docspring 3.4.0 → 3.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 (144) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +3 -0
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +11 -0
  5. data/Gemfile.lock +2 -2
  6. data/README.md +1 -1
  7. data/docs/BatchGeneratePdfs201Response.md +3 -1
  8. data/docs/Client.md +6 -6
  9. data/docs/CombinePdfsData.md +1 -1
  10. data/docs/CreateCombinedSubmissionResponse.md +5 -1
  11. data/docs/CreateCustomFileResponse.md +2 -0
  12. data/docs/CreatePdfSubmissionData.md +1 -1
  13. data/docs/CreateSubmissionDataRequestEventResponse.md +2 -0
  14. data/docs/CreateSubmissionDataRequestResponse.md +2 -0
  15. data/docs/CreateSubmissionDataRequestTokenResponse.md +2 -0
  16. data/docs/CreateSubmissionResponse.md +5 -1
  17. data/docs/ForbiddenErrorResponse.md +22 -0
  18. data/docs/SubmissionBatchData.md +1 -1
  19. data/docspring.gemspec +1 -1
  20. data/lib/docspring/api/client.rb +13 -13
  21. data/lib/docspring/api_client.rb +2 -2
  22. data/lib/docspring/api_error.rb +1 -1
  23. data/lib/docspring/configuration.rb +1 -1
  24. data/lib/docspring/models/add_fields_data.rb +1 -1
  25. data/lib/docspring/models/batch_generate_pdfs201_response.rb +15 -5
  26. data/lib/docspring/models/combine_pdfs_data.rb +2 -2
  27. data/lib/docspring/models/combined_submission.rb +3 -3
  28. data/lib/docspring/models/combined_submission_action.rb +1 -1
  29. data/lib/docspring/models/copy_template_options.rb +1 -1
  30. data/lib/docspring/models/create_combined_submission_response.rb +24 -5
  31. data/lib/docspring/models/create_custom_file_data.rb +1 -1
  32. data/lib/docspring/models/create_custom_file_response.rb +11 -2
  33. data/lib/docspring/models/create_folder_data.rb +1 -1
  34. data/lib/docspring/models/create_html_template.rb +1 -1
  35. data/lib/docspring/models/create_pdf_submission_data.rb +2 -1
  36. data/lib/docspring/models/create_pdf_template.rb +1 -1
  37. data/lib/docspring/models/create_submission_data_request_data.rb +1 -1
  38. data/lib/docspring/models/create_submission_data_request_event_request.rb +1 -1
  39. data/lib/docspring/models/create_submission_data_request_event_response.rb +11 -2
  40. data/lib/docspring/models/create_submission_data_request_response.rb +11 -2
  41. data/lib/docspring/models/create_submission_data_request_token_response.rb +11 -2
  42. data/lib/docspring/models/create_submission_response.rb +24 -5
  43. data/lib/docspring/models/create_webhook_data.rb +1 -1
  44. data/lib/docspring/models/custom_file.rb +1 -1
  45. data/lib/docspring/models/error_or_multiple_errors_response.rb +1 -1
  46. data/lib/docspring/models/error_response.rb +1 -1
  47. data/lib/docspring/models/folder.rb +1 -1
  48. data/lib/docspring/models/forbidden_error_response.rb +323 -0
  49. data/lib/docspring/models/json_schema.rb +1 -1
  50. data/lib/docspring/models/list_submissions_response.rb +1 -1
  51. data/lib/docspring/models/move_folder_data.rb +1 -1
  52. data/lib/docspring/models/move_template_data.rb +1 -1
  53. data/lib/docspring/models/multiple_errors_response.rb +1 -1
  54. data/lib/docspring/models/publish_version_data.rb +1 -1
  55. data/lib/docspring/models/rename_folder_data.rb +1 -1
  56. data/lib/docspring/models/restore_version_data.rb +1 -1
  57. data/lib/docspring/models/submission.rb +3 -3
  58. data/lib/docspring/models/submission422_response.rb +1 -1
  59. data/lib/docspring/models/submission_action.rb +1 -1
  60. data/lib/docspring/models/submission_batch.rb +1 -1
  61. data/lib/docspring/models/submission_batch_data.rb +2 -1
  62. data/lib/docspring/models/submission_batch_with_submissions.rb +1 -1
  63. data/lib/docspring/models/submission_data_request.rb +1 -1
  64. data/lib/docspring/models/submission_data_request_event.rb +1 -1
  65. data/lib/docspring/models/submission_data_request_show.rb +1 -1
  66. data/lib/docspring/models/submission_data_request_token.rb +1 -1
  67. data/lib/docspring/models/submission_preview.rb +3 -3
  68. data/lib/docspring/models/success_error_response.rb +1 -1
  69. data/lib/docspring/models/success_multiple_errors_response.rb +1 -1
  70. data/lib/docspring/models/template.rb +1 -1
  71. data/lib/docspring/models/template_add_fields_response.rb +1 -1
  72. data/lib/docspring/models/template_delete_response.rb +1 -1
  73. data/lib/docspring/models/template_model_code_response.rb +1 -1
  74. data/lib/docspring/models/template_preview.rb +1 -1
  75. data/lib/docspring/models/template_publish_version_response.rb +1 -1
  76. data/lib/docspring/models/update_html_template.rb +1 -1
  77. data/lib/docspring/models/update_pdf_template.rb +1 -1
  78. data/lib/docspring/models/update_submission_data_request_data.rb +1 -1
  79. data/lib/docspring/models/update_webhook_data.rb +1 -1
  80. data/lib/docspring/models/upload_presign_response.rb +1 -1
  81. data/lib/docspring/models/webhook.rb +1 -1
  82. data/lib/docspring/version.rb +2 -2
  83. data/lib/docspring.rb +2 -1
  84. data/spec/api/client_spec.rb +7 -7
  85. data/spec/models/add_fields_data_spec.rb +1 -1
  86. data/spec/models/batch_generate_pdfs201_response_spec.rb +7 -1
  87. data/spec/models/combine_pdfs_data_spec.rb +1 -1
  88. data/spec/models/combined_submission_action_spec.rb +1 -1
  89. data/spec/models/combined_submission_spec.rb +2 -2
  90. data/spec/models/copy_template_options_spec.rb +1 -1
  91. data/spec/models/create_combined_submission_response_spec.rb +13 -1
  92. data/spec/models/create_custom_file_data_spec.rb +1 -1
  93. data/spec/models/create_custom_file_response_spec.rb +7 -1
  94. data/spec/models/create_folder_data_spec.rb +1 -1
  95. data/spec/models/create_html_template_spec.rb +1 -1
  96. data/spec/models/create_pdf_submission_data_spec.rb +1 -1
  97. data/spec/models/create_pdf_template_spec.rb +1 -1
  98. data/spec/models/create_submission_data_request_data_spec.rb +1 -1
  99. data/spec/models/create_submission_data_request_event_request_spec.rb +1 -1
  100. data/spec/models/create_submission_data_request_event_response_spec.rb +7 -1
  101. data/spec/models/create_submission_data_request_response_spec.rb +7 -1
  102. data/spec/models/create_submission_data_request_token_response_spec.rb +7 -1
  103. data/spec/models/create_submission_response_spec.rb +13 -1
  104. data/spec/models/create_webhook_data_spec.rb +1 -1
  105. data/spec/models/custom_file_spec.rb +1 -1
  106. data/spec/models/error_or_multiple_errors_response_spec.rb +1 -1
  107. data/spec/models/error_response_spec.rb +1 -1
  108. data/spec/models/folder_spec.rb +1 -1
  109. data/spec/models/forbidden_error_response_spec.rb +56 -0
  110. data/spec/models/json_schema_spec.rb +1 -1
  111. data/spec/models/list_submissions_response_spec.rb +1 -1
  112. data/spec/models/move_folder_data_spec.rb +1 -1
  113. data/spec/models/move_template_data_spec.rb +1 -1
  114. data/spec/models/multiple_errors_response_spec.rb +1 -1
  115. data/spec/models/publish_version_data_spec.rb +1 -1
  116. data/spec/models/rename_folder_data_spec.rb +1 -1
  117. data/spec/models/restore_version_data_spec.rb +1 -1
  118. data/spec/models/submission422_response_spec.rb +1 -1
  119. data/spec/models/submission_action_spec.rb +1 -1
  120. data/spec/models/submission_batch_data_spec.rb +1 -1
  121. data/spec/models/submission_batch_spec.rb +1 -1
  122. data/spec/models/submission_batch_with_submissions_spec.rb +1 -1
  123. data/spec/models/submission_data_request_event_spec.rb +1 -1
  124. data/spec/models/submission_data_request_show_spec.rb +1 -1
  125. data/spec/models/submission_data_request_spec.rb +1 -1
  126. data/spec/models/submission_data_request_token_spec.rb +1 -1
  127. data/spec/models/submission_preview_spec.rb +2 -2
  128. data/spec/models/submission_spec.rb +2 -2
  129. data/spec/models/success_error_response_spec.rb +1 -1
  130. data/spec/models/success_multiple_errors_response_spec.rb +1 -1
  131. data/spec/models/template_add_fields_response_spec.rb +1 -1
  132. data/spec/models/template_delete_response_spec.rb +1 -1
  133. data/spec/models/template_model_code_response_spec.rb +1 -1
  134. data/spec/models/template_preview_spec.rb +1 -1
  135. data/spec/models/template_publish_version_response_spec.rb +1 -1
  136. data/spec/models/template_spec.rb +1 -1
  137. data/spec/models/update_html_template_spec.rb +1 -1
  138. data/spec/models/update_pdf_template_spec.rb +1 -1
  139. data/spec/models/update_submission_data_request_data_spec.rb +1 -1
  140. data/spec/models/update_webhook_data_spec.rb +1 -1
  141. data/spec/models/upload_presign_response_spec.rb +1 -1
  142. data/spec/models/webhook_spec.rb +1 -1
  143. data/spec/spec_helper.rb +1 -1
  144. metadata +5 -1
@@ -0,0 +1,323 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.16.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ class ForbiddenErrorResponse
18
+ attr_accessor :status
19
+
20
+ attr_accessor :error
21
+
22
+ attr_accessor :code
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'status' => :'status',
50
+ :'error' => :'error',
51
+ :'code' => :'code'
52
+ }
53
+ end
54
+
55
+ # Returns attribute mapping this model knows about
56
+ def self.acceptable_attribute_map
57
+ attribute_map
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ acceptable_attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'status' => :'String',
69
+ :'error' => :'String',
70
+ :'code' => :'String'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ if (!attributes.is_a?(Hash))
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::ForbiddenErrorResponse` initialize method"
85
+ end
86
+
87
+ # check to see if the attribute exists and convert string to symbol for hash key
88
+ acceptable_attribute_map = self.class.acceptable_attribute_map
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!acceptable_attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::ForbiddenErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'status')
97
+ self.status = attributes[:'status']
98
+ else
99
+ self.status = nil
100
+ end
101
+
102
+ if attributes.key?(:'error')
103
+ self.error = attributes[:'error']
104
+ else
105
+ self.error = nil
106
+ end
107
+
108
+ if attributes.key?(:'code')
109
+ self.code = attributes[:'code']
110
+ else
111
+ self.code = nil
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
119
+ invalid_properties = Array.new
120
+ if @status.nil?
121
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
122
+ end
123
+
124
+ if @error.nil?
125
+ invalid_properties.push('invalid value for "error", error cannot be nil.')
126
+ end
127
+
128
+ if @code.nil?
129
+ invalid_properties.push('invalid value for "code", code cannot be nil.')
130
+ end
131
+
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ warn '[DEPRECATED] the `valid?` method is obsolete'
139
+ return false if @status.nil?
140
+ status_validator = EnumAttributeValidator.new('String', ["error"])
141
+ return false unless status_validator.valid?(@status)
142
+ return false if @error.nil?
143
+ return false if @code.nil?
144
+ code_validator = EnumAttributeValidator.new('String', ["upgrade_required", "account_suspended"])
145
+ return false unless code_validator.valid?(@code)
146
+ true
147
+ end
148
+
149
+ # Custom attribute writer method checking allowed values (enum).
150
+ # @param [Object] status Object to be assigned
151
+ def status=(status)
152
+ validator = EnumAttributeValidator.new('String', ["error"])
153
+ # build_from_hash accepts enum values this client doesn't know about yet
154
+ unless defined?(@_skip_enum_validation) || validator.valid?(status)
155
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
156
+ end
157
+ @status = status
158
+ end
159
+
160
+ # Custom attribute writer method with validation
161
+ # @param [Object] error Value to be assigned
162
+ def error=(error)
163
+ if error.nil?
164
+ fail ArgumentError, 'error cannot be nil'
165
+ end
166
+
167
+ @error = error
168
+ end
169
+
170
+ # Custom attribute writer method checking allowed values (enum).
171
+ # @param [Object] code Object to be assigned
172
+ def code=(code)
173
+ validator = EnumAttributeValidator.new('String', ["upgrade_required", "account_suspended"])
174
+ # build_from_hash accepts enum values this client doesn't know about yet
175
+ unless defined?(@_skip_enum_validation) || validator.valid?(code)
176
+ fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
177
+ end
178
+ @code = code
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
+ status == o.status &&
187
+ error == o.error &&
188
+ code == o.code
189
+ end
190
+
191
+ # @see the `==` method
192
+ # @param [Object] Object to be compared
193
+ def eql?(o)
194
+ self == o
195
+ end
196
+
197
+ # Calculates hash code according to all attributes.
198
+ # @return [Integer] Hash code
199
+ def hash
200
+ [status, error, code].hash
201
+ end
202
+
203
+ # Builds the object from hash
204
+ # @param [Hash] attributes Model attributes in the form of hash
205
+ # @return [Object] Returns the model itself
206
+ def self.build_from_hash(attributes)
207
+ return nil unless attributes.is_a?(Hash)
208
+ attributes = attributes.transform_keys(&:to_sym)
209
+ transformed_hash = {}
210
+ openapi_types.each_pair do |key, type|
211
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
212
+ transformed_hash["#{key}"] = nil
213
+ elsif type =~ /\AArray<(.*)>/i
214
+ # check to ensure the input is an array given that the attribute
215
+ # is documented as an array but the input is not
216
+ if attributes[attribute_map[key]].is_a?(Array)
217
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
218
+ end
219
+ elsif !attributes[attribute_map[key]].nil?
220
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
221
+ end
222
+ end
223
+ # Responses can include enum values added after this client was released, so the enum setters
224
+ # accept any value while the model is built from a response
225
+ allocate.tap do |model|
226
+ model.instance_variable_set(:@_skip_enum_validation, true)
227
+ model.send(:initialize, transformed_hash)
228
+ model.remove_instance_variable(:@_skip_enum_validation)
229
+ end
230
+ end
231
+
232
+ # Deserializes the data based on type
233
+ # @param string type Data type
234
+ # @param string value Value to be deserialized
235
+ # @return [Object] Deserialized data
236
+ def self._deserialize(type, value)
237
+ case type.to_sym
238
+ when :Time
239
+ Time.parse(value)
240
+ when :Date
241
+ Date.parse(value)
242
+ when :String
243
+ value.to_s
244
+ when :Integer
245
+ value.to_i
246
+ when :Float
247
+ value.to_f
248
+ when :Boolean
249
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
250
+ true
251
+ else
252
+ false
253
+ end
254
+ when :Object
255
+ # generic object (usually a Hash), return directly
256
+ value
257
+ when /\AArray<(?<inner_type>.+)>\z/
258
+ inner_type = Regexp.last_match[:inner_type]
259
+ value.map { |v| _deserialize(inner_type, v) }
260
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
261
+ k_type = Regexp.last_match[:k_type]
262
+ v_type = Regexp.last_match[:v_type]
263
+ {}.tap do |hash|
264
+ value.each do |k, v|
265
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
266
+ end
267
+ end
268
+ else # model
269
+ # models (e.g. Pet) or oneOf
270
+ klass = DocSpring.const_get(type)
271
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
272
+ end
273
+ end
274
+
275
+ # Returns the string representation of the object
276
+ # @return [String] String presentation of the object
277
+ def to_s
278
+ to_hash.to_s
279
+ end
280
+
281
+ # to_body is an alias to to_hash (backward compatibility)
282
+ # @return [Hash] Returns the object in the form of hash
283
+ def to_body
284
+ to_hash
285
+ end
286
+
287
+ # Returns the object in the form of hash
288
+ # @return [Hash] Returns the object in the form of hash
289
+ def to_hash
290
+ hash = {}
291
+ self.class.attribute_map.each_pair do |attr, param|
292
+ value = self.send(attr)
293
+ if value.nil?
294
+ is_nullable = self.class.openapi_nullable.include?(attr)
295
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
296
+ end
297
+
298
+ hash[param] = _to_hash(value)
299
+ end
300
+ hash
301
+ end
302
+
303
+ # Outputs non-array value in the form of hash
304
+ # For object, use to_hash. Otherwise, just return the value
305
+ # @param [Object] value Any valid value
306
+ # @return [Hash] Returns the value in the form of hash
307
+ def _to_hash(value)
308
+ if value.is_a?(Array)
309
+ value.compact.map { |v| _to_hash(v) }
310
+ elsif value.is_a?(Hash)
311
+ {}.tap do |hash|
312
+ value.each { |k, v| hash[k] = _to_hash(v) }
313
+ end
314
+ elsif value.respond_to? :to_hash
315
+ value.to_hash
316
+ else
317
+ value
318
+ end
319
+ end
320
+
321
+ end
322
+
323
+ end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -415,7 +415,7 @@ module DocSpring
415
415
  return false if @expired.nil?
416
416
  return false if @metadata.nil?
417
417
  return false if @state.nil?
418
- state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "invalid_data", "error", "image_download_failed", "image_processing_failed", "waiting_for_data_requests", "syntax_error", "account_suspended", "license_revoked", "accidental", "declined"])
418
+ state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "invalid_data", "error", "image_download_failed", "image_processing_failed", "waiting_for_data_requests", "syntax_error", "insufficient_credits", "account_suspended", "license_revoked", "accidental", "declined"])
419
419
  return false unless state_validator.valid?(@state)
420
420
  return false if @template_type.nil?
421
421
  template_type_validator = EnumAttributeValidator.new('String', ["pdf", "html"])
@@ -460,7 +460,7 @@ module DocSpring
460
460
  # Custom attribute writer method checking allowed values (enum).
461
461
  # @param [Object] state Object to be assigned
462
462
  def state=(state)
463
- validator = EnumAttributeValidator.new('String', ["pending", "processed", "invalid_data", "error", "image_download_failed", "image_processing_failed", "waiting_for_data_requests", "syntax_error", "account_suspended", "license_revoked", "accidental", "declined"])
463
+ validator = EnumAttributeValidator.new('String', ["pending", "processed", "invalid_data", "error", "image_download_failed", "image_processing_failed", "waiting_for_data_requests", "syntax_error", "insufficient_credits", "account_suspended", "license_revoked", "accidental", "declined"])
464
464
  # build_from_hash accepts enum values this client doesn't know about yet
465
465
  unless defined?(@_skip_enum_validation) || validator.valid?(state)
466
466
  fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -23,6 +23,7 @@ module DocSpring
23
23
 
24
24
  attr_accessor :template_version
25
25
 
26
+ # Generate a watermarked test PDF. Test PDFs are free; live PDFs (the default) use credits.
26
27
  attr_accessor :test
27
28
 
28
29
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -389,7 +389,7 @@ module DocSpring
389
389
  return false if @expired.nil?
390
390
  return false if @metadata.nil?
391
391
  return false if @state.nil?
392
- state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "invalid_data", "error", "image_download_failed", "image_processing_failed", "waiting_for_data_requests", "syntax_error", "account_suspended", "license_revoked", "accidental", "declined"])
392
+ state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "invalid_data", "error", "image_download_failed", "image_processing_failed", "waiting_for_data_requests", "syntax_error", "insufficient_credits", "account_suspended", "license_revoked", "accidental", "declined"])
393
393
  return false unless state_validator.valid?(@state)
394
394
  return false if @template_type.nil?
395
395
  template_type_validator = EnumAttributeValidator.new('String', ["pdf", "html"])
@@ -432,7 +432,7 @@ module DocSpring
432
432
  # Custom attribute writer method checking allowed values (enum).
433
433
  # @param [Object] state Object to be assigned
434
434
  def state=(state)
435
- validator = EnumAttributeValidator.new('String', ["pending", "processed", "invalid_data", "error", "image_download_failed", "image_processing_failed", "waiting_for_data_requests", "syntax_error", "account_suspended", "license_revoked", "accidental", "declined"])
435
+ validator = EnumAttributeValidator.new('String', ["pending", "processed", "invalid_data", "error", "image_download_failed", "image_processing_failed", "waiting_for_data_requests", "syntax_error", "insufficient_credits", "account_suspended", "license_revoked", "accidental", "declined"])
436
436
  # build_from_hash accepts enum values this client doesn't know about yet
437
437
  unless defined?(@_skip_enum_validation) || validator.valid?(state)
438
438
  fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7