templatefox 1.11.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/lib/templatefox/api/account_api.rb +1 -1
  3. data/lib/templatefox/api/agent_api.rb +227 -0
  4. data/lib/templatefox/api/image_api.rb +1 -1
  5. data/lib/templatefox/api/integrations_api.rb +1 -1
  6. data/lib/templatefox/api/pdf_api.rb +1 -1
  7. data/lib/templatefox/api/pdf_async_api.rb +3 -3
  8. data/lib/templatefox/api/pdf_tools_api.rb +1 -1
  9. data/lib/templatefox/api/templates_api.rb +64 -1
  10. data/lib/templatefox/api_client.rb +1 -1
  11. data/lib/templatefox/api_error.rb +1 -1
  12. data/lib/templatefox/api_model_base.rb +1 -1
  13. data/lib/templatefox/configuration.rb +1 -1
  14. data/lib/templatefox/models/account_info_response.rb +1 -1
  15. data/lib/templatefox/models/agent_job_created_response.rb +266 -0
  16. data/lib/templatefox/models/agent_job_status_response.rb +388 -0
  17. data/lib/templatefox/models/{job_status.rb → app_routers_v1_agent_job_status.rb} +4 -4
  18. data/lib/templatefox/models/app_routers_v1_delivery_export_type.rb +1 -1
  19. data/lib/templatefox/models/app_routers_v1_pdf_async_export_type.rb +1 -1
  20. data/lib/templatefox/models/app_routers_v1_pdf_async_job_status.rb +42 -0
  21. data/lib/templatefox/models/app_routers_v1_pdf_tools_export_type.rb +1 -1
  22. data/lib/templatefox/models/brand_inputs.rb +232 -0
  23. data/lib/templatefox/models/create_agent_template_request.rb +350 -0
  24. data/lib/templatefox/models/create_async_pdf_request.rb +1 -1
  25. data/lib/templatefox/models/create_async_pdf_response.rb +2 -2
  26. data/lib/templatefox/models/create_image_request.rb +1 -1
  27. data/lib/templatefox/models/create_image_response.rb +1 -1
  28. data/lib/templatefox/models/create_pdf_request.rb +1 -1
  29. data/lib/templatefox/models/create_pdf_response.rb +1 -1
  30. data/lib/templatefox/models/create_version_request.rb +1 -1
  31. data/lib/templatefox/models/extract_pdf_pages_request.rb +1 -1
  32. data/lib/templatefox/models/http_validation_error.rb +1 -1
  33. data/lib/templatefox/models/image_format.rb +1 -1
  34. data/lib/templatefox/models/job_list_response.rb +1 -1
  35. data/lib/templatefox/models/job_status_response.rb +2 -2
  36. data/lib/templatefox/models/location_inner.rb +1 -1
  37. data/lib/templatefox/models/merge_pdf_request.rb +1 -1
  38. data/lib/templatefox/models/modification.rb +1 -1
  39. data/lib/templatefox/models/pdf_input.rb +1 -1
  40. data/lib/templatefox/models/pdf_tools_response.rb +1 -1
  41. data/lib/templatefox/models/pdf_variant.rb +1 -1
  42. data/lib/templatefox/models/revise_agent_template_request.rb +193 -0
  43. data/lib/templatefox/models/rotate_pdf_request.rb +1 -1
  44. data/lib/templatefox/models/s3_config_request.rb +1 -1
  45. data/lib/templatefox/models/s3_config_response.rb +1 -1
  46. data/lib/templatefox/models/s3_success_response.rb +1 -1
  47. data/lib/templatefox/models/s3_test_response.rb +1 -1
  48. data/lib/templatefox/models/template_field.rb +1 -1
  49. data/lib/templatefox/models/template_field_spec.rb +1 -1
  50. data/lib/templatefox/models/template_layer.rb +259 -0
  51. data/lib/templatefox/models/template_layers_response.rb +179 -0
  52. data/lib/templatefox/models/template_list_item.rb +1 -1
  53. data/lib/templatefox/models/templates_list_response.rb +1 -1
  54. data/lib/templatefox/models/transaction.rb +1 -1
  55. data/lib/templatefox/models/transactions_response.rb +1 -1
  56. data/lib/templatefox/models/update_version_request.rb +1 -1
  57. data/lib/templatefox/models/validation_error.rb +1 -1
  58. data/lib/templatefox/models/version_item.rb +1 -1
  59. data/lib/templatefox/models/versions_list_response.rb +1 -1
  60. data/lib/templatefox/version.rb +2 -2
  61. data/lib/templatefox.rb +11 -2
  62. data/spec/api/account_api_spec.rb +1 -1
  63. data/spec/api/agent_api_spec.rb +72 -0
  64. data/spec/api/image_api_spec.rb +1 -1
  65. data/spec/api/integrations_api_spec.rb +1 -1
  66. data/spec/api/pdf_api_spec.rb +1 -1
  67. data/spec/api/pdf_async_api_spec.rb +2 -2
  68. data/spec/api/pdf_tools_api_spec.rb +1 -1
  69. data/spec/api/templates_api_spec.rb +13 -1
  70. data/spec/models/account_info_response_spec.rb +1 -1
  71. data/spec/models/agent_job_created_response_spec.rb +58 -0
  72. data/spec/models/agent_job_status_response_spec.rb +112 -0
  73. data/spec/models/{job_status_spec.rb → app_routers_v1_agent_job_status_spec.rb} +7 -7
  74. data/spec/models/app_routers_v1_delivery_export_type_spec.rb +1 -1
  75. data/spec/models/app_routers_v1_pdf_async_export_type_spec.rb +1 -1
  76. data/spec/models/app_routers_v1_pdf_async_job_status_spec.rb +30 -0
  77. data/spec/models/app_routers_v1_pdf_tools_export_type_spec.rb +1 -1
  78. data/spec/models/brand_inputs_spec.rb +48 -0
  79. data/spec/models/create_agent_template_request_spec.rb +70 -0
  80. data/spec/models/create_async_pdf_request_spec.rb +1 -1
  81. data/spec/models/create_async_pdf_response_spec.rb +1 -1
  82. data/spec/models/create_image_request_spec.rb +1 -1
  83. data/spec/models/create_image_response_spec.rb +1 -1
  84. data/spec/models/create_pdf_request_spec.rb +1 -1
  85. data/spec/models/create_pdf_response_spec.rb +1 -1
  86. data/spec/models/create_version_request_spec.rb +1 -1
  87. data/spec/models/extract_pdf_pages_request_spec.rb +1 -1
  88. data/spec/models/http_validation_error_spec.rb +1 -1
  89. data/spec/models/image_format_spec.rb +1 -1
  90. data/spec/models/job_list_response_spec.rb +1 -1
  91. data/spec/models/job_status_response_spec.rb +1 -1
  92. data/spec/models/location_inner_spec.rb +1 -1
  93. data/spec/models/merge_pdf_request_spec.rb +1 -1
  94. data/spec/models/modification_spec.rb +1 -1
  95. data/spec/models/pdf_input_spec.rb +1 -1
  96. data/spec/models/pdf_tools_response_spec.rb +1 -1
  97. data/spec/models/pdf_variant_spec.rb +1 -1
  98. data/spec/models/revise_agent_template_request_spec.rb +42 -0
  99. data/spec/models/rotate_pdf_request_spec.rb +1 -1
  100. data/spec/models/s3_config_request_spec.rb +1 -1
  101. data/spec/models/s3_config_response_spec.rb +1 -1
  102. data/spec/models/s3_success_response_spec.rb +1 -1
  103. data/spec/models/s3_test_response_spec.rb +1 -1
  104. data/spec/models/template_field_spec.rb +1 -1
  105. data/spec/models/template_field_spec_spec.rb +1 -1
  106. data/spec/models/template_layer_spec.rb +60 -0
  107. data/spec/models/template_layers_response_spec.rb +42 -0
  108. data/spec/models/template_list_item_spec.rb +1 -1
  109. data/spec/models/templates_list_response_spec.rb +1 -1
  110. data/spec/models/transaction_spec.rb +1 -1
  111. data/spec/models/transactions_response_spec.rb +1 -1
  112. data/spec/models/update_version_request_spec.rb +1 -1
  113. data/spec/models/validation_error_spec.rb +1 -1
  114. data/spec/models/version_item_spec.rb +1 -1
  115. data/spec/models/versions_list_response_spec.rb +1 -1
  116. data/spec/spec_helper.rb +1 -1
  117. data/templatefox.gemspec +1 -1
  118. metadata +61 -34
@@ -0,0 +1,266 @@
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.13.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 AgentJobCreatedResponse < ApiModelBase
18
+ attr_accessor :job_id
19
+
20
+ attr_accessor :status
21
+
22
+ attr_accessor :credits_charged
23
+
24
+ attr_accessor :credits_remaining
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'job_id' => :'job_id',
52
+ :'status' => :'status',
53
+ :'credits_charged' => :'credits_charged',
54
+ :'credits_remaining' => :'credits_remaining'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'job_id' => :'String',
72
+ :'status' => :'String',
73
+ :'credits_charged' => :'Integer',
74
+ :'credits_remaining' => :'Integer'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TemplateFox::AgentJobCreatedResponse` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ acceptable_attribute_map = self.class.acceptable_attribute_map
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!acceptable_attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TemplateFox::AgentJobCreatedResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'job_id')
101
+ self.job_id = attributes[:'job_id']
102
+ else
103
+ self.job_id = nil
104
+ end
105
+
106
+ if attributes.key?(:'status')
107
+ self.status = attributes[:'status']
108
+ else
109
+ self.status = nil
110
+ end
111
+
112
+ if attributes.key?(:'credits_charged')
113
+ self.credits_charged = attributes[:'credits_charged']
114
+ else
115
+ self.credits_charged = nil
116
+ end
117
+
118
+ if attributes.key?(:'credits_remaining')
119
+ self.credits_remaining = attributes[:'credits_remaining']
120
+ else
121
+ self.credits_remaining = nil
122
+ end
123
+ end
124
+
125
+ # Show invalid properties with the reasons. Usually used together with valid?
126
+ # @return Array for valid properties with the reasons
127
+ def list_invalid_properties
128
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
129
+ invalid_properties = Array.new
130
+ if @job_id.nil?
131
+ invalid_properties.push('invalid value for "job_id", job_id cannot be nil.')
132
+ end
133
+
134
+ if @status.nil?
135
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
136
+ end
137
+
138
+ if @credits_charged.nil?
139
+ invalid_properties.push('invalid value for "credits_charged", credits_charged cannot be nil.')
140
+ end
141
+
142
+ if @credits_remaining.nil?
143
+ invalid_properties.push('invalid value for "credits_remaining", credits_remaining cannot be nil.')
144
+ end
145
+
146
+ invalid_properties
147
+ end
148
+
149
+ # Check to see if the all the properties in the model are valid
150
+ # @return true if the model is valid
151
+ def valid?
152
+ warn '[DEPRECATED] the `valid?` method is obsolete'
153
+ return false if @job_id.nil?
154
+ return false if @status.nil?
155
+ status_validator = EnumAttributeValidator.new('String', ["pending"])
156
+ return false unless status_validator.valid?(@status)
157
+ return false if @credits_charged.nil?
158
+ return false if @credits_remaining.nil?
159
+ true
160
+ end
161
+
162
+ # Custom attribute writer method with validation
163
+ # @param [Object] job_id Value to be assigned
164
+ def job_id=(job_id)
165
+ if job_id.nil?
166
+ fail ArgumentError, 'job_id cannot be nil'
167
+ end
168
+
169
+ @job_id = job_id
170
+ end
171
+
172
+ # Custom attribute writer method checking allowed values (enum).
173
+ # @param [Object] status Object to be assigned
174
+ def status=(status)
175
+ validator = EnumAttributeValidator.new('String', ["pending"])
176
+ unless validator.valid?(status)
177
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
178
+ end
179
+ @status = status
180
+ end
181
+
182
+ # Custom attribute writer method with validation
183
+ # @param [Object] credits_charged Value to be assigned
184
+ def credits_charged=(credits_charged)
185
+ if credits_charged.nil?
186
+ fail ArgumentError, 'credits_charged cannot be nil'
187
+ end
188
+
189
+ @credits_charged = credits_charged
190
+ end
191
+
192
+ # Custom attribute writer method with validation
193
+ # @param [Object] credits_remaining Value to be assigned
194
+ def credits_remaining=(credits_remaining)
195
+ if credits_remaining.nil?
196
+ fail ArgumentError, 'credits_remaining cannot be nil'
197
+ end
198
+
199
+ @credits_remaining = credits_remaining
200
+ end
201
+
202
+ # Checks equality by comparing each attribute.
203
+ # @param [Object] Object to be compared
204
+ def ==(o)
205
+ return true if self.equal?(o)
206
+ self.class == o.class &&
207
+ job_id == o.job_id &&
208
+ status == o.status &&
209
+ credits_charged == o.credits_charged &&
210
+ credits_remaining == o.credits_remaining
211
+ end
212
+
213
+ # @see the `==` method
214
+ # @param [Object] Object to be compared
215
+ def eql?(o)
216
+ self == o
217
+ end
218
+
219
+ # Calculates hash code according to all attributes.
220
+ # @return [Integer] Hash code
221
+ def hash
222
+ [job_id, status, credits_charged, credits_remaining].hash
223
+ end
224
+
225
+ # Builds the object from hash
226
+ # @param [Hash] attributes Model attributes in the form of hash
227
+ # @return [Object] Returns the model itself
228
+ def self.build_from_hash(attributes)
229
+ return nil unless attributes.is_a?(Hash)
230
+ attributes = attributes.transform_keys(&:to_sym)
231
+ transformed_hash = {}
232
+ openapi_types.each_pair do |key, type|
233
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
234
+ transformed_hash["#{key}"] = nil
235
+ elsif type =~ /\AArray<(.*)>/i
236
+ # check to ensure the input is an array given that the attribute
237
+ # is documented as an array but the input is not
238
+ if attributes[attribute_map[key]].is_a?(Array)
239
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
240
+ end
241
+ elsif !attributes[attribute_map[key]].nil?
242
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
243
+ end
244
+ end
245
+ new(transformed_hash)
246
+ end
247
+
248
+ # Returns the object in the form of hash
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_hash
251
+ hash = {}
252
+ self.class.attribute_map.each_pair do |attr, param|
253
+ value = self.send(attr)
254
+ if value.nil?
255
+ is_nullable = self.class.openapi_nullable.include?(attr)
256
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
257
+ end
258
+
259
+ hash[param] = _to_hash(value)
260
+ end
261
+ hash
262
+ end
263
+
264
+ end
265
+
266
+ end
@@ -0,0 +1,388 @@
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.13.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 AgentJobStatusResponse < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :kind
21
+
22
+ attr_accessor :status
23
+
24
+ attr_accessor :template_id
25
+
26
+ attr_accessor :preview_url
27
+
28
+ attr_accessor :preview_expires_at
29
+
30
+ attr_accessor :notes
31
+
32
+ attr_accessor :credits_charged
33
+
34
+ attr_accessor :error_message
35
+
36
+ attr_accessor :error_code
37
+
38
+ attr_accessor :created_at
39
+
40
+ attr_accessor :updated_at
41
+
42
+ attr_accessor :completed_at
43
+
44
+ class EnumAttributeValidator
45
+ attr_reader :datatype
46
+ attr_reader :allowable_values
47
+
48
+ def initialize(datatype, allowable_values)
49
+ @allowable_values = allowable_values.map do |value|
50
+ case datatype.to_s
51
+ when /Integer/i
52
+ value.to_i
53
+ when /Float/i
54
+ value.to_f
55
+ else
56
+ value
57
+ end
58
+ end
59
+ end
60
+
61
+ def valid?(value)
62
+ !value || allowable_values.include?(value)
63
+ end
64
+ end
65
+
66
+ # Attribute mapping from ruby-style variable name to JSON key.
67
+ def self.attribute_map
68
+ {
69
+ :'id' => :'id',
70
+ :'kind' => :'kind',
71
+ :'status' => :'status',
72
+ :'template_id' => :'template_id',
73
+ :'preview_url' => :'preview_url',
74
+ :'preview_expires_at' => :'preview_expires_at',
75
+ :'notes' => :'notes',
76
+ :'credits_charged' => :'credits_charged',
77
+ :'error_message' => :'error_message',
78
+ :'error_code' => :'error_code',
79
+ :'created_at' => :'created_at',
80
+ :'updated_at' => :'updated_at',
81
+ :'completed_at' => :'completed_at'
82
+ }
83
+ end
84
+
85
+ # Returns attribute mapping this model knows about
86
+ def self.acceptable_attribute_map
87
+ attribute_map
88
+ end
89
+
90
+ # Returns all the JSON keys this model knows about
91
+ def self.acceptable_attributes
92
+ acceptable_attribute_map.values
93
+ end
94
+
95
+ # Attribute type mapping.
96
+ def self.openapi_types
97
+ {
98
+ :'id' => :'String',
99
+ :'kind' => :'String',
100
+ :'status' => :'AppRoutersV1AgentJobStatus',
101
+ :'template_id' => :'String',
102
+ :'preview_url' => :'String',
103
+ :'preview_expires_at' => :'String',
104
+ :'notes' => :'String',
105
+ :'credits_charged' => :'Integer',
106
+ :'error_message' => :'String',
107
+ :'error_code' => :'String',
108
+ :'created_at' => :'String',
109
+ :'updated_at' => :'String',
110
+ :'completed_at' => :'String'
111
+ }
112
+ end
113
+
114
+ # List of attributes with nullable: true
115
+ def self.openapi_nullable
116
+ Set.new([
117
+ :'template_id',
118
+ :'preview_url',
119
+ :'preview_expires_at',
120
+ :'notes',
121
+ :'error_message',
122
+ :'error_code',
123
+ :'completed_at'
124
+ ])
125
+ end
126
+
127
+ # Initializes the object
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ def initialize(attributes = {})
130
+ if (!attributes.is_a?(Hash))
131
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TemplateFox::AgentJobStatusResponse` initialize method"
132
+ end
133
+
134
+ # check to see if the attribute exists and convert string to symbol for hash key
135
+ acceptable_attribute_map = self.class.acceptable_attribute_map
136
+ attributes = attributes.each_with_object({}) { |(k, v), h|
137
+ if (!acceptable_attribute_map.key?(k.to_sym))
138
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TemplateFox::AgentJobStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
139
+ end
140
+ h[k.to_sym] = v
141
+ }
142
+
143
+ if attributes.key?(:'id')
144
+ self.id = attributes[:'id']
145
+ else
146
+ self.id = nil
147
+ end
148
+
149
+ if attributes.key?(:'kind')
150
+ self.kind = attributes[:'kind']
151
+ else
152
+ self.kind = nil
153
+ end
154
+
155
+ if attributes.key?(:'status')
156
+ self.status = attributes[:'status']
157
+ else
158
+ self.status = nil
159
+ end
160
+
161
+ if attributes.key?(:'template_id')
162
+ self.template_id = attributes[:'template_id']
163
+ end
164
+
165
+ if attributes.key?(:'preview_url')
166
+ self.preview_url = attributes[:'preview_url']
167
+ end
168
+
169
+ if attributes.key?(:'preview_expires_at')
170
+ self.preview_expires_at = attributes[:'preview_expires_at']
171
+ end
172
+
173
+ if attributes.key?(:'notes')
174
+ self.notes = attributes[:'notes']
175
+ end
176
+
177
+ if attributes.key?(:'credits_charged')
178
+ self.credits_charged = attributes[:'credits_charged']
179
+ else
180
+ self.credits_charged = nil
181
+ end
182
+
183
+ if attributes.key?(:'error_message')
184
+ self.error_message = attributes[:'error_message']
185
+ end
186
+
187
+ if attributes.key?(:'error_code')
188
+ self.error_code = attributes[:'error_code']
189
+ end
190
+
191
+ if attributes.key?(:'created_at')
192
+ self.created_at = attributes[:'created_at']
193
+ else
194
+ self.created_at = nil
195
+ end
196
+
197
+ if attributes.key?(:'updated_at')
198
+ self.updated_at = attributes[:'updated_at']
199
+ else
200
+ self.updated_at = nil
201
+ end
202
+
203
+ if attributes.key?(:'completed_at')
204
+ self.completed_at = attributes[:'completed_at']
205
+ end
206
+ end
207
+
208
+ # Show invalid properties with the reasons. Usually used together with valid?
209
+ # @return Array for valid properties with the reasons
210
+ def list_invalid_properties
211
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
212
+ invalid_properties = Array.new
213
+ if @id.nil?
214
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
215
+ end
216
+
217
+ if @kind.nil?
218
+ invalid_properties.push('invalid value for "kind", kind cannot be nil.')
219
+ end
220
+
221
+ if @status.nil?
222
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
223
+ end
224
+
225
+ if @credits_charged.nil?
226
+ invalid_properties.push('invalid value for "credits_charged", credits_charged cannot be nil.')
227
+ end
228
+
229
+ if @created_at.nil?
230
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
231
+ end
232
+
233
+ if @updated_at.nil?
234
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
235
+ end
236
+
237
+ invalid_properties
238
+ end
239
+
240
+ # Check to see if the all the properties in the model are valid
241
+ # @return true if the model is valid
242
+ def valid?
243
+ warn '[DEPRECATED] the `valid?` method is obsolete'
244
+ return false if @id.nil?
245
+ return false if @kind.nil?
246
+ kind_validator = EnumAttributeValidator.new('String', ["create", "revise"])
247
+ return false unless kind_validator.valid?(@kind)
248
+ return false if @status.nil?
249
+ return false if @credits_charged.nil?
250
+ return false if @created_at.nil?
251
+ return false if @updated_at.nil?
252
+ true
253
+ end
254
+
255
+ # Custom attribute writer method with validation
256
+ # @param [Object] id Value to be assigned
257
+ def id=(id)
258
+ if id.nil?
259
+ fail ArgumentError, 'id cannot be nil'
260
+ end
261
+
262
+ @id = id
263
+ end
264
+
265
+ # Custom attribute writer method checking allowed values (enum).
266
+ # @param [Object] kind Object to be assigned
267
+ def kind=(kind)
268
+ validator = EnumAttributeValidator.new('String', ["create", "revise"])
269
+ unless validator.valid?(kind)
270
+ fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}."
271
+ end
272
+ @kind = kind
273
+ end
274
+
275
+ # Custom attribute writer method with validation
276
+ # @param [Object] status Value to be assigned
277
+ def status=(status)
278
+ if status.nil?
279
+ fail ArgumentError, 'status cannot be nil'
280
+ end
281
+
282
+ @status = status
283
+ end
284
+
285
+ # Custom attribute writer method with validation
286
+ # @param [Object] credits_charged Value to be assigned
287
+ def credits_charged=(credits_charged)
288
+ if credits_charged.nil?
289
+ fail ArgumentError, 'credits_charged cannot be nil'
290
+ end
291
+
292
+ @credits_charged = credits_charged
293
+ end
294
+
295
+ # Custom attribute writer method with validation
296
+ # @param [Object] created_at Value to be assigned
297
+ def created_at=(created_at)
298
+ if created_at.nil?
299
+ fail ArgumentError, 'created_at cannot be nil'
300
+ end
301
+
302
+ @created_at = created_at
303
+ end
304
+
305
+ # Custom attribute writer method with validation
306
+ # @param [Object] updated_at Value to be assigned
307
+ def updated_at=(updated_at)
308
+ if updated_at.nil?
309
+ fail ArgumentError, 'updated_at cannot be nil'
310
+ end
311
+
312
+ @updated_at = updated_at
313
+ end
314
+
315
+ # Checks equality by comparing each attribute.
316
+ # @param [Object] Object to be compared
317
+ def ==(o)
318
+ return true if self.equal?(o)
319
+ self.class == o.class &&
320
+ id == o.id &&
321
+ kind == o.kind &&
322
+ status == o.status &&
323
+ template_id == o.template_id &&
324
+ preview_url == o.preview_url &&
325
+ preview_expires_at == o.preview_expires_at &&
326
+ notes == o.notes &&
327
+ credits_charged == o.credits_charged &&
328
+ error_message == o.error_message &&
329
+ error_code == o.error_code &&
330
+ created_at == o.created_at &&
331
+ updated_at == o.updated_at &&
332
+ completed_at == o.completed_at
333
+ end
334
+
335
+ # @see the `==` method
336
+ # @param [Object] Object to be compared
337
+ def eql?(o)
338
+ self == o
339
+ end
340
+
341
+ # Calculates hash code according to all attributes.
342
+ # @return [Integer] Hash code
343
+ def hash
344
+ [id, kind, status, template_id, preview_url, preview_expires_at, notes, credits_charged, error_message, error_code, created_at, updated_at, completed_at].hash
345
+ end
346
+
347
+ # Builds the object from hash
348
+ # @param [Hash] attributes Model attributes in the form of hash
349
+ # @return [Object] Returns the model itself
350
+ def self.build_from_hash(attributes)
351
+ return nil unless attributes.is_a?(Hash)
352
+ attributes = attributes.transform_keys(&:to_sym)
353
+ transformed_hash = {}
354
+ openapi_types.each_pair do |key, type|
355
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
356
+ transformed_hash["#{key}"] = nil
357
+ elsif type =~ /\AArray<(.*)>/i
358
+ # check to ensure the input is an array given that the attribute
359
+ # is documented as an array but the input is not
360
+ if attributes[attribute_map[key]].is_a?(Array)
361
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
362
+ end
363
+ elsif !attributes[attribute_map[key]].nil?
364
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
365
+ end
366
+ end
367
+ new(transformed_hash)
368
+ end
369
+
370
+ # Returns the object in the form of hash
371
+ # @return [Hash] Returns the object in the form of hash
372
+ def to_hash
373
+ hash = {}
374
+ self.class.attribute_map.each_pair do |attr, param|
375
+ value = self.send(attr)
376
+ if value.nil?
377
+ is_nullable = self.class.openapi_nullable.include?(attr)
378
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
379
+ end
380
+
381
+ hash[param] = _to_hash(value)
382
+ end
383
+ hash
384
+ end
385
+
386
+ end
387
+
388
+ 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.11.0
6
+ The version of the OpenAPI document: 1.13.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.21.0
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module TemplateFox
17
- class JobStatus
17
+ class AppRoutersV1AgentJobStatus
18
18
  PENDING = "pending".freeze
19
19
  PROCESSING = "processing".freeze
20
20
  COMPLETED = "completed".freeze
@@ -35,8 +35,8 @@ module TemplateFox
35
35
  # @param [String] The enum value in the form of the string
36
36
  # @return [String] The enum value
37
37
  def build_from_hash(value)
38
- return value if JobStatus.all_vars.include?(value)
39
- raise "Invalid ENUM value #{value} for class #JobStatus"
38
+ return value if AppRoutersV1AgentJobStatus.all_vars.include?(value)
39
+ raise "Invalid ENUM value #{value} for class #AppRoutersV1AgentJobStatus"
40
40
  end
41
41
  end
42
42
  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.11.0
6
+ The version of the OpenAPI document: 1.13.0
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.11.0
6
+ The version of the OpenAPI document: 1.13.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.21.0