templatefox 1.7.0 → 1.8.1
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.
- checksums.yaml +4 -4
- data/README.md +6 -6
- data/lib/templatefox/api/account_api.rb +1 -1
- data/lib/templatefox/api/integrations_api.rb +1 -1
- data/lib/templatefox/api/pdf_api.rb +1 -1
- data/lib/templatefox/api/pdf_async_api.rb +9 -9
- data/lib/templatefox/api/templates_api.rb +426 -3
- data/lib/templatefox/api_client.rb +1 -1
- data/lib/templatefox/api_error.rb +1 -1
- data/lib/templatefox/api_model_base.rb +1 -1
- data/lib/templatefox/configuration.rb +3 -3
- data/lib/templatefox/models/account_info_response.rb +1 -1
- data/lib/templatefox/models/app_routers_v1_pdf_async_export_type.rb +1 -1
- data/lib/templatefox/models/app_routers_v1_pdf_export_type.rb +1 -1
- data/lib/templatefox/models/create_async_pdf_request.rb +33 -8
- data/lib/templatefox/models/create_async_pdf_response.rb +1 -1
- data/lib/templatefox/models/create_pdf_request.rb +33 -8
- data/lib/templatefox/models/create_pdf_response.rb +1 -1
- data/lib/templatefox/models/create_version_request.rb +200 -0
- data/lib/templatefox/models/http_validation_error.rb +1 -1
- data/lib/templatefox/models/job_list_response.rb +1 -1
- data/lib/templatefox/models/job_status.rb +1 -1
- data/lib/templatefox/models/job_status_response.rb +1 -1
- data/lib/templatefox/models/location_inner.rb +1 -1
- data/lib/templatefox/models/pdf_variant.rb +1 -1
- data/lib/templatefox/models/s3_config_request.rb +1 -1
- data/lib/templatefox/models/s3_config_response.rb +1 -1
- data/lib/templatefox/models/s3_success_response.rb +1 -1
- data/lib/templatefox/models/s3_test_response.rb +1 -1
- data/lib/templatefox/models/set_default_version_request.rb +166 -0
- data/lib/templatefox/models/template_field.rb +1 -1
- data/lib/templatefox/models/template_field_spec.rb +1 -1
- data/lib/templatefox/models/template_list_item.rb +1 -1
- data/lib/templatefox/models/templates_list_response.rb +1 -1
- data/lib/templatefox/models/transaction.rb +1 -1
- data/lib/templatefox/models/transactions_response.rb +1 -1
- data/lib/templatefox/models/update_version_request.rb +200 -0
- data/lib/templatefox/models/validation_error.rb +1 -1
- data/lib/templatefox/models/version_item.rb +225 -0
- data/lib/templatefox/models/versions_list_response.rb +167 -0
- data/lib/templatefox/version.rb +2 -2
- data/lib/templatefox.rb +6 -1
- data/spec/api/account_api_spec.rb +1 -1
- data/spec/api/integrations_api_spec.rb +1 -1
- data/spec/api/pdf_api_spec.rb +1 -1
- data/spec/api/pdf_async_api_spec.rb +5 -5
- data/spec/api/templates_api_spec.rb +79 -2
- data/spec/models/account_info_response_spec.rb +1 -1
- data/spec/models/app_routers_v1_pdf_async_export_type_spec.rb +1 -1
- data/spec/models/app_routers_v1_pdf_export_type_spec.rb +1 -1
- data/spec/models/create_async_pdf_request_spec.rb +7 -1
- data/spec/models/create_async_pdf_response_spec.rb +1 -1
- data/spec/models/create_pdf_request_spec.rb +7 -1
- data/spec/models/create_pdf_response_spec.rb +1 -1
- data/spec/models/create_version_request_spec.rb +42 -0
- data/spec/models/http_validation_error_spec.rb +1 -1
- data/spec/models/job_list_response_spec.rb +1 -1
- data/spec/models/job_status_response_spec.rb +1 -1
- data/spec/models/job_status_spec.rb +1 -1
- data/spec/models/location_inner_spec.rb +1 -1
- data/spec/models/pdf_variant_spec.rb +1 -1
- data/spec/models/s3_config_request_spec.rb +1 -1
- data/spec/models/s3_config_response_spec.rb +1 -1
- data/spec/models/s3_success_response_spec.rb +1 -1
- data/spec/models/s3_test_response_spec.rb +1 -1
- data/spec/models/set_default_version_request_spec.rb +36 -0
- data/spec/models/template_field_spec.rb +1 -1
- data/spec/models/template_field_spec_spec.rb +1 -1
- data/spec/models/template_list_item_spec.rb +1 -1
- data/spec/models/templates_list_response_spec.rb +1 -1
- data/spec/models/transaction_spec.rb +1 -1
- data/spec/models/transactions_response_spec.rb +1 -1
- data/spec/models/update_version_request_spec.rb +42 -0
- data/spec/models/validation_error_spec.rb +1 -1
- data/spec/models/version_item_spec.rb +60 -0
- data/spec/models/versions_list_response_spec.rb +36 -0
- data/spec/spec_helper.rb +1 -1
- data/templatefox.gemspec +5 -5
- metadata +38 -23
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -16,10 +16,10 @@ require 'time'
|
|
|
16
16
|
module TemplateFox
|
|
17
17
|
# Request model for async PDF generation
|
|
18
18
|
class CreateAsyncPdfRequest < ApiModelBase
|
|
19
|
-
#
|
|
19
|
+
# Template short ID (12 characters)
|
|
20
20
|
attr_accessor :template_id
|
|
21
21
|
|
|
22
|
-
#
|
|
22
|
+
# Key-value data to render in the template.
|
|
23
23
|
attr_accessor :data
|
|
24
24
|
|
|
25
25
|
# Export format. Currently only `url` is supported for async.
|
|
@@ -43,6 +43,8 @@ module TemplateFox
|
|
|
43
43
|
|
|
44
44
|
attr_accessor :pdf_variant
|
|
45
45
|
|
|
46
|
+
attr_accessor :version
|
|
47
|
+
|
|
46
48
|
class EnumAttributeValidator
|
|
47
49
|
attr_reader :datatype
|
|
48
50
|
attr_reader :allowable_values
|
|
@@ -78,7 +80,8 @@ module TemplateFox
|
|
|
78
80
|
:'s3_bucket' => :'s3_bucket',
|
|
79
81
|
:'webhook_url' => :'webhook_url',
|
|
80
82
|
:'webhook_secret' => :'webhook_secret',
|
|
81
|
-
:'pdf_variant' => :'pdf_variant'
|
|
83
|
+
:'pdf_variant' => :'pdf_variant',
|
|
84
|
+
:'version' => :'version'
|
|
82
85
|
}
|
|
83
86
|
end
|
|
84
87
|
|
|
@@ -105,7 +108,8 @@ module TemplateFox
|
|
|
105
108
|
:'s3_bucket' => :'String',
|
|
106
109
|
:'webhook_url' => :'String',
|
|
107
110
|
:'webhook_secret' => :'String',
|
|
108
|
-
:'pdf_variant' => :'PdfVariant'
|
|
111
|
+
:'pdf_variant' => :'PdfVariant',
|
|
112
|
+
:'version' => :'String'
|
|
109
113
|
}
|
|
110
114
|
end
|
|
111
115
|
|
|
@@ -117,7 +121,8 @@ module TemplateFox
|
|
|
117
121
|
:'s3_bucket',
|
|
118
122
|
:'webhook_url',
|
|
119
123
|
:'webhook_secret',
|
|
120
|
-
:'pdf_variant'
|
|
124
|
+
:'pdf_variant',
|
|
125
|
+
:'version'
|
|
121
126
|
])
|
|
122
127
|
end
|
|
123
128
|
|
|
@@ -190,6 +195,10 @@ module TemplateFox
|
|
|
190
195
|
if attributes.key?(:'pdf_variant')
|
|
191
196
|
self.pdf_variant = attributes[:'pdf_variant']
|
|
192
197
|
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'version')
|
|
200
|
+
self.version = attributes[:'version']
|
|
201
|
+
end
|
|
193
202
|
end
|
|
194
203
|
|
|
195
204
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -268,6 +277,10 @@ module TemplateFox
|
|
|
268
277
|
invalid_properties.push('invalid value for "webhook_secret", the character length must be greater than or equal to 16.')
|
|
269
278
|
end
|
|
270
279
|
|
|
280
|
+
if !@version.nil? && @version.to_s.length > 50
|
|
281
|
+
invalid_properties.push('invalid value for "version", the character length must be smaller than or equal to 50.')
|
|
282
|
+
end
|
|
283
|
+
|
|
271
284
|
invalid_properties
|
|
272
285
|
end
|
|
273
286
|
|
|
@@ -292,6 +305,7 @@ module TemplateFox
|
|
|
292
305
|
return false if !@webhook_url.nil? && @webhook_url.to_s.length < 1
|
|
293
306
|
return false if !@webhook_secret.nil? && @webhook_secret.to_s.length > 256
|
|
294
307
|
return false if !@webhook_secret.nil? && @webhook_secret.to_s.length < 16
|
|
308
|
+
return false if !@version.nil? && @version.to_s.length > 50
|
|
295
309
|
true
|
|
296
310
|
end
|
|
297
311
|
|
|
@@ -418,6 +432,16 @@ module TemplateFox
|
|
|
418
432
|
@webhook_secret = webhook_secret
|
|
419
433
|
end
|
|
420
434
|
|
|
435
|
+
# Custom attribute writer method with validation
|
|
436
|
+
# @param [Object] version Value to be assigned
|
|
437
|
+
def version=(version)
|
|
438
|
+
if !version.nil? && version.to_s.length > 50
|
|
439
|
+
fail ArgumentError, 'invalid value for "version", the character length must be smaller than or equal to 50.'
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
@version = version
|
|
443
|
+
end
|
|
444
|
+
|
|
421
445
|
# Checks equality by comparing each attribute.
|
|
422
446
|
# @param [Object] Object to be compared
|
|
423
447
|
def ==(o)
|
|
@@ -433,7 +457,8 @@ module TemplateFox
|
|
|
433
457
|
s3_bucket == o.s3_bucket &&
|
|
434
458
|
webhook_url == o.webhook_url &&
|
|
435
459
|
webhook_secret == o.webhook_secret &&
|
|
436
|
-
pdf_variant == o.pdf_variant
|
|
460
|
+
pdf_variant == o.pdf_variant &&
|
|
461
|
+
version == o.version
|
|
437
462
|
end
|
|
438
463
|
|
|
439
464
|
# @see the `==` method
|
|
@@ -445,7 +470,7 @@ module TemplateFox
|
|
|
445
470
|
# Calculates hash code according to all attributes.
|
|
446
471
|
# @return [Integer] Hash code
|
|
447
472
|
def hash
|
|
448
|
-
[template_id, data, export_type, expiration, filename, store_s3, s3_filepath, s3_bucket, webhook_url, webhook_secret, pdf_variant].hash
|
|
473
|
+
[template_id, data, export_type, expiration, filename, store_s3, s3_filepath, s3_bucket, webhook_url, webhook_secret, pdf_variant, version].hash
|
|
449
474
|
end
|
|
450
475
|
|
|
451
476
|
# Builds the object from hash
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -16,10 +16,10 @@ require 'time'
|
|
|
16
16
|
module TemplateFox
|
|
17
17
|
# Request model for PDF generation
|
|
18
18
|
class CreatePdfRequest < ApiModelBase
|
|
19
|
-
#
|
|
19
|
+
# Template short ID (12 characters)
|
|
20
20
|
attr_accessor :template_id
|
|
21
21
|
|
|
22
|
-
#
|
|
22
|
+
# Key-value data to render in the template. Keys must match template variables.
|
|
23
23
|
attr_accessor :data
|
|
24
24
|
|
|
25
25
|
# Export format: `url` uploads to CDN and returns URL, `binary` returns raw PDF bytes
|
|
@@ -39,6 +39,8 @@ module TemplateFox
|
|
|
39
39
|
|
|
40
40
|
attr_accessor :pdf_variant
|
|
41
41
|
|
|
42
|
+
attr_accessor :version
|
|
43
|
+
|
|
42
44
|
class EnumAttributeValidator
|
|
43
45
|
attr_reader :datatype
|
|
44
46
|
attr_reader :allowable_values
|
|
@@ -72,7 +74,8 @@ module TemplateFox
|
|
|
72
74
|
:'store_s3' => :'store_s3',
|
|
73
75
|
:'s3_filepath' => :'s3_filepath',
|
|
74
76
|
:'s3_bucket' => :'s3_bucket',
|
|
75
|
-
:'pdf_variant' => :'pdf_variant'
|
|
77
|
+
:'pdf_variant' => :'pdf_variant',
|
|
78
|
+
:'version' => :'version'
|
|
76
79
|
}
|
|
77
80
|
end
|
|
78
81
|
|
|
@@ -97,7 +100,8 @@ module TemplateFox
|
|
|
97
100
|
:'store_s3' => :'Boolean',
|
|
98
101
|
:'s3_filepath' => :'String',
|
|
99
102
|
:'s3_bucket' => :'String',
|
|
100
|
-
:'pdf_variant' => :'PdfVariant'
|
|
103
|
+
:'pdf_variant' => :'PdfVariant',
|
|
104
|
+
:'version' => :'String'
|
|
101
105
|
}
|
|
102
106
|
end
|
|
103
107
|
|
|
@@ -107,7 +111,8 @@ module TemplateFox
|
|
|
107
111
|
:'filename',
|
|
108
112
|
:'s3_filepath',
|
|
109
113
|
:'s3_bucket',
|
|
110
|
-
:'pdf_variant'
|
|
114
|
+
:'pdf_variant',
|
|
115
|
+
:'version'
|
|
111
116
|
])
|
|
112
117
|
end
|
|
113
118
|
|
|
@@ -172,6 +177,10 @@ module TemplateFox
|
|
|
172
177
|
if attributes.key?(:'pdf_variant')
|
|
173
178
|
self.pdf_variant = attributes[:'pdf_variant']
|
|
174
179
|
end
|
|
180
|
+
|
|
181
|
+
if attributes.key?(:'version')
|
|
182
|
+
self.version = attributes[:'version']
|
|
183
|
+
end
|
|
175
184
|
end
|
|
176
185
|
|
|
177
186
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -234,6 +243,10 @@ module TemplateFox
|
|
|
234
243
|
invalid_properties.push("invalid value for \"s3_bucket\", must conform to the pattern #{pattern}.")
|
|
235
244
|
end
|
|
236
245
|
|
|
246
|
+
if !@version.nil? && @version.to_s.length > 50
|
|
247
|
+
invalid_properties.push('invalid value for "version", the character length must be smaller than or equal to 50.')
|
|
248
|
+
end
|
|
249
|
+
|
|
237
250
|
invalid_properties
|
|
238
251
|
end
|
|
239
252
|
|
|
@@ -254,6 +267,7 @@ module TemplateFox
|
|
|
254
267
|
return false if !@s3_bucket.nil? && @s3_bucket.to_s.length > 63
|
|
255
268
|
return false if !@s3_bucket.nil? && @s3_bucket.to_s.length < 3
|
|
256
269
|
return false if !@s3_bucket.nil? && @s3_bucket !~ Regexp.new(/^[a-z0-9][a-z0-9.\-]*[a-z0-9]$/)
|
|
270
|
+
return false if !@version.nil? && @version.to_s.length > 50
|
|
257
271
|
true
|
|
258
272
|
end
|
|
259
273
|
|
|
@@ -352,6 +366,16 @@ module TemplateFox
|
|
|
352
366
|
@s3_bucket = s3_bucket
|
|
353
367
|
end
|
|
354
368
|
|
|
369
|
+
# Custom attribute writer method with validation
|
|
370
|
+
# @param [Object] version Value to be assigned
|
|
371
|
+
def version=(version)
|
|
372
|
+
if !version.nil? && version.to_s.length > 50
|
|
373
|
+
fail ArgumentError, 'invalid value for "version", the character length must be smaller than or equal to 50.'
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
@version = version
|
|
377
|
+
end
|
|
378
|
+
|
|
355
379
|
# Checks equality by comparing each attribute.
|
|
356
380
|
# @param [Object] Object to be compared
|
|
357
381
|
def ==(o)
|
|
@@ -365,7 +389,8 @@ module TemplateFox
|
|
|
365
389
|
store_s3 == o.store_s3 &&
|
|
366
390
|
s3_filepath == o.s3_filepath &&
|
|
367
391
|
s3_bucket == o.s3_bucket &&
|
|
368
|
-
pdf_variant == o.pdf_variant
|
|
392
|
+
pdf_variant == o.pdf_variant &&
|
|
393
|
+
version == o.version
|
|
369
394
|
end
|
|
370
395
|
|
|
371
396
|
# @see the `==` method
|
|
@@ -377,7 +402,7 @@ module TemplateFox
|
|
|
377
402
|
# Calculates hash code according to all attributes.
|
|
378
403
|
# @return [Integer] Hash code
|
|
379
404
|
def hash
|
|
380
|
-
[template_id, data, export_type, expiration, filename, store_s3, s3_filepath, s3_bucket, pdf_variant].hash
|
|
405
|
+
[template_id, data, export_type, expiration, filename, store_s3, s3_filepath, s3_bucket, pdf_variant, version].hash
|
|
381
406
|
end
|
|
382
407
|
|
|
383
408
|
# Builds the object from hash
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#TemplateFox API
|
|
3
|
+
|
|
4
|
+
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TemplateFox
|
|
17
|
+
# Request to create a version snapshot
|
|
18
|
+
class CreateVersionRequest < ApiModelBase
|
|
19
|
+
attr_accessor :tag
|
|
20
|
+
|
|
21
|
+
attr_accessor :description
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'tag' => :'tag',
|
|
27
|
+
:'description' => :'description'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'tag' => :'String',
|
|
45
|
+
:'description' => :'String'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
:'tag',
|
|
53
|
+
:'description'
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TemplateFox::CreateVersionRequest` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TemplateFox::CreateVersionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'tag')
|
|
74
|
+
self.tag = attributes[:'tag']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'description')
|
|
78
|
+
self.description = attributes[:'description']
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
83
|
+
# @return Array for valid properties with the reasons
|
|
84
|
+
def list_invalid_properties
|
|
85
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
86
|
+
invalid_properties = Array.new
|
|
87
|
+
if !@tag.nil? && @tag.to_s.length > 50
|
|
88
|
+
invalid_properties.push('invalid value for "tag", the character length must be smaller than or equal to 50.')
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
pattern = Regexp.new(/^[a-z0-9][a-z0-9_-]{0,48}[a-z0-9]$/)
|
|
92
|
+
if !@tag.nil? && @tag !~ pattern
|
|
93
|
+
invalid_properties.push("invalid value for \"tag\", must conform to the pattern #{pattern}.")
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if !@description.nil? && @description.to_s.length > 500
|
|
97
|
+
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 500.')
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
invalid_properties
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Check to see if the all the properties in the model are valid
|
|
104
|
+
# @return true if the model is valid
|
|
105
|
+
def valid?
|
|
106
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
107
|
+
return false if !@tag.nil? && @tag.to_s.length > 50
|
|
108
|
+
return false if !@tag.nil? && @tag !~ Regexp.new(/^[a-z0-9][a-z0-9_-]{0,48}[a-z0-9]$/)
|
|
109
|
+
return false if !@description.nil? && @description.to_s.length > 500
|
|
110
|
+
true
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Custom attribute writer method with validation
|
|
114
|
+
# @param [Object] tag Value to be assigned
|
|
115
|
+
def tag=(tag)
|
|
116
|
+
if !tag.nil? && tag.to_s.length > 50
|
|
117
|
+
fail ArgumentError, 'invalid value for "tag", the character length must be smaller than or equal to 50.'
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
pattern = Regexp.new(/^[a-z0-9][a-z0-9_-]{0,48}[a-z0-9]$/)
|
|
121
|
+
if !tag.nil? && tag !~ pattern
|
|
122
|
+
fail ArgumentError, "invalid value for \"tag\", must conform to the pattern #{pattern}."
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@tag = tag
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Custom attribute writer method with validation
|
|
129
|
+
# @param [Object] description Value to be assigned
|
|
130
|
+
def description=(description)
|
|
131
|
+
if !description.nil? && description.to_s.length > 500
|
|
132
|
+
fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 500.'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
@description = description
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Checks equality by comparing each attribute.
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def ==(o)
|
|
141
|
+
return true if self.equal?(o)
|
|
142
|
+
self.class == o.class &&
|
|
143
|
+
tag == o.tag &&
|
|
144
|
+
description == o.description
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @see the `==` method
|
|
148
|
+
# @param [Object] Object to be compared
|
|
149
|
+
def eql?(o)
|
|
150
|
+
self == o
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Calculates hash code according to all attributes.
|
|
154
|
+
# @return [Integer] Hash code
|
|
155
|
+
def hash
|
|
156
|
+
[tag, description].hash
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Builds the object from hash
|
|
160
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
161
|
+
# @return [Object] Returns the model itself
|
|
162
|
+
def self.build_from_hash(attributes)
|
|
163
|
+
return nil unless attributes.is_a?(Hash)
|
|
164
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
165
|
+
transformed_hash = {}
|
|
166
|
+
openapi_types.each_pair do |key, type|
|
|
167
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = nil
|
|
169
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
170
|
+
# check to ensure the input is an array given that the attribute
|
|
171
|
+
# is documented as an array but the input is not
|
|
172
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
173
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
174
|
+
end
|
|
175
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
176
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
new(transformed_hash)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the object in the form of hash
|
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
|
184
|
+
def to_hash
|
|
185
|
+
hash = {}
|
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
187
|
+
value = self.send(attr)
|
|
188
|
+
if value.nil?
|
|
189
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
190
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
hash[param] = _to_hash(value)
|
|
194
|
+
end
|
|
195
|
+
hash
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|