docraptor 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  =begin
2
- #DocRaptor v1
2
+ #DocRaptor
3
3
 
4
4
  #A native client library for the DocRaptor HTML to PDF/XLS service.
5
5
 
6
- OpenAPI spec version: 1.3.0
6
+ OpenAPI spec version: 1.4.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.2.3
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
- #DocRaptor v1
2
+ #DocRaptor
3
3
 
4
4
  #A native client library for the DocRaptor HTML to PDF/XLS service.
5
5
 
6
- OpenAPI spec version: 1.3.0
6
+ OpenAPI spec version: 1.4.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.2.3
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -170,7 +170,7 @@ module DocRaptor
170
170
  def base_path=(base_path)
171
171
  # Add leading and trailing slashes to base_path
172
172
  @base_path = "/#{base_path}".gsub(/\/+/, '/')
173
- @base_path = "" if @base_path == "/"
173
+ @base_path = '' if @base_path == '/'
174
174
  end
175
175
 
176
176
  def base_url
@@ -1,24 +1,22 @@
1
1
  =begin
2
- #DocRaptor v1
2
+ #DocRaptor
3
3
 
4
4
  #A native client library for the DocRaptor HTML to PDF/XLS service.
5
5
 
6
- OpenAPI spec version: 1.3.0
6
+ OpenAPI spec version: 1.4.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.2.3
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module DocRaptor
16
-
17
16
  class AsyncDoc
18
- # The identifier used to get the status of the document using the status api.
17
+ # The identifier used to get the status of the document using the status API.
19
18
  attr_accessor :status_id
20
19
 
21
-
22
20
  # Attribute mapping from ruby-style variable name to JSON key.
23
21
  def self.attribute_map
24
22
  {
@@ -39,25 +37,24 @@ module DocRaptor
39
37
  return unless attributes.is_a?(Hash)
40
38
 
41
39
  # convert string to symbol for hash key
42
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
40
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
43
41
 
44
42
  if attributes.has_key?(:'status_id')
45
43
  self.status_id = attributes[:'status_id']
46
44
  end
47
-
48
45
  end
49
46
 
50
47
  # Show invalid properties with the reasons. Usually used together with valid?
51
- # @return Array for valid properies with the reasons
48
+ # @return Array for valid properties with the reasons
52
49
  def list_invalid_properties
53
50
  invalid_properties = Array.new
54
- return invalid_properties
51
+ invalid_properties
55
52
  end
56
53
 
57
54
  # Check to see if the all the properties in the model are valid
58
55
  # @return true if the model is valid
59
56
  def valid?
60
- return true
57
+ true
61
58
  end
62
59
 
63
60
  # Checks equality by comparing each attribute.
@@ -87,10 +84,10 @@ module DocRaptor
87
84
  return nil unless attributes.is_a?(Hash)
88
85
  self.class.swagger_types.each_pair do |key, type|
89
86
  if type =~ /\AArray<(.*)>/i
90
- # check to ensure the input is an array given that the the attribute
87
+ # check to ensure the input is an array given that the attribute
91
88
  # is documented as an array but the input is not
92
89
  if attributes[self.class.attribute_map[key]].is_a?(Array)
93
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
90
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
94
91
  end
95
92
  elsif !attributes[self.class.attribute_map[key]].nil?
96
93
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -172,7 +169,7 @@ module DocRaptor
172
169
  # @return [Hash] Returns the value in the form of hash
173
170
  def _to_hash(value)
174
171
  if value.is_a?(Array)
175
- value.compact.map{ |v| _to_hash(v) }
172
+ value.compact.map { |v| _to_hash(v) }
176
173
  elsif value.is_a?(Hash)
177
174
  {}.tap do |hash|
178
175
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -185,5 +182,4 @@ module DocRaptor
185
182
  end
186
183
 
187
184
  end
188
-
189
185
  end
@@ -1,23 +1,19 @@
1
1
  =begin
2
- #DocRaptor v1
2
+ #DocRaptor
3
3
 
4
4
  #A native client library for the DocRaptor HTML to PDF/XLS service.
5
5
 
6
- OpenAPI spec version: 1.3.0
6
+ OpenAPI spec version: 1.4.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.2.3
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module DocRaptor
16
-
17
16
  class Doc
18
- # Specify a specific verison of the DocRaptor Pipeline to use.
19
- attr_accessor :pipeline
20
-
21
17
  # A name for identifying your document.
22
18
  attr_accessor :name
23
19
 
@@ -33,6 +29,9 @@ module DocRaptor
33
29
  # Enable test mode for this document. Test documents are not charged for but include a watermark.
34
30
  attr_accessor :test
35
31
 
32
+ # Specify a specific verison of the DocRaptor Pipeline to use.
33
+ attr_accessor :pipeline
34
+
36
35
  # Force strict HTML validation.
37
36
  attr_accessor :strict
38
37
 
@@ -54,9 +53,15 @@ module DocRaptor
54
53
  # Set HTTP referrer when generating this document.
55
54
  attr_accessor :referrer
56
55
 
57
- # A URL that will receive a POST request after successfully completing an asynchronous document. The POST data will include download_url and download_id similar to status api responses. WARNING: this only works on asynchronous documents.
56
+ # A URL that will receive a POST request after successfully completing an asynchronous document. The POST data will include download_url and download_id similar to status API responses. WARNING: this only works on asynchronous documents.
58
57
  attr_accessor :callback_url
59
58
 
59
+ # The number of times a hosted document can be downloaded. If no limit is specified, the document will be available for an unlimited number of downloads.
60
+ attr_accessor :hosted_download_limit
61
+
62
+ # The date and time at which a hosted document will be removed and no longer available. Must be a properly formatted ISO 8601 datetime, like 1981-01-23T08:02:30-05:00.
63
+ attr_accessor :hosted_expires_at
64
+
60
65
  attr_accessor :prince_options
61
66
 
62
67
  class EnumAttributeValidator
@@ -84,12 +89,12 @@ module DocRaptor
84
89
  # Attribute mapping from ruby-style variable name to JSON key.
85
90
  def self.attribute_map
86
91
  {
87
- :'pipeline' => :'pipeline',
88
92
  :'name' => :'name',
89
93
  :'document_type' => :'document_type',
90
94
  :'document_content' => :'document_content',
91
95
  :'document_url' => :'document_url',
92
96
  :'test' => :'test',
97
+ :'pipeline' => :'pipeline',
93
98
  :'strict' => :'strict',
94
99
  :'ignore_resource_errors' => :'ignore_resource_errors',
95
100
  :'ignore_console_messages' => :'ignore_console_messages',
@@ -98,6 +103,8 @@ module DocRaptor
98
103
  :'javascript' => :'javascript',
99
104
  :'referrer' => :'referrer',
100
105
  :'callback_url' => :'callback_url',
106
+ :'hosted_download_limit' => :'hosted_download_limit',
107
+ :'hosted_expires_at' => :'hosted_expires_at',
101
108
  :'prince_options' => :'prince_options'
102
109
  }
103
110
  end
@@ -105,12 +112,12 @@ module DocRaptor
105
112
  # Attribute type mapping.
106
113
  def self.swagger_types
107
114
  {
108
- :'pipeline' => :'String',
109
115
  :'name' => :'String',
110
116
  :'document_type' => :'String',
111
117
  :'document_content' => :'String',
112
118
  :'document_url' => :'String',
113
119
  :'test' => :'BOOLEAN',
120
+ :'pipeline' => :'String',
114
121
  :'strict' => :'String',
115
122
  :'ignore_resource_errors' => :'BOOLEAN',
116
123
  :'ignore_console_messages' => :'BOOLEAN',
@@ -119,6 +126,8 @@ module DocRaptor
119
126
  :'javascript' => :'BOOLEAN',
120
127
  :'referrer' => :'String',
121
128
  :'callback_url' => :'String',
129
+ :'hosted_download_limit' => :'Integer',
130
+ :'hosted_expires_at' => :'String',
122
131
  :'prince_options' => :'PrinceOptions'
123
132
  }
124
133
  end
@@ -129,11 +138,7 @@ module DocRaptor
129
138
  return unless attributes.is_a?(Hash)
130
139
 
131
140
  # convert string to symbol for hash key
132
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
133
-
134
- if attributes.has_key?(:'pipeline')
135
- self.pipeline = attributes[:'pipeline']
136
- end
141
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
137
142
 
138
143
  if attributes.has_key?(:'name')
139
144
  self.name = attributes[:'name']
@@ -157,10 +162,12 @@ module DocRaptor
157
162
  self.test = true
158
163
  end
159
164
 
165
+ if attributes.has_key?(:'pipeline')
166
+ self.pipeline = attributes[:'pipeline']
167
+ end
168
+
160
169
  if attributes.has_key?(:'strict')
161
170
  self.strict = attributes[:'strict']
162
- else
163
- self.strict = "none"
164
171
  end
165
172
 
166
173
  if attributes.has_key?(:'ignore_resource_errors')
@@ -199,29 +206,36 @@ module DocRaptor
199
206
  self.callback_url = attributes[:'callback_url']
200
207
  end
201
208
 
209
+ if attributes.has_key?(:'hosted_download_limit')
210
+ self.hosted_download_limit = attributes[:'hosted_download_limit']
211
+ end
212
+
213
+ if attributes.has_key?(:'hosted_expires_at')
214
+ self.hosted_expires_at = attributes[:'hosted_expires_at']
215
+ end
216
+
202
217
  if attributes.has_key?(:'prince_options')
203
218
  self.prince_options = attributes[:'prince_options']
204
219
  end
205
-
206
220
  end
207
221
 
208
222
  # Show invalid properties with the reasons. Usually used together with valid?
209
- # @return Array for valid properies with the reasons
223
+ # @return Array for valid properties with the reasons
210
224
  def list_invalid_properties
211
225
  invalid_properties = Array.new
212
226
  if @name.nil?
213
- invalid_properties.push("invalid value for 'name', name cannot be nil.")
227
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
214
228
  end
215
229
 
216
230
  if @document_type.nil?
217
- invalid_properties.push("invalid value for 'document_type', document_type cannot be nil.")
231
+ invalid_properties.push('invalid value for "document_type", document_type cannot be nil.')
218
232
  end
219
233
 
220
234
  if @document_content.nil?
221
- invalid_properties.push("invalid value for 'document_content', document_content cannot be nil.")
235
+ invalid_properties.push('invalid value for "document_content", document_content cannot be nil.')
222
236
  end
223
237
 
224
- return invalid_properties
238
+ invalid_properties
225
239
  end
226
240
 
227
241
  # Check to see if the all the properties in the model are valid
@@ -229,20 +243,20 @@ module DocRaptor
229
243
  def valid?
230
244
  return false if @name.nil?
231
245
  return false if @document_type.nil?
232
- document_type_validator = EnumAttributeValidator.new('String', ["pdf", "xls", "xlsx"])
246
+ document_type_validator = EnumAttributeValidator.new('String', ['pdf', 'xls', 'xlsx'])
233
247
  return false unless document_type_validator.valid?(@document_type)
234
248
  return false if @document_content.nil?
235
- strict_validator = EnumAttributeValidator.new('String', ["none"])
249
+ strict_validator = EnumAttributeValidator.new('String', ['none', 'html'])
236
250
  return false unless strict_validator.valid?(@strict)
237
- return true
251
+ true
238
252
  end
239
253
 
240
254
  # Custom attribute writer method checking allowed values (enum).
241
255
  # @param [Object] document_type Object to be assigned
242
256
  def document_type=(document_type)
243
- validator = EnumAttributeValidator.new('String', ["pdf", "xls", "xlsx"])
257
+ validator = EnumAttributeValidator.new('String', ['pdf', 'xls', 'xlsx'])
244
258
  unless validator.valid?(document_type)
245
- fail ArgumentError, "invalid value for 'document_type', must be one of #{validator.allowable_values}."
259
+ fail ArgumentError, 'invalid value for "document_type", must be one of #{validator.allowable_values}.'
246
260
  end
247
261
  @document_type = document_type
248
262
  end
@@ -250,9 +264,9 @@ module DocRaptor
250
264
  # Custom attribute writer method checking allowed values (enum).
251
265
  # @param [Object] strict Object to be assigned
252
266
  def strict=(strict)
253
- validator = EnumAttributeValidator.new('String', ["none"])
267
+ validator = EnumAttributeValidator.new('String', ['none', 'html'])
254
268
  unless validator.valid?(strict)
255
- fail ArgumentError, "invalid value for 'strict', must be one of #{validator.allowable_values}."
269
+ fail ArgumentError, 'invalid value for "strict", must be one of #{validator.allowable_values}.'
256
270
  end
257
271
  @strict = strict
258
272
  end
@@ -262,12 +276,12 @@ module DocRaptor
262
276
  def ==(o)
263
277
  return true if self.equal?(o)
264
278
  self.class == o.class &&
265
- pipeline == o.pipeline &&
266
279
  name == o.name &&
267
280
  document_type == o.document_type &&
268
281
  document_content == o.document_content &&
269
282
  document_url == o.document_url &&
270
283
  test == o.test &&
284
+ pipeline == o.pipeline &&
271
285
  strict == o.strict &&
272
286
  ignore_resource_errors == o.ignore_resource_errors &&
273
287
  ignore_console_messages == o.ignore_console_messages &&
@@ -276,6 +290,8 @@ module DocRaptor
276
290
  javascript == o.javascript &&
277
291
  referrer == o.referrer &&
278
292
  callback_url == o.callback_url &&
293
+ hosted_download_limit == o.hosted_download_limit &&
294
+ hosted_expires_at == o.hosted_expires_at &&
279
295
  prince_options == o.prince_options
280
296
  end
281
297
 
@@ -288,7 +304,7 @@ module DocRaptor
288
304
  # Calculates hash code according to all attributes.
289
305
  # @return [Fixnum] Hash code
290
306
  def hash
291
- [pipeline, name, document_type, document_content, document_url, test, strict, ignore_resource_errors, ignore_console_messages, tag, help, javascript, referrer, callback_url, prince_options].hash
307
+ [name, document_type, document_content, document_url, test, pipeline, strict, ignore_resource_errors, ignore_console_messages, tag, help, javascript, referrer, callback_url, hosted_download_limit, hosted_expires_at, prince_options].hash
292
308
  end
293
309
 
294
310
  # Builds the object from hash
@@ -298,10 +314,10 @@ module DocRaptor
298
314
  return nil unless attributes.is_a?(Hash)
299
315
  self.class.swagger_types.each_pair do |key, type|
300
316
  if type =~ /\AArray<(.*)>/i
301
- # check to ensure the input is an array given that the the attribute
317
+ # check to ensure the input is an array given that the attribute
302
318
  # is documented as an array but the input is not
303
319
  if attributes[self.class.attribute_map[key]].is_a?(Array)
304
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
320
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
305
321
  end
306
322
  elsif !attributes[self.class.attribute_map[key]].nil?
307
323
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -383,7 +399,7 @@ module DocRaptor
383
399
  # @return [Hash] Returns the value in the form of hash
384
400
  def _to_hash(value)
385
401
  if value.is_a?(Array)
386
- value.compact.map{ |v| _to_hash(v) }
402
+ value.compact.map { |v| _to_hash(v) }
387
403
  elsif value.is_a?(Hash)
388
404
  {}.tap do |hash|
389
405
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -396,5 +412,4 @@ module DocRaptor
396
412
  end
397
413
 
398
414
  end
399
-
400
415
  end
@@ -1,27 +1,26 @@
1
1
  =begin
2
- #DocRaptor v1
2
+ #DocRaptor
3
3
 
4
4
  #A native client library for the DocRaptor HTML to PDF/XLS service.
5
5
 
6
- OpenAPI spec version: 1.3.0
6
+ OpenAPI spec version: 1.4.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.2.3
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module DocRaptor
16
-
17
- class AsyncDocStatus
16
+ class DocStatus
18
17
  # The present status of the document. Can be queued, working, completed, and failed.
19
18
  attr_accessor :status
20
19
 
21
20
  # The URL where the document can be retrieved. This URL may only be used a few times.
22
21
  attr_accessor :download_url
23
22
 
24
- # The identifier for downloading the document with the download api.
23
+ # The identifier for downloading the document with the download API.
25
24
  attr_accessor :download_id
26
25
 
27
26
  # Additional information.
@@ -33,7 +32,6 @@ module DocRaptor
33
32
  # Error information.
34
33
  attr_accessor :validation_errors
35
34
 
36
-
37
35
  # Attribute mapping from ruby-style variable name to JSON key.
38
36
  def self.attribute_map
39
37
  {
@@ -64,7 +62,7 @@ module DocRaptor
64
62
  return unless attributes.is_a?(Hash)
65
63
 
66
64
  # convert string to symbol for hash key
67
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
65
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
66
 
69
67
  if attributes.has_key?(:'status')
70
68
  self.status = attributes[:'status']
@@ -89,20 +87,19 @@ module DocRaptor
89
87
  if attributes.has_key?(:'validation_errors')
90
88
  self.validation_errors = attributes[:'validation_errors']
91
89
  end
92
-
93
90
  end
94
91
 
95
92
  # Show invalid properties with the reasons. Usually used together with valid?
96
- # @return Array for valid properies with the reasons
93
+ # @return Array for valid properties with the reasons
97
94
  def list_invalid_properties
98
95
  invalid_properties = Array.new
99
- return invalid_properties
96
+ invalid_properties
100
97
  end
101
98
 
102
99
  # Check to see if the all the properties in the model are valid
103
100
  # @return true if the model is valid
104
101
  def valid?
105
- return true
102
+ true
106
103
  end
107
104
 
108
105
  # Checks equality by comparing each attribute.
@@ -137,10 +134,10 @@ module DocRaptor
137
134
  return nil unless attributes.is_a?(Hash)
138
135
  self.class.swagger_types.each_pair do |key, type|
139
136
  if type =~ /\AArray<(.*)>/i
140
- # check to ensure the input is an array given that the the attribute
137
+ # check to ensure the input is an array given that the attribute
141
138
  # is documented as an array but the input is not
142
139
  if attributes[self.class.attribute_map[key]].is_a?(Array)
143
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
140
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
141
  end
145
142
  elsif !attributes[self.class.attribute_map[key]].nil?
146
143
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -222,7 +219,7 @@ module DocRaptor
222
219
  # @return [Hash] Returns the value in the form of hash
223
220
  def _to_hash(value)
224
221
  if value.is_a?(Array)
225
- value.compact.map{ |v| _to_hash(v) }
222
+ value.compact.map { |v| _to_hash(v) }
226
223
  elsif value.is_a?(Hash)
227
224
  {}.tap do |hash|
228
225
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -235,5 +232,4 @@ module DocRaptor
235
232
  end
236
233
 
237
234
  end
238
-
239
235
  end