docspring 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +3 -0
- data/.travis.yml +1 -1
- data/CHANGELOG.md +11 -0
- data/Gemfile.lock +2 -2
- data/README.md +1 -1
- data/docs/BatchGeneratePdfs201Response.md +3 -1
- data/docs/Client.md +6 -6
- data/docs/CombinePdfsData.md +1 -1
- data/docs/CreateCombinedSubmissionResponse.md +5 -1
- data/docs/CreateCustomFileResponse.md +2 -0
- data/docs/CreatePdfSubmissionData.md +1 -1
- data/docs/CreateSubmissionDataRequestEventResponse.md +2 -0
- data/docs/CreateSubmissionDataRequestResponse.md +2 -0
- data/docs/CreateSubmissionDataRequestTokenResponse.md +2 -0
- data/docs/CreateSubmissionResponse.md +5 -1
- data/docs/ForbiddenErrorResponse.md +22 -0
- data/docs/SubmissionBatchData.md +1 -1
- data/docspring.gemspec +1 -1
- data/lib/docspring/api/client.rb +13 -13
- data/lib/docspring/api_client.rb +2 -2
- data/lib/docspring/api_error.rb +1 -1
- data/lib/docspring/configuration.rb +1 -1
- data/lib/docspring/models/add_fields_data.rb +1 -1
- data/lib/docspring/models/batch_generate_pdfs201_response.rb +15 -5
- data/lib/docspring/models/combine_pdfs_data.rb +2 -2
- data/lib/docspring/models/combined_submission.rb +3 -3
- data/lib/docspring/models/combined_submission_action.rb +1 -1
- data/lib/docspring/models/copy_template_options.rb +1 -1
- data/lib/docspring/models/create_combined_submission_response.rb +24 -5
- data/lib/docspring/models/create_custom_file_data.rb +1 -1
- data/lib/docspring/models/create_custom_file_response.rb +11 -2
- data/lib/docspring/models/create_folder_data.rb +1 -1
- data/lib/docspring/models/create_html_template.rb +1 -1
- data/lib/docspring/models/create_pdf_submission_data.rb +2 -1
- data/lib/docspring/models/create_pdf_template.rb +1 -1
- data/lib/docspring/models/create_submission_data_request_data.rb +1 -1
- data/lib/docspring/models/create_submission_data_request_event_request.rb +1 -1
- data/lib/docspring/models/create_submission_data_request_event_response.rb +11 -2
- data/lib/docspring/models/create_submission_data_request_response.rb +11 -2
- data/lib/docspring/models/create_submission_data_request_token_response.rb +11 -2
- data/lib/docspring/models/create_submission_response.rb +24 -5
- data/lib/docspring/models/create_webhook_data.rb +1 -1
- data/lib/docspring/models/custom_file.rb +1 -1
- data/lib/docspring/models/error_or_multiple_errors_response.rb +1 -1
- data/lib/docspring/models/error_response.rb +1 -1
- data/lib/docspring/models/folder.rb +1 -1
- data/lib/docspring/models/forbidden_error_response.rb +323 -0
- data/lib/docspring/models/json_schema.rb +1 -1
- data/lib/docspring/models/list_submissions_response.rb +1 -1
- data/lib/docspring/models/move_folder_data.rb +1 -1
- data/lib/docspring/models/move_template_data.rb +1 -1
- data/lib/docspring/models/multiple_errors_response.rb +1 -1
- data/lib/docspring/models/publish_version_data.rb +1 -1
- data/lib/docspring/models/rename_folder_data.rb +1 -1
- data/lib/docspring/models/restore_version_data.rb +1 -1
- data/lib/docspring/models/submission.rb +3 -3
- data/lib/docspring/models/submission422_response.rb +1 -1
- data/lib/docspring/models/submission_action.rb +1 -1
- data/lib/docspring/models/submission_batch.rb +1 -1
- data/lib/docspring/models/submission_batch_data.rb +2 -1
- data/lib/docspring/models/submission_batch_with_submissions.rb +1 -1
- data/lib/docspring/models/submission_data_request.rb +1 -1
- data/lib/docspring/models/submission_data_request_event.rb +1 -1
- data/lib/docspring/models/submission_data_request_show.rb +1 -1
- data/lib/docspring/models/submission_data_request_token.rb +1 -1
- data/lib/docspring/models/submission_preview.rb +3 -3
- data/lib/docspring/models/success_error_response.rb +1 -1
- data/lib/docspring/models/success_multiple_errors_response.rb +1 -1
- data/lib/docspring/models/template.rb +1 -1
- data/lib/docspring/models/template_add_fields_response.rb +1 -1
- data/lib/docspring/models/template_delete_response.rb +1 -1
- data/lib/docspring/models/template_model_code_response.rb +1 -1
- data/lib/docspring/models/template_preview.rb +1 -1
- data/lib/docspring/models/template_publish_version_response.rb +1 -1
- data/lib/docspring/models/update_html_template.rb +1 -1
- data/lib/docspring/models/update_pdf_template.rb +1 -1
- data/lib/docspring/models/update_submission_data_request_data.rb +1 -1
- data/lib/docspring/models/update_webhook_data.rb +1 -1
- data/lib/docspring/models/upload_presign_response.rb +1 -1
- data/lib/docspring/models/webhook.rb +1 -1
- data/lib/docspring/version.rb +2 -2
- data/lib/docspring.rb +2 -1
- data/spec/api/client_spec.rb +7 -7
- data/spec/models/add_fields_data_spec.rb +1 -1
- data/spec/models/batch_generate_pdfs201_response_spec.rb +7 -1
- data/spec/models/combine_pdfs_data_spec.rb +1 -1
- data/spec/models/combined_submission_action_spec.rb +1 -1
- data/spec/models/combined_submission_spec.rb +2 -2
- data/spec/models/copy_template_options_spec.rb +1 -1
- data/spec/models/create_combined_submission_response_spec.rb +13 -1
- data/spec/models/create_custom_file_data_spec.rb +1 -1
- data/spec/models/create_custom_file_response_spec.rb +7 -1
- data/spec/models/create_folder_data_spec.rb +1 -1
- data/spec/models/create_html_template_spec.rb +1 -1
- data/spec/models/create_pdf_submission_data_spec.rb +1 -1
- data/spec/models/create_pdf_template_spec.rb +1 -1
- data/spec/models/create_submission_data_request_data_spec.rb +1 -1
- data/spec/models/create_submission_data_request_event_request_spec.rb +1 -1
- data/spec/models/create_submission_data_request_event_response_spec.rb +7 -1
- data/spec/models/create_submission_data_request_response_spec.rb +7 -1
- data/spec/models/create_submission_data_request_token_response_spec.rb +7 -1
- data/spec/models/create_submission_response_spec.rb +13 -1
- data/spec/models/create_webhook_data_spec.rb +1 -1
- data/spec/models/custom_file_spec.rb +1 -1
- data/spec/models/error_or_multiple_errors_response_spec.rb +1 -1
- data/spec/models/error_response_spec.rb +1 -1
- data/spec/models/folder_spec.rb +1 -1
- data/spec/models/forbidden_error_response_spec.rb +56 -0
- data/spec/models/json_schema_spec.rb +1 -1
- data/spec/models/list_submissions_response_spec.rb +1 -1
- data/spec/models/move_folder_data_spec.rb +1 -1
- data/spec/models/move_template_data_spec.rb +1 -1
- data/spec/models/multiple_errors_response_spec.rb +1 -1
- data/spec/models/publish_version_data_spec.rb +1 -1
- data/spec/models/rename_folder_data_spec.rb +1 -1
- data/spec/models/restore_version_data_spec.rb +1 -1
- data/spec/models/submission422_response_spec.rb +1 -1
- data/spec/models/submission_action_spec.rb +1 -1
- data/spec/models/submission_batch_data_spec.rb +1 -1
- data/spec/models/submission_batch_spec.rb +1 -1
- data/spec/models/submission_batch_with_submissions_spec.rb +1 -1
- data/spec/models/submission_data_request_event_spec.rb +1 -1
- data/spec/models/submission_data_request_show_spec.rb +1 -1
- data/spec/models/submission_data_request_spec.rb +1 -1
- data/spec/models/submission_data_request_token_spec.rb +1 -1
- data/spec/models/submission_preview_spec.rb +2 -2
- data/spec/models/submission_spec.rb +2 -2
- data/spec/models/success_error_response_spec.rb +1 -1
- data/spec/models/success_multiple_errors_response_spec.rb +1 -1
- data/spec/models/template_add_fields_response_spec.rb +1 -1
- data/spec/models/template_delete_response_spec.rb +1 -1
- data/spec/models/template_model_code_response_spec.rb +1 -1
- data/spec/models/template_preview_spec.rb +1 -1
- data/spec/models/template_publish_version_response_spec.rb +1 -1
- data/spec/models/template_spec.rb +1 -1
- data/spec/models/update_html_template_spec.rb +1 -1
- data/spec/models/update_pdf_template_spec.rb +1 -1
- data/spec/models/update_submission_data_request_data_spec.rb +1 -1
- data/spec/models/update_webhook_data_spec.rb +1 -1
- data/spec/models/upload_presign_response_spec.rb +1 -1
- data/spec/models/webhook_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3a11774c889c3f5f78b06ecc109d774135778e4a127e9231cca7c01c80646808
|
|
4
|
+
data.tar.gz: ba8a09b96fbd6136bab001bede610a25ad54ce945b8d4716db979c312d9f6bf9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 580764cb088cc7ba219e28565d191c94841074e686b386e405945eeac2542a1bdc9867ada62cac93cfa479e942339f8b3aba246eca4f4f43d94ae6c8d44cab2c
|
|
7
|
+
data.tar.gz: bf9881c8bfb725c6560bc742b26bb1983909536b7cf4c9c13aca70e3223021f983b67d256bd45a4153b854ce97307bf2417fea06bb440960454a4eb30ddbd929
|
data/.openapi-generator/FILES
CHANGED
|
@@ -31,6 +31,7 @@ docs/CustomFile.md
|
|
|
31
31
|
docs/ErrorOrMultipleErrorsResponse.md
|
|
32
32
|
docs/ErrorResponse.md
|
|
33
33
|
docs/Folder.md
|
|
34
|
+
docs/ForbiddenErrorResponse.md
|
|
34
35
|
docs/JsonSchema.md
|
|
35
36
|
docs/ListSubmissionsResponse.md
|
|
36
37
|
docs/MoveFolderData.md
|
|
@@ -95,6 +96,7 @@ lib/docspring/models/custom_file.rb
|
|
|
95
96
|
lib/docspring/models/error_or_multiple_errors_response.rb
|
|
96
97
|
lib/docspring/models/error_response.rb
|
|
97
98
|
lib/docspring/models/folder.rb
|
|
99
|
+
lib/docspring/models/forbidden_error_response.rb
|
|
98
100
|
lib/docspring/models/json_schema.rb
|
|
99
101
|
lib/docspring/models/list_submissions_response.rb
|
|
100
102
|
lib/docspring/models/move_folder_data.rb
|
|
@@ -154,6 +156,7 @@ spec/models/custom_file_spec.rb
|
|
|
154
156
|
spec/models/error_or_multiple_errors_response_spec.rb
|
|
155
157
|
spec/models/error_response_spec.rb
|
|
156
158
|
spec/models/folder_spec.rb
|
|
159
|
+
spec/models/forbidden_error_response_spec.rb
|
|
157
160
|
spec/models/json_schema_spec.rb
|
|
158
161
|
spec/models/list_submissions_response_spec.rb
|
|
159
162
|
spec/models/move_folder_data_spec.rb
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
### 3.5.0 [October 18, 2026]
|
|
2
|
+
|
|
3
|
+
- Submissions and combined submissions can be in the new `insufficient_credits` state: a live PDF that your credit
|
|
4
|
+
balance can't cover is saved and processed once you add credits. See
|
|
5
|
+
https://docspring.com/docs/api-guide/credits-and-rate-limits/.
|
|
6
|
+
- generate_pdf, batch_generate_pdfs and combine_pdfs document the 402 response for insufficient credits. Their
|
|
7
|
+
responses can include a `code`, which is `insufficient_credits` on a 402.
|
|
8
|
+
- generate_pdf, batch_generate_pdfs, create_pdf_template, create_pdf_template_from_upload, create_html_template and
|
|
9
|
+
copy_template document a 403 response with a `code` of `upgrade_required` (the plan doesn't include it) or
|
|
10
|
+
`account_suspended`.
|
|
11
|
+
|
|
1
12
|
### 3.4.0 [October 18, 2026]
|
|
2
13
|
|
|
3
14
|
- Templates: new `parse_dates_using_template_date_format` setting, when you create or update a template. When it's
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
docspring (3.
|
|
4
|
+
docspring (3.5.0)
|
|
5
5
|
logger
|
|
6
6
|
typhoeus (~> 1.0, >= 1.0.1)
|
|
7
7
|
|
|
@@ -104,7 +104,7 @@ CHECKSUMS
|
|
|
104
104
|
coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
|
|
105
105
|
date (3.6.0) sha256=18ac945c4e24ebd93534f8eab8c2fd8c5604b3e977105b3798d62a1e8d27b580
|
|
106
106
|
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
|
|
107
|
-
docspring (3.
|
|
107
|
+
docspring (3.5.0)
|
|
108
108
|
ethon (0.18.0) sha256=b598afc9f30448cb068b850714b7d6948e941476095d04f90a4ac65b8d6efcb2
|
|
109
109
|
ffi (1.17.4) sha256=bcd1642e06f0d16fc9e09ac6d49c3a7298b9789bcb58127302f934e437d60acf
|
|
110
110
|
ffi (1.17.4-aarch64-linux-gnu) sha256=b208f06f91ffd8f5e1193da3cae3d2ccfc27fc36fba577baf698d26d91c080df
|
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@ templates with your data, generates PDFs from HTML templates, combines PDFs and
|
|
|
6
6
|
[Documentation](https://docspring.com/docs/) · [API reference](https://docspring.com/docs/api/) ·
|
|
7
7
|
[RubyGems](https://rubygems.org/gems/docspring) · [Changelog](https://github.com/DocSpring/docspring-ruby/blob/main/CHANGELOG.md)
|
|
8
8
|
|
|
9
|
-
Version 3.
|
|
9
|
+
Version 3.5.0. Requires Ruby >= 2.7.
|
|
10
10
|
|
|
11
11
|
## Install and configure
|
|
12
12
|
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
| **errors** | **Array<String>** | | [optional] |
|
|
10
10
|
| **submission_batch** | [**SubmissionBatch**](SubmissionBatch.md) | | |
|
|
11
11
|
| **submissions** | **Array<Object>** | | |
|
|
12
|
+
| **code** | **String** | `insufficient_credits` when the response is a 402. | [optional] |
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,7 +21,8 @@ instance = DocSpring::BatchGeneratePdfs201Response.new(
|
|
|
20
21
|
error: null,
|
|
21
22
|
errors: null,
|
|
22
23
|
submission_batch: null,
|
|
23
|
-
submissions: null
|
|
24
|
+
submissions: null,
|
|
25
|
+
code: null
|
|
24
26
|
)
|
|
25
27
|
```
|
|
26
28
|
|
data/docs/Client.md
CHANGED
|
@@ -130,7 +130,7 @@ end
|
|
|
130
130
|
|
|
131
131
|
Generate multiple PDFs
|
|
132
132
|
|
|
133
|
-
Generates up to 50 PDFs in a single request. Each submission can use a different template and data. Supports both synchronous (wait for all PDFs) and asynchronous processing. More efficient than individual requests when creating multiple PDFs. See also: - [Batch Generate PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Request format, responses, and limits
|
|
133
|
+
Generates up to 50 PDFs in a single request. Each submission can use a different template and data. Supports both synchronous (wait for all PDFs) and asynchronous processing. More efficient than individual requests when creating multiple PDFs. Live PDFs use credits. If any live submission is waiting for credits, the API returns 402 and the others are still processed: check each submission's `state`. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/). See also: - [Batch Generate PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Request format, responses, and limits
|
|
134
134
|
|
|
135
135
|
### Examples
|
|
136
136
|
|
|
@@ -204,7 +204,7 @@ end
|
|
|
204
204
|
|
|
205
205
|
Merge submission PDFs, template PDFs, or custom files
|
|
206
206
|
|
|
207
|
-
Combines multiple PDFs from various sources into a single PDF file. Supports merging submission PDFs, template PDFs, custom files, other merged PDFs, and PDFs from URLs. Merges the PDFs in the order provided.
|
|
207
|
+
Combines multiple PDFs from various sources into a single PDF file. Supports merging submission PDFs, template PDFs, custom files, other merged PDFs, and PDFs from URLs. Merges the PDFs in the order provided. Combining uses credits (4 per source PDF, plus 4 per unit of the combined PDF), even with a test API token or watermarked source PDFs. If your balance can't cover it, the API returns 402 and the combined submission waits in the `insufficient_credits` state until you add credits. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
208
208
|
|
|
209
209
|
### Examples
|
|
210
210
|
|
|
@@ -1278,7 +1278,7 @@ end
|
|
|
1278
1278
|
|
|
1279
1279
|
Generate a PDF
|
|
1280
1280
|
|
|
1281
|
-
Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and asynchronous processing. Add the `wait=false` query parameter to return immediately. See also: - [Customize the PDF Title and Filename](https://docspring.com/docs/api-guide/generate-pdfs/customize-pdf-title-and-filename/) - Set custom metadata - [Handling Truncated Text](https://docspring.com/docs/api-guide/generate-pdfs/handle-truncated-text/) - Handle text that doesn't fit in fields
|
|
1281
|
+
Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and asynchronous processing. Add the `wait=false` query parameter to return immediately. Live PDFs use credits; test PDFs (`test: true`) are free and watermarked. If your balance can't cover a live PDF, the API returns 402 and the submission waits in the `insufficient_credits` state until you add credits. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/). See also: - [Customize the PDF Title and Filename](https://docspring.com/docs/api-guide/generate-pdfs/customize-pdf-title-and-filename/) - Set custom metadata - [Handling Truncated Text](https://docspring.com/docs/api-guide/generate-pdfs/handle-truncated-text/) - Handle text that doesn't fit in fields
|
|
1282
1282
|
|
|
1283
1283
|
### Examples
|
|
1284
1284
|
|
|
@@ -1424,7 +1424,7 @@ end
|
|
|
1424
1424
|
|
|
1425
1425
|
Check the status of a combined submission (merged PDFs)
|
|
1426
1426
|
|
|
1427
|
-
Retrieves the details and status of a combined submission. Returns processing state, download URL (if processed), metadata, and information about any integrated actions (e.g., S3 uploads).
|
|
1427
|
+
Retrieves the details and status of a combined submission. Returns processing state, download URL (if processed), metadata, and information about any integrated actions (e.g., S3 uploads). `insufficient_credits` means the combined submission is waiting for credits and is processed once you add them. If it's still waiting after 30 days, it moves to `error`.
|
|
1428
1428
|
|
|
1429
1429
|
### Examples
|
|
1430
1430
|
|
|
@@ -1701,7 +1701,7 @@ This endpoint does not need any parameter.
|
|
|
1701
1701
|
|
|
1702
1702
|
Check the status of a PDF
|
|
1703
1703
|
|
|
1704
|
-
Retrieves the details and status of a PDF submission. Returns processing state, download URL (if processed), metadata, submission data (optional), and information about any integrated actions. Use this to poll for completion when using asynchronous processing.
|
|
1704
|
+
Retrieves the details and status of a PDF submission. Returns processing state, download URL (if processed), metadata, submission data (optional), and information about any integrated actions. Use this to poll for completion when using asynchronous processing. `insufficient_credits` means the submission is waiting for credits and is processed once you add them. If it's still waiting after 30 days, it moves to `error`.
|
|
1705
1705
|
|
|
1706
1706
|
### Examples
|
|
1707
1707
|
|
|
@@ -1775,7 +1775,7 @@ end
|
|
|
1775
1775
|
|
|
1776
1776
|
Check the status of a submission batch job
|
|
1777
1777
|
|
|
1778
|
-
Retrieves the status and results of a batch PDF generation job. Returns processing state, completion statistics, and optionally includes all individual submission details. Use this to poll for completion when using asynchronous batch processing.
|
|
1778
|
+
Retrieves the status and results of a batch PDF generation job. Returns processing state, completion statistics, and optionally includes all individual submission details. Use this to poll for completion when using asynchronous batch processing. Submissions waiting for credits are in the `insufficient_credits` state and count as pending, so the batch stays `pending` until you add credits or they stop waiting after 30 days.
|
|
1779
1779
|
|
|
1780
1780
|
### Examples
|
|
1781
1781
|
|
data/docs/CombinePdfsData.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| **metadata** | **Object** | | [optional] |
|
|
10
10
|
| **password** | **String** | | [optional] |
|
|
11
11
|
| **source_pdfs** | **Array<Object>** | | |
|
|
12
|
-
| **test** | **Boolean** | Deprecated, and has no effect.
|
|
12
|
+
| **test** | **Boolean** | Deprecated, and has no effect. Combining always uses credits, even with a test API token or watermarked source PDFs. | [optional] |
|
|
13
13
|
|
|
14
14
|
## Example
|
|
15
15
|
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **status** | **String** | | |
|
|
8
8
|
| **combined_submission** | [**CombinedSubmission**](CombinedSubmission.md) | | |
|
|
9
|
+
| **error** | **String** | | [optional] |
|
|
9
10
|
| **errors** | **Array<String>** | | [optional] |
|
|
11
|
+
| **code** | **String** | `insufficient_credits` when the response is a 402. | [optional] |
|
|
10
12
|
|
|
11
13
|
## Example
|
|
12
14
|
|
|
@@ -16,7 +18,9 @@ require 'docspring'
|
|
|
16
18
|
instance = DocSpring::CreateCombinedSubmissionResponse.new(
|
|
17
19
|
status: null,
|
|
18
20
|
combined_submission: null,
|
|
19
|
-
|
|
21
|
+
error: null,
|
|
22
|
+
errors: null,
|
|
23
|
+
code: null
|
|
20
24
|
)
|
|
21
25
|
```
|
|
22
26
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **status** | **String** | | |
|
|
8
8
|
| **custom_file** | [**CustomFile**](CustomFile.md) | | |
|
|
9
|
+
| **error** | **String** | | [optional] |
|
|
9
10
|
| **errors** | **Array<String>** | | [optional] |
|
|
10
11
|
|
|
11
12
|
## Example
|
|
@@ -16,6 +17,7 @@ require 'docspring'
|
|
|
16
17
|
instance = DocSpring::CreateCustomFileResponse.new(
|
|
17
18
|
status: null,
|
|
18
19
|
custom_file: null,
|
|
20
|
+
error: null,
|
|
19
21
|
errors: null
|
|
20
22
|
)
|
|
21
23
|
```
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| **field_overrides** | **Object** | | [optional] |
|
|
12
12
|
| **metadata** | **Object** | | [optional] |
|
|
13
13
|
| **password** | **String** | | [optional] |
|
|
14
|
-
| **test** | **Boolean** |
|
|
14
|
+
| **test** | **Boolean** | Generate a watermarked test PDF. Test PDFs are free; live PDFs (the default) use credits. | [optional] |
|
|
15
15
|
| **version** | **String** | | [optional] |
|
|
16
16
|
|
|
17
17
|
## Example
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **status** | **String** | | |
|
|
8
8
|
| **event** | [**SubmissionDataRequestEvent**](SubmissionDataRequestEvent.md) | | |
|
|
9
|
+
| **error** | **String** | | [optional] |
|
|
9
10
|
| **errors** | **Array<String>** | | [optional] |
|
|
10
11
|
|
|
11
12
|
## Example
|
|
@@ -16,6 +17,7 @@ require 'docspring'
|
|
|
16
17
|
instance = DocSpring::CreateSubmissionDataRequestEventResponse.new(
|
|
17
18
|
status: null,
|
|
18
19
|
event: null,
|
|
20
|
+
error: null,
|
|
19
21
|
errors: null
|
|
20
22
|
)
|
|
21
23
|
```
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **status** | **String** | | |
|
|
8
8
|
| **data_request** | [**SubmissionDataRequestShow**](SubmissionDataRequestShow.md) | | |
|
|
9
|
+
| **error** | **String** | | [optional] |
|
|
9
10
|
| **errors** | **Array<String>** | | [optional] |
|
|
10
11
|
|
|
11
12
|
## Example
|
|
@@ -16,6 +17,7 @@ require 'docspring'
|
|
|
16
17
|
instance = DocSpring::CreateSubmissionDataRequestResponse.new(
|
|
17
18
|
status: null,
|
|
18
19
|
data_request: null,
|
|
20
|
+
error: null,
|
|
19
21
|
errors: null
|
|
20
22
|
)
|
|
21
23
|
```
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **status** | **String** | | |
|
|
8
8
|
| **token** | [**SubmissionDataRequestToken**](SubmissionDataRequestToken.md) | | |
|
|
9
|
+
| **error** | **String** | | [optional] |
|
|
9
10
|
| **errors** | **Array<String>** | | [optional] |
|
|
10
11
|
|
|
11
12
|
## Example
|
|
@@ -16,6 +17,7 @@ require 'docspring'
|
|
|
16
17
|
instance = DocSpring::CreateSubmissionDataRequestTokenResponse.new(
|
|
17
18
|
status: null,
|
|
18
19
|
token: null,
|
|
20
|
+
error: null,
|
|
19
21
|
errors: null
|
|
20
22
|
)
|
|
21
23
|
```
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **status** | **String** | | |
|
|
8
8
|
| **submission** | [**SubmissionPreview**](SubmissionPreview.md) | | |
|
|
9
|
+
| **error** | **String** | | [optional] |
|
|
9
10
|
| **errors** | **Array<String>** | | [optional] |
|
|
11
|
+
| **code** | **String** | `insufficient_credits` when the response is a 402. | [optional] |
|
|
10
12
|
|
|
11
13
|
## Example
|
|
12
14
|
|
|
@@ -16,7 +18,9 @@ require 'docspring'
|
|
|
16
18
|
instance = DocSpring::CreateSubmissionResponse.new(
|
|
17
19
|
status: null,
|
|
18
20
|
submission: null,
|
|
19
|
-
|
|
21
|
+
error: null,
|
|
22
|
+
errors: null,
|
|
23
|
+
code: null
|
|
20
24
|
)
|
|
21
25
|
```
|
|
22
26
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# DocSpring::ForbiddenErrorResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **status** | **String** | | |
|
|
8
|
+
| **error** | **String** | | |
|
|
9
|
+
| **code** | **String** | | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'docspring'
|
|
15
|
+
|
|
16
|
+
instance = DocSpring::ForbiddenErrorResponse.new(
|
|
17
|
+
status: null,
|
|
18
|
+
error: null,
|
|
19
|
+
code: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/SubmissionBatchData.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| **submissions** | **Array<Object>** | | |
|
|
9
9
|
| **template_id** | **String** | | [optional] |
|
|
10
10
|
| **template_version** | **String** | | [optional] |
|
|
11
|
-
| **test** | **Boolean** |
|
|
11
|
+
| **test** | **Boolean** | Generate a watermarked test PDF. Test PDFs are free; live PDFs (the default) use credits. | [optional] |
|
|
12
12
|
|
|
13
13
|
## Example
|
|
14
14
|
|
data/docspring.gemspec
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
=begin
|
|
4
4
|
#DocSpring API
|
|
5
5
|
|
|
6
|
-
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
6
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v1
|
|
9
9
|
|
data/lib/docspring/api/client.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
@@ -135,7 +135,7 @@ end
|
|
|
135
135
|
end
|
|
136
136
|
|
|
137
137
|
# Generate multiple PDFs
|
|
138
|
-
# Generates up to 50 PDFs in a single request. Each submission can use a different template and data. Supports both synchronous (wait for all PDFs) and asynchronous processing. More efficient than individual requests when creating multiple PDFs. See also: - [Batch Generate PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Request format, responses, and limits
|
|
138
|
+
# Generates up to 50 PDFs in a single request. Each submission can use a different template and data. Supports both synchronous (wait for all PDFs) and asynchronous processing. More efficient than individual requests when creating multiple PDFs. Live PDFs use credits. If any live submission is waiting for credits, the API returns 402 and the others are still processed: check each submission's `state`. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/). See also: - [Batch Generate PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Request format, responses, and limits
|
|
139
139
|
# @param data [SubmissionBatchData]
|
|
140
140
|
# @param [Hash] opts the optional parameters
|
|
141
141
|
# @option opts [Boolean] :wait Wait for submission batch to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) (default to true)
|
|
@@ -146,7 +146,7 @@ end
|
|
|
146
146
|
end
|
|
147
147
|
|
|
148
148
|
# Generate multiple PDFs
|
|
149
|
-
# Generates up to 50 PDFs in a single request. Each submission can use a different template and data. Supports both synchronous (wait for all PDFs) and asynchronous processing. More efficient than individual requests when creating multiple PDFs. See also: - [Batch Generate PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Request format, responses, and limits
|
|
149
|
+
# Generates up to 50 PDFs in a single request. Each submission can use a different template and data. Supports both synchronous (wait for all PDFs) and asynchronous processing. More efficient than individual requests when creating multiple PDFs. Live PDFs use credits. If any live submission is waiting for credits, the API returns 402 and the others are still processed: check each submission's `state`. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/). See also: - [Batch Generate PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Request format, responses, and limits
|
|
150
150
|
# @param data [SubmissionBatchData]
|
|
151
151
|
# @param [Hash] opts the optional parameters
|
|
152
152
|
# @option opts [Boolean] :wait Wait for submission batch to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) (default to true)
|
|
@@ -206,7 +206,7 @@ end
|
|
|
206
206
|
end
|
|
207
207
|
|
|
208
208
|
# Merge submission PDFs, template PDFs, or custom files
|
|
209
|
-
# Combines multiple PDFs from various sources into a single PDF file. Supports merging submission PDFs, template PDFs, custom files, other merged PDFs, and PDFs from URLs. Merges the PDFs in the order provided.
|
|
209
|
+
# Combines multiple PDFs from various sources into a single PDF file. Supports merging submission PDFs, template PDFs, custom files, other merged PDFs, and PDFs from URLs. Merges the PDFs in the order provided. Combining uses credits (4 per source PDF, plus 4 per unit of the combined PDF), even with a test API token or watermarked source PDFs. If your balance can't cover it, the API returns 402 and the combined submission waits in the `insufficient_credits` state until you add credits. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
210
210
|
# @param data [CombinePdfsData]
|
|
211
211
|
# @param [Hash] opts the optional parameters
|
|
212
212
|
# @return [CreateCombinedSubmissionResponse]
|
|
@@ -216,7 +216,7 @@ end
|
|
|
216
216
|
end
|
|
217
217
|
|
|
218
218
|
# Merge submission PDFs, template PDFs, or custom files
|
|
219
|
-
# Combines multiple PDFs from various sources into a single PDF file. Supports merging submission PDFs, template PDFs, custom files, other merged PDFs, and PDFs from URLs. Merges the PDFs in the order provided.
|
|
219
|
+
# Combines multiple PDFs from various sources into a single PDF file. Supports merging submission PDFs, template PDFs, custom files, other merged PDFs, and PDFs from URLs. Merges the PDFs in the order provided. Combining uses credits (4 per source PDF, plus 4 per unit of the combined PDF), even with a test API token or watermarked source PDFs. If your balance can't cover it, the API returns 402 and the combined submission waits in the `insufficient_credits` state until you add credits. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
220
220
|
# @param data [CombinePdfsData]
|
|
221
221
|
# @param [Hash] opts the optional parameters
|
|
222
222
|
# @return [Array<(CreateCombinedSubmissionResponse, Integer, Hash)>] CreateCombinedSubmissionResponse data, response status code and response headers
|
|
@@ -1231,7 +1231,7 @@ end
|
|
|
1231
1231
|
end
|
|
1232
1232
|
|
|
1233
1233
|
# Generate a PDF
|
|
1234
|
-
# Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and asynchronous processing. Add the `wait=false` query parameter to return immediately. See also: - [Customize the PDF Title and Filename](https://docspring.com/docs/api-guide/generate-pdfs/customize-pdf-title-and-filename/) - Set custom metadata - [Handling Truncated Text](https://docspring.com/docs/api-guide/generate-pdfs/handle-truncated-text/) - Handle text that doesn't fit in fields
|
|
1234
|
+
# Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and asynchronous processing. Add the `wait=false` query parameter to return immediately. Live PDFs use credits; test PDFs (`test: true`) are free and watermarked. If your balance can't cover a live PDF, the API returns 402 and the submission waits in the `insufficient_credits` state until you add credits. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/). See also: - [Customize the PDF Title and Filename](https://docspring.com/docs/api-guide/generate-pdfs/customize-pdf-title-and-filename/) - Set custom metadata - [Handling Truncated Text](https://docspring.com/docs/api-guide/generate-pdfs/handle-truncated-text/) - Handle text that doesn't fit in fields
|
|
1235
1235
|
# @param template_id [String]
|
|
1236
1236
|
# @param submission [CreatePdfSubmissionData]
|
|
1237
1237
|
# @param [Hash] opts the optional parameters
|
|
@@ -1243,7 +1243,7 @@ end
|
|
|
1243
1243
|
end
|
|
1244
1244
|
|
|
1245
1245
|
# Generate a PDF
|
|
1246
|
-
# Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and asynchronous processing. Add the `wait=false` query parameter to return immediately. See also: - [Customize the PDF Title and Filename](https://docspring.com/docs/api-guide/generate-pdfs/customize-pdf-title-and-filename/) - Set custom metadata - [Handling Truncated Text](https://docspring.com/docs/api-guide/generate-pdfs/handle-truncated-text/) - Handle text that doesn't fit in fields
|
|
1246
|
+
# Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and asynchronous processing. Add the `wait=false` query parameter to return immediately. Live PDFs use credits; test PDFs (`test: true`) are free and watermarked. If your balance can't cover a live PDF, the API returns 402 and the submission waits in the `insufficient_credits` state until you add credits. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/). See also: - [Customize the PDF Title and Filename](https://docspring.com/docs/api-guide/generate-pdfs/customize-pdf-title-and-filename/) - Set custom metadata - [Handling Truncated Text](https://docspring.com/docs/api-guide/generate-pdfs/handle-truncated-text/) - Handle text that doesn't fit in fields
|
|
1247
1247
|
# @param template_id [String]
|
|
1248
1248
|
# @param submission [CreatePdfSubmissionData]
|
|
1249
1249
|
# @param [Hash] opts the optional parameters
|
|
@@ -1371,7 +1371,7 @@ end
|
|
|
1371
1371
|
end
|
|
1372
1372
|
|
|
1373
1373
|
# Check the status of a combined submission (merged PDFs)
|
|
1374
|
-
# Retrieves the details and status of a combined submission. Returns processing state, download URL (if processed), metadata, and information about any integrated actions (e.g., S3 uploads).
|
|
1374
|
+
# Retrieves the details and status of a combined submission. Returns processing state, download URL (if processed), metadata, and information about any integrated actions (e.g., S3 uploads). `insufficient_credits` means the combined submission is waiting for credits and is processed once you add them. If it's still waiting after 30 days, it moves to `error`.
|
|
1375
1375
|
# @param combined_submission_id [String]
|
|
1376
1376
|
# @param [Hash] opts the optional parameters
|
|
1377
1377
|
# @return [CombinedSubmission]
|
|
@@ -1381,7 +1381,7 @@ end
|
|
|
1381
1381
|
end
|
|
1382
1382
|
|
|
1383
1383
|
# Check the status of a combined submission (merged PDFs)
|
|
1384
|
-
# Retrieves the details and status of a combined submission. Returns processing state, download URL (if processed), metadata, and information about any integrated actions (e.g., S3 uploads).
|
|
1384
|
+
# Retrieves the details and status of a combined submission. Returns processing state, download URL (if processed), metadata, and information about any integrated actions (e.g., S3 uploads). `insufficient_credits` means the combined submission is waiting for credits and is processed once you add them. If it's still waiting after 30 days, it moves to `error`.
|
|
1385
1385
|
# @param combined_submission_id [String]
|
|
1386
1386
|
# @param [Hash] opts the optional parameters
|
|
1387
1387
|
# @return [Array<(CombinedSubmission, Integer, Hash)>] CombinedSubmission data, response status code and response headers
|
|
@@ -1617,7 +1617,7 @@ end
|
|
|
1617
1617
|
end
|
|
1618
1618
|
|
|
1619
1619
|
# Check the status of a PDF
|
|
1620
|
-
# Retrieves the details and status of a PDF submission. Returns processing state, download URL (if processed), metadata, submission data (optional), and information about any integrated actions. Use this to poll for completion when using asynchronous processing.
|
|
1620
|
+
# Retrieves the details and status of a PDF submission. Returns processing state, download URL (if processed), metadata, submission data (optional), and information about any integrated actions. Use this to poll for completion when using asynchronous processing. `insufficient_credits` means the submission is waiting for credits and is processed once you add them. If it's still waiting after 30 days, it moves to `error`.
|
|
1621
1621
|
# @param submission_id [String]
|
|
1622
1622
|
# @param [Hash] opts the optional parameters
|
|
1623
1623
|
# @option opts [Boolean] :include_data
|
|
@@ -1628,7 +1628,7 @@ end
|
|
|
1628
1628
|
end
|
|
1629
1629
|
|
|
1630
1630
|
# Check the status of a PDF
|
|
1631
|
-
# Retrieves the details and status of a PDF submission. Returns processing state, download URL (if processed), metadata, submission data (optional), and information about any integrated actions. Use this to poll for completion when using asynchronous processing.
|
|
1631
|
+
# Retrieves the details and status of a PDF submission. Returns processing state, download URL (if processed), metadata, submission data (optional), and information about any integrated actions. Use this to poll for completion when using asynchronous processing. `insufficient_credits` means the submission is waiting for credits and is processed once you add them. If it's still waiting after 30 days, it moves to `error`.
|
|
1632
1632
|
# @param submission_id [String]
|
|
1633
1633
|
# @param [Hash] opts the optional parameters
|
|
1634
1634
|
# @option opts [Boolean] :include_data
|
|
@@ -1683,7 +1683,7 @@ end
|
|
|
1683
1683
|
end
|
|
1684
1684
|
|
|
1685
1685
|
# Check the status of a submission batch job
|
|
1686
|
-
# Retrieves the status and results of a batch PDF generation job. Returns processing state, completion statistics, and optionally includes all individual submission details. Use this to poll for completion when using asynchronous batch processing.
|
|
1686
|
+
# Retrieves the status and results of a batch PDF generation job. Returns processing state, completion statistics, and optionally includes all individual submission details. Use this to poll for completion when using asynchronous batch processing. Submissions waiting for credits are in the `insufficient_credits` state and count as pending, so the batch stays `pending` until you add credits or they stop waiting after 30 days.
|
|
1687
1687
|
# @param submission_batch_id [String]
|
|
1688
1688
|
# @param [Hash] opts the optional parameters
|
|
1689
1689
|
# @option opts [Boolean] :include_submissions
|
|
@@ -1694,7 +1694,7 @@ end
|
|
|
1694
1694
|
end
|
|
1695
1695
|
|
|
1696
1696
|
# Check the status of a submission batch job
|
|
1697
|
-
# Retrieves the status and results of a batch PDF generation job. Returns processing state, completion statistics, and optionally includes all individual submission details. Use this to poll for completion when using asynchronous batch processing.
|
|
1697
|
+
# Retrieves the status and results of a batch PDF generation job. Returns processing state, completion statistics, and optionally includes all individual submission details. Use this to poll for completion when using asynchronous batch processing. Submissions waiting for credits are in the `insufficient_credits` state and count as pending, so the batch stays `pending` until you add credits or they stop waiting after 30 days.
|
|
1698
1698
|
# @param submission_batch_id [String]
|
|
1699
1699
|
# @param [Hash] opts the optional parameters
|
|
1700
1700
|
# @option opts [Boolean] :include_submissions
|
data/lib/docspring/api_client.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
@@ -33,7 +33,7 @@ module DocSpring
|
|
|
33
33
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
34
34
|
def initialize(config = Configuration.default)
|
|
35
35
|
@config = config
|
|
36
|
-
@user_agent = "docspring-ruby-3.
|
|
36
|
+
@user_agent = "docspring-ruby-3.5.0"
|
|
37
37
|
@default_headers = {
|
|
38
38
|
'Content-Type' => 'application/json',
|
|
39
39
|
'User-Agent' => @user_agent
|
data/lib/docspring/api_error.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
@@ -25,6 +25,9 @@ module DocSpring
|
|
|
25
25
|
|
|
26
26
|
attr_accessor :submissions
|
|
27
27
|
|
|
28
|
+
# `insufficient_credits` when the response is a 402.
|
|
29
|
+
attr_accessor :code
|
|
30
|
+
|
|
28
31
|
class EnumAttributeValidator
|
|
29
32
|
attr_reader :datatype
|
|
30
33
|
attr_reader :allowable_values
|
|
@@ -54,7 +57,8 @@ module DocSpring
|
|
|
54
57
|
:'error' => :'error',
|
|
55
58
|
:'errors' => :'errors',
|
|
56
59
|
:'submission_batch' => :'submission_batch',
|
|
57
|
-
:'submissions' => :'submissions'
|
|
60
|
+
:'submissions' => :'submissions',
|
|
61
|
+
:'code' => :'code'
|
|
58
62
|
}
|
|
59
63
|
end
|
|
60
64
|
|
|
@@ -75,7 +79,8 @@ module DocSpring
|
|
|
75
79
|
:'error' => :'String',
|
|
76
80
|
:'errors' => :'Array<String>',
|
|
77
81
|
:'submission_batch' => :'SubmissionBatch',
|
|
78
|
-
:'submissions' => :'Array<Object>'
|
|
82
|
+
:'submissions' => :'Array<Object>',
|
|
83
|
+
:'code' => :'String'
|
|
79
84
|
}
|
|
80
85
|
end
|
|
81
86
|
|
|
@@ -130,6 +135,10 @@ module DocSpring
|
|
|
130
135
|
else
|
|
131
136
|
self.submissions = nil
|
|
132
137
|
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'code')
|
|
140
|
+
self.code = attributes[:'code']
|
|
141
|
+
end
|
|
133
142
|
end
|
|
134
143
|
|
|
135
144
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -204,7 +213,8 @@ module DocSpring
|
|
|
204
213
|
error == o.error &&
|
|
205
214
|
errors == o.errors &&
|
|
206
215
|
submission_batch == o.submission_batch &&
|
|
207
|
-
submissions == o.submissions
|
|
216
|
+
submissions == o.submissions &&
|
|
217
|
+
code == o.code
|
|
208
218
|
end
|
|
209
219
|
|
|
210
220
|
# @see the `==` method
|
|
@@ -216,7 +226,7 @@ module DocSpring
|
|
|
216
226
|
# Calculates hash code according to all attributes.
|
|
217
227
|
# @return [Integer] Hash code
|
|
218
228
|
def hash
|
|
219
|
-
[status, error, errors, submission_batch, submissions].hash
|
|
229
|
+
[status, error, errors, submission_batch, submissions, code].hash
|
|
220
230
|
end
|
|
221
231
|
|
|
222
232
|
# Builds the object from hash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
@@ -26,7 +26,7 @@ module DocSpring
|
|
|
26
26
|
|
|
27
27
|
attr_accessor :source_pdfs
|
|
28
28
|
|
|
29
|
-
# Deprecated, and has no effect.
|
|
29
|
+
# Deprecated, and has no effect. Combining always uses credits, even with a test API token or watermarked source PDFs.
|
|
30
30
|
attr_accessor :test
|
|
31
31
|
|
|
32
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
@@ -273,7 +273,7 @@ module DocSpring
|
|
|
273
273
|
def valid?
|
|
274
274
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
275
275
|
return false if @state.nil?
|
|
276
|
-
state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "error"])
|
|
276
|
+
state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "error", "insufficient_credits"])
|
|
277
277
|
return false unless state_validator.valid?(@state)
|
|
278
278
|
return false if @expired.nil?
|
|
279
279
|
return false if @submission_ids.nil?
|
|
@@ -286,7 +286,7 @@ module DocSpring
|
|
|
286
286
|
# Custom attribute writer method checking allowed values (enum).
|
|
287
287
|
# @param [Object] state Object to be assigned
|
|
288
288
|
def state=(state)
|
|
289
|
-
validator = EnumAttributeValidator.new('String', ["pending", "processed", "error"])
|
|
289
|
+
validator = EnumAttributeValidator.new('String', ["pending", "processed", "error", "insufficient_credits"])
|
|
290
290
|
# build_from_hash accepts enum values this client doesn't know about yet
|
|
291
291
|
unless defined?(@_skip_enum_validation) || validator.valid?(state)
|
|
292
292
|
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v1
|
|
7
7
|
|