templatefox 1.10.0 → 1.11.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 (100) hide show
  1. checksums.yaml +4 -4
  2. data/lib/templatefox/api/account_api.rb +1 -1
  3. data/lib/templatefox/api/image_api.rb +90 -0
  4. data/lib/templatefox/api/integrations_api.rb +1 -1
  5. data/lib/templatefox/api/pdf_api.rb +1 -1
  6. data/lib/templatefox/api/pdf_async_api.rb +1 -1
  7. data/lib/templatefox/api/pdf_tools_api.rb +1 -1
  8. data/lib/templatefox/api/templates_api.rb +9 -1
  9. data/lib/templatefox/api_client.rb +1 -1
  10. data/lib/templatefox/api_error.rb +1 -1
  11. data/lib/templatefox/api_model_base.rb +1 -1
  12. data/lib/templatefox/configuration.rb +1 -1
  13. data/lib/templatefox/models/account_info_response.rb +1 -1
  14. data/lib/templatefox/models/{app_routers_v1_pdf_export_type.rb → app_routers_v1_delivery_export_type.rb} +4 -4
  15. data/lib/templatefox/models/app_routers_v1_pdf_async_export_type.rb +1 -1
  16. data/lib/templatefox/models/app_routers_v1_pdf_tools_export_type.rb +1 -1
  17. data/lib/templatefox/models/create_async_pdf_request.rb +1 -1
  18. data/lib/templatefox/models/create_async_pdf_response.rb +1 -1
  19. data/lib/templatefox/models/create_image_request.rb +533 -0
  20. data/lib/templatefox/models/create_image_response.rb +259 -0
  21. data/lib/templatefox/models/create_pdf_request.rb +2 -2
  22. data/lib/templatefox/models/create_pdf_response.rb +1 -1
  23. data/lib/templatefox/models/create_version_request.rb +1 -1
  24. data/lib/templatefox/models/extract_pdf_pages_request.rb +1 -1
  25. data/lib/templatefox/models/http_validation_error.rb +1 -1
  26. data/lib/templatefox/models/image_format.rb +41 -0
  27. data/lib/templatefox/models/job_list_response.rb +1 -1
  28. data/lib/templatefox/models/job_status.rb +1 -1
  29. data/lib/templatefox/models/job_status_response.rb +1 -1
  30. data/lib/templatefox/models/location_inner.rb +1 -1
  31. data/lib/templatefox/models/merge_pdf_request.rb +1 -1
  32. data/lib/templatefox/models/modification.rb +305 -0
  33. data/lib/templatefox/models/pdf_input.rb +1 -1
  34. data/lib/templatefox/models/pdf_tools_response.rb +1 -1
  35. data/lib/templatefox/models/pdf_variant.rb +1 -1
  36. data/lib/templatefox/models/rotate_pdf_request.rb +1 -1
  37. data/lib/templatefox/models/s3_config_request.rb +1 -1
  38. data/lib/templatefox/models/s3_config_response.rb +1 -1
  39. data/lib/templatefox/models/s3_success_response.rb +1 -1
  40. data/lib/templatefox/models/s3_test_response.rb +1 -1
  41. data/lib/templatefox/models/template_field.rb +1 -1
  42. data/lib/templatefox/models/template_field_spec.rb +1 -1
  43. data/lib/templatefox/models/template_list_item.rb +14 -2
  44. data/lib/templatefox/models/templates_list_response.rb +1 -1
  45. data/lib/templatefox/models/transaction.rb +1 -1
  46. data/lib/templatefox/models/transactions_response.rb +1 -1
  47. data/lib/templatefox/models/update_version_request.rb +1 -1
  48. data/lib/templatefox/models/validation_error.rb +1 -1
  49. data/lib/templatefox/models/version_item.rb +1 -1
  50. data/lib/templatefox/models/versions_list_response.rb +1 -1
  51. data/lib/templatefox/version.rb +2 -2
  52. data/lib/templatefox.rb +7 -2
  53. data/spec/api/account_api_spec.rb +1 -1
  54. data/spec/api/image_api_spec.rb +47 -0
  55. data/spec/api/integrations_api_spec.rb +1 -1
  56. data/spec/api/pdf_api_spec.rb +1 -1
  57. data/spec/api/pdf_async_api_spec.rb +1 -1
  58. data/spec/api/pdf_tools_api_spec.rb +1 -1
  59. data/spec/api/templates_api_spec.rb +2 -1
  60. data/spec/models/account_info_response_spec.rb +1 -1
  61. data/spec/models/{app_routers_v1_pdf_export_type_spec.rb → app_routers_v1_delivery_export_type_spec.rb} +7 -7
  62. data/spec/models/app_routers_v1_pdf_async_export_type_spec.rb +1 -1
  63. data/spec/models/app_routers_v1_pdf_tools_export_type_spec.rb +1 -1
  64. data/spec/models/create_async_pdf_request_spec.rb +1 -1
  65. data/spec/models/create_async_pdf_response_spec.rb +1 -1
  66. data/spec/models/create_image_request_spec.rb +108 -0
  67. data/spec/models/create_image_response_spec.rb +60 -0
  68. data/spec/models/create_pdf_request_spec.rb +1 -1
  69. data/spec/models/create_pdf_response_spec.rb +1 -1
  70. data/spec/models/create_version_request_spec.rb +1 -1
  71. data/spec/models/extract_pdf_pages_request_spec.rb +1 -1
  72. data/spec/models/http_validation_error_spec.rb +1 -1
  73. data/spec/models/image_format_spec.rb +30 -0
  74. data/spec/models/job_list_response_spec.rb +1 -1
  75. data/spec/models/job_status_response_spec.rb +1 -1
  76. data/spec/models/job_status_spec.rb +1 -1
  77. data/spec/models/location_inner_spec.rb +1 -1
  78. data/spec/models/merge_pdf_request_spec.rb +1 -1
  79. data/spec/models/modification_spec.rb +66 -0
  80. data/spec/models/pdf_input_spec.rb +1 -1
  81. data/spec/models/pdf_tools_response_spec.rb +1 -1
  82. data/spec/models/pdf_variant_spec.rb +1 -1
  83. data/spec/models/rotate_pdf_request_spec.rb +1 -1
  84. data/spec/models/s3_config_request_spec.rb +1 -1
  85. data/spec/models/s3_config_response_spec.rb +1 -1
  86. data/spec/models/s3_success_response_spec.rb +1 -1
  87. data/spec/models/s3_test_response_spec.rb +1 -1
  88. data/spec/models/template_field_spec.rb +1 -1
  89. data/spec/models/template_field_spec_spec.rb +1 -1
  90. data/spec/models/template_list_item_spec.rb +7 -1
  91. data/spec/models/templates_list_response_spec.rb +1 -1
  92. data/spec/models/transaction_spec.rb +1 -1
  93. data/spec/models/transactions_response_spec.rb +1 -1
  94. data/spec/models/update_version_request_spec.rb +1 -1
  95. data/spec/models/validation_error_spec.rb +1 -1
  96. data/spec/models/version_item_spec.rb +1 -1
  97. data/spec/models/versions_list_response_spec.rb +1 -1
  98. data/spec/spec_helper.rb +1 -1
  99. data/templatefox.gemspec +1 -1
  100. metadata +46 -31
@@ -0,0 +1,259 @@
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.11.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
+ # Response for URL export type
18
+ class CreateImageResponse < ApiModelBase
19
+ # Signed URL to download the image (expires after specified time)
20
+ attr_accessor :url
21
+
22
+ # Filename of the generated image
23
+ attr_accessor :filename
24
+
25
+ # Remaining credits after this request
26
+ attr_accessor :credits_remaining
27
+
28
+ # Seconds until the signed URL expires
29
+ attr_accessor :expires_in
30
+
31
+ attr_accessor :warnings
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'url' => :'url',
37
+ :'filename' => :'filename',
38
+ :'credits_remaining' => :'credits_remaining',
39
+ :'expires_in' => :'expires_in',
40
+ :'warnings' => :'warnings'
41
+ }
42
+ end
43
+
44
+ # Returns attribute mapping this model knows about
45
+ def self.acceptable_attribute_map
46
+ attribute_map
47
+ end
48
+
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ acceptable_attribute_map.values
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.openapi_types
56
+ {
57
+ :'url' => :'String',
58
+ :'filename' => :'String',
59
+ :'credits_remaining' => :'Integer',
60
+ :'expires_in' => :'Integer',
61
+ :'warnings' => :'Array<String>'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ :'warnings'
69
+ ])
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TemplateFox::CreateImageResponse` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ acceptable_attribute_map = self.class.acceptable_attribute_map
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!acceptable_attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TemplateFox::CreateImageResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'url')
89
+ self.url = attributes[:'url']
90
+ else
91
+ self.url = nil
92
+ end
93
+
94
+ if attributes.key?(:'filename')
95
+ self.filename = attributes[:'filename']
96
+ else
97
+ self.filename = nil
98
+ end
99
+
100
+ if attributes.key?(:'credits_remaining')
101
+ self.credits_remaining = attributes[:'credits_remaining']
102
+ else
103
+ self.credits_remaining = nil
104
+ end
105
+
106
+ if attributes.key?(:'expires_in')
107
+ self.expires_in = attributes[:'expires_in']
108
+ else
109
+ self.expires_in = nil
110
+ end
111
+
112
+ if attributes.key?(:'warnings')
113
+ if (value = attributes[:'warnings']).is_a?(Array)
114
+ self.warnings = value
115
+ end
116
+ end
117
+ end
118
+
119
+ # Show invalid properties with the reasons. Usually used together with valid?
120
+ # @return Array for valid properties with the reasons
121
+ def list_invalid_properties
122
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
123
+ invalid_properties = Array.new
124
+ if @url.nil?
125
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
126
+ end
127
+
128
+ if @filename.nil?
129
+ invalid_properties.push('invalid value for "filename", filename cannot be nil.')
130
+ end
131
+
132
+ if @credits_remaining.nil?
133
+ invalid_properties.push('invalid value for "credits_remaining", credits_remaining cannot be nil.')
134
+ end
135
+
136
+ if @expires_in.nil?
137
+ invalid_properties.push('invalid value for "expires_in", expires_in cannot be nil.')
138
+ end
139
+
140
+ invalid_properties
141
+ end
142
+
143
+ # Check to see if the all the properties in the model are valid
144
+ # @return true if the model is valid
145
+ def valid?
146
+ warn '[DEPRECATED] the `valid?` method is obsolete'
147
+ return false if @url.nil?
148
+ return false if @filename.nil?
149
+ return false if @credits_remaining.nil?
150
+ return false if @expires_in.nil?
151
+ true
152
+ end
153
+
154
+ # Custom attribute writer method with validation
155
+ # @param [Object] url Value to be assigned
156
+ def url=(url)
157
+ if url.nil?
158
+ fail ArgumentError, 'url cannot be nil'
159
+ end
160
+
161
+ @url = url
162
+ end
163
+
164
+ # Custom attribute writer method with validation
165
+ # @param [Object] filename Value to be assigned
166
+ def filename=(filename)
167
+ if filename.nil?
168
+ fail ArgumentError, 'filename cannot be nil'
169
+ end
170
+
171
+ @filename = filename
172
+ end
173
+
174
+ # Custom attribute writer method with validation
175
+ # @param [Object] credits_remaining Value to be assigned
176
+ def credits_remaining=(credits_remaining)
177
+ if credits_remaining.nil?
178
+ fail ArgumentError, 'credits_remaining cannot be nil'
179
+ end
180
+
181
+ @credits_remaining = credits_remaining
182
+ end
183
+
184
+ # Custom attribute writer method with validation
185
+ # @param [Object] expires_in Value to be assigned
186
+ def expires_in=(expires_in)
187
+ if expires_in.nil?
188
+ fail ArgumentError, 'expires_in cannot be nil'
189
+ end
190
+
191
+ @expires_in = expires_in
192
+ end
193
+
194
+ # Checks equality by comparing each attribute.
195
+ # @param [Object] Object to be compared
196
+ def ==(o)
197
+ return true if self.equal?(o)
198
+ self.class == o.class &&
199
+ url == o.url &&
200
+ filename == o.filename &&
201
+ credits_remaining == o.credits_remaining &&
202
+ expires_in == o.expires_in &&
203
+ warnings == o.warnings
204
+ end
205
+
206
+ # @see the `==` method
207
+ # @param [Object] Object to be compared
208
+ def eql?(o)
209
+ self == o
210
+ end
211
+
212
+ # Calculates hash code according to all attributes.
213
+ # @return [Integer] Hash code
214
+ def hash
215
+ [url, filename, credits_remaining, expires_in, warnings].hash
216
+ end
217
+
218
+ # Builds the object from hash
219
+ # @param [Hash] attributes Model attributes in the form of hash
220
+ # @return [Object] Returns the model itself
221
+ def self.build_from_hash(attributes)
222
+ return nil unless attributes.is_a?(Hash)
223
+ attributes = attributes.transform_keys(&:to_sym)
224
+ transformed_hash = {}
225
+ openapi_types.each_pair do |key, type|
226
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
227
+ transformed_hash["#{key}"] = nil
228
+ elsif type =~ /\AArray<(.*)>/i
229
+ # check to ensure the input is an array given that the attribute
230
+ # is documented as an array but the input is not
231
+ if attributes[attribute_map[key]].is_a?(Array)
232
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
233
+ end
234
+ elsif !attributes[attribute_map[key]].nil?
235
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
236
+ end
237
+ end
238
+ new(transformed_hash)
239
+ end
240
+
241
+ # Returns the object in the form of hash
242
+ # @return [Hash] Returns the object in the form of hash
243
+ def to_hash
244
+ hash = {}
245
+ self.class.attribute_map.each_pair do |attr, param|
246
+ value = self.send(attr)
247
+ if value.nil?
248
+ is_nullable = self.class.openapi_nullable.include?(attr)
249
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
250
+ end
251
+
252
+ hash[param] = _to_hash(value)
253
+ end
254
+ hash
255
+ end
256
+
257
+ end
258
+
259
+ 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.10.0
6
+ The version of the OpenAPI document: 1.11.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.21.0
@@ -94,7 +94,7 @@ module TemplateFox
94
94
  {
95
95
  :'template_id' => :'String',
96
96
  :'data' => :'Hash<String, Object>',
97
- :'export_type' => :'AppRoutersV1PdfExportType',
97
+ :'export_type' => :'AppRoutersV1DeliveryExportType',
98
98
  :'expiration' => :'Integer',
99
99
  :'filename' => :'String',
100
100
  :'store_s3' => :'Boolean',
@@ -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.10.0
6
+ The version of the OpenAPI document: 1.11.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.10.0
6
+ The version of the OpenAPI document: 1.11.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.10.0
6
+ The version of the OpenAPI document: 1.11.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.10.0
6
+ The version of the OpenAPI document: 1.11.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.21.0
@@ -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.11.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 ImageFormat
18
+ PNG = "png".freeze
19
+ JPEG = "jpeg".freeze
20
+ WEBP = "webp".freeze
21
+
22
+ def self.all_vars
23
+ @all_vars ||= [PNG, JPEG, WEBP].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 ImageFormat.all_vars.include?(value)
38
+ raise "Invalid ENUM value #{value} for class #ImageFormat"
39
+ end
40
+ end
41
+ 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.10.0
6
+ The version of the OpenAPI document: 1.11.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.10.0
6
+ The version of the OpenAPI document: 1.11.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.10.0
6
+ The version of the OpenAPI document: 1.11.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.10.0
6
+ The version of the OpenAPI document: 1.11.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.10.0
6
+ The version of the OpenAPI document: 1.11.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.21.0