docspring 4.3.0 → 4.4.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 (160) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +80 -0
  3. data/.openapi-generator/FILES +84 -0
  4. data/CHANGELOG.md +55 -0
  5. data/Gemfile.lock +2 -2
  6. data/README.md +20 -1
  7. data/docs/AddTemplateFieldsRequest.md +1 -1
  8. data/docs/Client.md +2311 -766
  9. data/docs/CombinedPdfSource.md +1 -1
  10. data/docs/CreateAccountEmailActionRequest.md +54 -0
  11. data/docs/CreateEmailActionRequest.md +50 -0
  12. data/docs/CreateEmailDomainRequest.md +18 -0
  13. data/docs/CreateSubmissionBatchRequest.md +2 -2
  14. data/docs/CreateSubmissionRequest.md +22 -4
  15. data/docs/CreateTemplateRequest.md +22 -6
  16. data/docs/DnsRecordType.md +15 -0
  17. data/docs/EmailAction.md +76 -0
  18. data/docs/EmailActionConditions.md +20 -0
  19. data/docs/EmailActionConditionsInput.md +20 -0
  20. data/docs/EmailActionCustomization.md +36 -0
  21. data/docs/EmailActionDelivery.md +15 -0
  22. data/docs/EmailActionFileFormats.md +15 -0
  23. data/docs/EmailActionList.md +20 -0
  24. data/docs/EmailActionSetting.md +15 -0
  25. data/docs/EmailActionSubmissionType.md +15 -0
  26. data/docs/EmailActionTestEmail.md +18 -0
  27. data/docs/EmailDomain.md +38 -0
  28. data/docs/EmailDomainDnsRecord.md +24 -0
  29. data/docs/EmailDomainDnsRecordPurpose.md +15 -0
  30. data/docs/EmailDomainList.md +20 -0
  31. data/docs/EmailDomainRecordState.md +15 -0
  32. data/docs/EmailDomainState.md +15 -0
  33. data/docs/ErrorInfo.md +12 -6
  34. data/docs/Field.md +1 -1
  35. data/docs/FieldInput.md +1 -1
  36. data/docs/HtmlEngineOptions.md +1 -1
  37. data/docs/HtmlEngineOptionsInput.md +1 -1
  38. data/docs/SendAccountEmailActionTestEmailRequest.md +18 -0
  39. data/docs/SignatureRequest.md +9 -1
  40. data/docs/SignatureRequestEmailAttachments.md +15 -0
  41. data/docs/SignatureRequestEmailStatus.md +15 -0
  42. data/docs/SignatureRequestInput.md +7 -3
  43. data/docs/SignatureRequestReminders.md +20 -0
  44. data/docs/SigningOrder.md +15 -0
  45. data/docs/Submission.md +4 -2
  46. data/docs/SubmissionAction.md +5 -3
  47. data/docs/SubmissionInput.md +3 -3
  48. data/docs/SubmissionSummary.md +1 -1
  49. data/docs/Template.md +23 -7
  50. data/docs/TemplateSourcePdf.md +1 -1
  51. data/docs/TemplateSummary.md +4 -4
  52. data/docs/UpdateAccountEmailActionRequest.md +54 -0
  53. data/docs/UpdateEmailActionCustomizationRequest.md +46 -0
  54. data/docs/UpdateEmailActionRequest.md +50 -0
  55. data/docs/UpdateTemplateDocumentRequest.md +1 -1
  56. data/docs/UpdateTemplateRequest.md +21 -5
  57. data/docs/ValidateSubmissionRequest.md +22 -4
  58. data/lib/docspring/api/client.rb +1749 -314
  59. data/lib/docspring/api_client.rb +1 -1
  60. data/lib/docspring/models/add_template_fields_request.rb +1 -1
  61. data/lib/docspring/models/combined_pdf_source.rb +1 -1
  62. data/lib/docspring/models/create_account_email_action_request.rb +388 -0
  63. data/lib/docspring/models/create_email_action_request.rb +364 -0
  64. data/lib/docspring/models/create_email_domain_request.rb +185 -0
  65. data/lib/docspring/models/create_submission_batch_request.rb +2 -2
  66. data/lib/docspring/models/create_submission_request.rb +143 -7
  67. data/lib/docspring/models/create_template_request.rb +107 -7
  68. data/lib/docspring/models/dns_record_type.rb +42 -0
  69. data/lib/docspring/models/email_action.rb +790 -0
  70. data/lib/docspring/models/email_action_conditions.rb +219 -0
  71. data/lib/docspring/models/email_action_conditions_input.rb +219 -0
  72. data/lib/docspring/models/email_action_customization.rb +360 -0
  73. data/lib/docspring/models/email_action_delivery.rb +41 -0
  74. data/lib/docspring/models/email_action_file_formats.rb +43 -0
  75. data/lib/docspring/models/email_action_list.rb +200 -0
  76. data/lib/docspring/models/email_action_setting.rb +53 -0
  77. data/lib/docspring/models/email_action_submission_type.rb +42 -0
  78. data/lib/docspring/models/email_action_test_email.rb +185 -0
  79. data/lib/docspring/models/email_domain.rb +423 -0
  80. data/lib/docspring/models/email_domain_dns_record.rb +288 -0
  81. data/lib/docspring/models/email_domain_dns_record_purpose.rb +42 -0
  82. data/lib/docspring/models/email_domain_list.rb +200 -0
  83. data/lib/docspring/models/email_domain_record_state.rb +42 -0
  84. data/lib/docspring/models/email_domain_state.rb +42 -0
  85. data/lib/docspring/models/error_code.rb +3 -1
  86. data/lib/docspring/models/error_info.rb +39 -9
  87. data/lib/docspring/models/field.rb +1 -1
  88. data/lib/docspring/models/field_input.rb +1 -1
  89. data/lib/docspring/models/html_engine_options.rb +1 -1
  90. data/lib/docspring/models/html_engine_options_input.rb +1 -1
  91. data/lib/docspring/models/send_account_email_action_test_email_request.rb +168 -0
  92. data/lib/docspring/models/signature_request.rb +68 -2
  93. data/lib/docspring/models/signature_request_email_attachments.rb +41 -0
  94. data/lib/docspring/models/signature_request_email_status.rb +47 -0
  95. data/lib/docspring/models/signature_request_event_type.rb +3 -1
  96. data/lib/docspring/models/signature_request_input.rb +25 -22
  97. data/lib/docspring/models/signature_request_reminders.rb +212 -0
  98. data/lib/docspring/models/signing_order.rb +41 -0
  99. data/lib/docspring/models/string_condition_type.rb +8 -1
  100. data/lib/docspring/models/submission.rb +30 -3
  101. data/lib/docspring/models/submission_action.rb +18 -5
  102. data/lib/docspring/models/submission_input.rb +3 -3
  103. data/lib/docspring/models/submission_summary.rb +1 -1
  104. data/lib/docspring/models/template.rb +144 -8
  105. data/lib/docspring/models/template_source_pdf.rb +1 -1
  106. data/lib/docspring/models/template_summary.rb +4 -4
  107. data/lib/docspring/models/template_type.rb +2 -1
  108. data/lib/docspring/models/update_account_email_action_request.rb +388 -0
  109. data/lib/docspring/models/update_email_action_customization_request.rb +343 -0
  110. data/lib/docspring/models/update_email_action_request.rb +364 -0
  111. data/lib/docspring/models/update_template_document_request.rb +1 -1
  112. data/lib/docspring/models/update_template_request.rb +108 -8
  113. data/lib/docspring/models/validate_submission_request.rb +143 -7
  114. data/lib/docspring/models/webhook_event_type.rb +3 -1
  115. data/lib/docspring/request_schemas.json +1691 -145
  116. data/lib/docspring/request_validator.rb +4 -0
  117. data/lib/docspring/version.rb +1 -1
  118. data/lib/docspring.rb +28 -0
  119. data/spec/api/client_spec.rb +306 -18
  120. data/spec/models/create_account_email_action_request_spec.rb +144 -0
  121. data/spec/models/create_email_action_request_spec.rb +132 -0
  122. data/spec/models/create_email_domain_request_spec.rb +36 -0
  123. data/spec/models/create_submission_request_spec.rb +54 -0
  124. data/spec/models/create_template_request_spec.rb +48 -0
  125. data/spec/models/dns_record_type_spec.rb +30 -0
  126. data/spec/models/email_action_conditions_input_spec.rb +42 -0
  127. data/spec/models/email_action_conditions_spec.rb +42 -0
  128. data/spec/models/email_action_customization_spec.rb +90 -0
  129. data/spec/models/email_action_delivery_spec.rb +30 -0
  130. data/spec/models/email_action_file_formats_spec.rb +30 -0
  131. data/spec/models/email_action_list_spec.rb +42 -0
  132. data/spec/models/email_action_setting_spec.rb +30 -0
  133. data/spec/models/email_action_spec.rb +210 -0
  134. data/spec/models/email_action_submission_type_spec.rb +30 -0
  135. data/spec/models/email_action_test_email_spec.rb +36 -0
  136. data/spec/models/email_domain_dns_record_purpose_spec.rb +30 -0
  137. data/spec/models/email_domain_dns_record_spec.rb +54 -0
  138. data/spec/models/email_domain_list_spec.rb +42 -0
  139. data/spec/models/email_domain_record_state_spec.rb +30 -0
  140. data/spec/models/email_domain_spec.rb +96 -0
  141. data/spec/models/email_domain_state_spec.rb +30 -0
  142. data/spec/models/error_info_spec.rb +18 -0
  143. data/spec/models/send_account_email_action_test_email_request_spec.rb +36 -0
  144. data/spec/models/signature_request_email_attachments_spec.rb +30 -0
  145. data/spec/models/signature_request_email_status_spec.rb +30 -0
  146. data/spec/models/signature_request_input_spec.rb +12 -0
  147. data/spec/models/signature_request_reminders_spec.rb +42 -0
  148. data/spec/models/signature_request_spec.rb +24 -0
  149. data/spec/models/signing_order_spec.rb +30 -0
  150. data/spec/models/submission_action_spec.rb +6 -0
  151. data/spec/models/submission_spec.rb +6 -0
  152. data/spec/models/template_spec.rb +48 -0
  153. data/spec/models/update_account_email_action_request_spec.rb +144 -0
  154. data/spec/models/update_email_action_customization_request_spec.rb +120 -0
  155. data/spec/models/update_email_action_request_spec.rb +132 -0
  156. data/spec/models/update_template_request_spec.rb +48 -0
  157. data/spec/models/validate_submission_request_spec.rb +54 -0
  158. metadata +115 -4
  159. data/.gitlab-ci.yml +0 -26
  160. data/.travis.yml +0 -11
@@ -34,10 +34,11 @@ describe 'Client' do
34
34
 
35
35
  # unit tests for add_template_fields
36
36
  # Add fields to a template
37
- # Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
37
+ # Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them. A field with the name of one of the template's fields shares its settings (`type`, `required`, `default`, ...), so a field that sets one to another value is refused: PUT /templates/{template_id}/fields changes them for every field with the name.
38
38
  # @param template_id The template's ID.
39
39
  # @param body The fields to add to the template's draft.
40
40
  # @param [Hash] opts the optional parameters
41
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
41
42
  # @return [TemplateFields]
42
43
  describe 'add_template_fields test' do
43
44
  it 'should work' do
@@ -51,6 +52,7 @@ describe 'Client' do
51
52
  # @param template_id The template's ID.
52
53
  # @param [Hash] opts the optional parameters
53
54
  # @option opts [CopyTemplateRequest] :body Settings for the copy.
55
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
54
56
  # @return [Template]
55
57
  describe 'copy_template test' do
56
58
  it 'should work' do
@@ -58,13 +60,26 @@ describe 'Client' do
58
60
  end
59
61
  end
60
62
 
63
+ # unit tests for create_account_email_action
64
+ # Create an account email action
65
+ # Adds an email action to your account. It sends for every template, or only for the templates in `template_ids` and the templates in the folders in `folder_ids` (and the folders inside them). Each template can turn it off or change its settings for that template only (`PUT /templates/{template_id}/email_actions/{email_action_id}/customization`). Without a paid plan (Starter or higher), email actions only email your team: test submissions' emails go to your account's users, and live submissions' emails aren't sent.
66
+ # @param body The account email action to create. Properties left out get their defaults, and it sends for every template unless it lists `template_ids` or `folder_ids`.
67
+ # @param [Hash] opts the optional parameters
68
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
69
+ # @return [EmailAction]
70
+ describe 'create_account_email_action test' do
71
+ it 'should work' do
72
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
73
+ end
74
+ end
75
+
61
76
  # unit tests for create_combined_pdf
62
77
  # Combine PDFs
63
78
  # Merges PDFs into one: submissions, other combined PDFs, templates, custom files (POST /custom_files) and PDFs from URLs, in the order of `source_pdfs`. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /combined_pdfs/{combined_pdf_id} until `state` isn't `pending`. A template source merges the template's processed PDF by default: the PDF submissions are filled in on, decrypted and with its form fields removed. Pass `processed: false` to merge the PDF as it was uploaded.
64
79
  # @param body The PDFs to merge, and the combined PDF's settings.
65
80
  # @param [Hash] opts the optional parameters
66
81
  # @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
67
- # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another combined PDF. Send a new key with each new combined PDF, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds.
82
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
68
83
  # @return [CombinedPdf]
69
84
  describe 'create_combined_pdf test' do
70
85
  it 'should work' do
@@ -77,6 +92,7 @@ describe 'Client' do
77
92
  # Creates a custom file from a PDF you uploaded, so you can merge it with other PDFs. Upload the file with the presigned upload (GET /uploads/presign) first, then pass its `fields.key` as `cache_id`.
78
93
  # @param body The uploaded file to create the custom file from.
79
94
  # @param [Hash] opts the optional parameters
95
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
80
96
  # @return [CustomFile]
81
97
  describe 'create_custom_file_from_upload test' do
82
98
  it 'should work' do
@@ -84,11 +100,39 @@ describe 'Client' do
84
100
  end
85
101
  end
86
102
 
103
+ # unit tests for create_email_action
104
+ # Create an email action
105
+ # Adds an email action to a template's draft. From then on, each processed submission emails its PDF to the recipients in `to`, `cc` and `bcc`: addresses, and tags for the address in one of the submission's fields (`{{ data.tenant_email }}`) or in its metadata (`{{ metadata.agent_email }}`). With `send_when`, only the submissions whose values meet its conditions send one. Without a paid plan (Starter or higher), email actions only email your team: test submissions' emails go to your account's users, and live submissions' emails aren't sent.
106
+ # @param template_id The template's ID.
107
+ # @param body The email action to create. Properties left out get their defaults.
108
+ # @param [Hash] opts the optional parameters
109
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
110
+ # @return [EmailAction]
111
+ describe 'create_email_action test' do
112
+ it 'should work' do
113
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
114
+ end
115
+ end
116
+
117
+ # unit tests for create_email_domain
118
+ # Add an email domain
119
+ # Adds a domain for email actions to send from, and returns the DNS records to add to it. DocSpring checks for them every few minutes, and the domain is verified once its DKIM and DMARC records are found. Needs a paid monthly plan.
120
+ # @param body The domain to add.
121
+ # @param [Hash] opts the optional parameters
122
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
123
+ # @return [EmailDomain]
124
+ describe 'create_email_domain test' do
125
+ it 'should work' do
126
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
127
+ end
128
+ end
129
+
87
130
  # unit tests for create_folder
88
131
  # Create a folder
89
132
  # Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
90
133
  # @param body The folder to create.
91
134
  # @param [Hash] opts the optional parameters
135
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
92
136
  # @return [Folder]
93
137
  describe 'create_folder test' do
94
138
  it 'should work' do
@@ -102,6 +146,7 @@ describe 'Client' do
102
146
  # @param signature_request_id The signature request's ID.
103
147
  # @param body The event to record.
104
148
  # @param [Hash] opts the optional parameters
149
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
105
150
  # @return [SignatureRequestEvent]
106
151
  describe 'create_signature_request_event test' do
107
152
  it 'should work' do
@@ -115,6 +160,7 @@ describe 'Client' do
115
160
  # @param signature_request_id The signature request's ID.
116
161
  # @param [Hash] opts the optional parameters
117
162
  # @option opts [CreateSignatureRequestTokenRequest] :body The kind of link to make. Send no body for an `api` token.
163
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
118
164
  # @return [SignatureRequestToken]
119
165
  describe 'create_signature_request_token test' do
120
166
  it 'should work' do
@@ -124,13 +170,13 @@ describe 'Client' do
124
170
 
125
171
  # unit tests for create_submission
126
172
  # Generate a PDF
127
- # Creates a submission: fills in a template with your data and generates a PDF. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until `state` isn't `pending`. Data that doesn't match the template's fields returns a 422 with an `invalid_data` error. The submission is still saved, with its errors, so you can find it in DocSpring: the error's `submission_id` is its ID.
173
+ # Creates a submission: fills in a template with your data and generates a PDF. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until `state` isn't `pending`. Data that doesn't match the template's fields returns a 422 with an `invalid_data` error. The submission is still saved, with its errors, so you can find it in DocSpring: the error's `submission_id` is its ID. With `signature_requests`, the PDF is generated once everyone has signed. DocSpring emails each signer a link to sign, unless `send_email` is false, and can send reminders and the completed document.
128
174
  # @param template_id The template's ID.
129
175
  # @param body The submission's data and settings.
130
176
  # @param [Hash] opts the optional parameters
131
- # @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
177
+ # @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`.
132
178
  # @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
133
- # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another submission. Send a new key with each new submission, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds.
179
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
134
180
  # @return [Submission]
135
181
  describe 'create_submission test' do
136
182
  it 'should work' do
@@ -144,7 +190,7 @@ describe 'Client' do
144
190
  # @param body The submissions to create, and the settings they share.
145
191
  # @param [Hash] opts the optional parameters
146
192
  # @option opts [Boolean] :wait Wait until every file in the batch has been generated before responding. Default true on sync.api hosts.
147
- # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another batch. Send a new key with each new batch, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds.
193
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
148
194
  # @return [SubmissionBatch]
149
195
  describe 'create_submission_batch test' do
150
196
  it 'should work' do
@@ -154,10 +200,11 @@ describe 'Client' do
154
200
 
155
201
  # unit tests for create_template
156
202
  # Create a template
157
- # Creates an HTML template, or a PDF or Word template from a file you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. You can send a link to the file (`document_url`) or the file in base64 (`document_base64`) instead, or send the file with the request with POST /templates/upload. A Word template is made from a Word document (.docx) or an OpenDocument text file (.odt), which DocSpring converts to a Word document. It needs its `output_format`: what each submission makes, a Word document (`docx`), an OpenDocument file (`odt`) or a PDF. A PDF template is ready to generate PDFs once DocSpring has processed its PDF, a template created from a `document_url` once its document has been downloaded, and one created from an .odt once it has been converted (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
203
+ # Creates an HTML template, or a PDF or Word template from a file you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. You can send a link to the file (`document_url`) or the file in base64 (`document_base64`) instead, or send the file with the request with POST /templates/upload. A Word template is made from a Word document (.docx) or an OpenDocument text file (.odt), which DocSpring converts to a Word document. It needs its `output_format`: what each submission makes, a Word document (`docx`), an OpenDocument file (`odt`) or a PDF. A page design (`page_designer`) takes its `layout` in the Page Designer layout format, or starts with an empty page without one. A PDF template is ready to generate PDFs once DocSpring has processed its PDF, a template created from a `document_url` once its document has been downloaded, and one created from an .odt once it has been converted (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
158
204
  # @param body The template to create.
159
205
  # @param [Hash] opts the optional parameters
160
206
  # @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
207
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
161
208
  # @return [Template]
162
209
  describe 'create_template test' do
163
210
  it 'should work' do
@@ -167,11 +214,12 @@ describe 'Client' do
167
214
 
168
215
  # unit tests for create_template_preview
169
216
  # Preview a template with data
170
- # Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML, PDF or Word template prints with your data before you publish a version or send live data. A Word template's pages are its PDF's, whatever its `output_format`. It renders the template's draft, or the published `version` you ask for. A preview makes no submission and uses no credits, and its pages are watermarked like a test submission's PDF. It's `pending` while it renders: get it with GET /templates/{template_id}/previews/{preview_id} until it's `processed`, with an image of each page, or `error`.
217
+ # Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML, PDF or Word template or a page design prints with your data before you publish a version or send live data. A Word template's pages are its PDF's, whatever its `output_format`. It renders the template's draft, or the published `version` you ask for. A preview makes no submission and uses no credits, and its pages are watermarked like a test submission's PDF. It's `pending` while it renders: get it with GET /templates/{template_id}/previews/{preview_id} until it's `processed`, with an image of each page, or `error`.
171
218
  # @param template_id The template's ID.
172
219
  # @param body The data to render the template with.
173
220
  # @param [Hash] opts the optional parameters
174
- # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
221
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
222
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
175
223
  # @return [TemplatePreview]
176
224
  describe 'create_template_preview test' do
177
225
  it 'should work' do
@@ -184,6 +232,7 @@ describe 'Client' do
184
232
  # Creates a webhook that sends a POST request to your endpoint whenever a subscribed event happens. Scope it to API tokens, templates or folders to receive only their events.
185
233
  # @param body The webhook to create.
186
234
  # @param [Hash] opts the optional parameters
235
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
187
236
  # @return [Webhook]
188
237
  describe 'create_webhook test' do
189
238
  it 'should work' do
@@ -191,11 +240,25 @@ describe 'Client' do
191
240
  end
192
241
  end
193
242
 
243
+ # unit tests for delete_account_email_action
244
+ # Delete an account email action
245
+ # Deletes one of your account's email actions, with every template's customization of it. Emails it has already queued for submissions aren't sent. Submissions keep the record of the emails it sent.
246
+ # @param email_action_id The account email action's ID.
247
+ # @param [Hash] opts the optional parameters
248
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
249
+ # @return [EmailAction]
250
+ describe 'delete_account_email_action test' do
251
+ it 'should work' do
252
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
253
+ end
254
+ end
255
+
194
256
  # unit tests for delete_custom_file
195
257
  # Delete a custom file
196
258
  # Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
197
259
  # @param custom_file_id The custom file's ID.
198
260
  # @param [Hash] opts the optional parameters
261
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
199
262
  # @return [CustomFile]
200
263
  describe 'delete_custom_file test' do
201
264
  it 'should work' do
@@ -203,11 +266,53 @@ describe 'Client' do
203
266
  end
204
267
  end
205
268
 
269
+ # unit tests for delete_email_action
270
+ # Delete an email action
271
+ # Deletes an email action. Emails it has already queued for submissions aren't sent. Submissions keep the record of the emails it sent.
272
+ # @param template_id The template's ID.
273
+ # @param email_action_id The email action's ID.
274
+ # @param [Hash] opts the optional parameters
275
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
276
+ # @return [EmailAction]
277
+ describe 'delete_email_action test' do
278
+ it 'should work' do
279
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
280
+ end
281
+ end
282
+
283
+ # unit tests for delete_email_action_customization
284
+ # Reset an account email action's customization
285
+ # Removes the template's changes to one of your account's email actions: it sends for this template as it is, and again if the template had turned it off.
286
+ # @param template_id The template's ID.
287
+ # @param email_action_id The ID of one of your account's email actions that sends for the template.
288
+ # @param [Hash] opts the optional parameters
289
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
290
+ # @return [EmailAction]
291
+ describe 'delete_email_action_customization test' do
292
+ it 'should work' do
293
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
294
+ end
295
+ end
296
+
297
+ # unit tests for delete_email_domain
298
+ # Remove an email domain
299
+ # Removes an email domain. Email actions that send from an address at it fail until you add and verify it again, or change their `from_address`. You can then remove its DNS records.
300
+ # @param email_domain_id The email domain's ID.
301
+ # @param [Hash] opts the optional parameters
302
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
303
+ # @return [EmailDomain]
304
+ describe 'delete_email_domain test' do
305
+ it 'should work' do
306
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
307
+ end
308
+ end
309
+
206
310
  # unit tests for delete_folder
207
311
  # Delete a folder
208
312
  # Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
209
313
  # @param folder_id The folder's ID.
210
314
  # @param [Hash] opts the optional parameters
315
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
211
316
  # @return [Folder]
212
317
  describe 'delete_folder test' do
213
318
  it 'should work' do
@@ -221,6 +326,7 @@ describe 'Client' do
221
326
  # @param template_id The template's ID.
222
327
  # @param [Hash] opts the optional parameters
223
328
  # @option opts [String] :version Delete only this published version (`1.2.0`) or the draft (`draft`, when no version has been published). Without it, the draft and every published version are deleted.
329
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
224
330
  # @return [Template]
225
331
  describe 'delete_template test' do
226
332
  it 'should work' do
@@ -233,6 +339,7 @@ describe 'Client' do
233
339
  # Deletes a webhook so it stops receiving events, and returns it.
234
340
  # @param webhook_id The webhook's ID.
235
341
  # @param [Hash] opts the optional parameters
342
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
236
343
  # @return [Webhook]
237
344
  describe 'delete_webhook test' do
238
345
  it 'should work' do
@@ -245,6 +352,7 @@ describe 'Client' do
245
352
  # Deletes a combined PDF's PDF and returns the expired combined PDF.
246
353
  # @param combined_pdf_id The combined PDF's ID.
247
354
  # @param [Hash] opts the optional parameters
355
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
248
356
  # @return [CombinedPdf]
249
357
  describe 'expire_combined_pdf test' do
250
358
  it 'should work' do
@@ -257,6 +365,7 @@ describe 'Client' do
257
365
  # Deletes a submission's data and PDF now, and returns the expired submission.
258
366
  # @param submission_id The submission's ID.
259
367
  # @param [Hash] opts the optional parameters
368
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
260
369
  # @return [Submission]
261
370
  describe 'expire_submission test' do
262
371
  it 'should work' do
@@ -271,6 +380,7 @@ describe 'Client' do
271
380
  # @param body The formats to make.
272
381
  # @param [Hash] opts the optional parameters
273
382
  # @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
383
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
274
384
  # @return [Submission]
275
385
  describe 'generate_submission_files test' do
276
386
  it 'should work' do
@@ -283,6 +393,7 @@ describe 'Client' do
283
393
  # Generates a preview of a submission's PDF in the background, such as for a submission still waiting for its signature requests. It's in `files.preview` once `preview_generated_at` changes.
284
394
  # @param submission_id The submission's ID.
285
395
  # @param [Hash] opts the optional parameters
396
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
286
397
  # @return [Submission]
287
398
  describe 'generate_submission_preview test' do
288
399
  it 'should work' do
@@ -290,6 +401,18 @@ describe 'Client' do
290
401
  end
291
402
  end
292
403
 
404
+ # unit tests for get_account_email_action
405
+ # Get an account email action
406
+ # Returns one of your account's email actions, with its settings and whether its emails are failing.
407
+ # @param email_action_id The account email action's ID.
408
+ # @param [Hash] opts the optional parameters
409
+ # @return [EmailAction]
410
+ describe 'get_account_email_action test' do
411
+ it 'should work' do
412
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
413
+ end
414
+ end
415
+
293
416
  # unit tests for get_combined_pdf
294
417
  # Get a combined PDF
295
418
  # Returns a combined PDF, with a temporary link to download it once it has been generated.
@@ -314,6 +437,31 @@ describe 'Client' do
314
437
  end
315
438
  end
316
439
 
440
+ # unit tests for get_email_action
441
+ # Get an email action
442
+ # Returns one of a template's email actions, with its settings and whether its emails are failing.
443
+ # @param template_id The template's ID.
444
+ # @param email_action_id The email action's ID.
445
+ # @param [Hash] opts the optional parameters
446
+ # @return [EmailAction]
447
+ describe 'get_email_action test' do
448
+ it 'should work' do
449
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
450
+ end
451
+ end
452
+
453
+ # unit tests for get_email_domain
454
+ # Get an email domain
455
+ # Returns an email domain, whether it's verified, and the DNS records to add to it.
456
+ # @param email_domain_id The email domain's ID.
457
+ # @param [Hash] opts the optional parameters
458
+ # @return [EmailDomain]
459
+ describe 'get_email_domain test' do
460
+ it 'should work' do
461
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
462
+ end
463
+ end
464
+
317
465
  # unit tests for get_folder
318
466
  # Get a folder
319
467
  # Returns a folder.
@@ -379,7 +527,7 @@ describe 'Client' do
379
527
  # Returns a template: its draft, or one of its published versions.
380
528
  # @param template_id The template's ID.
381
529
  # @param [Hash] opts the optional parameters
382
- # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
530
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
383
531
  # @return [Template]
384
532
  describe 'get_template test' do
385
533
  it 'should work' do
@@ -392,7 +540,7 @@ describe 'Client' do
392
540
  # Returns what changed in the template's draft since its latest published version (or in a published version since the one before it): fields added, removed, changed and moved, the settings that changed, and whether the document was replaced. Check it before you publish a version.
393
541
  # @param template_id The template's ID.
394
542
  # @param [Hash] opts the optional parameters
395
- # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
543
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
396
544
  # @return [TemplateDiff]
397
545
  describe 'get_template_diff test' do
398
546
  it 'should work' do
@@ -406,7 +554,7 @@ describe 'Client' do
406
554
  # @param template_id The template's ID.
407
555
  # @param lang The language to generate the code in.
408
556
  # @param [Hash] opts the optional parameters
409
- # @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
557
+ # @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`, the version a submission uses by default.
410
558
  # @option opts [Boolean] :just_types Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types, PHP has no types-only code, and Rust's code is only types (serde converts the JSON), so theirs is the same either way.
411
559
  # @return [TemplateModelCode]
412
560
  describe 'get_template_model_code test' do
@@ -420,7 +568,7 @@ describe 'Client' do
420
568
  # Returns a JPEG image of each page of a PDF template's PDF, with temporary links to download them: the draft's PDF, or a published version's. Use them to see the pages that fields are placed on.
421
569
  # @param template_id The template's ID.
422
570
  # @param [Hash] opts the optional parameters
423
- # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
571
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
424
572
  # @return [TemplatePageImages]
425
573
  describe 'get_template_page_images test' do
426
574
  it 'should work' do
@@ -446,7 +594,7 @@ describe 'Client' do
446
594
  # Returns the JSON Schema that a submission's `data` must match. Use it to check data before you create submissions, or to build a form for the template's fields.
447
595
  # @param template_id The template's ID.
448
596
  # @param [Hash] opts the optional parameters
449
- # @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
597
+ # @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`, the version a submission uses by default.
450
598
  # @return [Hash<String, Object>]
451
599
  describe 'get_template_schema test' do
452
600
  it 'should work' do
@@ -466,6 +614,19 @@ describe 'Client' do
466
614
  end
467
615
  end
468
616
 
617
+ # unit tests for list_account_email_actions
618
+ # List account email actions
619
+ # Returns your account's email actions, newest first, one page at a time. Each one emails the files of every template's processed submissions, or of the templates and folders it lists. A template's own email actions are listed with the template (`GET /templates/{template_id}/email_actions`).
620
+ # @param [Hash] opts the optional parameters
621
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
622
+ # @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
623
+ # @return [EmailActionList]
624
+ describe 'list_account_email_actions test' do
625
+ it 'should work' do
626
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
627
+ end
628
+ end
629
+
469
630
  # unit tests for list_combined_pdfs
470
631
  # List combined PDFs
471
632
  # Returns the combined PDFs in your account, newest first, one page at a time.
@@ -492,6 +653,33 @@ describe 'Client' do
492
653
  end
493
654
  end
494
655
 
656
+ # unit tests for list_email_actions
657
+ # List email actions
658
+ # Returns the email actions of a template's draft, and your account's email actions that send for it, newest first, one page at a time. Each one emails every processed submission's files to the people it lists. An account email action (`template_id` null) shows the settings it sends for this template, with the template's changes in `customization`.
659
+ # @param template_id The template's ID.
660
+ # @param [Hash] opts the optional parameters
661
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
662
+ # @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
663
+ # @return [EmailActionList]
664
+ describe 'list_email_actions test' do
665
+ it 'should work' do
666
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
667
+ end
668
+ end
669
+
670
+ # unit tests for list_email_domains
671
+ # List email domains
672
+ # Returns the domains in your account that email actions can send from once they're verified, newest first, one page at a time.
673
+ # @param [Hash] opts the optional parameters
674
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
675
+ # @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
676
+ # @return [EmailDomainList]
677
+ describe 'list_email_domains test' do
678
+ it 'should work' do
679
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
680
+ end
681
+ end
682
+
495
683
  # unit tests for list_folders
496
684
  # List folders
497
685
  # Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
@@ -531,7 +719,7 @@ describe 'Client' do
531
719
  # Returns a template's fields with all of their settings, page by page: the draft's fields, or a published version's. A PDF template's fields are placed on its pages: GET /templates/{template_id}/page_images has images of the pages.
532
720
  # @param template_id The template's ID.
533
721
  # @param [Hash] opts the optional parameters
534
- # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
722
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
535
723
  # @return [TemplateFields]
536
724
  describe 'list_template_fields test' do
537
725
  it 'should work' do
@@ -563,7 +751,7 @@ describe 'Client' do
563
751
  # List templates
564
752
  # Returns the templates in your account (their drafts), newest first, one page at a time. Each one is a summary: get a template by its ID for its settings, its PDF in full, its HTML, defaults and published versions.
565
753
  # @param [Hash] opts the optional parameters
566
- # @option opts [String] :query Only list templates whose name contains this text (ignoring case).
754
+ # @option opts [String] :query Only list templates whose name contains this text (ignoring case). `%` and `_` match themselves.
567
755
  # @option opts [String] :parent_folder_id Only list the templates in this folder (not in its subfolders).
568
756
  # @option opts [Integer] :limit How many items to return (1-100, default 50).
569
757
  # @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
@@ -598,6 +786,7 @@ describe 'Client' do
598
786
  # @param folder_id The folder's ID.
599
787
  # @param body Where to move the folder.
600
788
  # @param [Hash] opts the optional parameters
789
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
601
790
  # @return [Folder]
602
791
  describe 'move_folder test' do
603
792
  it 'should work' do
@@ -611,6 +800,7 @@ describe 'Client' do
611
800
  # @param template_id The template's ID.
612
801
  # @param body Where to move the template.
613
802
  # @param [Hash] opts the optional parameters
803
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
614
804
  # @return [Template]
615
805
  describe 'move_template test' do
616
806
  it 'should work' do
@@ -624,6 +814,7 @@ describe 'Client' do
624
814
  # @param template_id The template's ID.
625
815
  # @param body The version to publish.
626
816
  # @param [Hash] opts the optional parameters
817
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
627
818
  # @return [TemplateVersion]
628
819
  describe 'publish_template_version test' do
629
820
  it 'should work' do
@@ -637,6 +828,7 @@ describe 'Client' do
637
828
  # @param template_id The template's ID.
638
829
  # @param body The fields to remove from the template's draft.
639
830
  # @param [Hash] opts the optional parameters
831
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
640
832
  # @return [TemplateFields]
641
833
  describe 'remove_template_fields test' do
642
834
  it 'should work' do
@@ -650,6 +842,7 @@ describe 'Client' do
650
842
  # @param folder_id The folder's ID.
651
843
  # @param body The folder's new name.
652
844
  # @param [Hash] opts the optional parameters
845
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
653
846
  # @return [Folder]
654
847
  describe 'rename_folder test' do
655
848
  it 'should work' do
@@ -663,6 +856,7 @@ describe 'Client' do
663
856
  # @param template_id The template's ID.
664
857
  # @param body The new order of the fields in the template's draft.
665
858
  # @param [Hash] opts the optional parameters
859
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
666
860
  # @return [TemplateFields]
667
861
  describe 'reorder_template_fields test' do
668
862
  it 'should work' do
@@ -676,6 +870,7 @@ describe 'Client' do
676
870
  # @param template_id The template's ID.
677
871
  # @param body The version to restore.
678
872
  # @param [Hash] opts the optional parameters
873
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
679
874
  # @return [Template]
680
875
  describe 'restore_template_version test' do
681
876
  it 'should work' do
@@ -683,6 +878,34 @@ describe 'Client' do
683
878
  end
684
879
  end
685
880
 
881
+ # unit tests for send_account_email_action_test_email
882
+ # Send a test email for an account email action
883
+ # Sends the account email action's email to the API token's user only, as it would go for one template it sends for, with each field shown as its name in brackets, so you can check how it looks. When the email action attaches its files and that template is a PDF template, the test attaches the template's blank PDF. It isn't recorded on any submission.
884
+ # @param email_action_id The account email action's ID.
885
+ # @param [Hash] opts the optional parameters
886
+ # @option opts [SendAccountEmailActionTestEmailRequest] :body Which template the test email is for.
887
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
888
+ # @return [EmailActionTestEmail]
889
+ describe 'send_account_email_action_test_email test' do
890
+ it 'should work' do
891
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
892
+ end
893
+ end
894
+
895
+ # unit tests for send_email_action_test_email
896
+ # Send a test email
897
+ # Sends the email action's email to the API token's user only, with each field and metadata value shown as its name in brackets, so you can check how it looks. When the email action attaches its files and the template is a PDF template, the test attaches the template's blank PDF. It isn't recorded on any submission. Without a paid plan, the user needs a confirmed email address.
898
+ # @param template_id The template's ID.
899
+ # @param email_action_id The email action's ID.
900
+ # @param [Hash] opts the optional parameters
901
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
902
+ # @return [EmailActionTestEmail]
903
+ describe 'send_email_action_test_email test' do
904
+ it 'should work' do
905
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
906
+ end
907
+ end
908
+
686
909
  # unit tests for test_authentication
687
910
  # Test authentication
688
911
  # Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
@@ -694,12 +917,57 @@ describe 'Client' do
694
917
  end
695
918
  end
696
919
 
920
+ # unit tests for update_account_email_action
921
+ # Update an account email action
922
+ # Changes one of your account's email actions. Properties left out keep their values. Its templates' customizations keep their own changes, and follow the rest. Set `enabled` to false to stop its emails for every template.
923
+ # @param email_action_id The account email action's ID.
924
+ # @param body The settings to change. Properties left out keep their values.
925
+ # @param [Hash] opts the optional parameters
926
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
927
+ # @return [EmailAction]
928
+ describe 'update_account_email_action test' do
929
+ it 'should work' do
930
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
931
+ end
932
+ end
933
+
934
+ # unit tests for update_email_action
935
+ # Update an email action
936
+ # Changes an email action's settings. Properties left out keep their values. Set `enabled` to false to stop its emails, or to true to turn it back on after DocSpring turned it off.
937
+ # @param template_id The template's ID.
938
+ # @param email_action_id The email action's ID.
939
+ # @param body The settings to change. Properties left out keep their values.
940
+ # @param [Hash] opts the optional parameters
941
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
942
+ # @return [EmailAction]
943
+ describe 'update_email_action test' do
944
+ it 'should work' do
945
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
946
+ end
947
+ end
948
+
949
+ # unit tests for update_email_action_customization
950
+ # Customize an account email action for a template
951
+ # Changes one of your account's email actions for this template only, replacing any changes the template had. Each setting you send is changed for this template, and the ones you leave out follow the account email action, including later changes to it. Set `enabled` to false to stop it sending for this template.
952
+ # @param template_id The template's ID.
953
+ # @param email_action_id The ID of one of your account's email actions that sends for the template.
954
+ # @param body The template's changes to the account email action, replacing any it had. Each setting you send is changed for this template, and the ones you leave out follow the account email action. `enabled: false` stops it sending for this template; left out, it sends.
955
+ # @param [Hash] opts the optional parameters
956
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
957
+ # @return [EmailAction]
958
+ describe 'update_email_action_customization test' do
959
+ it 'should work' do
960
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
961
+ end
962
+ end
963
+
697
964
  # unit tests for update_signature_request
698
965
  # Update a signature request
699
966
  # Changes a pending signature request's metadata, or how your app authenticated the person (for the audit trail). Once the person has opened it, only its metadata can be changed, and a completed or declined signature request can't be changed.
700
967
  # @param signature_request_id The signature request's ID.
701
968
  # @param body The settings to change. Properties left out keep their values.
702
969
  # @param [Hash] opts the optional parameters
970
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
703
971
  # @return [SignatureRequest]
704
972
  describe 'update_signature_request test' do
705
973
  it 'should work' do
@@ -709,10 +977,11 @@ describe 'Client' do
709
977
 
710
978
  # unit tests for update_template
711
979
  # Update a template
712
- # Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists. Settings such as `webhook_url`, `public_submissions` and `expire_after` apply to every published version too, and setting `parent_folder_id` moves the template and all of its published versions.
980
+ # Changes a template's draft. Properties left out keep their values. `defaults`, `html_engine_options` and a page design's `layout` replace the whole object, and `field_groups` changes only the groups it lists. A new layout adds a field for each new value it reads. Settings such as `webhook_url`, `public_submissions` and `expire_after` apply to every published version too, and setting `parent_folder_id` moves the template and all of its published versions.
713
981
  # @param template_id The template's ID.
714
982
  # @param body The settings to change. Properties left out keep their values.
715
983
  # @param [Hash] opts the optional parameters
984
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
716
985
  # @return [Template]
717
986
  describe 'update_template test' do
718
987
  it 'should work' do
@@ -727,6 +996,7 @@ describe 'Client' do
727
996
  # @param body The new PDF, or a Word template's new Word document, as one of `cache_id`, `document_url` and `document_base64`.
728
997
  # @param [Hash] opts the optional parameters
729
998
  # @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
999
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
730
1000
  # @return [Template]
731
1001
  describe 'update_template_document test' do
732
1002
  it 'should work' do
@@ -740,6 +1010,7 @@ describe 'Client' do
740
1010
  # @param template_id The template's ID.
741
1011
  # @param body The fields to change in the template's draft.
742
1012
  # @param [Hash] opts the optional parameters
1013
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
743
1014
  # @return [TemplateFields]
744
1015
  describe 'update_template_fields test' do
745
1016
  it 'should work' do
@@ -753,6 +1024,7 @@ describe 'Client' do
753
1024
  # @param webhook_id The webhook's ID.
754
1025
  # @param body The settings to change. Properties left out keep their values.
755
1026
  # @param [Hash] opts the optional parameters
1027
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
756
1028
  # @return [Webhook]
757
1029
  describe 'update_webhook test' do
758
1030
  it 'should work' do
@@ -775,6 +1047,7 @@ describe 'Client' do
775
1047
  # @option opts [FieldSetupNaming] :field_naming With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`.
776
1048
  # @option opts [FieldSetupLogic] :field_logic With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings.
777
1049
  # @option opts [OutputFormat] :output_format What each submission of a Word template makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. Required when `document` is a Word document.
1050
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
778
1051
  # @return [Template]
779
1052
  describe 'upload_template test' do
780
1053
  it 'should work' do
@@ -790,6 +1063,7 @@ describe 'Client' do
790
1063
  # @param [Hash] opts the optional parameters
791
1064
  # @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
792
1065
  # @option opts [Boolean] :reimport_fields Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields. Only for PDF templates: a Word template adds a field for each new tag.
1066
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
793
1067
  # @return [Template]
794
1068
  describe 'upload_template_document test' do
795
1069
  it 'should work' do
@@ -803,7 +1077,8 @@ describe 'Client' do
803
1077
  # @param template_id The template's ID.
804
1078
  # @param body The submission's data and settings.
805
1079
  # @param [Hash] opts the optional parameters
806
- # @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
1080
+ # @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`.
1081
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
807
1082
  # @return [SubmissionValidation]
808
1083
  describe 'validate_submission test' do
809
1084
  it 'should work' do
@@ -811,4 +1086,17 @@ describe 'Client' do
811
1086
  end
812
1087
  end
813
1088
 
1089
+ # unit tests for verify_email_domain
1090
+ # Verify an email domain
1091
+ # Checks the email domain's DNS records now, instead of waiting for the next check. If DocSpring has stopped looking for its DKIM records (3 days after they were created), it starts again with new ones: replace the CNAME records with them.
1092
+ # @param email_domain_id The email domain's ID.
1093
+ # @param [Hash] opts the optional parameters
1094
+ # @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
1095
+ # @return [EmailDomain]
1096
+ describe 'verify_email_domain test' do
1097
+ it 'should work' do
1098
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
1099
+ end
1100
+ end
1101
+
814
1102
  end