docspring 3.3.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/AGENTS.md +33 -0
- data/CHANGELOG.md +19 -0
- data/Gemfile.lock +2 -2
- data/README.md +145 -178
- 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/docs/Template.md +2 -0
- data/docs/TemplatePreview.md +2 -0
- 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 +28 -2
- 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 +28 -2
- 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 +7 -1
- data/spec/models/template_publish_version_response_spec.rb +1 -1
- data/spec/models/template_spec.rb +7 -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 +6 -2
- 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: 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/AGENTS.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Notes for AI coding agents working with the DocSpring Ruby SDK (`docspring`), in this repository or
|
|
4
|
+
as a dependency of an app.
|
|
5
|
+
|
|
6
|
+
## This code is generated
|
|
7
|
+
|
|
8
|
+
Every file here is generated from DocSpring's OpenAPI spec by
|
|
9
|
+
[DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches), and each release replaces
|
|
10
|
+
all of it. Don't edit it or open pull requests that change it, and don't patch an installed copy: the next release
|
|
11
|
+
overwrites the change. Report bugs at https://github.com/DocSpring/docspring-ruby/issues or to support@docspring.com, and DocSpring fixes them in
|
|
12
|
+
the generator.
|
|
13
|
+
|
|
14
|
+
## Where to look
|
|
15
|
+
|
|
16
|
+
- [README.md](README.md): install, configuration, an example and how errors and API changes are handled.
|
|
17
|
+
- [docs/Client.md](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md): every method, with its parameters and return type.
|
|
18
|
+
- [docs/](https://github.com/DocSpring/docspring-ruby/tree/main/docs): every model and its fields.
|
|
19
|
+
- https://docspring.com/docs/llms.txt: DocSpring's documentation for LLMs (`llms-small.txt`, `llms-full.txt`).
|
|
20
|
+
- https://docspring.com/docs/api/: the API reference, with Ruby code for every method.
|
|
21
|
+
- https://docspring.com/api-docs/v1/openapi.json: the OpenAPI spec this SDK is generated from.
|
|
22
|
+
|
|
23
|
+
## Using it in an app
|
|
24
|
+
|
|
25
|
+
- Credentials come from `DOCSPRING_TOKEN_ID` and `DOCSPRING_TOKEN_SECRET`. Keep them in the environment or a secret
|
|
26
|
+
store, never in code. Accounts in the EU region also need `DOCSPRING_REGION=EU`.
|
|
27
|
+
- Template IDs look like `tpl_...` and submission IDs like `sub_...`.
|
|
28
|
+
- Pass `test: true` when you generate PDFs during development: test PDFs are free and watermarked.
|
|
29
|
+
- Generating a PDF waits for it, for up to 95 seconds. For many PDFs or slow templates, set `wait` to false and use
|
|
30
|
+
webhooks or check the submission later (https://docspring.com/docs/api-guide/synchronous-requests/).
|
|
31
|
+
- Errors: Methods raise `DocSpring::ApiError` for an error response, with the HTTP status in `code` and the body in `response_body`.
|
|
32
|
+
- Responses can be newer than this SDK, because DocSpring adds fields and enum values to API v1 without a new
|
|
33
|
+
version. The model leaves out a response field added to the API after this release. An enum value added to the API after this release comes back as a string, so handle values you don't recognize.
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
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
|
+
|
|
12
|
+
### 3.4.0 [October 18, 2026]
|
|
13
|
+
|
|
14
|
+
- Templates: new `parse_dates_using_template_date_format` setting, when you create or update a template. When it's
|
|
15
|
+
true, date values sent as NN/NN/YYYY (with slashes, dashes or dots) are read in the order of the template's default
|
|
16
|
+
date format: month first for `%m/%d/%Y`, day first for `%d/%m/%Y`. When it's false, they're read day first.
|
|
17
|
+
- A new README: installing, a quick start, every API method, errors, and how API changes are handled. The repository
|
|
18
|
+
also has an AGENTS.md for coding agents.
|
|
19
|
+
|
|
1
20
|
### 3.3.0 [October 15, 2026]
|
|
2
21
|
|
|
3
22
|
- Submissions and data requests can now be in the `declined` state, when a signer declines to sign. Data
|
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
|
@@ -1,203 +1,170 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DocSpring Ruby SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The official Ruby client for the [DocSpring API](https://docspring.com/docs/api/). DocSpring fills PDF
|
|
4
|
+
templates with your data, generates PDFs from HTML templates, combines PDFs and collects e-signatures.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
[Documentation](https://docspring.com/docs/) · [API reference](https://docspring.com/docs/api/) ·
|
|
7
|
+
[RubyGems](https://rubygems.org/gems/docspring) · [Changelog](https://github.com/DocSpring/docspring-ruby/blob/main/CHANGELOG.md)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Version 3.5.0. Requires Ruby >= 2.7.
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
- Package version: 3.3.0
|
|
11
|
-
- Generator version: 7.16.0-DOCSPRING
|
|
12
|
-
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
11
|
+
## Install and configure
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
Add the following line to your Gemfile:
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
To build the Ruby code into a gem:
|
|
19
|
-
|
|
20
|
-
```shell
|
|
21
|
-
gem build docspring.gemspec
|
|
15
|
+
```ruby
|
|
16
|
+
gem "docspring"
|
|
22
17
|
```
|
|
23
18
|
|
|
24
|
-
Then
|
|
19
|
+
Then run:
|
|
25
20
|
|
|
26
|
-
```
|
|
27
|
-
|
|
21
|
+
```bash
|
|
22
|
+
bundle install
|
|
28
23
|
```
|
|
29
24
|
|
|
30
|
-
|
|
25
|
+
Configure authentication via environment variables:
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
gem 'docspring', '~> 3.3.0'
|
|
27
|
+
```bash
|
|
28
|
+
export DOCSPRING_TOKEN_ID="API_TOKEN_ID"
|
|
29
|
+
export DOCSPRING_TOKEN_SECRET="API_TOKEN_SECRET"
|
|
30
|
+
```
|
|
37
31
|
|
|
38
|
-
|
|
32
|
+
You can also configure the region or host. The host takes priority over the region:
|
|
39
33
|
|
|
40
|
-
|
|
34
|
+
```bash
|
|
35
|
+
export DOCSPRING_REGION="US" # US or EU (defaults to US)
|
|
36
|
+
export DOCSPRING_HOST="docspring.yourcompany.com" # For on-premise deployments
|
|
37
|
+
```
|
|
41
38
|
|
|
42
|
-
|
|
39
|
+
Initialize the DocSpring client with no arguments:
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
```ruby
|
|
42
|
+
client = DocSpring::Client.new
|
|
43
|
+
```
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
Or pass credentials directly as arguments:
|
|
47
46
|
|
|
48
|
-
```
|
|
49
|
-
|
|
47
|
+
```ruby
|
|
48
|
+
client = DocSpring::Client.new(
|
|
49
|
+
api_token_id: 'API_TOKEN_ID',
|
|
50
|
+
api_token_secret: 'API_TOKEN_SECRET'
|
|
51
|
+
)
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
##
|
|
54
|
+
## Generate a PDF
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
Fill a template with data (use your template's ID in place of `tpl_1234567890abcdef01`):
|
|
55
57
|
|
|
56
58
|
```ruby
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
begin
|
|
72
|
-
#Add new fields to a Template
|
|
73
|
-
result = api_instance.add_fields_to_template(template_id, data)
|
|
74
|
-
p result
|
|
75
|
-
rescue DocSpring::ApiError => e
|
|
76
|
-
puts "Exception when calling Client->add_fields_to_template: #{e}"
|
|
77
|
-
end
|
|
78
|
-
|
|
59
|
+
template_id = 'tpl_1234567890abcdef01'
|
|
60
|
+
submission = {
|
|
61
|
+
data: { first_name: 'John', last_name: 'Smith', phone_number: '+11234567890' },
|
|
62
|
+
metadata: { foo: 123, bar: :baz },
|
|
63
|
+
}
|
|
64
|
+
wait = nil
|
|
65
|
+
|
|
66
|
+
response = client.generate_pdf(
|
|
67
|
+
template_id,
|
|
68
|
+
submission,
|
|
69
|
+
wait: wait
|
|
70
|
+
)
|
|
71
|
+
puts response
|
|
79
72
|
```
|
|
80
73
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
- [
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
- [DocSpring::SubmissionDataRequestToken](docs/SubmissionDataRequestToken.md)
|
|
179
|
-
- [DocSpring::SubmissionPreview](docs/SubmissionPreview.md)
|
|
180
|
-
- [DocSpring::SuccessErrorResponse](docs/SuccessErrorResponse.md)
|
|
181
|
-
- [DocSpring::SuccessMultipleErrorsResponse](docs/SuccessMultipleErrorsResponse.md)
|
|
182
|
-
- [DocSpring::Template](docs/Template.md)
|
|
183
|
-
- [DocSpring::TemplateAddFieldsResponse](docs/TemplateAddFieldsResponse.md)
|
|
184
|
-
- [DocSpring::TemplateDeleteResponse](docs/TemplateDeleteResponse.md)
|
|
185
|
-
- [DocSpring::TemplateModelCodeResponse](docs/TemplateModelCodeResponse.md)
|
|
186
|
-
- [DocSpring::TemplatePreview](docs/TemplatePreview.md)
|
|
187
|
-
- [DocSpring::TemplatePublishVersionResponse](docs/TemplatePublishVersionResponse.md)
|
|
188
|
-
- [DocSpring::UpdateHtmlTemplate](docs/UpdateHtmlTemplate.md)
|
|
189
|
-
- [DocSpring::UpdatePdfTemplate](docs/UpdatePdfTemplate.md)
|
|
190
|
-
- [DocSpring::UpdateSubmissionDataRequestData](docs/UpdateSubmissionDataRequestData.md)
|
|
191
|
-
- [DocSpring::UpdateWebhookData](docs/UpdateWebhookData.md)
|
|
192
|
-
- [DocSpring::UploadPresignResponse](docs/UploadPresignResponse.md)
|
|
193
|
-
- [DocSpring::Webhook](docs/Webhook.md)
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
## Documentation for Authorization
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
Authentication schemes defined for the API:
|
|
200
|
-
### api_token_basic
|
|
201
|
-
|
|
202
|
-
- **Type**: HTTP basic authentication
|
|
203
|
-
|
|
74
|
+
By default the call waits for the PDF, for up to 95 seconds, and the submission in the response has its
|
|
75
|
+
`download_url`. Set `wait` to false to get a pending submission straight away.
|
|
76
|
+
[Sync vs. async processing](https://docspring.com/docs/api-guide/synchronous-requests/) covers the time limit, status
|
|
77
|
+
checks and webhooks.
|
|
78
|
+
|
|
79
|
+
## Methods
|
|
80
|
+
|
|
81
|
+
[docs/Client.md](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md) has each method's parameters and return type, and
|
|
82
|
+
[docs/](https://github.com/DocSpring/docspring-ruby/tree/main/docs) has the models. The [API reference](https://docspring.com/docs/api/) has
|
|
83
|
+
Ruby code for every method.
|
|
84
|
+
|
|
85
|
+
| Method | Description |
|
|
86
|
+
| ------ | ----------- |
|
|
87
|
+
| [`add_fields_to_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#add_fields_to_template) | Add new fields to a Template |
|
|
88
|
+
| [`batch_generate_pdfs`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#batch_generate_pdfs) | Generate multiple PDFs |
|
|
89
|
+
| [`combine_pdfs`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#combine_pdfs) | Merge submission PDFs, template PDFs, or custom files |
|
|
90
|
+
| [`copy_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#copy_template) | Copy a template |
|
|
91
|
+
| [`create_custom_file_from_upload`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_custom_file_from_upload) | Create a new custom file from a cached S3 upload |
|
|
92
|
+
| [`create_data_request_event`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_data_request_event) | Create a new event for emailing a signee a request for signature |
|
|
93
|
+
| [`create_data_request_token`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_data_request_token) | Create a new data request token for form authentication |
|
|
94
|
+
| [`create_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_folder) | Create a folder |
|
|
95
|
+
| [`create_html_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_html_template) | Create a new HTML template |
|
|
96
|
+
| [`create_pdf_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_pdf_template) | Create a new PDF template with a form POST file upload |
|
|
97
|
+
| [`create_pdf_template_from_upload`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_pdf_template_from_upload) | Create a new PDF template from a cached S3 file upload |
|
|
98
|
+
| [`create_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_webhook) | Create a webhook |
|
|
99
|
+
| [`delete_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_folder) | Delete a folder |
|
|
100
|
+
| [`delete_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_template) | Delete a template |
|
|
101
|
+
| [`delete_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_webhook) | Delete a webhook |
|
|
102
|
+
| [`expire_combined_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#expire_combined_submission) | Expire a combined submission |
|
|
103
|
+
| [`expire_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#expire_submission) | Expire a PDF submission |
|
|
104
|
+
| [`generate_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#generate_pdf) | Generate a PDF |
|
|
105
|
+
| [`generate_preview`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#generate_preview) | Generate a preview PDF for partially completed data requests |
|
|
106
|
+
| [`get_combined_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_combined_submission) | Check the status of a combined submission (merged PDFs) |
|
|
107
|
+
| [`get_data_request`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_data_request) | Look up a submission data request |
|
|
108
|
+
| [`get_full_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_full_template) | Fetch the full attributes for a PDF template |
|
|
109
|
+
| [`get_presign_url`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_presign_url) | Get a presigned S3 URL for direct file upload |
|
|
110
|
+
| [`get_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_submission) | Check the status of a PDF |
|
|
111
|
+
| [`get_submission_batch`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_submission_batch) | Check the status of a submission batch job |
|
|
112
|
+
| [`get_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template) | Check the status of an uploaded template |
|
|
113
|
+
| [`get_template_model_code`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_model_code) | Generate typed model code for a template |
|
|
114
|
+
| [`get_template_schema`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_schema) | Fetch the JSON schema for a template |
|
|
115
|
+
| [`get_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_webhook) | Get a webhook |
|
|
116
|
+
| [`list_combined_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_combined_submissions) | Get a list of all combined submissions |
|
|
117
|
+
| [`list_folders`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_folders) | Get a list of all folders |
|
|
118
|
+
| [`list_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_submissions) | List all submissions |
|
|
119
|
+
| [`list_template_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_template_submissions) | List all submissions for a given template |
|
|
120
|
+
| [`list_templates`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_templates) | Get a list of all templates |
|
|
121
|
+
| [`list_webhooks`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_webhooks) | Get a list of all webhooks |
|
|
122
|
+
| [`move_folder_to_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#move_folder_to_folder) | Move a folder |
|
|
123
|
+
| [`move_template_to_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#move_template_to_folder) | Move Template to folder |
|
|
124
|
+
| [`publish_template_version`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#publish_template_version) | Publish a template version |
|
|
125
|
+
| [`rename_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#rename_folder) | Rename a folder |
|
|
126
|
+
| [`restore_template_version`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#restore_template_version) | Restore a template version |
|
|
127
|
+
| [`test_authentication`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#test_authentication) | Test authentication |
|
|
128
|
+
| [`update_data_request`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_data_request) | Update a submission data request |
|
|
129
|
+
| [`update_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template) | Update a Template |
|
|
130
|
+
| [`update_template_document`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template_document) | Update a template's document with a form POST file upload |
|
|
131
|
+
| [`update_template_document_from_upload`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template_document_from_upload) | Update a template's document with a cached S3 file upload |
|
|
132
|
+
| [`update_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_webhook) | Update a webhook |
|
|
133
|
+
|
|
134
|
+
## Errors
|
|
135
|
+
|
|
136
|
+
Methods raise `DocSpring::ApiError` for an error response, with the HTTP status in `code` and the body in `response_body`.
|
|
137
|
+
|
|
138
|
+
## API changes
|
|
139
|
+
|
|
140
|
+
DocSpring adds fields and enum values to API v1 without releasing a new API version. Changes that would break
|
|
141
|
+
existing code, such as removing or renaming a field, go in a new API version
|
|
142
|
+
([API changes](https://docspring.com/docs/api-guide/openapi-schema/#api-changes)). So this SDK keeps working with
|
|
143
|
+
responses that are newer than it is:
|
|
144
|
+
|
|
145
|
+
- The model leaves out a response field added to the API after this release.
|
|
146
|
+
- An enum value added to the API after this release comes back as a string, so handle values you don't recognize.
|
|
147
|
+
|
|
148
|
+
Upgrade the SDK to read new fields and enum values. The [changelog](https://github.com/DocSpring/docspring-ruby/blob/main/CHANGELOG.md) lists
|
|
149
|
+
what each release adds.
|
|
150
|
+
|
|
151
|
+
## About this SDK
|
|
152
|
+
|
|
153
|
+
This SDK is generated from DocSpring's [OpenAPI spec](https://docspring.com/api-docs/v1/openapi.json) with
|
|
154
|
+
[DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches) 7.16.0.
|
|
155
|
+
The fork changes the Ruby generator:
|
|
156
|
+
|
|
157
|
+
- Responses with an enum value added to the API after this release don't raise `ArgumentError`. Setting an attribute yourself still checks its value.
|
|
158
|
+
|
|
159
|
+
On top of the generated code, we add:
|
|
160
|
+
|
|
161
|
+
- A client constructor that reads your credentials, region and host from the environment.
|
|
162
|
+
- A fix for multipart PUT requests in Ethon (file uploads to `update_template_document`).
|
|
163
|
+
|
|
164
|
+
Because the code is generated, we can't merge pull requests that change it. Please
|
|
165
|
+
[open an issue](https://github.com/DocSpring/docspring-ruby/issues) or email [support@docspring.com](mailto:support@docspring.com) instead, and
|
|
166
|
+
we'll fix it in the generator. [AGENTS.md](https://github.com/DocSpring/docspring-ruby/blob/main/AGENTS.md) is a short guide for AI coding agents.
|
|
167
|
+
|
|
168
|
+
## License
|
|
169
|
+
|
|
170
|
+
MIT. See [LICENSE](https://github.com/DocSpring/docspring-ruby/blob/main/LICENSE).
|
|
@@ -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
|
|