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.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +3 -0
  3. data/.travis.yml +1 -1
  4. data/AGENTS.md +33 -0
  5. data/CHANGELOG.md +19 -0
  6. data/Gemfile.lock +2 -2
  7. data/README.md +145 -178
  8. data/docs/BatchGeneratePdfs201Response.md +3 -1
  9. data/docs/Client.md +6 -6
  10. data/docs/CombinePdfsData.md +1 -1
  11. data/docs/CreateCombinedSubmissionResponse.md +5 -1
  12. data/docs/CreateCustomFileResponse.md +2 -0
  13. data/docs/CreatePdfSubmissionData.md +1 -1
  14. data/docs/CreateSubmissionDataRequestEventResponse.md +2 -0
  15. data/docs/CreateSubmissionDataRequestResponse.md +2 -0
  16. data/docs/CreateSubmissionDataRequestTokenResponse.md +2 -0
  17. data/docs/CreateSubmissionResponse.md +5 -1
  18. data/docs/ForbiddenErrorResponse.md +22 -0
  19. data/docs/SubmissionBatchData.md +1 -1
  20. data/docs/Template.md +2 -0
  21. data/docs/TemplatePreview.md +2 -0
  22. data/docspring.gemspec +1 -1
  23. data/lib/docspring/api/client.rb +13 -13
  24. data/lib/docspring/api_client.rb +2 -2
  25. data/lib/docspring/api_error.rb +1 -1
  26. data/lib/docspring/configuration.rb +1 -1
  27. data/lib/docspring/models/add_fields_data.rb +1 -1
  28. data/lib/docspring/models/batch_generate_pdfs201_response.rb +15 -5
  29. data/lib/docspring/models/combine_pdfs_data.rb +2 -2
  30. data/lib/docspring/models/combined_submission.rb +3 -3
  31. data/lib/docspring/models/combined_submission_action.rb +1 -1
  32. data/lib/docspring/models/copy_template_options.rb +1 -1
  33. data/lib/docspring/models/create_combined_submission_response.rb +24 -5
  34. data/lib/docspring/models/create_custom_file_data.rb +1 -1
  35. data/lib/docspring/models/create_custom_file_response.rb +11 -2
  36. data/lib/docspring/models/create_folder_data.rb +1 -1
  37. data/lib/docspring/models/create_html_template.rb +1 -1
  38. data/lib/docspring/models/create_pdf_submission_data.rb +2 -1
  39. data/lib/docspring/models/create_pdf_template.rb +1 -1
  40. data/lib/docspring/models/create_submission_data_request_data.rb +1 -1
  41. data/lib/docspring/models/create_submission_data_request_event_request.rb +1 -1
  42. data/lib/docspring/models/create_submission_data_request_event_response.rb +11 -2
  43. data/lib/docspring/models/create_submission_data_request_response.rb +11 -2
  44. data/lib/docspring/models/create_submission_data_request_token_response.rb +11 -2
  45. data/lib/docspring/models/create_submission_response.rb +24 -5
  46. data/lib/docspring/models/create_webhook_data.rb +1 -1
  47. data/lib/docspring/models/custom_file.rb +1 -1
  48. data/lib/docspring/models/error_or_multiple_errors_response.rb +1 -1
  49. data/lib/docspring/models/error_response.rb +1 -1
  50. data/lib/docspring/models/folder.rb +1 -1
  51. data/lib/docspring/models/forbidden_error_response.rb +323 -0
  52. data/lib/docspring/models/json_schema.rb +1 -1
  53. data/lib/docspring/models/list_submissions_response.rb +1 -1
  54. data/lib/docspring/models/move_folder_data.rb +1 -1
  55. data/lib/docspring/models/move_template_data.rb +1 -1
  56. data/lib/docspring/models/multiple_errors_response.rb +1 -1
  57. data/lib/docspring/models/publish_version_data.rb +1 -1
  58. data/lib/docspring/models/rename_folder_data.rb +1 -1
  59. data/lib/docspring/models/restore_version_data.rb +1 -1
  60. data/lib/docspring/models/submission.rb +3 -3
  61. data/lib/docspring/models/submission422_response.rb +1 -1
  62. data/lib/docspring/models/submission_action.rb +1 -1
  63. data/lib/docspring/models/submission_batch.rb +1 -1
  64. data/lib/docspring/models/submission_batch_data.rb +2 -1
  65. data/lib/docspring/models/submission_batch_with_submissions.rb +1 -1
  66. data/lib/docspring/models/submission_data_request.rb +1 -1
  67. data/lib/docspring/models/submission_data_request_event.rb +1 -1
  68. data/lib/docspring/models/submission_data_request_show.rb +1 -1
  69. data/lib/docspring/models/submission_data_request_token.rb +1 -1
  70. data/lib/docspring/models/submission_preview.rb +3 -3
  71. data/lib/docspring/models/success_error_response.rb +1 -1
  72. data/lib/docspring/models/success_multiple_errors_response.rb +1 -1
  73. data/lib/docspring/models/template.rb +28 -2
  74. data/lib/docspring/models/template_add_fields_response.rb +1 -1
  75. data/lib/docspring/models/template_delete_response.rb +1 -1
  76. data/lib/docspring/models/template_model_code_response.rb +1 -1
  77. data/lib/docspring/models/template_preview.rb +28 -2
  78. data/lib/docspring/models/template_publish_version_response.rb +1 -1
  79. data/lib/docspring/models/update_html_template.rb +1 -1
  80. data/lib/docspring/models/update_pdf_template.rb +1 -1
  81. data/lib/docspring/models/update_submission_data_request_data.rb +1 -1
  82. data/lib/docspring/models/update_webhook_data.rb +1 -1
  83. data/lib/docspring/models/upload_presign_response.rb +1 -1
  84. data/lib/docspring/models/webhook.rb +1 -1
  85. data/lib/docspring/version.rb +2 -2
  86. data/lib/docspring.rb +2 -1
  87. data/spec/api/client_spec.rb +7 -7
  88. data/spec/models/add_fields_data_spec.rb +1 -1
  89. data/spec/models/batch_generate_pdfs201_response_spec.rb +7 -1
  90. data/spec/models/combine_pdfs_data_spec.rb +1 -1
  91. data/spec/models/combined_submission_action_spec.rb +1 -1
  92. data/spec/models/combined_submission_spec.rb +2 -2
  93. data/spec/models/copy_template_options_spec.rb +1 -1
  94. data/spec/models/create_combined_submission_response_spec.rb +13 -1
  95. data/spec/models/create_custom_file_data_spec.rb +1 -1
  96. data/spec/models/create_custom_file_response_spec.rb +7 -1
  97. data/spec/models/create_folder_data_spec.rb +1 -1
  98. data/spec/models/create_html_template_spec.rb +1 -1
  99. data/spec/models/create_pdf_submission_data_spec.rb +1 -1
  100. data/spec/models/create_pdf_template_spec.rb +1 -1
  101. data/spec/models/create_submission_data_request_data_spec.rb +1 -1
  102. data/spec/models/create_submission_data_request_event_request_spec.rb +1 -1
  103. data/spec/models/create_submission_data_request_event_response_spec.rb +7 -1
  104. data/spec/models/create_submission_data_request_response_spec.rb +7 -1
  105. data/spec/models/create_submission_data_request_token_response_spec.rb +7 -1
  106. data/spec/models/create_submission_response_spec.rb +13 -1
  107. data/spec/models/create_webhook_data_spec.rb +1 -1
  108. data/spec/models/custom_file_spec.rb +1 -1
  109. data/spec/models/error_or_multiple_errors_response_spec.rb +1 -1
  110. data/spec/models/error_response_spec.rb +1 -1
  111. data/spec/models/folder_spec.rb +1 -1
  112. data/spec/models/forbidden_error_response_spec.rb +56 -0
  113. data/spec/models/json_schema_spec.rb +1 -1
  114. data/spec/models/list_submissions_response_spec.rb +1 -1
  115. data/spec/models/move_folder_data_spec.rb +1 -1
  116. data/spec/models/move_template_data_spec.rb +1 -1
  117. data/spec/models/multiple_errors_response_spec.rb +1 -1
  118. data/spec/models/publish_version_data_spec.rb +1 -1
  119. data/spec/models/rename_folder_data_spec.rb +1 -1
  120. data/spec/models/restore_version_data_spec.rb +1 -1
  121. data/spec/models/submission422_response_spec.rb +1 -1
  122. data/spec/models/submission_action_spec.rb +1 -1
  123. data/spec/models/submission_batch_data_spec.rb +1 -1
  124. data/spec/models/submission_batch_spec.rb +1 -1
  125. data/spec/models/submission_batch_with_submissions_spec.rb +1 -1
  126. data/spec/models/submission_data_request_event_spec.rb +1 -1
  127. data/spec/models/submission_data_request_show_spec.rb +1 -1
  128. data/spec/models/submission_data_request_spec.rb +1 -1
  129. data/spec/models/submission_data_request_token_spec.rb +1 -1
  130. data/spec/models/submission_preview_spec.rb +2 -2
  131. data/spec/models/submission_spec.rb +2 -2
  132. data/spec/models/success_error_response_spec.rb +1 -1
  133. data/spec/models/success_multiple_errors_response_spec.rb +1 -1
  134. data/spec/models/template_add_fields_response_spec.rb +1 -1
  135. data/spec/models/template_delete_response_spec.rb +1 -1
  136. data/spec/models/template_model_code_response_spec.rb +1 -1
  137. data/spec/models/template_preview_spec.rb +7 -1
  138. data/spec/models/template_publish_version_response_spec.rb +1 -1
  139. data/spec/models/template_spec.rb +7 -1
  140. data/spec/models/update_html_template_spec.rb +1 -1
  141. data/spec/models/update_pdf_template_spec.rb +1 -1
  142. data/spec/models/update_submission_data_request_data_spec.rb +1 -1
  143. data/spec/models/update_webhook_data_spec.rb +1 -1
  144. data/spec/models/upload_presign_response_spec.rb +1 -1
  145. data/spec/models/webhook_spec.rb +1 -1
  146. data/spec/spec_helper.rb +1 -1
  147. metadata +6 -2
  148. data/git_push.sh +0 -57
@@ -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/docs/Template.md CHANGED
@@ -33,6 +33,7 @@
33
33
  | **page_count** | **Integer** | | |
34
34
  | **page_dimensions** | **Array<Array<Float>>** | | |
35
35
  | **parent_folder_id** | **String** | | |
36
+ | **parse_dates_using_template_date_format** | **Boolean** | | |
36
37
  | **path** | **String** | | |
37
38
  | **permanent_document_url** | **String** | | |
38
39
  | **public_submissions** | **Boolean** | | |
@@ -102,6 +103,7 @@ instance = DocSpring::Template.new(
102
103
  page_count: null,
103
104
  page_dimensions: null,
104
105
  parent_folder_id: null,
106
+ parse_dates_using_template_date_format: null,
105
107
  path: null,
106
108
  permanent_document_url: null,
107
109
  public_submissions: null,
@@ -33,6 +33,7 @@
33
33
  | **page_count** | **Integer** | | |
34
34
  | **page_dimensions** | **Array<Array<Float>>** | | |
35
35
  | **parent_folder_id** | **String** | | |
36
+ | **parse_dates_using_template_date_format** | **Boolean** | | |
36
37
  | **path** | **String** | | |
37
38
  | **permanent_document_url** | **String** | | |
38
39
  | **public_submissions** | **Boolean** | | |
@@ -89,6 +90,7 @@ instance = DocSpring::TemplatePreview.new(
89
90
  page_count: null,
90
91
  page_dimensions: null,
91
92
  parent_folder_id: null,
93
+ parse_dates_using_template_date_format: null,
92
94
  path: null,
93
95
  permanent_document_url: null,
94
96
  public_submissions: null,
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.3.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
 
@@ -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
 
@@ -19,8 +19,13 @@ module DocSpring
19
19
 
20
20
  attr_accessor :combined_submission
21
21
 
22
+ attr_accessor :error
23
+
22
24
  attr_accessor :errors
23
25
 
26
+ # `insufficient_credits` when the response is a 402.
27
+ attr_accessor :code
28
+
24
29
  class EnumAttributeValidator
25
30
  attr_reader :datatype
26
31
  attr_reader :allowable_values
@@ -48,7 +53,9 @@ module DocSpring
48
53
  {
49
54
  :'status' => :'status',
50
55
  :'combined_submission' => :'combined_submission',
51
- :'errors' => :'errors'
56
+ :'error' => :'error',
57
+ :'errors' => :'errors',
58
+ :'code' => :'code'
52
59
  }
53
60
  end
54
61
 
@@ -67,7 +74,9 @@ module DocSpring
67
74
  {
68
75
  :'status' => :'String',
69
76
  :'combined_submission' => :'CombinedSubmission',
70
- :'errors' => :'Array<String>'
77
+ :'error' => :'String',
78
+ :'errors' => :'Array<String>',
79
+ :'code' => :'String'
71
80
  }
72
81
  end
73
82
 
@@ -105,11 +114,19 @@ module DocSpring
105
114
  self.combined_submission = nil
106
115
  end
107
116
 
117
+ if attributes.key?(:'error')
118
+ self.error = attributes[:'error']
119
+ end
120
+
108
121
  if attributes.key?(:'errors')
109
122
  if (value = attributes[:'errors']).is_a?(Array)
110
123
  self.errors = value
111
124
  end
112
125
  end
126
+
127
+ if attributes.key?(:'code')
128
+ self.code = attributes[:'code']
129
+ end
113
130
  end
114
131
 
115
132
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -167,7 +184,9 @@ module DocSpring
167
184
  self.class == o.class &&
168
185
  status == o.status &&
169
186
  combined_submission == o.combined_submission &&
170
- errors == o.errors
187
+ error == o.error &&
188
+ errors == o.errors &&
189
+ code == o.code
171
190
  end
172
191
 
173
192
  # @see the `==` method
@@ -179,7 +198,7 @@ module DocSpring
179
198
  # Calculates hash code according to all attributes.
180
199
  # @return [Integer] Hash code
181
200
  def hash
182
- [status, combined_submission, errors].hash
201
+ [status, combined_submission, error, errors, code].hash
183
202
  end
184
203
 
185
204
  # 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
 
@@ -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
 
@@ -19,6 +19,8 @@ module DocSpring
19
19
 
20
20
  attr_accessor :custom_file
21
21
 
22
+ attr_accessor :error
23
+
22
24
  attr_accessor :errors
23
25
 
24
26
  class EnumAttributeValidator
@@ -48,6 +50,7 @@ module DocSpring
48
50
  {
49
51
  :'status' => :'status',
50
52
  :'custom_file' => :'custom_file',
53
+ :'error' => :'error',
51
54
  :'errors' => :'errors'
52
55
  }
53
56
  end
@@ -67,6 +70,7 @@ module DocSpring
67
70
  {
68
71
  :'status' => :'String',
69
72
  :'custom_file' => :'CustomFile',
73
+ :'error' => :'String',
70
74
  :'errors' => :'Array<String>'
71
75
  }
72
76
  end
@@ -105,6 +109,10 @@ module DocSpring
105
109
  self.custom_file = nil
106
110
  end
107
111
 
112
+ if attributes.key?(:'error')
113
+ self.error = attributes[:'error']
114
+ end
115
+
108
116
  if attributes.key?(:'errors')
109
117
  if (value = attributes[:'errors']).is_a?(Array)
110
118
  self.errors = value
@@ -167,6 +175,7 @@ module DocSpring
167
175
  self.class == o.class &&
168
176
  status == o.status &&
169
177
  custom_file == o.custom_file &&
178
+ error == o.error &&
170
179
  errors == o.errors
171
180
  end
172
181
 
@@ -179,7 +188,7 @@ module DocSpring
179
188
  # Calculates hash code according to all attributes.
180
189
  # @return [Integer] Hash code
181
190
  def hash
182
- [status, custom_file, errors].hash
191
+ [status, custom_file, error, errors].hash
183
192
  end
184
193
 
185
194
  # 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