templatefox 1.0.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 (75) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +206 -0
  5. data/Rakefile +10 -0
  6. data/docs/AccountApi.md +152 -0
  7. data/docs/AccountInfoResponse.md +20 -0
  8. data/docs/CreatePdfRequest.md +32 -0
  9. data/docs/CreatePdfResponse.md +24 -0
  10. data/docs/ExportType.md +15 -0
  11. data/docs/HTTPValidationError.md +18 -0
  12. data/docs/IntegrationsApi.md +286 -0
  13. data/docs/LocationInner.md +15 -0
  14. data/docs/PDFApi.md +79 -0
  15. data/docs/S3ConfigRequest.md +26 -0
  16. data/docs/S3ConfigResponse.md +28 -0
  17. data/docs/S3SuccessResponse.md +18 -0
  18. data/docs/S3TestResponse.md +20 -0
  19. data/docs/TemplateField.md +26 -0
  20. data/docs/TemplateListItem.md +24 -0
  21. data/docs/TemplatesApi.md +148 -0
  22. data/docs/TemplatesListResponse.md +18 -0
  23. data/docs/Transaction.md +28 -0
  24. data/docs/TransactionsResponse.md +24 -0
  25. data/docs/ValidationError.md +22 -0
  26. data/git_push.sh +57 -0
  27. data/lib/templatefox/api/account_api.rb +154 -0
  28. data/lib/templatefox/api/integrations_api.rb +261 -0
  29. data/lib/templatefox/api/pdf_api.rb +90 -0
  30. data/lib/templatefox/api/templates_api.rb +142 -0
  31. data/lib/templatefox/api_client.rb +397 -0
  32. data/lib/templatefox/api_error.rb +58 -0
  33. data/lib/templatefox/api_model_base.rb +88 -0
  34. data/lib/templatefox/configuration.rb +308 -0
  35. data/lib/templatefox/models/account_info_response.rb +176 -0
  36. data/lib/templatefox/models/create_pdf_request.rb +414 -0
  37. data/lib/templatefox/models/create_pdf_response.rb +247 -0
  38. data/lib/templatefox/models/export_type.rb +40 -0
  39. data/lib/templatefox/models/http_validation_error.rb +149 -0
  40. data/lib/templatefox/models/location_inner.rb +103 -0
  41. data/lib/templatefox/models/s3_config_request.rb +372 -0
  42. data/lib/templatefox/models/s3_config_response.rb +301 -0
  43. data/lib/templatefox/models/s3_success_response.rb +166 -0
  44. data/lib/templatefox/models/s3_test_response.rb +193 -0
  45. data/lib/templatefox/models/template_field.rb +227 -0
  46. data/lib/templatefox/models/template_list_item.rb +247 -0
  47. data/lib/templatefox/models/templates_list_response.rb +167 -0
  48. data/lib/templatefox/models/transaction.rb +267 -0
  49. data/lib/templatefox/models/transactions_response.rb +248 -0
  50. data/lib/templatefox/models/validation_error.rb +218 -0
  51. data/lib/templatefox/version.rb +15 -0
  52. data/lib/templatefox.rb +60 -0
  53. data/spec/api/account_api_spec.rb +59 -0
  54. data/spec/api/integrations_api_spec.rb +80 -0
  55. data/spec/api/pdf_api_spec.rb +47 -0
  56. data/spec/api/templates_api_spec.rb +58 -0
  57. data/spec/models/account_info_response_spec.rb +42 -0
  58. data/spec/models/create_pdf_request_spec.rb +78 -0
  59. data/spec/models/create_pdf_response_spec.rb +54 -0
  60. data/spec/models/export_type_spec.rb +30 -0
  61. data/spec/models/http_validation_error_spec.rb +36 -0
  62. data/spec/models/location_inner_spec.rb +21 -0
  63. data/spec/models/s3_config_request_spec.rb +60 -0
  64. data/spec/models/s3_config_response_spec.rb +66 -0
  65. data/spec/models/s3_success_response_spec.rb +36 -0
  66. data/spec/models/s3_test_response_spec.rb +42 -0
  67. data/spec/models/template_field_spec.rb +60 -0
  68. data/spec/models/template_list_item_spec.rb +54 -0
  69. data/spec/models/templates_list_response_spec.rb +36 -0
  70. data/spec/models/transaction_spec.rb +66 -0
  71. data/spec/models/transactions_response_spec.rb +54 -0
  72. data/spec/models/validation_error_spec.rb +48 -0
  73. data/spec/spec_helper.rb +111 -0
  74. data/templatefox.gemspec +39 -0
  75. metadata +177 -0
@@ -0,0 +1,218 @@
1
+ =begin
2
+ #TemplateFox API
3
+
4
+ #Generate PDFs from HTML templates via API. Design once, generate thousands.
5
+
6
+ The version of the OpenAPI document: 1.0.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
+ class ValidationError < ApiModelBase
18
+ attr_accessor :loc
19
+
20
+ attr_accessor :msg
21
+
22
+ attr_accessor :type
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'loc' => :'loc',
28
+ :'msg' => :'msg',
29
+ :'type' => :'type'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'loc' => :'Array<LocationInner>',
47
+ :'msg' => :'String',
48
+ :'type' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TemplateFox::ValidationError` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TemplateFox::ValidationError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'loc')
75
+ if (value = attributes[:'loc']).is_a?(Array)
76
+ self.loc = value
77
+ end
78
+ else
79
+ self.loc = nil
80
+ end
81
+
82
+ if attributes.key?(:'msg')
83
+ self.msg = attributes[:'msg']
84
+ else
85
+ self.msg = nil
86
+ end
87
+
88
+ if attributes.key?(:'type')
89
+ self.type = attributes[:'type']
90
+ else
91
+ self.type = nil
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if @loc.nil?
101
+ invalid_properties.push('invalid value for "loc", loc cannot be nil.')
102
+ end
103
+
104
+ if @msg.nil?
105
+ invalid_properties.push('invalid value for "msg", msg cannot be nil.')
106
+ end
107
+
108
+ if @type.nil?
109
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
110
+ end
111
+
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ warn '[DEPRECATED] the `valid?` method is obsolete'
119
+ return false if @loc.nil?
120
+ return false if @msg.nil?
121
+ return false if @type.nil?
122
+ true
123
+ end
124
+
125
+ # Custom attribute writer method with validation
126
+ # @param [Object] loc Value to be assigned
127
+ def loc=(loc)
128
+ if loc.nil?
129
+ fail ArgumentError, 'loc cannot be nil'
130
+ end
131
+
132
+ @loc = loc
133
+ end
134
+
135
+ # Custom attribute writer method with validation
136
+ # @param [Object] msg Value to be assigned
137
+ def msg=(msg)
138
+ if msg.nil?
139
+ fail ArgumentError, 'msg cannot be nil'
140
+ end
141
+
142
+ @msg = msg
143
+ end
144
+
145
+ # Custom attribute writer method with validation
146
+ # @param [Object] type Value to be assigned
147
+ def type=(type)
148
+ if type.nil?
149
+ fail ArgumentError, 'type cannot be nil'
150
+ end
151
+
152
+ @type = type
153
+ end
154
+
155
+ # Checks equality by comparing each attribute.
156
+ # @param [Object] Object to be compared
157
+ def ==(o)
158
+ return true if self.equal?(o)
159
+ self.class == o.class &&
160
+ loc == o.loc &&
161
+ msg == o.msg &&
162
+ type == o.type
163
+ end
164
+
165
+ # @see the `==` method
166
+ # @param [Object] Object to be compared
167
+ def eql?(o)
168
+ self == o
169
+ end
170
+
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Integer] Hash code
173
+ def hash
174
+ [loc, msg, type].hash
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def self.build_from_hash(attributes)
181
+ return nil unless attributes.is_a?(Hash)
182
+ attributes = attributes.transform_keys(&:to_sym)
183
+ transformed_hash = {}
184
+ openapi_types.each_pair do |key, type|
185
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = nil
187
+ elsif type =~ /\AArray<(.*)>/i
188
+ # check to ensure the input is an array given that the attribute
189
+ # is documented as an array but the input is not
190
+ if attributes[attribute_map[key]].is_a?(Array)
191
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
192
+ end
193
+ elsif !attributes[attribute_map[key]].nil?
194
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
195
+ end
196
+ end
197
+ new(transformed_hash)
198
+ end
199
+
200
+ # Returns the object in the form of hash
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ if value.nil?
207
+ is_nullable = self.class.openapi_nullable.include?(attr)
208
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
+ end
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ end
217
+
218
+ end
@@ -0,0 +1,15 @@
1
+ =begin
2
+ #TemplateFox API
3
+
4
+ #Generate PDFs from HTML templates via API. Design once, generate thousands.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ module TemplateFox
14
+ VERSION = '1.0.0'
15
+ end
@@ -0,0 +1,60 @@
1
+ =begin
2
+ #TemplateFox API
3
+
4
+ #Generate PDFs from HTML templates via API. Design once, generate thousands.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'templatefox/api_client'
15
+ require 'templatefox/api_error'
16
+ require 'templatefox/api_model_base'
17
+ require 'templatefox/version'
18
+ require 'templatefox/configuration'
19
+
20
+ # Models
21
+ require 'templatefox/models/account_info_response'
22
+ require 'templatefox/models/create_pdf_request'
23
+ require 'templatefox/models/create_pdf_response'
24
+ require 'templatefox/models/export_type'
25
+ require 'templatefox/models/http_validation_error'
26
+ require 'templatefox/models/location_inner'
27
+ require 'templatefox/models/s3_config_request'
28
+ require 'templatefox/models/s3_config_response'
29
+ require 'templatefox/models/s3_success_response'
30
+ require 'templatefox/models/s3_test_response'
31
+ require 'templatefox/models/template_field'
32
+ require 'templatefox/models/template_list_item'
33
+ require 'templatefox/models/templates_list_response'
34
+ require 'templatefox/models/transaction'
35
+ require 'templatefox/models/transactions_response'
36
+ require 'templatefox/models/validation_error'
37
+
38
+ # APIs
39
+ require 'templatefox/api/account_api'
40
+ require 'templatefox/api/integrations_api'
41
+ require 'templatefox/api/pdf_api'
42
+ require 'templatefox/api/templates_api'
43
+
44
+ module TemplateFox
45
+ class << self
46
+ # Customize default settings for the SDK using block.
47
+ # TemplateFox.configure do |config|
48
+ # config.username = "xxx"
49
+ # config.password = "xxx"
50
+ # end
51
+ # If no block given, return the default Configuration object.
52
+ def configure
53
+ if block_given?
54
+ yield(Configuration.default)
55
+ else
56
+ Configuration.default
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,59 @@
1
+ =begin
2
+ #TemplateFox API
3
+
4
+ #Generate PDFs from HTML templates via API. Design once, generate thousands.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for TemplateFox::AccountApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'AccountApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = TemplateFox::AccountApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of AccountApi' do
30
+ it 'should create an instance of AccountApi' do
31
+ expect(@api_instance).to be_instance_of(TemplateFox::AccountApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get_account
36
+ # Get account info
37
+ # Get account information including remaining credits. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) or JWT token **Usage:** Check credit balance before performing operations. **No credits consumed:** This is a read-only endpoint.
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [AccountInfoResponse]
40
+ describe 'get_account test' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ # unit tests for list_transactions
47
+ # List transactions
48
+ # List transaction history for the authenticated user. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) or JWT token **Pagination:** Use &#x60;limit&#x60; and &#x60;offset&#x60; query parameters. **Transaction types:** - &#x60;PDFGEN&#x60;: PDF generation (consumes credits) - &#x60;REFUND&#x60;: Credit refund (on failed generation) - &#x60;PURCHASE&#x60;: Credit purchase - &#x60;BONUS&#x60;: Bonus credits **Credits field:** - Positive value &#x3D; credits consumed - Negative value &#x3D; credits added **No credits consumed:** This is a read-only endpoint.
49
+ # @param [Hash] opts the optional parameters
50
+ # @option opts [Integer] :limit Number of records to return
51
+ # @option opts [Integer] :offset Number of records to skip
52
+ # @return [TransactionsResponse]
53
+ describe 'list_transactions test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
56
+ end
57
+ end
58
+
59
+ end
@@ -0,0 +1,80 @@
1
+ =begin
2
+ #TemplateFox API
3
+
4
+ #Generate PDFs from HTML templates via API. Design once, generate thousands.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for TemplateFox::IntegrationsApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'IntegrationsApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = TemplateFox::IntegrationsApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of IntegrationsApi' do
30
+ it 'should create an instance of IntegrationsApi' do
31
+ expect(@api_instance).to be_instance_of(TemplateFox::IntegrationsApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for delete_s3_config
36
+ # Delete S3 configuration
37
+ # Delete S3 storage configuration. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) with admin privileges **Usage:** Remove your S3 integration. Generated PDFs will use the default CDN storage after deletion. **Warning:** This action is irreversible. You&#39;ll need to reconfigure S3 to use it again. **No credits consumed:** This is a configuration endpoint.
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [S3SuccessResponse]
40
+ describe 'delete_s3_config test' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ # unit tests for get_s3_config
47
+ # Get S3 configuration
48
+ # Get current S3 storage configuration. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) with admin privileges **Usage:** Retrieve your S3 integration settings. Secret access key is masked for security. **Returns 404** if S3 is not configured. **No credits consumed:** This is a read-only endpoint.
49
+ # @param [Hash] opts the optional parameters
50
+ # @return [S3ConfigResponse]
51
+ describe 'get_s3_config test' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
54
+ end
55
+ end
56
+
57
+ # unit tests for save_s3_config
58
+ # Save S3 configuration
59
+ # Save or update S3-compatible storage configuration. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) with admin privileges **Usage:** Configure your S3-compatible storage to receive generated PDFs directly in your own bucket instead of the default CDN. **Supported providers:** - Amazon S3 - DigitalOcean Spaces - Cloudflare R2 - MinIO - Any S3-compatible storage **Secret key behavior:** - For new configuration: &#x60;secret_access_key&#x60; is required - For updates: Omit &#x60;secret_access_key&#x60; to keep existing value **No credits consumed:** This is a configuration endpoint.
60
+ # @param s3_config_request
61
+ # @param [Hash] opts the optional parameters
62
+ # @return [S3SuccessResponse]
63
+ describe 'save_s3_config test' do
64
+ it 'should work' do
65
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
66
+ end
67
+ end
68
+
69
+ # unit tests for test_s3_connection
70
+ # Test S3 connection
71
+ # Test S3 connection with stored credentials. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) with admin privileges **Usage:** Verify your S3 configuration is working correctly. The test will: 1. Connect to the endpoint 2. Verify bucket access 3. Check write permissions by uploading a small test file **Prerequisite:** S3 must be configured first using &#x60;POST /v1/integrations/s3&#x60; **No credits consumed:** This is a diagnostic endpoint.
72
+ # @param [Hash] opts the optional parameters
73
+ # @return [S3TestResponse]
74
+ describe 'test_s3_connection test' do
75
+ it 'should work' do
76
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
77
+ end
78
+ end
79
+
80
+ end
@@ -0,0 +1,47 @@
1
+ =begin
2
+ #TemplateFox API
3
+
4
+ #Generate PDFs from HTML templates via API. Design once, generate thousands.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for TemplateFox::PDFApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'PDFApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = TemplateFox::PDFApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of PDFApi' do
30
+ it 'should create an instance of PDFApi' do
31
+ expect(@api_instance).to be_instance_of(TemplateFox::PDFApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for create_pdf
36
+ # Generate PDF from template
37
+ # Generate a PDF from a saved template with dynamic data. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) ## Request Body | Field | Type | Required | Description | |-------|------|----------|-------------| | &#x60;template_id&#x60; | string | ✅ Yes | Template short ID (12 characters) | | &#x60;data&#x60; | object | ✅ Yes | Key-value data to render in template | | &#x60;export_type&#x60; | string | No | &#x60;url&#x60; (default) or &#x60;binary&#x60; | | &#x60;expiration&#x60; | integer | No | URL expiration in seconds (60-604800, default: 86400) | ## Export Types - &#x60;url&#x60; (default): PDF is uploaded to CDN, returns JSON with URL - &#x60;binary&#x60;: Returns raw PDF bytes directly **Credits:** 1 credit deducted per successful generation.
38
+ # @param create_pdf_request
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [CreatePdfResponse]
41
+ describe 'create_pdf test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
+ end
45
+ end
46
+
47
+ end
@@ -0,0 +1,58 @@
1
+ =begin
2
+ #TemplateFox API
3
+
4
+ #Generate PDFs from HTML templates via API. Design once, generate thousands.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for TemplateFox::TemplatesApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'TemplatesApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = TemplateFox::TemplatesApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of TemplatesApi' do
30
+ it 'should create an instance of TemplatesApi' do
31
+ expect(@api_instance).to be_instance_of(TemplateFox::TemplatesApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get_template_fields
36
+ # Get template fields
37
+ # Get the dynamic fields for a template. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) or JWT token **Usage:** This endpoint is designed for Zapier Dynamic Fields integration. It returns an array of field definitions that Zapier uses to dynamically generate input forms. **Response format:** Array of objects compatible with Zapier InputFieldsSchema. Each field has: &#x60;key&#x60;, &#x60;label&#x60;, &#x60;type&#x60;, &#x60;required&#x60;, and optional &#x60;helpText&#x60;. **Field types:** - &#x60;string&#x60;: Text input (also used for JSON arrays/objects) - &#x60;integer&#x60;: Integer number - &#x60;number&#x60;: Decimal number - &#x60;boolean&#x60;: True/False checkbox **Arrays and objects:** Complex types are returned as &#x60;string&#x60; type with a &#x60;helpText&#x60; showing the expected JSON format. **No credits consumed:** This is a read-only endpoint.
38
+ # @param template_id
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<TemplateField>]
41
+ describe 'get_template_fields test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
+ end
45
+ end
46
+
47
+ # unit tests for list_templates
48
+ # List templates
49
+ # List all templates for the authenticated user. **Authentication:** API Key required (&#x60;x-api-key&#x60; header) or JWT token **Usage:** This endpoint is designed for no-code tools (Zapier, Make, n8n) to populate template selection dropdowns. **No credits consumed:** This is a read-only endpoint.
50
+ # @param [Hash] opts the optional parameters
51
+ # @return [TemplatesListResponse]
52
+ describe 'list_templates test' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
55
+ end
56
+ end
57
+
58
+ end
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #TemplateFox API
3
+
4
+ #Generate PDFs from HTML templates via API. Design once, generate thousands.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TemplateFox::AccountInfoResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe TemplateFox::AccountInfoResponse do
21
+ #let(:instance) { TemplateFox::AccountInfoResponse.new }
22
+
23
+ describe 'test an instance of AccountInfoResponse' do
24
+ it 'should create an instance of AccountInfoResponse' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(TemplateFox::AccountInfoResponse)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "credits"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "email"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ end
@@ -0,0 +1,78 @@
1
+ =begin
2
+ #TemplateFox API
3
+
4
+ #Generate PDFs from HTML templates via API. Design once, generate thousands.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for TemplateFox::CreatePdfRequest
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe TemplateFox::CreatePdfRequest do
21
+ #let(:instance) { TemplateFox::CreatePdfRequest.new }
22
+
23
+ describe 'test an instance of CreatePdfRequest' do
24
+ it 'should create an instance of CreatePdfRequest' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(TemplateFox::CreatePdfRequest)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "template_id"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "data"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "export_type"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ describe 'test attribute "expiration"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "filename"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
60
+ describe 'test attribute "store_s3"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
+ end
64
+ end
65
+
66
+ describe 'test attribute "s3_filepath"' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
69
+ end
70
+ end
71
+
72
+ describe 'test attribute "s3_bucket"' do
73
+ it 'should work' do
74
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
75
+ end
76
+ end
77
+
78
+ end