templatefox 1.0.0 → 1.6.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/lib/templatefox/api/account_api.rb +6 -6
- data/lib/templatefox/api/integrations_api.rb +10 -10
- data/lib/templatefox/api/pdf_api.rb +4 -4
- data/lib/templatefox/api/pdf_async_api.rb +219 -0
- data/lib/templatefox/api/templates_api.rb +6 -6
- 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 +2 -2
- data/lib/templatefox/models/account_info_response.rb +2 -2
- data/lib/templatefox/models/app_routers_v1_pdf_async_export_type.rb +39 -0
- data/lib/templatefox/models/{export_type.rb → app_routers_v1_pdf_export_type.rb} +5 -5
- data/lib/templatefox/models/create_async_pdf_request.rb +482 -0
- data/lib/templatefox/models/create_async_pdf_response.rb +242 -0
- data/lib/templatefox/models/create_pdf_request.rb +3 -3
- data/lib/templatefox/models/create_pdf_response.rb +2 -2
- data/lib/templatefox/models/http_validation_error.rb +2 -2
- data/lib/templatefox/models/job_list_response.rb +249 -0
- data/lib/templatefox/models/job_status.rb +42 -0
- data/lib/templatefox/models/job_status_response.rb +440 -0
- data/lib/templatefox/models/location_inner.rb +2 -2
- 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/template_field.rb +21 -9
- data/lib/templatefox/models/template_field_spec.rb +205 -0
- 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/validation_error.rb +2 -2
- data/lib/templatefox/version.rb +3 -3
- data/lib/templatefox.rb +11 -3
- data/spec/api/account_api_spec.rb +4 -4
- data/spec/api/integrations_api_spec.rb +6 -6
- data/spec/api/pdf_api_spec.rb +3 -3
- data/spec/api/pdf_async_api_spec.rb +73 -0
- data/spec/api/templates_api_spec.rb +4 -4
- data/spec/models/account_info_response_spec.rb +2 -2
- data/spec/models/app_routers_v1_pdf_async_export_type_spec.rb +30 -0
- data/spec/models/app_routers_v1_pdf_export_type_spec.rb +30 -0
- data/spec/models/create_async_pdf_request_spec.rb +90 -0
- data/spec/models/create_async_pdf_response_spec.rb +48 -0
- data/spec/models/create_pdf_request_spec.rb +2 -2
- data/spec/models/create_pdf_response_spec.rb +2 -2
- data/spec/models/http_validation_error_spec.rb +2 -2
- data/spec/models/job_list_response_spec.rb +54 -0
- data/spec/models/job_status_response_spec.rb +126 -0
- data/spec/models/job_status_spec.rb +30 -0
- data/spec/models/location_inner_spec.rb +2 -2
- 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/template_field_spec.rb +8 -2
- data/spec/models/template_field_spec_spec.rb +48 -0
- 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/validation_error_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- data/templatefox.gemspec +9 -4
- metadata +57 -50
- data/docs/AccountApi.md +0 -152
- data/docs/AccountInfoResponse.md +0 -20
- data/docs/CreatePdfRequest.md +0 -32
- data/docs/CreatePdfResponse.md +0 -24
- data/docs/ExportType.md +0 -15
- data/docs/HTTPValidationError.md +0 -18
- data/docs/IntegrationsApi.md +0 -286
- data/docs/LocationInner.md +0 -15
- data/docs/PDFApi.md +0 -79
- data/docs/S3ConfigRequest.md +0 -26
- data/docs/S3ConfigResponse.md +0 -28
- data/docs/S3SuccessResponse.md +0 -18
- data/docs/S3TestResponse.md +0 -20
- data/docs/TemplateField.md +0 -26
- data/docs/TemplateListItem.md +0 -24
- data/docs/TemplatesApi.md +0 -148
- data/docs/TemplatesListResponse.md +0 -18
- data/docs/Transaction.md +0 -28
- data/docs/TransactionsResponse.md +0 -24
- data/docs/ValidationError.md +0 -22
- data/git_push.sh +0 -57
- data/spec/models/export_type_spec.rb +0 -30
|
@@ -0,0 +1,440 @@
|
|
|
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.6.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TemplateFox
|
|
17
|
+
# Response for job status query
|
|
18
|
+
class JobStatusResponse < ApiModelBase
|
|
19
|
+
# Job ID
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# Current job status
|
|
23
|
+
attr_accessor :status
|
|
24
|
+
|
|
25
|
+
# Template used for generation
|
|
26
|
+
attr_accessor :template_id
|
|
27
|
+
|
|
28
|
+
# Export type (url)
|
|
29
|
+
attr_accessor :export_type
|
|
30
|
+
|
|
31
|
+
attr_accessor :filename
|
|
32
|
+
|
|
33
|
+
# Whether S3 storage was requested
|
|
34
|
+
attr_accessor :store_s3
|
|
35
|
+
|
|
36
|
+
# Job creation timestamp (ISO 8601)
|
|
37
|
+
attr_accessor :created_at
|
|
38
|
+
|
|
39
|
+
# Last update timestamp (ISO 8601)
|
|
40
|
+
attr_accessor :updated_at
|
|
41
|
+
|
|
42
|
+
attr_accessor :completed_at
|
|
43
|
+
|
|
44
|
+
attr_accessor :result_url
|
|
45
|
+
|
|
46
|
+
attr_accessor :result_filename
|
|
47
|
+
|
|
48
|
+
attr_accessor :result_expires_at
|
|
49
|
+
|
|
50
|
+
attr_accessor :result_s3_bucket
|
|
51
|
+
|
|
52
|
+
attr_accessor :result_s3_key
|
|
53
|
+
|
|
54
|
+
attr_accessor :error_message
|
|
55
|
+
|
|
56
|
+
attr_accessor :error_code
|
|
57
|
+
|
|
58
|
+
class EnumAttributeValidator
|
|
59
|
+
attr_reader :datatype
|
|
60
|
+
attr_reader :allowable_values
|
|
61
|
+
|
|
62
|
+
def initialize(datatype, allowable_values)
|
|
63
|
+
@allowable_values = allowable_values.map do |value|
|
|
64
|
+
case datatype.to_s
|
|
65
|
+
when /Integer/i
|
|
66
|
+
value.to_i
|
|
67
|
+
when /Float/i
|
|
68
|
+
value.to_f
|
|
69
|
+
else
|
|
70
|
+
value
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def valid?(value)
|
|
76
|
+
!value || allowable_values.include?(value)
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
81
|
+
def self.attribute_map
|
|
82
|
+
{
|
|
83
|
+
:'id' => :'id',
|
|
84
|
+
:'status' => :'status',
|
|
85
|
+
:'template_id' => :'template_id',
|
|
86
|
+
:'export_type' => :'export_type',
|
|
87
|
+
:'filename' => :'filename',
|
|
88
|
+
:'store_s3' => :'store_s3',
|
|
89
|
+
:'created_at' => :'created_at',
|
|
90
|
+
:'updated_at' => :'updated_at',
|
|
91
|
+
:'completed_at' => :'completed_at',
|
|
92
|
+
:'result_url' => :'result_url',
|
|
93
|
+
:'result_filename' => :'result_filename',
|
|
94
|
+
:'result_expires_at' => :'result_expires_at',
|
|
95
|
+
:'result_s3_bucket' => :'result_s3_bucket',
|
|
96
|
+
:'result_s3_key' => :'result_s3_key',
|
|
97
|
+
:'error_message' => :'error_message',
|
|
98
|
+
:'error_code' => :'error_code'
|
|
99
|
+
}
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Returns attribute mapping this model knows about
|
|
103
|
+
def self.acceptable_attribute_map
|
|
104
|
+
attribute_map
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Returns all the JSON keys this model knows about
|
|
108
|
+
def self.acceptable_attributes
|
|
109
|
+
acceptable_attribute_map.values
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Attribute type mapping.
|
|
113
|
+
def self.openapi_types
|
|
114
|
+
{
|
|
115
|
+
:'id' => :'String',
|
|
116
|
+
:'status' => :'JobStatus',
|
|
117
|
+
:'template_id' => :'String',
|
|
118
|
+
:'export_type' => :'String',
|
|
119
|
+
:'filename' => :'String',
|
|
120
|
+
:'store_s3' => :'Boolean',
|
|
121
|
+
:'created_at' => :'String',
|
|
122
|
+
:'updated_at' => :'String',
|
|
123
|
+
:'completed_at' => :'String',
|
|
124
|
+
:'result_url' => :'String',
|
|
125
|
+
:'result_filename' => :'String',
|
|
126
|
+
:'result_expires_at' => :'String',
|
|
127
|
+
:'result_s3_bucket' => :'String',
|
|
128
|
+
:'result_s3_key' => :'String',
|
|
129
|
+
:'error_message' => :'String',
|
|
130
|
+
:'error_code' => :'String'
|
|
131
|
+
}
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# List of attributes with nullable: true
|
|
135
|
+
def self.openapi_nullable
|
|
136
|
+
Set.new([
|
|
137
|
+
:'filename',
|
|
138
|
+
:'completed_at',
|
|
139
|
+
:'result_url',
|
|
140
|
+
:'result_filename',
|
|
141
|
+
:'result_expires_at',
|
|
142
|
+
:'result_s3_bucket',
|
|
143
|
+
:'result_s3_key',
|
|
144
|
+
:'error_message',
|
|
145
|
+
:'error_code'
|
|
146
|
+
])
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Initializes the object
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
def initialize(attributes = {})
|
|
152
|
+
if (!attributes.is_a?(Hash))
|
|
153
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TemplateFox::JobStatusResponse` initialize method"
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
157
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
158
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
159
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
160
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TemplateFox::JobStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
161
|
+
end
|
|
162
|
+
h[k.to_sym] = v
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'id')
|
|
166
|
+
self.id = attributes[:'id']
|
|
167
|
+
else
|
|
168
|
+
self.id = nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'status')
|
|
172
|
+
self.status = attributes[:'status']
|
|
173
|
+
else
|
|
174
|
+
self.status = nil
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'template_id')
|
|
178
|
+
self.template_id = attributes[:'template_id']
|
|
179
|
+
else
|
|
180
|
+
self.template_id = nil
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'export_type')
|
|
184
|
+
self.export_type = attributes[:'export_type']
|
|
185
|
+
else
|
|
186
|
+
self.export_type = nil
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'filename')
|
|
190
|
+
self.filename = attributes[:'filename']
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
if attributes.key?(:'store_s3')
|
|
194
|
+
self.store_s3 = attributes[:'store_s3']
|
|
195
|
+
else
|
|
196
|
+
self.store_s3 = nil
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'created_at')
|
|
200
|
+
self.created_at = attributes[:'created_at']
|
|
201
|
+
else
|
|
202
|
+
self.created_at = nil
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if attributes.key?(:'updated_at')
|
|
206
|
+
self.updated_at = attributes[:'updated_at']
|
|
207
|
+
else
|
|
208
|
+
self.updated_at = nil
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'completed_at')
|
|
212
|
+
self.completed_at = attributes[:'completed_at']
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if attributes.key?(:'result_url')
|
|
216
|
+
self.result_url = attributes[:'result_url']
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if attributes.key?(:'result_filename')
|
|
220
|
+
self.result_filename = attributes[:'result_filename']
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'result_expires_at')
|
|
224
|
+
self.result_expires_at = attributes[:'result_expires_at']
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if attributes.key?(:'result_s3_bucket')
|
|
228
|
+
self.result_s3_bucket = attributes[:'result_s3_bucket']
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if attributes.key?(:'result_s3_key')
|
|
232
|
+
self.result_s3_key = attributes[:'result_s3_key']
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if attributes.key?(:'error_message')
|
|
236
|
+
self.error_message = attributes[:'error_message']
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if attributes.key?(:'error_code')
|
|
240
|
+
self.error_code = attributes[:'error_code']
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
245
|
+
# @return Array for valid properties with the reasons
|
|
246
|
+
def list_invalid_properties
|
|
247
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
248
|
+
invalid_properties = Array.new
|
|
249
|
+
if @id.nil?
|
|
250
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
if @status.nil?
|
|
254
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
if @template_id.nil?
|
|
258
|
+
invalid_properties.push('invalid value for "template_id", template_id cannot be nil.')
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
if @export_type.nil?
|
|
262
|
+
invalid_properties.push('invalid value for "export_type", export_type cannot be nil.')
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
if @store_s3.nil?
|
|
266
|
+
invalid_properties.push('invalid value for "store_s3", store_s3 cannot be nil.')
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
if @created_at.nil?
|
|
270
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
if @updated_at.nil?
|
|
274
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
invalid_properties
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Check to see if the all the properties in the model are valid
|
|
281
|
+
# @return true if the model is valid
|
|
282
|
+
def valid?
|
|
283
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
284
|
+
return false if @id.nil?
|
|
285
|
+
return false if @status.nil?
|
|
286
|
+
return false if @template_id.nil?
|
|
287
|
+
return false if @export_type.nil?
|
|
288
|
+
return false if @store_s3.nil?
|
|
289
|
+
return false if @created_at.nil?
|
|
290
|
+
return false if @updated_at.nil?
|
|
291
|
+
true
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# Custom attribute writer method with validation
|
|
295
|
+
# @param [Object] id Value to be assigned
|
|
296
|
+
def id=(id)
|
|
297
|
+
if id.nil?
|
|
298
|
+
fail ArgumentError, 'id cannot be nil'
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
@id = id
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Custom attribute writer method with validation
|
|
305
|
+
# @param [Object] status Value to be assigned
|
|
306
|
+
def status=(status)
|
|
307
|
+
if status.nil?
|
|
308
|
+
fail ArgumentError, 'status cannot be nil'
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
@status = status
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Custom attribute writer method with validation
|
|
315
|
+
# @param [Object] template_id Value to be assigned
|
|
316
|
+
def template_id=(template_id)
|
|
317
|
+
if template_id.nil?
|
|
318
|
+
fail ArgumentError, 'template_id cannot be nil'
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
@template_id = template_id
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Custom attribute writer method with validation
|
|
325
|
+
# @param [Object] export_type Value to be assigned
|
|
326
|
+
def export_type=(export_type)
|
|
327
|
+
if export_type.nil?
|
|
328
|
+
fail ArgumentError, 'export_type cannot be nil'
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
@export_type = export_type
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Custom attribute writer method with validation
|
|
335
|
+
# @param [Object] store_s3 Value to be assigned
|
|
336
|
+
def store_s3=(store_s3)
|
|
337
|
+
if store_s3.nil?
|
|
338
|
+
fail ArgumentError, 'store_s3 cannot be nil'
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
@store_s3 = store_s3
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Custom attribute writer method with validation
|
|
345
|
+
# @param [Object] created_at Value to be assigned
|
|
346
|
+
def created_at=(created_at)
|
|
347
|
+
if created_at.nil?
|
|
348
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
@created_at = created_at
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# Custom attribute writer method with validation
|
|
355
|
+
# @param [Object] updated_at Value to be assigned
|
|
356
|
+
def updated_at=(updated_at)
|
|
357
|
+
if updated_at.nil?
|
|
358
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
@updated_at = updated_at
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# Checks equality by comparing each attribute.
|
|
365
|
+
# @param [Object] Object to be compared
|
|
366
|
+
def ==(o)
|
|
367
|
+
return true if self.equal?(o)
|
|
368
|
+
self.class == o.class &&
|
|
369
|
+
id == o.id &&
|
|
370
|
+
status == o.status &&
|
|
371
|
+
template_id == o.template_id &&
|
|
372
|
+
export_type == o.export_type &&
|
|
373
|
+
filename == o.filename &&
|
|
374
|
+
store_s3 == o.store_s3 &&
|
|
375
|
+
created_at == o.created_at &&
|
|
376
|
+
updated_at == o.updated_at &&
|
|
377
|
+
completed_at == o.completed_at &&
|
|
378
|
+
result_url == o.result_url &&
|
|
379
|
+
result_filename == o.result_filename &&
|
|
380
|
+
result_expires_at == o.result_expires_at &&
|
|
381
|
+
result_s3_bucket == o.result_s3_bucket &&
|
|
382
|
+
result_s3_key == o.result_s3_key &&
|
|
383
|
+
error_message == o.error_message &&
|
|
384
|
+
error_code == o.error_code
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
# @see the `==` method
|
|
388
|
+
# @param [Object] Object to be compared
|
|
389
|
+
def eql?(o)
|
|
390
|
+
self == o
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# Calculates hash code according to all attributes.
|
|
394
|
+
# @return [Integer] Hash code
|
|
395
|
+
def hash
|
|
396
|
+
[id, status, template_id, export_type, filename, store_s3, created_at, updated_at, completed_at, result_url, result_filename, result_expires_at, result_s3_bucket, result_s3_key, error_message, error_code].hash
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
# Builds the object from hash
|
|
400
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
401
|
+
# @return [Object] Returns the model itself
|
|
402
|
+
def self.build_from_hash(attributes)
|
|
403
|
+
return nil unless attributes.is_a?(Hash)
|
|
404
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
405
|
+
transformed_hash = {}
|
|
406
|
+
openapi_types.each_pair do |key, type|
|
|
407
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
408
|
+
transformed_hash["#{key}"] = nil
|
|
409
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
410
|
+
# check to ensure the input is an array given that the attribute
|
|
411
|
+
# is documented as an array but the input is not
|
|
412
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
413
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
414
|
+
end
|
|
415
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
416
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
417
|
+
end
|
|
418
|
+
end
|
|
419
|
+
new(transformed_hash)
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
# Returns the object in the form of hash
|
|
423
|
+
# @return [Hash] Returns the object in the form of hash
|
|
424
|
+
def to_hash
|
|
425
|
+
hash = {}
|
|
426
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
427
|
+
value = self.send(attr)
|
|
428
|
+
if value.nil?
|
|
429
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
430
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
hash[param] = _to_hash(value)
|
|
434
|
+
end
|
|
435
|
+
hash
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#TemplateFox API
|
|
3
3
|
|
|
4
|
-
#Generate PDFs from HTML templates via API. Design once, generate thousands.
|
|
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.6.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#TemplateFox API
|
|
3
3
|
|
|
4
|
-
#Generate PDFs from HTML templates via API. Design once, generate thousands.
|
|
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.6.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#TemplateFox API
|
|
3
3
|
|
|
4
|
-
#Generate PDFs from HTML templates via API. Design once, generate thousands.
|
|
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.6.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#TemplateFox API
|
|
3
3
|
|
|
4
|
-
#Generate PDFs from HTML templates via API. Design once, generate thousands.
|
|
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.6.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#TemplateFox API
|
|
3
3
|
|
|
4
|
-
#Generate PDFs from HTML templates via API. Design once, generate thousands.
|
|
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.6.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#TemplateFox API
|
|
3
3
|
|
|
4
|
-
#Generate PDFs from HTML templates via API. Design once, generate thousands.
|
|
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.6.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module TemplateFox
|
|
17
|
-
#
|
|
17
|
+
# Field definition for template variables (compatible with Zapier and Make.com)
|
|
18
18
|
class TemplateField < ApiModelBase
|
|
19
19
|
# Field key/identifier
|
|
20
20
|
attr_accessor :key
|
|
@@ -22,7 +22,7 @@ module TemplateFox
|
|
|
22
22
|
# Human-readable label
|
|
23
23
|
attr_accessor :label
|
|
24
24
|
|
|
25
|
-
# Field type: string, integer, number, boolean
|
|
25
|
+
# Field type: string, integer, number, boolean, array
|
|
26
26
|
attr_accessor :type
|
|
27
27
|
|
|
28
28
|
# Whether the field is required
|
|
@@ -30,6 +30,8 @@ module TemplateFox
|
|
|
30
30
|
|
|
31
31
|
attr_accessor :help_text
|
|
32
32
|
|
|
33
|
+
attr_accessor :spec
|
|
34
|
+
|
|
33
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
36
|
def self.attribute_map
|
|
35
37
|
{
|
|
@@ -37,7 +39,8 @@ module TemplateFox
|
|
|
37
39
|
:'label' => :'label',
|
|
38
40
|
:'type' => :'type',
|
|
39
41
|
:'required' => :'required',
|
|
40
|
-
:'help_text' => :'helpText'
|
|
42
|
+
:'help_text' => :'helpText',
|
|
43
|
+
:'spec' => :'spec'
|
|
41
44
|
}
|
|
42
45
|
end
|
|
43
46
|
|
|
@@ -58,14 +61,16 @@ module TemplateFox
|
|
|
58
61
|
:'label' => :'String',
|
|
59
62
|
:'type' => :'String',
|
|
60
63
|
:'required' => :'Boolean',
|
|
61
|
-
:'help_text' => :'String'
|
|
64
|
+
:'help_text' => :'String',
|
|
65
|
+
:'spec' => :'Array<TemplateFieldSpec>'
|
|
62
66
|
}
|
|
63
67
|
end
|
|
64
68
|
|
|
65
69
|
# List of attributes with nullable: true
|
|
66
70
|
def self.openapi_nullable
|
|
67
71
|
Set.new([
|
|
68
|
-
:'help_text'
|
|
72
|
+
:'help_text',
|
|
73
|
+
:'spec'
|
|
69
74
|
])
|
|
70
75
|
end
|
|
71
76
|
|
|
@@ -112,6 +117,12 @@ module TemplateFox
|
|
|
112
117
|
if attributes.key?(:'help_text')
|
|
113
118
|
self.help_text = attributes[:'help_text']
|
|
114
119
|
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'spec')
|
|
122
|
+
if (value = attributes[:'spec']).is_a?(Array)
|
|
123
|
+
self.spec = value
|
|
124
|
+
end
|
|
125
|
+
end
|
|
115
126
|
end
|
|
116
127
|
|
|
117
128
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -168,7 +179,8 @@ module TemplateFox
|
|
|
168
179
|
label == o.label &&
|
|
169
180
|
type == o.type &&
|
|
170
181
|
required == o.required &&
|
|
171
|
-
help_text == o.help_text
|
|
182
|
+
help_text == o.help_text &&
|
|
183
|
+
spec == o.spec
|
|
172
184
|
end
|
|
173
185
|
|
|
174
186
|
# @see the `==` method
|
|
@@ -180,7 +192,7 @@ module TemplateFox
|
|
|
180
192
|
# Calculates hash code according to all attributes.
|
|
181
193
|
# @return [Integer] Hash code
|
|
182
194
|
def hash
|
|
183
|
-
[key, label, type, required, help_text].hash
|
|
195
|
+
[key, label, type, required, help_text, spec].hash
|
|
184
196
|
end
|
|
185
197
|
|
|
186
198
|
# Builds the object from hash
|