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.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +3 -0
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +11 -0
  5. data/Gemfile.lock +2 -2
  6. data/README.md +1 -1
  7. data/docs/BatchGeneratePdfs201Response.md +3 -1
  8. data/docs/Client.md +6 -6
  9. data/docs/CombinePdfsData.md +1 -1
  10. data/docs/CreateCombinedSubmissionResponse.md +5 -1
  11. data/docs/CreateCustomFileResponse.md +2 -0
  12. data/docs/CreatePdfSubmissionData.md +1 -1
  13. data/docs/CreateSubmissionDataRequestEventResponse.md +2 -0
  14. data/docs/CreateSubmissionDataRequestResponse.md +2 -0
  15. data/docs/CreateSubmissionDataRequestTokenResponse.md +2 -0
  16. data/docs/CreateSubmissionResponse.md +5 -1
  17. data/docs/ForbiddenErrorResponse.md +22 -0
  18. data/docs/SubmissionBatchData.md +1 -1
  19. data/docspring.gemspec +1 -1
  20. data/lib/docspring/api/client.rb +13 -13
  21. data/lib/docspring/api_client.rb +2 -2
  22. data/lib/docspring/api_error.rb +1 -1
  23. data/lib/docspring/configuration.rb +1 -1
  24. data/lib/docspring/models/add_fields_data.rb +1 -1
  25. data/lib/docspring/models/batch_generate_pdfs201_response.rb +15 -5
  26. data/lib/docspring/models/combine_pdfs_data.rb +2 -2
  27. data/lib/docspring/models/combined_submission.rb +3 -3
  28. data/lib/docspring/models/combined_submission_action.rb +1 -1
  29. data/lib/docspring/models/copy_template_options.rb +1 -1
  30. data/lib/docspring/models/create_combined_submission_response.rb +24 -5
  31. data/lib/docspring/models/create_custom_file_data.rb +1 -1
  32. data/lib/docspring/models/create_custom_file_response.rb +11 -2
  33. data/lib/docspring/models/create_folder_data.rb +1 -1
  34. data/lib/docspring/models/create_html_template.rb +1 -1
  35. data/lib/docspring/models/create_pdf_submission_data.rb +2 -1
  36. data/lib/docspring/models/create_pdf_template.rb +1 -1
  37. data/lib/docspring/models/create_submission_data_request_data.rb +1 -1
  38. data/lib/docspring/models/create_submission_data_request_event_request.rb +1 -1
  39. data/lib/docspring/models/create_submission_data_request_event_response.rb +11 -2
  40. data/lib/docspring/models/create_submission_data_request_response.rb +11 -2
  41. data/lib/docspring/models/create_submission_data_request_token_response.rb +11 -2
  42. data/lib/docspring/models/create_submission_response.rb +24 -5
  43. data/lib/docspring/models/create_webhook_data.rb +1 -1
  44. data/lib/docspring/models/custom_file.rb +1 -1
  45. data/lib/docspring/models/error_or_multiple_errors_response.rb +1 -1
  46. data/lib/docspring/models/error_response.rb +1 -1
  47. data/lib/docspring/models/folder.rb +1 -1
  48. data/lib/docspring/models/forbidden_error_response.rb +323 -0
  49. data/lib/docspring/models/json_schema.rb +1 -1
  50. data/lib/docspring/models/list_submissions_response.rb +1 -1
  51. data/lib/docspring/models/move_folder_data.rb +1 -1
  52. data/lib/docspring/models/move_template_data.rb +1 -1
  53. data/lib/docspring/models/multiple_errors_response.rb +1 -1
  54. data/lib/docspring/models/publish_version_data.rb +1 -1
  55. data/lib/docspring/models/rename_folder_data.rb +1 -1
  56. data/lib/docspring/models/restore_version_data.rb +1 -1
  57. data/lib/docspring/models/submission.rb +3 -3
  58. data/lib/docspring/models/submission422_response.rb +1 -1
  59. data/lib/docspring/models/submission_action.rb +1 -1
  60. data/lib/docspring/models/submission_batch.rb +1 -1
  61. data/lib/docspring/models/submission_batch_data.rb +2 -1
  62. data/lib/docspring/models/submission_batch_with_submissions.rb +1 -1
  63. data/lib/docspring/models/submission_data_request.rb +1 -1
  64. data/lib/docspring/models/submission_data_request_event.rb +1 -1
  65. data/lib/docspring/models/submission_data_request_show.rb +1 -1
  66. data/lib/docspring/models/submission_data_request_token.rb +1 -1
  67. data/lib/docspring/models/submission_preview.rb +3 -3
  68. data/lib/docspring/models/success_error_response.rb +1 -1
  69. data/lib/docspring/models/success_multiple_errors_response.rb +1 -1
  70. data/lib/docspring/models/template.rb +1 -1
  71. data/lib/docspring/models/template_add_fields_response.rb +1 -1
  72. data/lib/docspring/models/template_delete_response.rb +1 -1
  73. data/lib/docspring/models/template_model_code_response.rb +1 -1
  74. data/lib/docspring/models/template_preview.rb +1 -1
  75. data/lib/docspring/models/template_publish_version_response.rb +1 -1
  76. data/lib/docspring/models/update_html_template.rb +1 -1
  77. data/lib/docspring/models/update_pdf_template.rb +1 -1
  78. data/lib/docspring/models/update_submission_data_request_data.rb +1 -1
  79. data/lib/docspring/models/update_webhook_data.rb +1 -1
  80. data/lib/docspring/models/upload_presign_response.rb +1 -1
  81. data/lib/docspring/models/webhook.rb +1 -1
  82. data/lib/docspring/version.rb +2 -2
  83. data/lib/docspring.rb +2 -1
  84. data/spec/api/client_spec.rb +7 -7
  85. data/spec/models/add_fields_data_spec.rb +1 -1
  86. data/spec/models/batch_generate_pdfs201_response_spec.rb +7 -1
  87. data/spec/models/combine_pdfs_data_spec.rb +1 -1
  88. data/spec/models/combined_submission_action_spec.rb +1 -1
  89. data/spec/models/combined_submission_spec.rb +2 -2
  90. data/spec/models/copy_template_options_spec.rb +1 -1
  91. data/spec/models/create_combined_submission_response_spec.rb +13 -1
  92. data/spec/models/create_custom_file_data_spec.rb +1 -1
  93. data/spec/models/create_custom_file_response_spec.rb +7 -1
  94. data/spec/models/create_folder_data_spec.rb +1 -1
  95. data/spec/models/create_html_template_spec.rb +1 -1
  96. data/spec/models/create_pdf_submission_data_spec.rb +1 -1
  97. data/spec/models/create_pdf_template_spec.rb +1 -1
  98. data/spec/models/create_submission_data_request_data_spec.rb +1 -1
  99. data/spec/models/create_submission_data_request_event_request_spec.rb +1 -1
  100. data/spec/models/create_submission_data_request_event_response_spec.rb +7 -1
  101. data/spec/models/create_submission_data_request_response_spec.rb +7 -1
  102. data/spec/models/create_submission_data_request_token_response_spec.rb +7 -1
  103. data/spec/models/create_submission_response_spec.rb +13 -1
  104. data/spec/models/create_webhook_data_spec.rb +1 -1
  105. data/spec/models/custom_file_spec.rb +1 -1
  106. data/spec/models/error_or_multiple_errors_response_spec.rb +1 -1
  107. data/spec/models/error_response_spec.rb +1 -1
  108. data/spec/models/folder_spec.rb +1 -1
  109. data/spec/models/forbidden_error_response_spec.rb +56 -0
  110. data/spec/models/json_schema_spec.rb +1 -1
  111. data/spec/models/list_submissions_response_spec.rb +1 -1
  112. data/spec/models/move_folder_data_spec.rb +1 -1
  113. data/spec/models/move_template_data_spec.rb +1 -1
  114. data/spec/models/multiple_errors_response_spec.rb +1 -1
  115. data/spec/models/publish_version_data_spec.rb +1 -1
  116. data/spec/models/rename_folder_data_spec.rb +1 -1
  117. data/spec/models/restore_version_data_spec.rb +1 -1
  118. data/spec/models/submission422_response_spec.rb +1 -1
  119. data/spec/models/submission_action_spec.rb +1 -1
  120. data/spec/models/submission_batch_data_spec.rb +1 -1
  121. data/spec/models/submission_batch_spec.rb +1 -1
  122. data/spec/models/submission_batch_with_submissions_spec.rb +1 -1
  123. data/spec/models/submission_data_request_event_spec.rb +1 -1
  124. data/spec/models/submission_data_request_show_spec.rb +1 -1
  125. data/spec/models/submission_data_request_spec.rb +1 -1
  126. data/spec/models/submission_data_request_token_spec.rb +1 -1
  127. data/spec/models/submission_preview_spec.rb +2 -2
  128. data/spec/models/submission_spec.rb +2 -2
  129. data/spec/models/success_error_response_spec.rb +1 -1
  130. data/spec/models/success_multiple_errors_response_spec.rb +1 -1
  131. data/spec/models/template_add_fields_response_spec.rb +1 -1
  132. data/spec/models/template_delete_response_spec.rb +1 -1
  133. data/spec/models/template_model_code_response_spec.rb +1 -1
  134. data/spec/models/template_preview_spec.rb +1 -1
  135. data/spec/models/template_publish_version_response_spec.rb +1 -1
  136. data/spec/models/template_spec.rb +1 -1
  137. data/spec/models/update_html_template_spec.rb +1 -1
  138. data/spec/models/update_pdf_template_spec.rb +1 -1
  139. data/spec/models/update_submission_data_request_data_spec.rb +1 -1
  140. data/spec/models/update_webhook_data_spec.rb +1 -1
  141. data/spec/models/upload_presign_response_spec.rb +1 -1
  142. data/spec/models/webhook_spec.rb +1 -1
  143. data/spec/spec_helper.rb +1 -1
  144. metadata +5 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0d687b11706d412a3672e312f6692a173079a58a4b83ce336f8dd7a1df94230
4
- data.tar.gz: c7848c09b5e8bae983300846564e1741b034bdb09f4a18732ff6400a589b5a76
3
+ metadata.gz: 3a11774c889c3f5f78b06ecc109d774135778e4a127e9231cca7c01c80646808
4
+ data.tar.gz: ba8a09b96fbd6136bab001bede610a25ad54ce945b8d4716db979c312d9f6bf9
5
5
  SHA512:
6
- metadata.gz: 817c3f7a9e81959050e59a8786488f13762435109ec3db569d4d2887ffe95715765624569f4effbd6e89792f13de38a83c7cb0ba770ed144c00c0f6a2135d67f
7
- data.tar.gz: 01a9c3e07d089e33f87315ed855c73cfe42fb67b8ec0d201efdc99375d1bedc72d279028b81d5d4418435b0776b4e4b7aa2eda8696b2216d4b6004f01f65080c
6
+ metadata.gz: 580764cb088cc7ba219e28565d191c94841074e686b386e405945eeac2542a1bdc9867ada62cac93cfa479e942339f8b3aba246eca4f4f43d94ae6c8d44cab2c
7
+ data.tar.gz: bf9881c8bfb725c6560bc742b26bb1983909536b7cf4c9c13aca70e3223021f983b67d256bd45a4153b854ce97307bf2417fea06bb440960454a4eb30ddbd929
@@ -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
@@ -8,4 +8,4 @@ script:
8
8
  - bundle install --path vendor/bundle
9
9
  - bundle exec rspec
10
10
  - gem build docspring.gemspec
11
- - gem install ./docspring-3.4.0.gem
11
+ - gem install ./docspring-3.5.0.gem
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.0)
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.4.0)
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.4.0. Requires Ruby >= 2.7.
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
 
@@ -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. A combined PDF is a test or live document because of its source PDFs. | [optional] |
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
- errors: null
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** | | [optional] |
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
- errors: null
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
+
@@ -8,7 +8,7 @@
8
8
  | **submissions** | **Array<Object>** | | |
9
9
  | **template_id** | **String** | | [optional] |
10
10
  | **template_version** | **String** | | [optional] |
11
- | **test** | **Boolean** | | [optional] |
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
 
@@ -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 &#x60;wait&#x3D;false&#x60; 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&#39;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 &#x60;wait&#x3D;false&#x60; query parameter to return immediately. Live PDFs use credits; test PDFs (&#x60;test: true&#x60;) are free and watermarked. If your balance can&#39;t cover a live PDF, the API returns 402 and the submission waits in the &#x60;insufficient_credits&#x60; state until you add credits. See [Credits &amp; 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&#39;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). &#x60;insufficient_credits&#x60; means the combined submission is waiting for credits and is processed once you add them. If it&#39;s still waiting after 30 days, it moves to &#x60;error&#x60;.
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. &#x60;insufficient_credits&#x60; means the submission is waiting for credits and is processed once you add them. If it&#39;s still waiting after 30 days, it moves to &#x60;error&#x60;.
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 &#x60;insufficient_credits&#x60; state and count as pending, so the batch stays &#x60;pending&#x60; 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
@@ -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.4.0"
36
+ @user_agent = "docspring-ruby-3.5.0"
37
37
  @default_headers = {
38
38
  'Content-Type' => 'application/json',
39
39
  'User-Agent' => @user_agent
@@ -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. A combined PDF is a test or live document because of its source PDFs.
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