templatefox 1.0.0 → 1.0.1
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/version.rb +1 -1
- data/templatefox.gemspec +7 -2
- metadata +29 -46
- 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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fff8ad4c1d9086b53e3642668c5121f43b026b6decbaa58ddd0698bc71318227
|
|
4
|
+
data.tar.gz: 2f6f35486b49c29a44a641f6c8293e808a1ce73bad704480c20a724dd7f62084
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c2be2b40850b1398c3d279554fcd3cf10196bb42ff551414d010d2afd982c0d6721ce094b72bd5e7ae4d554e1d962c607f29bf8bd5df5c9b171acf4763ef838f
|
|
7
|
+
data.tar.gz: b2f78c4dff74f6316d0cee0487a825c27c6fdfb44763017d8c06465a0733423e6beda86a4a7b4a29e8e4ffe84ee93fe24ddf00d5a02ab282dea391bf73ab8925
|
data/lib/templatefox/version.rb
CHANGED
data/templatefox.gemspec
CHANGED
|
@@ -21,12 +21,17 @@ Gem::Specification.new do |s|
|
|
|
21
21
|
s.platform = Gem::Platform::RUBY
|
|
22
22
|
s.authors = ["TemplateFox"]
|
|
23
23
|
s.email = ["support@pdftemplateapi.com"]
|
|
24
|
-
s.homepage = "https://
|
|
24
|
+
s.homepage = "https://pdftemplateapi.com"
|
|
25
25
|
s.summary = "Official TemplateFox Ruby SDK"
|
|
26
26
|
s.description = "Ruby SDK for TemplateFox - Generate PDFs from HTML templates via API"
|
|
27
27
|
s.license = "MIT"
|
|
28
28
|
s.required_ruby_version = ">= 2.7"
|
|
29
|
-
s.metadata = {
|
|
29
|
+
s.metadata = {
|
|
30
|
+
"source_code_uri" => "https://github.com/TemplateFoxPDF/rubysdk",
|
|
31
|
+
"bug_tracker_uri" => "https://github.com/TemplateFoxPDF/rubysdk/issues",
|
|
32
|
+
"documentation_uri" => "https://pdftemplateapi.com/docs",
|
|
33
|
+
"homepage_uri" => "https://pdftemplateapi.com"
|
|
34
|
+
}
|
|
30
35
|
|
|
31
36
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
32
37
|
|
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: templatefox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- TemplateFox
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2026-02-05 00:00:00.000000000 Z
|
|
@@ -34,22 +34,22 @@ dependencies:
|
|
|
34
34
|
name: rspec
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
|
-
- - ">="
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: 3.6.0
|
|
40
37
|
- - "~>"
|
|
41
38
|
- !ruby/object:Gem::Version
|
|
42
39
|
version: '3.6'
|
|
40
|
+
- - ">="
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: 3.6.0
|
|
43
43
|
type: :development
|
|
44
44
|
prerelease: false
|
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
|
46
46
|
requirements:
|
|
47
|
-
- - ">="
|
|
48
|
-
- !ruby/object:Gem::Version
|
|
49
|
-
version: 3.6.0
|
|
50
47
|
- - "~>"
|
|
51
48
|
- !ruby/object:Gem::Version
|
|
52
49
|
version: '3.6'
|
|
50
|
+
- - ">="
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: 3.6.0
|
|
53
53
|
description: Ruby SDK for TemplateFox - Generate PDFs from HTML templates via API
|
|
54
54
|
email:
|
|
55
55
|
- support@pdftemplateapi.com
|
|
@@ -61,27 +61,6 @@ files:
|
|
|
61
61
|
- LICENSE
|
|
62
62
|
- README.md
|
|
63
63
|
- Rakefile
|
|
64
|
-
- docs/AccountApi.md
|
|
65
|
-
- docs/AccountInfoResponse.md
|
|
66
|
-
- docs/CreatePdfRequest.md
|
|
67
|
-
- docs/CreatePdfResponse.md
|
|
68
|
-
- docs/ExportType.md
|
|
69
|
-
- docs/HTTPValidationError.md
|
|
70
|
-
- docs/IntegrationsApi.md
|
|
71
|
-
- docs/LocationInner.md
|
|
72
|
-
- docs/PDFApi.md
|
|
73
|
-
- docs/S3ConfigRequest.md
|
|
74
|
-
- docs/S3ConfigResponse.md
|
|
75
|
-
- docs/S3SuccessResponse.md
|
|
76
|
-
- docs/S3TestResponse.md
|
|
77
|
-
- docs/TemplateField.md
|
|
78
|
-
- docs/TemplateListItem.md
|
|
79
|
-
- docs/TemplatesApi.md
|
|
80
|
-
- docs/TemplatesListResponse.md
|
|
81
|
-
- docs/Transaction.md
|
|
82
|
-
- docs/TransactionsResponse.md
|
|
83
|
-
- docs/ValidationError.md
|
|
84
|
-
- git_push.sh
|
|
85
64
|
- lib/templatefox.rb
|
|
86
65
|
- lib/templatefox/api/account_api.rb
|
|
87
66
|
- lib/templatefox/api/integrations_api.rb
|
|
@@ -130,11 +109,15 @@ files:
|
|
|
130
109
|
- spec/models/validation_error_spec.rb
|
|
131
110
|
- spec/spec_helper.rb
|
|
132
111
|
- templatefox.gemspec
|
|
133
|
-
homepage: https://
|
|
112
|
+
homepage: https://pdftemplateapi.com
|
|
134
113
|
licenses:
|
|
135
114
|
- MIT
|
|
136
|
-
metadata:
|
|
137
|
-
|
|
115
|
+
metadata:
|
|
116
|
+
source_code_uri: https://github.com/TemplateFoxPDF/rubysdk
|
|
117
|
+
bug_tracker_uri: https://github.com/TemplateFoxPDF/rubysdk/issues
|
|
118
|
+
documentation_uri: https://pdftemplateapi.com/docs
|
|
119
|
+
homepage_uri: https://pdftemplateapi.com
|
|
120
|
+
post_install_message:
|
|
138
121
|
rdoc_options: []
|
|
139
122
|
require_paths:
|
|
140
123
|
- lib
|
|
@@ -149,29 +132,29 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
149
132
|
- !ruby/object:Gem::Version
|
|
150
133
|
version: '0'
|
|
151
134
|
requirements: []
|
|
152
|
-
rubygems_version: 3.
|
|
153
|
-
signing_key:
|
|
135
|
+
rubygems_version: 3.4.19
|
|
136
|
+
signing_key:
|
|
154
137
|
specification_version: 4
|
|
155
138
|
summary: Official TemplateFox Ruby SDK
|
|
156
139
|
test_files:
|
|
140
|
+
- spec/api/templates_api_spec.rb
|
|
157
141
|
- spec/api/integrations_api_spec.rb
|
|
158
142
|
- spec/api/account_api_spec.rb
|
|
159
143
|
- spec/api/pdf_api_spec.rb
|
|
160
|
-
- spec/api/templates_api_spec.rb
|
|
161
|
-
- spec/models/export_type_spec.rb
|
|
162
|
-
- spec/models/s3_test_response_spec.rb
|
|
163
|
-
- spec/models/template_list_item_spec.rb
|
|
164
|
-
- spec/models/validation_error_spec.rb
|
|
165
|
-
- spec/models/s3_config_response_spec.rb
|
|
166
|
-
- spec/models/create_pdf_request_spec.rb
|
|
167
|
-
- spec/models/transaction_spec.rb
|
|
168
144
|
- spec/models/location_inner_spec.rb
|
|
169
|
-
- spec/models/http_validation_error_spec.rb
|
|
170
145
|
- spec/models/account_info_response_spec.rb
|
|
146
|
+
- spec/models/template_list_item_spec.rb
|
|
147
|
+
- spec/models/http_validation_error_spec.rb
|
|
148
|
+
- spec/models/export_type_spec.rb
|
|
171
149
|
- spec/models/create_pdf_response_spec.rb
|
|
172
|
-
- spec/models/
|
|
173
|
-
- spec/models/
|
|
150
|
+
- spec/models/validation_error_spec.rb
|
|
151
|
+
- spec/models/s3_config_request_spec.rb
|
|
152
|
+
- spec/models/s3_test_response_spec.rb
|
|
174
153
|
- spec/models/s3_success_response_spec.rb
|
|
154
|
+
- spec/models/templates_list_response_spec.rb
|
|
175
155
|
- spec/models/transactions_response_spec.rb
|
|
176
|
-
- spec/models/
|
|
156
|
+
- spec/models/template_field_spec.rb
|
|
157
|
+
- spec/models/s3_config_response_spec.rb
|
|
158
|
+
- spec/models/create_pdf_request_spec.rb
|
|
159
|
+
- spec/models/transaction_spec.rb
|
|
177
160
|
- spec/spec_helper.rb
|
data/docs/AccountApi.md
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
# TemplateFox::AccountApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://api.pdftemplateapi.com*
|
|
4
|
-
|
|
5
|
-
| Method | HTTP request | Description |
|
|
6
|
-
| ------ | ------------ | ----------- |
|
|
7
|
-
| [**get_account**](AccountApi.md#get_account) | **GET** /v1/account | Get account info |
|
|
8
|
-
| [**list_transactions**](AccountApi.md#list_transactions) | **GET** /v1/account/transactions | List transactions |
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## get_account
|
|
12
|
-
|
|
13
|
-
> <AccountInfoResponse> get_account
|
|
14
|
-
|
|
15
|
-
Get account info
|
|
16
|
-
|
|
17
|
-
Get account information including remaining credits. **Authentication:** API Key required (`x-api-key` header) or JWT token **Usage:** Check credit balance before performing operations. **No credits consumed:** This is a read-only endpoint.
|
|
18
|
-
|
|
19
|
-
### Examples
|
|
20
|
-
|
|
21
|
-
```ruby
|
|
22
|
-
require 'time'
|
|
23
|
-
require 'templatefox'
|
|
24
|
-
# setup authorization
|
|
25
|
-
TemplateFox.configure do |config|
|
|
26
|
-
# Configure API key authorization: ApiKeyAuth
|
|
27
|
-
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
28
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
29
|
-
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
api_instance = TemplateFox::AccountApi.new
|
|
33
|
-
|
|
34
|
-
begin
|
|
35
|
-
# Get account info
|
|
36
|
-
result = api_instance.get_account
|
|
37
|
-
p result
|
|
38
|
-
rescue TemplateFox::ApiError => e
|
|
39
|
-
puts "Error when calling AccountApi->get_account: #{e}"
|
|
40
|
-
end
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
#### Using the get_account_with_http_info variant
|
|
44
|
-
|
|
45
|
-
This returns an Array which contains the response data, status code and headers.
|
|
46
|
-
|
|
47
|
-
> <Array(<AccountInfoResponse>, Integer, Hash)> get_account_with_http_info
|
|
48
|
-
|
|
49
|
-
```ruby
|
|
50
|
-
begin
|
|
51
|
-
# Get account info
|
|
52
|
-
data, status_code, headers = api_instance.get_account_with_http_info
|
|
53
|
-
p status_code # => 2xx
|
|
54
|
-
p headers # => { ... }
|
|
55
|
-
p data # => <AccountInfoResponse>
|
|
56
|
-
rescue TemplateFox::ApiError => e
|
|
57
|
-
puts "Error when calling AccountApi->get_account_with_http_info: #{e}"
|
|
58
|
-
end
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Parameters
|
|
62
|
-
|
|
63
|
-
This endpoint does not need any parameter.
|
|
64
|
-
|
|
65
|
-
### Return type
|
|
66
|
-
|
|
67
|
-
[**AccountInfoResponse**](AccountInfoResponse.md)
|
|
68
|
-
|
|
69
|
-
### Authorization
|
|
70
|
-
|
|
71
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
72
|
-
|
|
73
|
-
### HTTP request headers
|
|
74
|
-
|
|
75
|
-
- **Content-Type**: Not defined
|
|
76
|
-
- **Accept**: application/json
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
## list_transactions
|
|
80
|
-
|
|
81
|
-
> <TransactionsResponse> list_transactions(opts)
|
|
82
|
-
|
|
83
|
-
List transactions
|
|
84
|
-
|
|
85
|
-
List transaction history for the authenticated user. **Authentication:** API Key required (`x-api-key` header) or JWT token **Pagination:** Use `limit` and `offset` query parameters. **Transaction types:** - `PDFGEN`: PDF generation (consumes credits) - `REFUND`: Credit refund (on failed generation) - `PURCHASE`: Credit purchase - `BONUS`: Bonus credits **Credits field:** - Positive value = credits consumed - Negative value = credits added **No credits consumed:** This is a read-only endpoint.
|
|
86
|
-
|
|
87
|
-
### Examples
|
|
88
|
-
|
|
89
|
-
```ruby
|
|
90
|
-
require 'time'
|
|
91
|
-
require 'templatefox'
|
|
92
|
-
# setup authorization
|
|
93
|
-
TemplateFox.configure do |config|
|
|
94
|
-
# Configure API key authorization: ApiKeyAuth
|
|
95
|
-
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
96
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
97
|
-
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
api_instance = TemplateFox::AccountApi.new
|
|
101
|
-
opts = {
|
|
102
|
-
limit: 56, # Integer | Number of records to return
|
|
103
|
-
offset: 56 # Integer | Number of records to skip
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
begin
|
|
107
|
-
# List transactions
|
|
108
|
-
result = api_instance.list_transactions(opts)
|
|
109
|
-
p result
|
|
110
|
-
rescue TemplateFox::ApiError => e
|
|
111
|
-
puts "Error when calling AccountApi->list_transactions: #{e}"
|
|
112
|
-
end
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
#### Using the list_transactions_with_http_info variant
|
|
116
|
-
|
|
117
|
-
This returns an Array which contains the response data, status code and headers.
|
|
118
|
-
|
|
119
|
-
> <Array(<TransactionsResponse>, Integer, Hash)> list_transactions_with_http_info(opts)
|
|
120
|
-
|
|
121
|
-
```ruby
|
|
122
|
-
begin
|
|
123
|
-
# List transactions
|
|
124
|
-
data, status_code, headers = api_instance.list_transactions_with_http_info(opts)
|
|
125
|
-
p status_code # => 2xx
|
|
126
|
-
p headers # => { ... }
|
|
127
|
-
p data # => <TransactionsResponse>
|
|
128
|
-
rescue TemplateFox::ApiError => e
|
|
129
|
-
puts "Error when calling AccountApi->list_transactions_with_http_info: #{e}"
|
|
130
|
-
end
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### Parameters
|
|
134
|
-
|
|
135
|
-
| Name | Type | Description | Notes |
|
|
136
|
-
| ---- | ---- | ----------- | ----- |
|
|
137
|
-
| **limit** | **Integer** | Number of records to return | [optional][default to 300] |
|
|
138
|
-
| **offset** | **Integer** | Number of records to skip | [optional][default to 0] |
|
|
139
|
-
|
|
140
|
-
### Return type
|
|
141
|
-
|
|
142
|
-
[**TransactionsResponse**](TransactionsResponse.md)
|
|
143
|
-
|
|
144
|
-
### Authorization
|
|
145
|
-
|
|
146
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
147
|
-
|
|
148
|
-
### HTTP request headers
|
|
149
|
-
|
|
150
|
-
- **Content-Type**: Not defined
|
|
151
|
-
- **Accept**: application/json
|
|
152
|
-
|
data/docs/AccountInfoResponse.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# TemplateFox::AccountInfoResponse
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **credits** | **Integer** | Remaining credits | |
|
|
8
|
-
| **email** | **String** | | [optional] |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'templatefox'
|
|
14
|
-
|
|
15
|
-
instance = TemplateFox::AccountInfoResponse.new(
|
|
16
|
-
credits: null,
|
|
17
|
-
email: null
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|
data/docs/CreatePdfRequest.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# TemplateFox::CreatePdfRequest
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **template_id** | **String** | **Required.** Template short ID (12 characters) | |
|
|
8
|
-
| **data** | **Hash<String, Object>** | **Required.** Key-value data to render in the template. Keys must match template variables. | |
|
|
9
|
-
| **export_type** | [**ExportType**](ExportType.md) | Export format: `url` uploads to CDN and returns URL, `binary` returns raw PDF bytes | [optional] |
|
|
10
|
-
| **expiration** | **Integer** | URL expiration in seconds. Min: 60 (1 min), Max: 604800 (7 days). Only applies to `url` export type. | [optional][default to 86400] |
|
|
11
|
-
| **filename** | **String** | | [optional] |
|
|
12
|
-
| **store_s3** | **Boolean** | Upload to your configured S3 bucket instead of CDN | [optional][default to false] |
|
|
13
|
-
| **s3_filepath** | **String** | | [optional] |
|
|
14
|
-
| **s3_bucket** | **String** | | [optional] |
|
|
15
|
-
|
|
16
|
-
## Example
|
|
17
|
-
|
|
18
|
-
```ruby
|
|
19
|
-
require 'templatefox'
|
|
20
|
-
|
|
21
|
-
instance = TemplateFox::CreatePdfRequest.new(
|
|
22
|
-
template_id: null,
|
|
23
|
-
data: null,
|
|
24
|
-
export_type: null,
|
|
25
|
-
expiration: null,
|
|
26
|
-
filename: null,
|
|
27
|
-
store_s3: null,
|
|
28
|
-
s3_filepath: null,
|
|
29
|
-
s3_bucket: null
|
|
30
|
-
)
|
|
31
|
-
```
|
|
32
|
-
|
data/docs/CreatePdfResponse.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# TemplateFox::CreatePdfResponse
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **url** | **String** | Signed URL to download the PDF (expires after specified time) | |
|
|
8
|
-
| **filename** | **String** | Filename of the generated PDF | |
|
|
9
|
-
| **credits_remaining** | **Integer** | Remaining credits after this request | |
|
|
10
|
-
| **expires_in** | **Integer** | Seconds until URL expires | |
|
|
11
|
-
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```ruby
|
|
15
|
-
require 'templatefox'
|
|
16
|
-
|
|
17
|
-
instance = TemplateFox::CreatePdfResponse.new(
|
|
18
|
-
url: null,
|
|
19
|
-
filename: null,
|
|
20
|
-
credits_remaining: null,
|
|
21
|
-
expires_in: null
|
|
22
|
-
)
|
|
23
|
-
```
|
|
24
|
-
|
data/docs/ExportType.md
DELETED
data/docs/HTTPValidationError.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# TemplateFox::HTTPValidationError
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **detail** | [**Array<ValidationError>**](ValidationError.md) | | [optional] |
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
require 'templatefox'
|
|
13
|
-
|
|
14
|
-
instance = TemplateFox::HTTPValidationError.new(
|
|
15
|
-
detail: null
|
|
16
|
-
)
|
|
17
|
-
```
|
|
18
|
-
|
data/docs/IntegrationsApi.md
DELETED
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
# TemplateFox::IntegrationsApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://api.pdftemplateapi.com*
|
|
4
|
-
|
|
5
|
-
| Method | HTTP request | Description |
|
|
6
|
-
| ------ | ------------ | ----------- |
|
|
7
|
-
| [**delete_s3_config**](IntegrationsApi.md#delete_s3_config) | **DELETE** /v1/integrations/s3 | Delete S3 configuration |
|
|
8
|
-
| [**get_s3_config**](IntegrationsApi.md#get_s3_config) | **GET** /v1/integrations/s3 | Get S3 configuration |
|
|
9
|
-
| [**save_s3_config**](IntegrationsApi.md#save_s3_config) | **POST** /v1/integrations/s3 | Save S3 configuration |
|
|
10
|
-
| [**test_s3_connection**](IntegrationsApi.md#test_s3_connection) | **POST** /v1/integrations/s3/test | Test S3 connection |
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## delete_s3_config
|
|
14
|
-
|
|
15
|
-
> <S3SuccessResponse> delete_s3_config
|
|
16
|
-
|
|
17
|
-
Delete S3 configuration
|
|
18
|
-
|
|
19
|
-
Delete S3 storage configuration. **Authentication:** API Key required (`x-api-key` 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'll need to reconfigure S3 to use it again. **No credits consumed:** This is a configuration endpoint.
|
|
20
|
-
|
|
21
|
-
### Examples
|
|
22
|
-
|
|
23
|
-
```ruby
|
|
24
|
-
require 'time'
|
|
25
|
-
require 'templatefox'
|
|
26
|
-
# setup authorization
|
|
27
|
-
TemplateFox.configure do |config|
|
|
28
|
-
# Configure API key authorization: ApiKeyAuth
|
|
29
|
-
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
30
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
31
|
-
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
api_instance = TemplateFox::IntegrationsApi.new
|
|
35
|
-
|
|
36
|
-
begin
|
|
37
|
-
# Delete S3 configuration
|
|
38
|
-
result = api_instance.delete_s3_config
|
|
39
|
-
p result
|
|
40
|
-
rescue TemplateFox::ApiError => e
|
|
41
|
-
puts "Error when calling IntegrationsApi->delete_s3_config: #{e}"
|
|
42
|
-
end
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
#### Using the delete_s3_config_with_http_info variant
|
|
46
|
-
|
|
47
|
-
This returns an Array which contains the response data, status code and headers.
|
|
48
|
-
|
|
49
|
-
> <Array(<S3SuccessResponse>, Integer, Hash)> delete_s3_config_with_http_info
|
|
50
|
-
|
|
51
|
-
```ruby
|
|
52
|
-
begin
|
|
53
|
-
# Delete S3 configuration
|
|
54
|
-
data, status_code, headers = api_instance.delete_s3_config_with_http_info
|
|
55
|
-
p status_code # => 2xx
|
|
56
|
-
p headers # => { ... }
|
|
57
|
-
p data # => <S3SuccessResponse>
|
|
58
|
-
rescue TemplateFox::ApiError => e
|
|
59
|
-
puts "Error when calling IntegrationsApi->delete_s3_config_with_http_info: #{e}"
|
|
60
|
-
end
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Parameters
|
|
64
|
-
|
|
65
|
-
This endpoint does not need any parameter.
|
|
66
|
-
|
|
67
|
-
### Return type
|
|
68
|
-
|
|
69
|
-
[**S3SuccessResponse**](S3SuccessResponse.md)
|
|
70
|
-
|
|
71
|
-
### Authorization
|
|
72
|
-
|
|
73
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
74
|
-
|
|
75
|
-
### HTTP request headers
|
|
76
|
-
|
|
77
|
-
- **Content-Type**: Not defined
|
|
78
|
-
- **Accept**: application/json
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
## get_s3_config
|
|
82
|
-
|
|
83
|
-
> <S3ConfigResponse> get_s3_config
|
|
84
|
-
|
|
85
|
-
Get S3 configuration
|
|
86
|
-
|
|
87
|
-
Get current S3 storage configuration. **Authentication:** API Key required (`x-api-key` 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.
|
|
88
|
-
|
|
89
|
-
### Examples
|
|
90
|
-
|
|
91
|
-
```ruby
|
|
92
|
-
require 'time'
|
|
93
|
-
require 'templatefox'
|
|
94
|
-
# setup authorization
|
|
95
|
-
TemplateFox.configure do |config|
|
|
96
|
-
# Configure API key authorization: ApiKeyAuth
|
|
97
|
-
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
98
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
99
|
-
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
api_instance = TemplateFox::IntegrationsApi.new
|
|
103
|
-
|
|
104
|
-
begin
|
|
105
|
-
# Get S3 configuration
|
|
106
|
-
result = api_instance.get_s3_config
|
|
107
|
-
p result
|
|
108
|
-
rescue TemplateFox::ApiError => e
|
|
109
|
-
puts "Error when calling IntegrationsApi->get_s3_config: #{e}"
|
|
110
|
-
end
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
#### Using the get_s3_config_with_http_info variant
|
|
114
|
-
|
|
115
|
-
This returns an Array which contains the response data, status code and headers.
|
|
116
|
-
|
|
117
|
-
> <Array(<S3ConfigResponse>, Integer, Hash)> get_s3_config_with_http_info
|
|
118
|
-
|
|
119
|
-
```ruby
|
|
120
|
-
begin
|
|
121
|
-
# Get S3 configuration
|
|
122
|
-
data, status_code, headers = api_instance.get_s3_config_with_http_info
|
|
123
|
-
p status_code # => 2xx
|
|
124
|
-
p headers # => { ... }
|
|
125
|
-
p data # => <S3ConfigResponse>
|
|
126
|
-
rescue TemplateFox::ApiError => e
|
|
127
|
-
puts "Error when calling IntegrationsApi->get_s3_config_with_http_info: #{e}"
|
|
128
|
-
end
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Parameters
|
|
132
|
-
|
|
133
|
-
This endpoint does not need any parameter.
|
|
134
|
-
|
|
135
|
-
### Return type
|
|
136
|
-
|
|
137
|
-
[**S3ConfigResponse**](S3ConfigResponse.md)
|
|
138
|
-
|
|
139
|
-
### Authorization
|
|
140
|
-
|
|
141
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
142
|
-
|
|
143
|
-
### HTTP request headers
|
|
144
|
-
|
|
145
|
-
- **Content-Type**: Not defined
|
|
146
|
-
- **Accept**: application/json
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
## save_s3_config
|
|
150
|
-
|
|
151
|
-
> <S3SuccessResponse> save_s3_config(s3_config_request)
|
|
152
|
-
|
|
153
|
-
Save S3 configuration
|
|
154
|
-
|
|
155
|
-
Save or update S3-compatible storage configuration. **Authentication:** API Key required (`x-api-key` 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: `secret_access_key` is required - For updates: Omit `secret_access_key` to keep existing value **No credits consumed:** This is a configuration endpoint.
|
|
156
|
-
|
|
157
|
-
### Examples
|
|
158
|
-
|
|
159
|
-
```ruby
|
|
160
|
-
require 'time'
|
|
161
|
-
require 'templatefox'
|
|
162
|
-
# setup authorization
|
|
163
|
-
TemplateFox.configure do |config|
|
|
164
|
-
# Configure API key authorization: ApiKeyAuth
|
|
165
|
-
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
166
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
167
|
-
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
api_instance = TemplateFox::IntegrationsApi.new
|
|
171
|
-
s3_config_request = TemplateFox::S3ConfigRequest.new({endpoint_url: 'endpoint_url_example', access_key_id: 'access_key_id_example', bucket_name: 'bucket_name_example'}) # S3ConfigRequest |
|
|
172
|
-
|
|
173
|
-
begin
|
|
174
|
-
# Save S3 configuration
|
|
175
|
-
result = api_instance.save_s3_config(s3_config_request)
|
|
176
|
-
p result
|
|
177
|
-
rescue TemplateFox::ApiError => e
|
|
178
|
-
puts "Error when calling IntegrationsApi->save_s3_config: #{e}"
|
|
179
|
-
end
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
#### Using the save_s3_config_with_http_info variant
|
|
183
|
-
|
|
184
|
-
This returns an Array which contains the response data, status code and headers.
|
|
185
|
-
|
|
186
|
-
> <Array(<S3SuccessResponse>, Integer, Hash)> save_s3_config_with_http_info(s3_config_request)
|
|
187
|
-
|
|
188
|
-
```ruby
|
|
189
|
-
begin
|
|
190
|
-
# Save S3 configuration
|
|
191
|
-
data, status_code, headers = api_instance.save_s3_config_with_http_info(s3_config_request)
|
|
192
|
-
p status_code # => 2xx
|
|
193
|
-
p headers # => { ... }
|
|
194
|
-
p data # => <S3SuccessResponse>
|
|
195
|
-
rescue TemplateFox::ApiError => e
|
|
196
|
-
puts "Error when calling IntegrationsApi->save_s3_config_with_http_info: #{e}"
|
|
197
|
-
end
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Parameters
|
|
201
|
-
|
|
202
|
-
| Name | Type | Description | Notes |
|
|
203
|
-
| ---- | ---- | ----------- | ----- |
|
|
204
|
-
| **s3_config_request** | [**S3ConfigRequest**](S3ConfigRequest.md) | | |
|
|
205
|
-
|
|
206
|
-
### Return type
|
|
207
|
-
|
|
208
|
-
[**S3SuccessResponse**](S3SuccessResponse.md)
|
|
209
|
-
|
|
210
|
-
### Authorization
|
|
211
|
-
|
|
212
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
213
|
-
|
|
214
|
-
### HTTP request headers
|
|
215
|
-
|
|
216
|
-
- **Content-Type**: application/json
|
|
217
|
-
- **Accept**: application/json
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
## test_s3_connection
|
|
221
|
-
|
|
222
|
-
> <S3TestResponse> test_s3_connection
|
|
223
|
-
|
|
224
|
-
Test S3 connection
|
|
225
|
-
|
|
226
|
-
Test S3 connection with stored credentials. **Authentication:** API Key required (`x-api-key` 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 `POST /v1/integrations/s3` **No credits consumed:** This is a diagnostic endpoint.
|
|
227
|
-
|
|
228
|
-
### Examples
|
|
229
|
-
|
|
230
|
-
```ruby
|
|
231
|
-
require 'time'
|
|
232
|
-
require 'templatefox'
|
|
233
|
-
# setup authorization
|
|
234
|
-
TemplateFox.configure do |config|
|
|
235
|
-
# Configure API key authorization: ApiKeyAuth
|
|
236
|
-
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
237
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
238
|
-
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
api_instance = TemplateFox::IntegrationsApi.new
|
|
242
|
-
|
|
243
|
-
begin
|
|
244
|
-
# Test S3 connection
|
|
245
|
-
result = api_instance.test_s3_connection
|
|
246
|
-
p result
|
|
247
|
-
rescue TemplateFox::ApiError => e
|
|
248
|
-
puts "Error when calling IntegrationsApi->test_s3_connection: #{e}"
|
|
249
|
-
end
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
#### Using the test_s3_connection_with_http_info variant
|
|
253
|
-
|
|
254
|
-
This returns an Array which contains the response data, status code and headers.
|
|
255
|
-
|
|
256
|
-
> <Array(<S3TestResponse>, Integer, Hash)> test_s3_connection_with_http_info
|
|
257
|
-
|
|
258
|
-
```ruby
|
|
259
|
-
begin
|
|
260
|
-
# Test S3 connection
|
|
261
|
-
data, status_code, headers = api_instance.test_s3_connection_with_http_info
|
|
262
|
-
p status_code # => 2xx
|
|
263
|
-
p headers # => { ... }
|
|
264
|
-
p data # => <S3TestResponse>
|
|
265
|
-
rescue TemplateFox::ApiError => e
|
|
266
|
-
puts "Error when calling IntegrationsApi->test_s3_connection_with_http_info: #{e}"
|
|
267
|
-
end
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
### Parameters
|
|
271
|
-
|
|
272
|
-
This endpoint does not need any parameter.
|
|
273
|
-
|
|
274
|
-
### Return type
|
|
275
|
-
|
|
276
|
-
[**S3TestResponse**](S3TestResponse.md)
|
|
277
|
-
|
|
278
|
-
### Authorization
|
|
279
|
-
|
|
280
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
281
|
-
|
|
282
|
-
### HTTP request headers
|
|
283
|
-
|
|
284
|
-
- **Content-Type**: Not defined
|
|
285
|
-
- **Accept**: application/json
|
|
286
|
-
|
data/docs/LocationInner.md
DELETED
data/docs/PDFApi.md
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# TemplateFox::PDFApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://api.pdftemplateapi.com*
|
|
4
|
-
|
|
5
|
-
| Method | HTTP request | Description |
|
|
6
|
-
| ------ | ------------ | ----------- |
|
|
7
|
-
| [**create_pdf**](PDFApi.md#create_pdf) | **POST** /v1/pdf/create | Generate PDF from template |
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## create_pdf
|
|
11
|
-
|
|
12
|
-
> <CreatePdfResponse> create_pdf(create_pdf_request)
|
|
13
|
-
|
|
14
|
-
Generate PDF from template
|
|
15
|
-
|
|
16
|
-
Generate a PDF from a saved template with dynamic data. **Authentication:** API Key required (`x-api-key` header) ## Request Body | Field | Type | Required | Description | |-------|------|----------|-------------| | `template_id` | string | ✅ Yes | Template short ID (12 characters) | | `data` | object | ✅ Yes | Key-value data to render in template | | `export_type` | string | No | `url` (default) or `binary` | | `expiration` | integer | No | URL expiration in seconds (60-604800, default: 86400) | ## Export Types - `url` (default): PDF is uploaded to CDN, returns JSON with URL - `binary`: Returns raw PDF bytes directly **Credits:** 1 credit deducted per successful generation.
|
|
17
|
-
|
|
18
|
-
### Examples
|
|
19
|
-
|
|
20
|
-
```ruby
|
|
21
|
-
require 'time'
|
|
22
|
-
require 'templatefox'
|
|
23
|
-
# setup authorization
|
|
24
|
-
TemplateFox.configure do |config|
|
|
25
|
-
# Configure API key authorization: ApiKeyAuth
|
|
26
|
-
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
27
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
28
|
-
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
api_instance = TemplateFox::PDFApi.new
|
|
32
|
-
create_pdf_request = TemplateFox::CreatePdfRequest.new({template_id: 'template_id_example', data: { key: 3.56}}) # CreatePdfRequest |
|
|
33
|
-
|
|
34
|
-
begin
|
|
35
|
-
# Generate PDF from template
|
|
36
|
-
result = api_instance.create_pdf(create_pdf_request)
|
|
37
|
-
p result
|
|
38
|
-
rescue TemplateFox::ApiError => e
|
|
39
|
-
puts "Error when calling PDFApi->create_pdf: #{e}"
|
|
40
|
-
end
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
#### Using the create_pdf_with_http_info variant
|
|
44
|
-
|
|
45
|
-
This returns an Array which contains the response data, status code and headers.
|
|
46
|
-
|
|
47
|
-
> <Array(<CreatePdfResponse>, Integer, Hash)> create_pdf_with_http_info(create_pdf_request)
|
|
48
|
-
|
|
49
|
-
```ruby
|
|
50
|
-
begin
|
|
51
|
-
# Generate PDF from template
|
|
52
|
-
data, status_code, headers = api_instance.create_pdf_with_http_info(create_pdf_request)
|
|
53
|
-
p status_code # => 2xx
|
|
54
|
-
p headers # => { ... }
|
|
55
|
-
p data # => <CreatePdfResponse>
|
|
56
|
-
rescue TemplateFox::ApiError => e
|
|
57
|
-
puts "Error when calling PDFApi->create_pdf_with_http_info: #{e}"
|
|
58
|
-
end
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Parameters
|
|
62
|
-
|
|
63
|
-
| Name | Type | Description | Notes |
|
|
64
|
-
| ---- | ---- | ----------- | ----- |
|
|
65
|
-
| **create_pdf_request** | [**CreatePdfRequest**](CreatePdfRequest.md) | | |
|
|
66
|
-
|
|
67
|
-
### Return type
|
|
68
|
-
|
|
69
|
-
[**CreatePdfResponse**](CreatePdfResponse.md)
|
|
70
|
-
|
|
71
|
-
### Authorization
|
|
72
|
-
|
|
73
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
74
|
-
|
|
75
|
-
### HTTP request headers
|
|
76
|
-
|
|
77
|
-
- **Content-Type**: application/json
|
|
78
|
-
- **Accept**: application/json, application/pdf
|
|
79
|
-
|
data/docs/S3ConfigRequest.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# TemplateFox::S3ConfigRequest
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **endpoint_url** | **String** | S3-compatible endpoint URL. Must start with https:// | |
|
|
8
|
-
| **access_key_id** | **String** | Access key ID for S3 authentication | |
|
|
9
|
-
| **secret_access_key** | **String** | | [optional] |
|
|
10
|
-
| **bucket_name** | **String** | S3 bucket name. Must follow S3 naming conventions (lowercase, no underscores) | |
|
|
11
|
-
| **default_prefix** | **String** | Default path prefix for uploaded files. Can include slashes for folder structure | [optional][default to ''] |
|
|
12
|
-
|
|
13
|
-
## Example
|
|
14
|
-
|
|
15
|
-
```ruby
|
|
16
|
-
require 'templatefox'
|
|
17
|
-
|
|
18
|
-
instance = TemplateFox::S3ConfigRequest.new(
|
|
19
|
-
endpoint_url: null,
|
|
20
|
-
access_key_id: null,
|
|
21
|
-
secret_access_key: null,
|
|
22
|
-
bucket_name: null,
|
|
23
|
-
default_prefix: null
|
|
24
|
-
)
|
|
25
|
-
```
|
|
26
|
-
|
data/docs/S3ConfigResponse.md
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# TemplateFox::S3ConfigResponse
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **configured** | **Boolean** | Whether S3 is configured | |
|
|
8
|
-
| **endpoint_url** | **String** | S3-compatible endpoint URL | |
|
|
9
|
-
| **access_key_id** | **String** | Access key ID | |
|
|
10
|
-
| **secret_access_key_masked** | **String** | Masked secret access key (shows first 4 and last 4 characters) | |
|
|
11
|
-
| **bucket_name** | **String** | S3 bucket name | |
|
|
12
|
-
| **default_prefix** | **String** | Default path prefix for uploads | |
|
|
13
|
-
|
|
14
|
-
## Example
|
|
15
|
-
|
|
16
|
-
```ruby
|
|
17
|
-
require 'templatefox'
|
|
18
|
-
|
|
19
|
-
instance = TemplateFox::S3ConfigResponse.new(
|
|
20
|
-
configured: null,
|
|
21
|
-
endpoint_url: null,
|
|
22
|
-
access_key_id: null,
|
|
23
|
-
secret_access_key_masked: null,
|
|
24
|
-
bucket_name: null,
|
|
25
|
-
default_prefix: null
|
|
26
|
-
)
|
|
27
|
-
```
|
|
28
|
-
|
data/docs/S3SuccessResponse.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# TemplateFox::S3SuccessResponse
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **success** | **Boolean** | Whether the operation succeeded | |
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
require 'templatefox'
|
|
13
|
-
|
|
14
|
-
instance = TemplateFox::S3SuccessResponse.new(
|
|
15
|
-
success: null
|
|
16
|
-
)
|
|
17
|
-
```
|
|
18
|
-
|
data/docs/S3TestResponse.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# TemplateFox::S3TestResponse
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **success** | **Boolean** | Whether the connection test succeeded | |
|
|
8
|
-
| **message** | **String** | Test result message | |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'templatefox'
|
|
14
|
-
|
|
15
|
-
instance = TemplateFox::S3TestResponse.new(
|
|
16
|
-
success: null,
|
|
17
|
-
message: null
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|
data/docs/TemplateField.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# TemplateFox::TemplateField
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **key** | **String** | Field key/identifier | |
|
|
8
|
-
| **label** | **String** | Human-readable label | |
|
|
9
|
-
| **type** | **String** | Field type: string, integer, number, boolean | [optional][default to 'string'] |
|
|
10
|
-
| **required** | **Boolean** | Whether the field is required | [optional][default to false] |
|
|
11
|
-
| **help_text** | **String** | | [optional] |
|
|
12
|
-
|
|
13
|
-
## Example
|
|
14
|
-
|
|
15
|
-
```ruby
|
|
16
|
-
require 'templatefox'
|
|
17
|
-
|
|
18
|
-
instance = TemplateFox::TemplateField.new(
|
|
19
|
-
key: null,
|
|
20
|
-
label: null,
|
|
21
|
-
type: null,
|
|
22
|
-
required: null,
|
|
23
|
-
help_text: null
|
|
24
|
-
)
|
|
25
|
-
```
|
|
26
|
-
|
data/docs/TemplateListItem.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# TemplateFox::TemplateListItem
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **id** | **String** | Template short ID (12 characters) | |
|
|
8
|
-
| **name** | **String** | Template name | |
|
|
9
|
-
| **created_at** | **String** | ISO 8601 timestamp | |
|
|
10
|
-
| **updated_at** | **String** | ISO 8601 timestamp | |
|
|
11
|
-
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```ruby
|
|
15
|
-
require 'templatefox'
|
|
16
|
-
|
|
17
|
-
instance = TemplateFox::TemplateListItem.new(
|
|
18
|
-
id: null,
|
|
19
|
-
name: null,
|
|
20
|
-
created_at: null,
|
|
21
|
-
updated_at: null
|
|
22
|
-
)
|
|
23
|
-
```
|
|
24
|
-
|
data/docs/TemplatesApi.md
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
# TemplateFox::TemplatesApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://api.pdftemplateapi.com*
|
|
4
|
-
|
|
5
|
-
| Method | HTTP request | Description |
|
|
6
|
-
| ------ | ------------ | ----------- |
|
|
7
|
-
| [**get_template_fields**](TemplatesApi.md#get_template_fields) | **GET** /v1/templates/{template_id}/fields | Get template fields |
|
|
8
|
-
| [**list_templates**](TemplatesApi.md#list_templates) | **GET** /v1/templates | List templates |
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## get_template_fields
|
|
12
|
-
|
|
13
|
-
> <Array<TemplateField>> get_template_fields(template_id)
|
|
14
|
-
|
|
15
|
-
Get template fields
|
|
16
|
-
|
|
17
|
-
Get the dynamic fields for a template. **Authentication:** API Key required (`x-api-key` 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: `key`, `label`, `type`, `required`, and optional `helpText`. **Field types:** - `string`: Text input (also used for JSON arrays/objects) - `integer`: Integer number - `number`: Decimal number - `boolean`: True/False checkbox **Arrays and objects:** Complex types are returned as `string` type with a `helpText` showing the expected JSON format. **No credits consumed:** This is a read-only endpoint.
|
|
18
|
-
|
|
19
|
-
### Examples
|
|
20
|
-
|
|
21
|
-
```ruby
|
|
22
|
-
require 'time'
|
|
23
|
-
require 'templatefox'
|
|
24
|
-
# setup authorization
|
|
25
|
-
TemplateFox.configure do |config|
|
|
26
|
-
# Configure API key authorization: ApiKeyAuth
|
|
27
|
-
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
28
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
29
|
-
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
api_instance = TemplateFox::TemplatesApi.new
|
|
33
|
-
template_id = 'template_id_example' # String |
|
|
34
|
-
|
|
35
|
-
begin
|
|
36
|
-
# Get template fields
|
|
37
|
-
result = api_instance.get_template_fields(template_id)
|
|
38
|
-
p result
|
|
39
|
-
rescue TemplateFox::ApiError => e
|
|
40
|
-
puts "Error when calling TemplatesApi->get_template_fields: #{e}"
|
|
41
|
-
end
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
#### Using the get_template_fields_with_http_info variant
|
|
45
|
-
|
|
46
|
-
This returns an Array which contains the response data, status code and headers.
|
|
47
|
-
|
|
48
|
-
> <Array(<Array<TemplateField>>, Integer, Hash)> get_template_fields_with_http_info(template_id)
|
|
49
|
-
|
|
50
|
-
```ruby
|
|
51
|
-
begin
|
|
52
|
-
# Get template fields
|
|
53
|
-
data, status_code, headers = api_instance.get_template_fields_with_http_info(template_id)
|
|
54
|
-
p status_code # => 2xx
|
|
55
|
-
p headers # => { ... }
|
|
56
|
-
p data # => <Array<TemplateField>>
|
|
57
|
-
rescue TemplateFox::ApiError => e
|
|
58
|
-
puts "Error when calling TemplatesApi->get_template_fields_with_http_info: #{e}"
|
|
59
|
-
end
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Parameters
|
|
63
|
-
|
|
64
|
-
| Name | Type | Description | Notes |
|
|
65
|
-
| ---- | ---- | ----------- | ----- |
|
|
66
|
-
| **template_id** | **String** | | |
|
|
67
|
-
|
|
68
|
-
### Return type
|
|
69
|
-
|
|
70
|
-
[**Array<TemplateField>**](TemplateField.md)
|
|
71
|
-
|
|
72
|
-
### Authorization
|
|
73
|
-
|
|
74
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
75
|
-
|
|
76
|
-
### HTTP request headers
|
|
77
|
-
|
|
78
|
-
- **Content-Type**: Not defined
|
|
79
|
-
- **Accept**: application/json
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
## list_templates
|
|
83
|
-
|
|
84
|
-
> <TemplatesListResponse> list_templates
|
|
85
|
-
|
|
86
|
-
List templates
|
|
87
|
-
|
|
88
|
-
List all templates for the authenticated user. **Authentication:** API Key required (`x-api-key` 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.
|
|
89
|
-
|
|
90
|
-
### Examples
|
|
91
|
-
|
|
92
|
-
```ruby
|
|
93
|
-
require 'time'
|
|
94
|
-
require 'templatefox'
|
|
95
|
-
# setup authorization
|
|
96
|
-
TemplateFox.configure do |config|
|
|
97
|
-
# Configure API key authorization: ApiKeyAuth
|
|
98
|
-
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
99
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
100
|
-
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
api_instance = TemplateFox::TemplatesApi.new
|
|
104
|
-
|
|
105
|
-
begin
|
|
106
|
-
# List templates
|
|
107
|
-
result = api_instance.list_templates
|
|
108
|
-
p result
|
|
109
|
-
rescue TemplateFox::ApiError => e
|
|
110
|
-
puts "Error when calling TemplatesApi->list_templates: #{e}"
|
|
111
|
-
end
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
#### Using the list_templates_with_http_info variant
|
|
115
|
-
|
|
116
|
-
This returns an Array which contains the response data, status code and headers.
|
|
117
|
-
|
|
118
|
-
> <Array(<TemplatesListResponse>, Integer, Hash)> list_templates_with_http_info
|
|
119
|
-
|
|
120
|
-
```ruby
|
|
121
|
-
begin
|
|
122
|
-
# List templates
|
|
123
|
-
data, status_code, headers = api_instance.list_templates_with_http_info
|
|
124
|
-
p status_code # => 2xx
|
|
125
|
-
p headers # => { ... }
|
|
126
|
-
p data # => <TemplatesListResponse>
|
|
127
|
-
rescue TemplateFox::ApiError => e
|
|
128
|
-
puts "Error when calling TemplatesApi->list_templates_with_http_info: #{e}"
|
|
129
|
-
end
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### Parameters
|
|
133
|
-
|
|
134
|
-
This endpoint does not need any parameter.
|
|
135
|
-
|
|
136
|
-
### Return type
|
|
137
|
-
|
|
138
|
-
[**TemplatesListResponse**](TemplatesListResponse.md)
|
|
139
|
-
|
|
140
|
-
### Authorization
|
|
141
|
-
|
|
142
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
143
|
-
|
|
144
|
-
### HTTP request headers
|
|
145
|
-
|
|
146
|
-
- **Content-Type**: Not defined
|
|
147
|
-
- **Accept**: application/json
|
|
148
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# TemplateFox::TemplatesListResponse
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **templates** | [**Array<TemplateListItem>**](TemplateListItem.md) | | |
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
require 'templatefox'
|
|
13
|
-
|
|
14
|
-
instance = TemplateFox::TemplatesListResponse.new(
|
|
15
|
-
templates: null
|
|
16
|
-
)
|
|
17
|
-
```
|
|
18
|
-
|
data/docs/Transaction.md
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# TemplateFox::Transaction
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **transaction_ref** | **String** | Unique transaction reference (UUID) | |
|
|
8
|
-
| **transaction_type** | **String** | Transaction type: PDFGEN, PURCHASE, REFUND, BONUS | |
|
|
9
|
-
| **template_id** | **String** | | [optional] |
|
|
10
|
-
| **exec_tm** | **Integer** | | [optional] |
|
|
11
|
-
| **credits** | **Integer** | Credits consumed (positive) or added (negative) | |
|
|
12
|
-
| **created_at** | **String** | ISO 8601 timestamp | |
|
|
13
|
-
|
|
14
|
-
## Example
|
|
15
|
-
|
|
16
|
-
```ruby
|
|
17
|
-
require 'templatefox'
|
|
18
|
-
|
|
19
|
-
instance = TemplateFox::Transaction.new(
|
|
20
|
-
transaction_ref: null,
|
|
21
|
-
transaction_type: null,
|
|
22
|
-
template_id: null,
|
|
23
|
-
exec_tm: null,
|
|
24
|
-
credits: null,
|
|
25
|
-
created_at: null
|
|
26
|
-
)
|
|
27
|
-
```
|
|
28
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# TemplateFox::TransactionsResponse
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **transactions** | [**Array<Transaction>**](Transaction.md) | | |
|
|
8
|
-
| **total** | **Integer** | Total number of transactions | |
|
|
9
|
-
| **limit** | **Integer** | Number of records returned | |
|
|
10
|
-
| **offset** | **Integer** | Number of records skipped | |
|
|
11
|
-
|
|
12
|
-
## Example
|
|
13
|
-
|
|
14
|
-
```ruby
|
|
15
|
-
require 'templatefox'
|
|
16
|
-
|
|
17
|
-
instance = TemplateFox::TransactionsResponse.new(
|
|
18
|
-
transactions: null,
|
|
19
|
-
total: null,
|
|
20
|
-
limit: null,
|
|
21
|
-
offset: null
|
|
22
|
-
)
|
|
23
|
-
```
|
|
24
|
-
|
data/docs/ValidationError.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# TemplateFox::ValidationError
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **loc** | [**Array<LocationInner>**](LocationInner.md) | | |
|
|
8
|
-
| **msg** | **String** | | |
|
|
9
|
-
| **type** | **String** | | |
|
|
10
|
-
|
|
11
|
-
## Example
|
|
12
|
-
|
|
13
|
-
```ruby
|
|
14
|
-
require 'templatefox'
|
|
15
|
-
|
|
16
|
-
instance = TemplateFox::ValidationError.new(
|
|
17
|
-
loc: null,
|
|
18
|
-
msg: null,
|
|
19
|
-
type: null
|
|
20
|
-
)
|
|
21
|
-
```
|
|
22
|
-
|
data/git_push.sh
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
3
|
-
#
|
|
4
|
-
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
|
5
|
-
|
|
6
|
-
git_user_id=$1
|
|
7
|
-
git_repo_id=$2
|
|
8
|
-
release_note=$3
|
|
9
|
-
git_host=$4
|
|
10
|
-
|
|
11
|
-
if [ "$git_host" = "" ]; then
|
|
12
|
-
git_host="github.com"
|
|
13
|
-
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
if [ "$git_user_id" = "" ]; then
|
|
17
|
-
git_user_id="TemplateFoxPDF"
|
|
18
|
-
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
if [ "$git_repo_id" = "" ]; then
|
|
22
|
-
git_repo_id="rubysdk"
|
|
23
|
-
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
24
|
-
fi
|
|
25
|
-
|
|
26
|
-
if [ "$release_note" = "" ]; then
|
|
27
|
-
release_note="Minor update"
|
|
28
|
-
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
# Initialize the local directory as a Git repository
|
|
32
|
-
git init
|
|
33
|
-
|
|
34
|
-
# Adds the files in the local repository and stages them for commit.
|
|
35
|
-
git add .
|
|
36
|
-
|
|
37
|
-
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
38
|
-
git commit -m "$release_note"
|
|
39
|
-
|
|
40
|
-
# Sets the new remote
|
|
41
|
-
git_remote=$(git remote)
|
|
42
|
-
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
43
|
-
|
|
44
|
-
if [ "$GIT_TOKEN" = "" ]; then
|
|
45
|
-
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
46
|
-
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
|
47
|
-
else
|
|
48
|
-
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
|
-
fi
|
|
52
|
-
|
|
53
|
-
git pull origin master
|
|
54
|
-
|
|
55
|
-
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
56
|
-
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
|
57
|
-
git push origin master 2>&1 | grep -v 'To https'
|