templatefox 1.6.1 → 1.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.
- checksums.yaml +4 -4
- data/README.md +6 -6
- data/lib/templatefox/api/account_api.rb +2 -2
- data/lib/templatefox/api/integrations_api.rb +2 -2
- data/lib/templatefox/api/pdf_api.rb +2 -2
- data/lib/templatefox/api/pdf_async_api.rb +10 -10
- data/lib/templatefox/api/templates_api.rb +427 -4
- data/lib/templatefox/api_client.rb +2 -2
- data/lib/templatefox/api_error.rb +2 -2
- data/lib/templatefox/api_model_base.rb +2 -2
- data/lib/templatefox/configuration.rb +4 -4
- data/lib/templatefox/models/account_info_response.rb +2 -2
- data/lib/templatefox/models/app_routers_v1_pdf_async_export_type.rb +2 -2
- data/lib/templatefox/models/app_routers_v1_pdf_export_type.rb +2 -2
- data/lib/templatefox/models/create_async_pdf_request.rb +44 -9
- data/lib/templatefox/models/create_async_pdf_response.rb +2 -2
- data/lib/templatefox/models/create_pdf_request.rb +44 -9
- data/lib/templatefox/models/create_pdf_response.rb +2 -2
- data/lib/templatefox/models/create_version_request.rb +200 -0
- data/lib/templatefox/models/http_validation_error.rb +2 -2
- data/lib/templatefox/models/job_list_response.rb +2 -2
- data/lib/templatefox/models/job_status.rb +2 -2
- data/lib/templatefox/models/job_status_response.rb +2 -2
- data/lib/templatefox/models/location_inner.rb +2 -2
- data/lib/templatefox/models/pdf_variant.rb +41 -0
- data/lib/templatefox/models/s3_config_request.rb +2 -2
- data/lib/templatefox/models/s3_config_response.rb +2 -2
- data/lib/templatefox/models/s3_success_response.rb +2 -2
- data/lib/templatefox/models/s3_test_response.rb +2 -2
- data/lib/templatefox/models/set_default_version_request.rb +166 -0
- data/lib/templatefox/models/template_field.rb +2 -2
- data/lib/templatefox/models/template_field_spec.rb +2 -2
- data/lib/templatefox/models/template_list_item.rb +2 -2
- data/lib/templatefox/models/templates_list_response.rb +2 -2
- data/lib/templatefox/models/transaction.rb +2 -2
- data/lib/templatefox/models/transactions_response.rb +2 -2
- data/lib/templatefox/models/update_version_request.rb +200 -0
- data/lib/templatefox/models/validation_error.rb +2 -2
- data/lib/templatefox/models/version_item.rb +225 -0
- data/lib/templatefox/models/versions_list_response.rb +167 -0
- data/lib/templatefox/version.rb +3 -3
- data/lib/templatefox.rb +8 -2
- data/spec/api/account_api_spec.rb +2 -2
- data/spec/api/integrations_api_spec.rb +2 -2
- data/spec/api/pdf_api_spec.rb +2 -2
- data/spec/api/pdf_async_api_spec.rb +6 -6
- data/spec/api/templates_api_spec.rb +80 -3
- data/spec/models/account_info_response_spec.rb +2 -2
- data/spec/models/app_routers_v1_pdf_async_export_type_spec.rb +2 -2
- data/spec/models/app_routers_v1_pdf_export_type_spec.rb +2 -2
- data/spec/models/create_async_pdf_request_spec.rb +14 -2
- data/spec/models/create_async_pdf_response_spec.rb +2 -2
- data/spec/models/create_pdf_request_spec.rb +14 -2
- data/spec/models/create_pdf_response_spec.rb +2 -2
- data/spec/models/create_version_request_spec.rb +42 -0
- data/spec/models/http_validation_error_spec.rb +2 -2
- data/spec/models/job_list_response_spec.rb +2 -2
- data/spec/models/job_status_response_spec.rb +2 -2
- data/spec/models/job_status_spec.rb +2 -2
- data/spec/models/location_inner_spec.rb +2 -2
- data/spec/models/pdf_variant_spec.rb +30 -0
- data/spec/models/s3_config_request_spec.rb +2 -2
- data/spec/models/s3_config_response_spec.rb +2 -2
- data/spec/models/s3_success_response_spec.rb +2 -2
- data/spec/models/s3_test_response_spec.rb +2 -2
- data/spec/models/set_default_version_request_spec.rb +36 -0
- data/spec/models/template_field_spec.rb +2 -2
- data/spec/models/template_field_spec_spec.rb +2 -2
- data/spec/models/template_list_item_spec.rb +2 -2
- data/spec/models/templates_list_response_spec.rb +2 -2
- data/spec/models/transaction_spec.rb +2 -2
- data/spec/models/transactions_response_spec.rb +2 -2
- data/spec/models/update_version_request_spec.rb +42 -0
- data/spec/models/validation_error_spec.rb +2 -2
- data/spec/models/version_item_spec.rb +60 -0
- data/spec/models/versions_list_response_spec.rb +36 -0
- data/spec/spec_helper.rb +2 -2
- data/templatefox.gemspec +6 -6
- metadata +42 -24
|
@@ -3,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -158,7 +158,7 @@ module TemplateFox
|
|
|
158
158
|
|
|
159
159
|
def initialize
|
|
160
160
|
@scheme = 'https'
|
|
161
|
-
@host = 'api.
|
|
161
|
+
@host = 'api.templatefox.com'
|
|
162
162
|
@base_path = ''
|
|
163
163
|
@server_index = nil
|
|
164
164
|
@server_operation_index = {}
|
|
@@ -258,7 +258,7 @@ module TemplateFox
|
|
|
258
258
|
def server_settings
|
|
259
259
|
[
|
|
260
260
|
{
|
|
261
|
-
url: "https://api.
|
|
261
|
+
url: "https://api.templatefox.com",
|
|
262
262
|
description: "Production",
|
|
263
263
|
}
|
|
264
264
|
]
|
|
@@ -3,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -3,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -3,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -3,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -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.
|
|
@@ -41,6 +41,10 @@ module TemplateFox
|
|
|
41
41
|
|
|
42
42
|
attr_accessor :webhook_secret
|
|
43
43
|
|
|
44
|
+
attr_accessor :pdf_variant
|
|
45
|
+
|
|
46
|
+
attr_accessor :version
|
|
47
|
+
|
|
44
48
|
class EnumAttributeValidator
|
|
45
49
|
attr_reader :datatype
|
|
46
50
|
attr_reader :allowable_values
|
|
@@ -75,7 +79,9 @@ module TemplateFox
|
|
|
75
79
|
:'s3_filepath' => :'s3_filepath',
|
|
76
80
|
:'s3_bucket' => :'s3_bucket',
|
|
77
81
|
:'webhook_url' => :'webhook_url',
|
|
78
|
-
:'webhook_secret' => :'webhook_secret'
|
|
82
|
+
:'webhook_secret' => :'webhook_secret',
|
|
83
|
+
:'pdf_variant' => :'pdf_variant',
|
|
84
|
+
:'version' => :'version'
|
|
79
85
|
}
|
|
80
86
|
end
|
|
81
87
|
|
|
@@ -101,7 +107,9 @@ module TemplateFox
|
|
|
101
107
|
:'s3_filepath' => :'String',
|
|
102
108
|
:'s3_bucket' => :'String',
|
|
103
109
|
:'webhook_url' => :'String',
|
|
104
|
-
:'webhook_secret' => :'String'
|
|
110
|
+
:'webhook_secret' => :'String',
|
|
111
|
+
:'pdf_variant' => :'PdfVariant',
|
|
112
|
+
:'version' => :'String'
|
|
105
113
|
}
|
|
106
114
|
end
|
|
107
115
|
|
|
@@ -112,7 +120,9 @@ module TemplateFox
|
|
|
112
120
|
:'s3_filepath',
|
|
113
121
|
:'s3_bucket',
|
|
114
122
|
:'webhook_url',
|
|
115
|
-
:'webhook_secret'
|
|
123
|
+
:'webhook_secret',
|
|
124
|
+
:'pdf_variant',
|
|
125
|
+
:'version'
|
|
116
126
|
])
|
|
117
127
|
end
|
|
118
128
|
|
|
@@ -181,6 +191,14 @@ module TemplateFox
|
|
|
181
191
|
if attributes.key?(:'webhook_secret')
|
|
182
192
|
self.webhook_secret = attributes[:'webhook_secret']
|
|
183
193
|
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'pdf_variant')
|
|
196
|
+
self.pdf_variant = attributes[:'pdf_variant']
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'version')
|
|
200
|
+
self.version = attributes[:'version']
|
|
201
|
+
end
|
|
184
202
|
end
|
|
185
203
|
|
|
186
204
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -259,6 +277,10 @@ module TemplateFox
|
|
|
259
277
|
invalid_properties.push('invalid value for "webhook_secret", the character length must be greater than or equal to 16.')
|
|
260
278
|
end
|
|
261
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
|
+
|
|
262
284
|
invalid_properties
|
|
263
285
|
end
|
|
264
286
|
|
|
@@ -283,6 +305,7 @@ module TemplateFox
|
|
|
283
305
|
return false if !@webhook_url.nil? && @webhook_url.to_s.length < 1
|
|
284
306
|
return false if !@webhook_secret.nil? && @webhook_secret.to_s.length > 256
|
|
285
307
|
return false if !@webhook_secret.nil? && @webhook_secret.to_s.length < 16
|
|
308
|
+
return false if !@version.nil? && @version.to_s.length > 50
|
|
286
309
|
true
|
|
287
310
|
end
|
|
288
311
|
|
|
@@ -409,6 +432,16 @@ module TemplateFox
|
|
|
409
432
|
@webhook_secret = webhook_secret
|
|
410
433
|
end
|
|
411
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
|
+
|
|
412
445
|
# Checks equality by comparing each attribute.
|
|
413
446
|
# @param [Object] Object to be compared
|
|
414
447
|
def ==(o)
|
|
@@ -423,7 +456,9 @@ module TemplateFox
|
|
|
423
456
|
s3_filepath == o.s3_filepath &&
|
|
424
457
|
s3_bucket == o.s3_bucket &&
|
|
425
458
|
webhook_url == o.webhook_url &&
|
|
426
|
-
webhook_secret == o.webhook_secret
|
|
459
|
+
webhook_secret == o.webhook_secret &&
|
|
460
|
+
pdf_variant == o.pdf_variant &&
|
|
461
|
+
version == o.version
|
|
427
462
|
end
|
|
428
463
|
|
|
429
464
|
# @see the `==` method
|
|
@@ -435,7 +470,7 @@ module TemplateFox
|
|
|
435
470
|
# Calculates hash code according to all attributes.
|
|
436
471
|
# @return [Integer] Hash code
|
|
437
472
|
def hash
|
|
438
|
-
[template_id, data, export_type, expiration, filename, store_s3, s3_filepath, s3_bucket, webhook_url, webhook_secret].hash
|
|
473
|
+
[template_id, data, export_type, expiration, filename, store_s3, s3_filepath, s3_bucket, webhook_url, webhook_secret, pdf_variant, version].hash
|
|
439
474
|
end
|
|
440
475
|
|
|
441
476
|
# Builds the object from hash
|
|
@@ -3,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -3,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -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
|
|
@@ -37,6 +37,10 @@ module TemplateFox
|
|
|
37
37
|
|
|
38
38
|
attr_accessor :s3_bucket
|
|
39
39
|
|
|
40
|
+
attr_accessor :pdf_variant
|
|
41
|
+
|
|
42
|
+
attr_accessor :version
|
|
43
|
+
|
|
40
44
|
class EnumAttributeValidator
|
|
41
45
|
attr_reader :datatype
|
|
42
46
|
attr_reader :allowable_values
|
|
@@ -69,7 +73,9 @@ module TemplateFox
|
|
|
69
73
|
:'filename' => :'filename',
|
|
70
74
|
:'store_s3' => :'store_s3',
|
|
71
75
|
:'s3_filepath' => :'s3_filepath',
|
|
72
|
-
:'s3_bucket' => :'s3_bucket'
|
|
76
|
+
:'s3_bucket' => :'s3_bucket',
|
|
77
|
+
:'pdf_variant' => :'pdf_variant',
|
|
78
|
+
:'version' => :'version'
|
|
73
79
|
}
|
|
74
80
|
end
|
|
75
81
|
|
|
@@ -93,7 +99,9 @@ module TemplateFox
|
|
|
93
99
|
:'filename' => :'String',
|
|
94
100
|
:'store_s3' => :'Boolean',
|
|
95
101
|
:'s3_filepath' => :'String',
|
|
96
|
-
:'s3_bucket' => :'String'
|
|
102
|
+
:'s3_bucket' => :'String',
|
|
103
|
+
:'pdf_variant' => :'PdfVariant',
|
|
104
|
+
:'version' => :'String'
|
|
97
105
|
}
|
|
98
106
|
end
|
|
99
107
|
|
|
@@ -102,7 +110,9 @@ module TemplateFox
|
|
|
102
110
|
Set.new([
|
|
103
111
|
:'filename',
|
|
104
112
|
:'s3_filepath',
|
|
105
|
-
:'s3_bucket'
|
|
113
|
+
:'s3_bucket',
|
|
114
|
+
:'pdf_variant',
|
|
115
|
+
:'version'
|
|
106
116
|
])
|
|
107
117
|
end
|
|
108
118
|
|
|
@@ -163,6 +173,14 @@ module TemplateFox
|
|
|
163
173
|
if attributes.key?(:'s3_bucket')
|
|
164
174
|
self.s3_bucket = attributes[:'s3_bucket']
|
|
165
175
|
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'pdf_variant')
|
|
178
|
+
self.pdf_variant = attributes[:'pdf_variant']
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if attributes.key?(:'version')
|
|
182
|
+
self.version = attributes[:'version']
|
|
183
|
+
end
|
|
166
184
|
end
|
|
167
185
|
|
|
168
186
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -225,6 +243,10 @@ module TemplateFox
|
|
|
225
243
|
invalid_properties.push("invalid value for \"s3_bucket\", must conform to the pattern #{pattern}.")
|
|
226
244
|
end
|
|
227
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
|
+
|
|
228
250
|
invalid_properties
|
|
229
251
|
end
|
|
230
252
|
|
|
@@ -245,6 +267,7 @@ module TemplateFox
|
|
|
245
267
|
return false if !@s3_bucket.nil? && @s3_bucket.to_s.length > 63
|
|
246
268
|
return false if !@s3_bucket.nil? && @s3_bucket.to_s.length < 3
|
|
247
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
|
|
248
271
|
true
|
|
249
272
|
end
|
|
250
273
|
|
|
@@ -343,6 +366,16 @@ module TemplateFox
|
|
|
343
366
|
@s3_bucket = s3_bucket
|
|
344
367
|
end
|
|
345
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
|
+
|
|
346
379
|
# Checks equality by comparing each attribute.
|
|
347
380
|
# @param [Object] Object to be compared
|
|
348
381
|
def ==(o)
|
|
@@ -355,7 +388,9 @@ module TemplateFox
|
|
|
355
388
|
filename == o.filename &&
|
|
356
389
|
store_s3 == o.store_s3 &&
|
|
357
390
|
s3_filepath == o.s3_filepath &&
|
|
358
|
-
s3_bucket == o.s3_bucket
|
|
391
|
+
s3_bucket == o.s3_bucket &&
|
|
392
|
+
pdf_variant == o.pdf_variant &&
|
|
393
|
+
version == o.version
|
|
359
394
|
end
|
|
360
395
|
|
|
361
396
|
# @see the `==` method
|
|
@@ -367,7 +402,7 @@ module TemplateFox
|
|
|
367
402
|
# Calculates hash code according to all attributes.
|
|
368
403
|
# @return [Integer] Hash code
|
|
369
404
|
def hash
|
|
370
|
-
[template_id, data, export_type, expiration, filename, store_s3, s3_filepath, s3_bucket].hash
|
|
405
|
+
[template_id, data, export_type, expiration, filename, store_s3, s3_filepath, s3_bucket, pdf_variant, version].hash
|
|
371
406
|
end
|
|
372
407
|
|
|
373
408
|
# Builds the object from hash
|
|
@@ -3,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -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.0
|
|
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,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -3,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -3,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -3,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -3,10 +3,10 @@
|
|
|
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.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.21.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -0,0 +1,41 @@
|
|
|
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.0
|
|
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
|
+
class PdfVariant
|
|
18
|
+
PDF_A_1B = "pdf/a-1b".freeze
|
|
19
|
+
PDF_A_2B = "pdf/a-2b".freeze
|
|
20
|
+
PDF_A_3B = "pdf/a-3b".freeze
|
|
21
|
+
|
|
22
|
+
def self.all_vars
|
|
23
|
+
@all_vars ||= [PDF_A_1B, PDF_A_2B, PDF_A_3B].freeze
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Builds the enum from string
|
|
27
|
+
# @param [String] The enum value in the form of the string
|
|
28
|
+
# @return [String] The enum value
|
|
29
|
+
def self.build_from_hash(value)
|
|
30
|
+
new.build_from_hash(value)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Builds the enum from string
|
|
34
|
+
# @param [String] The enum value in the form of the string
|
|
35
|
+
# @return [String] The enum value
|
|
36
|
+
def build_from_hash(value)
|
|
37
|
+
return value if PdfVariant.all_vars.include?(value)
|
|
38
|
+
raise "Invalid ENUM value #{value} for class #PdfVariant"
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|