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.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +80 -0
- data/.openapi-generator/FILES +84 -0
- data/CHANGELOG.md +55 -0
- data/Gemfile.lock +2 -2
- data/README.md +20 -1
- data/docs/AddTemplateFieldsRequest.md +1 -1
- data/docs/Client.md +2311 -766
- data/docs/CombinedPdfSource.md +1 -1
- data/docs/CreateAccountEmailActionRequest.md +54 -0
- data/docs/CreateEmailActionRequest.md +50 -0
- data/docs/CreateEmailDomainRequest.md +18 -0
- data/docs/CreateSubmissionBatchRequest.md +2 -2
- data/docs/CreateSubmissionRequest.md +22 -4
- data/docs/CreateTemplateRequest.md +22 -6
- data/docs/DnsRecordType.md +15 -0
- data/docs/EmailAction.md +76 -0
- data/docs/EmailActionConditions.md +20 -0
- data/docs/EmailActionConditionsInput.md +20 -0
- data/docs/EmailActionCustomization.md +36 -0
- data/docs/EmailActionDelivery.md +15 -0
- data/docs/EmailActionFileFormats.md +15 -0
- data/docs/EmailActionList.md +20 -0
- data/docs/EmailActionSetting.md +15 -0
- data/docs/EmailActionSubmissionType.md +15 -0
- data/docs/EmailActionTestEmail.md +18 -0
- data/docs/EmailDomain.md +38 -0
- data/docs/EmailDomainDnsRecord.md +24 -0
- data/docs/EmailDomainDnsRecordPurpose.md +15 -0
- data/docs/EmailDomainList.md +20 -0
- data/docs/EmailDomainRecordState.md +15 -0
- data/docs/EmailDomainState.md +15 -0
- data/docs/ErrorInfo.md +12 -6
- data/docs/Field.md +1 -1
- data/docs/FieldInput.md +1 -1
- data/docs/HtmlEngineOptions.md +1 -1
- data/docs/HtmlEngineOptionsInput.md +1 -1
- data/docs/SendAccountEmailActionTestEmailRequest.md +18 -0
- data/docs/SignatureRequest.md +9 -1
- data/docs/SignatureRequestEmailAttachments.md +15 -0
- data/docs/SignatureRequestEmailStatus.md +15 -0
- data/docs/SignatureRequestInput.md +7 -3
- data/docs/SignatureRequestReminders.md +20 -0
- data/docs/SigningOrder.md +15 -0
- data/docs/Submission.md +4 -2
- data/docs/SubmissionAction.md +5 -3
- data/docs/SubmissionInput.md +3 -3
- data/docs/SubmissionSummary.md +1 -1
- data/docs/Template.md +23 -7
- data/docs/TemplateSourcePdf.md +1 -1
- data/docs/TemplateSummary.md +4 -4
- data/docs/UpdateAccountEmailActionRequest.md +54 -0
- data/docs/UpdateEmailActionCustomizationRequest.md +46 -0
- data/docs/UpdateEmailActionRequest.md +50 -0
- data/docs/UpdateTemplateDocumentRequest.md +1 -1
- data/docs/UpdateTemplateRequest.md +21 -5
- data/docs/ValidateSubmissionRequest.md +22 -4
- data/lib/docspring/api/client.rb +1749 -314
- data/lib/docspring/api_client.rb +1 -1
- data/lib/docspring/models/add_template_fields_request.rb +1 -1
- data/lib/docspring/models/combined_pdf_source.rb +1 -1
- data/lib/docspring/models/create_account_email_action_request.rb +388 -0
- data/lib/docspring/models/create_email_action_request.rb +364 -0
- data/lib/docspring/models/create_email_domain_request.rb +185 -0
- data/lib/docspring/models/create_submission_batch_request.rb +2 -2
- data/lib/docspring/models/create_submission_request.rb +143 -7
- data/lib/docspring/models/create_template_request.rb +107 -7
- data/lib/docspring/models/dns_record_type.rb +42 -0
- data/lib/docspring/models/email_action.rb +790 -0
- data/lib/docspring/models/email_action_conditions.rb +219 -0
- data/lib/docspring/models/email_action_conditions_input.rb +219 -0
- data/lib/docspring/models/email_action_customization.rb +360 -0
- data/lib/docspring/models/email_action_delivery.rb +41 -0
- data/lib/docspring/models/email_action_file_formats.rb +43 -0
- data/lib/docspring/models/email_action_list.rb +200 -0
- data/lib/docspring/models/email_action_setting.rb +53 -0
- data/lib/docspring/models/email_action_submission_type.rb +42 -0
- data/lib/docspring/models/email_action_test_email.rb +185 -0
- data/lib/docspring/models/email_domain.rb +423 -0
- data/lib/docspring/models/email_domain_dns_record.rb +288 -0
- data/lib/docspring/models/email_domain_dns_record_purpose.rb +42 -0
- data/lib/docspring/models/email_domain_list.rb +200 -0
- data/lib/docspring/models/email_domain_record_state.rb +42 -0
- data/lib/docspring/models/email_domain_state.rb +42 -0
- data/lib/docspring/models/error_code.rb +3 -1
- data/lib/docspring/models/error_info.rb +39 -9
- data/lib/docspring/models/field.rb +1 -1
- data/lib/docspring/models/field_input.rb +1 -1
- data/lib/docspring/models/html_engine_options.rb +1 -1
- data/lib/docspring/models/html_engine_options_input.rb +1 -1
- data/lib/docspring/models/send_account_email_action_test_email_request.rb +168 -0
- data/lib/docspring/models/signature_request.rb +68 -2
- data/lib/docspring/models/signature_request_email_attachments.rb +41 -0
- data/lib/docspring/models/signature_request_email_status.rb +47 -0
- data/lib/docspring/models/signature_request_event_type.rb +3 -1
- data/lib/docspring/models/signature_request_input.rb +25 -22
- data/lib/docspring/models/signature_request_reminders.rb +212 -0
- data/lib/docspring/models/signing_order.rb +41 -0
- data/lib/docspring/models/string_condition_type.rb +8 -1
- data/lib/docspring/models/submission.rb +30 -3
- data/lib/docspring/models/submission_action.rb +18 -5
- data/lib/docspring/models/submission_input.rb +3 -3
- data/lib/docspring/models/submission_summary.rb +1 -1
- data/lib/docspring/models/template.rb +144 -8
- data/lib/docspring/models/template_source_pdf.rb +1 -1
- data/lib/docspring/models/template_summary.rb +4 -4
- data/lib/docspring/models/template_type.rb +2 -1
- data/lib/docspring/models/update_account_email_action_request.rb +388 -0
- data/lib/docspring/models/update_email_action_customization_request.rb +343 -0
- data/lib/docspring/models/update_email_action_request.rb +364 -0
- data/lib/docspring/models/update_template_document_request.rb +1 -1
- data/lib/docspring/models/update_template_request.rb +108 -8
- data/lib/docspring/models/validate_submission_request.rb +143 -7
- data/lib/docspring/models/webhook_event_type.rb +3 -1
- data/lib/docspring/request_schemas.json +1691 -145
- data/lib/docspring/request_validator.rb +4 -0
- data/lib/docspring/version.rb +1 -1
- data/lib/docspring.rb +28 -0
- data/spec/api/client_spec.rb +306 -18
- data/spec/models/create_account_email_action_request_spec.rb +144 -0
- data/spec/models/create_email_action_request_spec.rb +132 -0
- data/spec/models/create_email_domain_request_spec.rb +36 -0
- data/spec/models/create_submission_request_spec.rb +54 -0
- data/spec/models/create_template_request_spec.rb +48 -0
- data/spec/models/dns_record_type_spec.rb +30 -0
- data/spec/models/email_action_conditions_input_spec.rb +42 -0
- data/spec/models/email_action_conditions_spec.rb +42 -0
- data/spec/models/email_action_customization_spec.rb +90 -0
- data/spec/models/email_action_delivery_spec.rb +30 -0
- data/spec/models/email_action_file_formats_spec.rb +30 -0
- data/spec/models/email_action_list_spec.rb +42 -0
- data/spec/models/email_action_setting_spec.rb +30 -0
- data/spec/models/email_action_spec.rb +210 -0
- data/spec/models/email_action_submission_type_spec.rb +30 -0
- data/spec/models/email_action_test_email_spec.rb +36 -0
- data/spec/models/email_domain_dns_record_purpose_spec.rb +30 -0
- data/spec/models/email_domain_dns_record_spec.rb +54 -0
- data/spec/models/email_domain_list_spec.rb +42 -0
- data/spec/models/email_domain_record_state_spec.rb +30 -0
- data/spec/models/email_domain_spec.rb +96 -0
- data/spec/models/email_domain_state_spec.rb +30 -0
- data/spec/models/error_info_spec.rb +18 -0
- data/spec/models/send_account_email_action_test_email_request_spec.rb +36 -0
- data/spec/models/signature_request_email_attachments_spec.rb +30 -0
- data/spec/models/signature_request_email_status_spec.rb +30 -0
- data/spec/models/signature_request_input_spec.rb +12 -0
- data/spec/models/signature_request_reminders_spec.rb +42 -0
- data/spec/models/signature_request_spec.rb +24 -0
- data/spec/models/signing_order_spec.rb +30 -0
- data/spec/models/submission_action_spec.rb +6 -0
- data/spec/models/submission_spec.rb +6 -0
- data/spec/models/template_spec.rb +48 -0
- data/spec/models/update_account_email_action_request_spec.rb +144 -0
- data/spec/models/update_email_action_customization_request_spec.rb +120 -0
- data/spec/models/update_email_action_request_spec.rb +132 -0
- data/spec/models/update_template_request_spec.rb +48 -0
- data/spec/models/validate_submission_request_spec.rb +54 -0
- metadata +115 -4
- data/.gitlab-ci.yml +0 -26
- data/.travis.yml +0 -11
data/lib/docspring/api/client.rb
CHANGED
|
@@ -67,10 +67,11 @@ module DocSpring
|
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
# Add fields to a template
|
|
70
|
-
# Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
|
|
70
|
+
# 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.
|
|
71
71
|
# @param template_id [String] The template's ID.
|
|
72
72
|
# @param body [AddTemplateFieldsRequest] The fields to add to the template's draft.
|
|
73
73
|
# @param [Hash] opts the optional parameters
|
|
74
|
+
# @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.
|
|
74
75
|
# @return [TemplateFields]
|
|
75
76
|
def add_template_fields(template_id, body, opts = {})
|
|
76
77
|
data, _status_code, _headers = add_template_fields_with_http_info(template_id, body, opts)
|
|
@@ -78,10 +79,11 @@ end
|
|
|
78
79
|
end
|
|
79
80
|
|
|
80
81
|
# Add fields to a template
|
|
81
|
-
# Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
|
|
82
|
+
# 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.
|
|
82
83
|
# @param template_id [String] The template's ID.
|
|
83
84
|
# @param body [AddTemplateFieldsRequest] The fields to add to the template's draft.
|
|
84
85
|
# @param [Hash] opts the optional parameters
|
|
86
|
+
# @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.
|
|
85
87
|
# @return [Array<(TemplateFields, Integer, Hash)>] TemplateFields data, response status code and response headers
|
|
86
88
|
def add_template_fields_with_http_info(template_id, body, opts = {})
|
|
87
89
|
if @api_client.config.debugging
|
|
@@ -110,6 +112,7 @@ end
|
|
|
110
112
|
if !content_type.nil?
|
|
111
113
|
header_params['Content-Type'] = content_type
|
|
112
114
|
end
|
|
115
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
113
116
|
|
|
114
117
|
# form parameters
|
|
115
118
|
form_params = opts[:form_params] || {}
|
|
@@ -145,6 +148,7 @@ end
|
|
|
145
148
|
# @param template_id [String] The template's ID.
|
|
146
149
|
# @param [Hash] opts the optional parameters
|
|
147
150
|
# @option opts [CopyTemplateRequest] :body Settings for the copy.
|
|
151
|
+
# @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
152
|
# @return [Template]
|
|
149
153
|
def copy_template(template_id, opts = {})
|
|
150
154
|
data, _status_code, _headers = copy_template_with_http_info(template_id, opts)
|
|
@@ -156,6 +160,7 @@ end
|
|
|
156
160
|
# @param template_id [String] The template's ID.
|
|
157
161
|
# @param [Hash] opts the optional parameters
|
|
158
162
|
# @option opts [CopyTemplateRequest] :body Settings for the copy.
|
|
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.
|
|
159
164
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
160
165
|
def copy_template_with_http_info(template_id, opts = {})
|
|
161
166
|
if @api_client.config.debugging
|
|
@@ -180,6 +185,7 @@ end
|
|
|
180
185
|
if !content_type.nil?
|
|
181
186
|
header_params['Content-Type'] = content_type
|
|
182
187
|
end
|
|
188
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
183
189
|
|
|
184
190
|
# form parameters
|
|
185
191
|
form_params = opts[:form_params] || {}
|
|
@@ -210,12 +216,83 @@ end
|
|
|
210
216
|
return data, status_code, headers
|
|
211
217
|
end
|
|
212
218
|
|
|
219
|
+
# Create an account email action
|
|
220
|
+
# 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.
|
|
221
|
+
# @param body [CreateAccountEmailActionRequest] 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`.
|
|
222
|
+
# @param [Hash] opts the optional parameters
|
|
223
|
+
# @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
|
+
# @return [EmailAction]
|
|
225
|
+
def create_account_email_action(body, opts = {})
|
|
226
|
+
data, _status_code, _headers = create_account_email_action_with_http_info(body, opts)
|
|
227
|
+
data
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Create an account email action
|
|
231
|
+
# 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.
|
|
232
|
+
# @param body [CreateAccountEmailActionRequest] 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`.
|
|
233
|
+
# @param [Hash] opts the optional parameters
|
|
234
|
+
# @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.
|
|
235
|
+
# @return [Array<(EmailAction, Integer, Hash)>] EmailAction data, response status code and response headers
|
|
236
|
+
def create_account_email_action_with_http_info(body, opts = {})
|
|
237
|
+
if @api_client.config.debugging
|
|
238
|
+
@api_client.config.logger.debug 'Calling API: Client.create_account_email_action ...'
|
|
239
|
+
end
|
|
240
|
+
# verify the required parameter 'body' is set
|
|
241
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
242
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_account_email_action"
|
|
243
|
+
end
|
|
244
|
+
# resource path
|
|
245
|
+
local_var_path = '/email_actions'
|
|
246
|
+
|
|
247
|
+
# query parameters
|
|
248
|
+
query_params = opts[:query_params] || {}
|
|
249
|
+
|
|
250
|
+
# header parameters
|
|
251
|
+
header_params = opts[:header_params] || {}
|
|
252
|
+
# HTTP header 'Accept' (if needed)
|
|
253
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
254
|
+
# HTTP header 'Content-Type'
|
|
255
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
256
|
+
if !content_type.nil?
|
|
257
|
+
header_params['Content-Type'] = content_type
|
|
258
|
+
end
|
|
259
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
260
|
+
|
|
261
|
+
# form parameters
|
|
262
|
+
form_params = opts[:form_params] || {}
|
|
263
|
+
|
|
264
|
+
# http body (model)
|
|
265
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
266
|
+
|
|
267
|
+
# return_type
|
|
268
|
+
return_type = opts[:debug_return_type] || 'EmailAction'
|
|
269
|
+
|
|
270
|
+
# auth_names
|
|
271
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
272
|
+
|
|
273
|
+
new_options = opts.merge(
|
|
274
|
+
:operation => :"Client.create_account_email_action",
|
|
275
|
+
:header_params => header_params,
|
|
276
|
+
:query_params => query_params,
|
|
277
|
+
:form_params => form_params,
|
|
278
|
+
:body => post_body,
|
|
279
|
+
:auth_names => auth_names,
|
|
280
|
+
:return_type => return_type
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
284
|
+
if @api_client.config.debugging
|
|
285
|
+
@api_client.config.logger.debug "API called: Client#create_account_email_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
286
|
+
end
|
|
287
|
+
return data, status_code, headers
|
|
288
|
+
end
|
|
289
|
+
|
|
213
290
|
# Combine PDFs
|
|
214
291
|
# 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.
|
|
215
292
|
# @param body [CreateCombinedPdfRequest] The PDFs to merge, and the combined PDF's settings.
|
|
216
293
|
# @param [Hash] opts the optional parameters
|
|
217
294
|
# @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
218
|
-
# @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
|
|
295
|
+
# @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.
|
|
219
296
|
# @return [CombinedPdf]
|
|
220
297
|
def create_combined_pdf(body, opts = {})
|
|
221
298
|
data, _status_code, _headers = create_combined_pdf_with_http_info(body, opts)
|
|
@@ -227,7 +304,7 @@ end
|
|
|
227
304
|
# @param body [CreateCombinedPdfRequest] The PDFs to merge, and the combined PDF's settings.
|
|
228
305
|
# @param [Hash] opts the optional parameters
|
|
229
306
|
# @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
230
|
-
# @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
|
|
307
|
+
# @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.
|
|
231
308
|
# @return [Array<(CombinedPdf, Integer, Hash)>] CombinedPdf data, response status code and response headers
|
|
232
309
|
def create_combined_pdf_with_http_info(body, opts = {})
|
|
233
310
|
if @api_client.config.debugging
|
|
@@ -288,6 +365,7 @@ end
|
|
|
288
365
|
# 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`.
|
|
289
366
|
# @param body [CreateCustomFileFromUploadRequest] The uploaded file to create the custom file from.
|
|
290
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.
|
|
291
369
|
# @return [CustomFile]
|
|
292
370
|
def create_custom_file_from_upload(body, opts = {})
|
|
293
371
|
data, _status_code, _headers = create_custom_file_from_upload_with_http_info(body, opts)
|
|
@@ -298,6 +376,7 @@ end
|
|
|
298
376
|
# 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`.
|
|
299
377
|
# @param body [CreateCustomFileFromUploadRequest] The uploaded file to create the custom file from.
|
|
300
378
|
# @param [Hash] opts the optional parameters
|
|
379
|
+
# @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.
|
|
301
380
|
# @return [Array<(CustomFile, Integer, Hash)>] CustomFile data, response status code and response headers
|
|
302
381
|
def create_custom_file_from_upload_with_http_info(body, opts = {})
|
|
303
382
|
if @api_client.config.debugging
|
|
@@ -322,6 +401,7 @@ end
|
|
|
322
401
|
if !content_type.nil?
|
|
323
402
|
header_params['Content-Type'] = content_type
|
|
324
403
|
end
|
|
404
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
325
405
|
|
|
326
406
|
# form parameters
|
|
327
407
|
form_params = opts[:form_params] || {}
|
|
@@ -352,10 +432,159 @@ end
|
|
|
352
432
|
return data, status_code, headers
|
|
353
433
|
end
|
|
354
434
|
|
|
435
|
+
# Create an email action
|
|
436
|
+
# 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.
|
|
437
|
+
# @param template_id [String] The template's ID.
|
|
438
|
+
# @param body [CreateEmailActionRequest] The email action to create. Properties left out get their defaults.
|
|
439
|
+
# @param [Hash] opts the optional parameters
|
|
440
|
+
# @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.
|
|
441
|
+
# @return [EmailAction]
|
|
442
|
+
def create_email_action(template_id, body, opts = {})
|
|
443
|
+
data, _status_code, _headers = create_email_action_with_http_info(template_id, body, opts)
|
|
444
|
+
data
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
# Create an email action
|
|
448
|
+
# 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.
|
|
449
|
+
# @param template_id [String] The template's ID.
|
|
450
|
+
# @param body [CreateEmailActionRequest] The email action to create. Properties left out get their defaults.
|
|
451
|
+
# @param [Hash] opts the optional parameters
|
|
452
|
+
# @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.
|
|
453
|
+
# @return [Array<(EmailAction, Integer, Hash)>] EmailAction data, response status code and response headers
|
|
454
|
+
def create_email_action_with_http_info(template_id, body, opts = {})
|
|
455
|
+
if @api_client.config.debugging
|
|
456
|
+
@api_client.config.logger.debug 'Calling API: Client.create_email_action ...'
|
|
457
|
+
end
|
|
458
|
+
# verify the required parameter 'template_id' is set
|
|
459
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
460
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.create_email_action"
|
|
461
|
+
end
|
|
462
|
+
# verify the required parameter 'body' is set
|
|
463
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
464
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_email_action"
|
|
465
|
+
end
|
|
466
|
+
# resource path
|
|
467
|
+
local_var_path = '/templates/{template_id}/email_actions'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
468
|
+
|
|
469
|
+
# query parameters
|
|
470
|
+
query_params = opts[:query_params] || {}
|
|
471
|
+
|
|
472
|
+
# header parameters
|
|
473
|
+
header_params = opts[:header_params] || {}
|
|
474
|
+
# HTTP header 'Accept' (if needed)
|
|
475
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
476
|
+
# HTTP header 'Content-Type'
|
|
477
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
478
|
+
if !content_type.nil?
|
|
479
|
+
header_params['Content-Type'] = content_type
|
|
480
|
+
end
|
|
481
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
482
|
+
|
|
483
|
+
# form parameters
|
|
484
|
+
form_params = opts[:form_params] || {}
|
|
485
|
+
|
|
486
|
+
# http body (model)
|
|
487
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
488
|
+
|
|
489
|
+
# return_type
|
|
490
|
+
return_type = opts[:debug_return_type] || 'EmailAction'
|
|
491
|
+
|
|
492
|
+
# auth_names
|
|
493
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
494
|
+
|
|
495
|
+
new_options = opts.merge(
|
|
496
|
+
:operation => :"Client.create_email_action",
|
|
497
|
+
:header_params => header_params,
|
|
498
|
+
:query_params => query_params,
|
|
499
|
+
:form_params => form_params,
|
|
500
|
+
:body => post_body,
|
|
501
|
+
:auth_names => auth_names,
|
|
502
|
+
:return_type => return_type
|
|
503
|
+
)
|
|
504
|
+
|
|
505
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
506
|
+
if @api_client.config.debugging
|
|
507
|
+
@api_client.config.logger.debug "API called: Client#create_email_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
508
|
+
end
|
|
509
|
+
return data, status_code, headers
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
# Add an email domain
|
|
513
|
+
# 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.
|
|
514
|
+
# @param body [CreateEmailDomainRequest] The domain to add.
|
|
515
|
+
# @param [Hash] opts the optional parameters
|
|
516
|
+
# @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.
|
|
517
|
+
# @return [EmailDomain]
|
|
518
|
+
def create_email_domain(body, opts = {})
|
|
519
|
+
data, _status_code, _headers = create_email_domain_with_http_info(body, opts)
|
|
520
|
+
data
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
# Add an email domain
|
|
524
|
+
# 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.
|
|
525
|
+
# @param body [CreateEmailDomainRequest] The domain to add.
|
|
526
|
+
# @param [Hash] opts the optional parameters
|
|
527
|
+
# @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.
|
|
528
|
+
# @return [Array<(EmailDomain, Integer, Hash)>] EmailDomain data, response status code and response headers
|
|
529
|
+
def create_email_domain_with_http_info(body, opts = {})
|
|
530
|
+
if @api_client.config.debugging
|
|
531
|
+
@api_client.config.logger.debug 'Calling API: Client.create_email_domain ...'
|
|
532
|
+
end
|
|
533
|
+
# verify the required parameter 'body' is set
|
|
534
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
535
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_email_domain"
|
|
536
|
+
end
|
|
537
|
+
# resource path
|
|
538
|
+
local_var_path = '/email_domains'
|
|
539
|
+
|
|
540
|
+
# query parameters
|
|
541
|
+
query_params = opts[:query_params] || {}
|
|
542
|
+
|
|
543
|
+
# header parameters
|
|
544
|
+
header_params = opts[:header_params] || {}
|
|
545
|
+
# HTTP header 'Accept' (if needed)
|
|
546
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
547
|
+
# HTTP header 'Content-Type'
|
|
548
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
549
|
+
if !content_type.nil?
|
|
550
|
+
header_params['Content-Type'] = content_type
|
|
551
|
+
end
|
|
552
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
553
|
+
|
|
554
|
+
# form parameters
|
|
555
|
+
form_params = opts[:form_params] || {}
|
|
556
|
+
|
|
557
|
+
# http body (model)
|
|
558
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
559
|
+
|
|
560
|
+
# return_type
|
|
561
|
+
return_type = opts[:debug_return_type] || 'EmailDomain'
|
|
562
|
+
|
|
563
|
+
# auth_names
|
|
564
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
565
|
+
|
|
566
|
+
new_options = opts.merge(
|
|
567
|
+
:operation => :"Client.create_email_domain",
|
|
568
|
+
:header_params => header_params,
|
|
569
|
+
:query_params => query_params,
|
|
570
|
+
:form_params => form_params,
|
|
571
|
+
:body => post_body,
|
|
572
|
+
:auth_names => auth_names,
|
|
573
|
+
:return_type => return_type
|
|
574
|
+
)
|
|
575
|
+
|
|
576
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
577
|
+
if @api_client.config.debugging
|
|
578
|
+
@api_client.config.logger.debug "API called: Client#create_email_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
579
|
+
end
|
|
580
|
+
return data, status_code, headers
|
|
581
|
+
end
|
|
582
|
+
|
|
355
583
|
# Create a folder
|
|
356
584
|
# Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
357
585
|
# @param body [CreateFolderRequest] The folder to create.
|
|
358
586
|
# @param [Hash] opts the optional parameters
|
|
587
|
+
# @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.
|
|
359
588
|
# @return [Folder]
|
|
360
589
|
def create_folder(body, opts = {})
|
|
361
590
|
data, _status_code, _headers = create_folder_with_http_info(body, opts)
|
|
@@ -366,6 +595,7 @@ end
|
|
|
366
595
|
# Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
367
596
|
# @param body [CreateFolderRequest] The folder to create.
|
|
368
597
|
# @param [Hash] opts the optional parameters
|
|
598
|
+
# @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.
|
|
369
599
|
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
370
600
|
def create_folder_with_http_info(body, opts = {})
|
|
371
601
|
if @api_client.config.debugging
|
|
@@ -390,6 +620,7 @@ end
|
|
|
390
620
|
if !content_type.nil?
|
|
391
621
|
header_params['Content-Type'] = content_type
|
|
392
622
|
end
|
|
623
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
393
624
|
|
|
394
625
|
# form parameters
|
|
395
626
|
form_params = opts[:form_params] || {}
|
|
@@ -425,6 +656,7 @@ end
|
|
|
425
656
|
# @param signature_request_id [String] The signature request's ID.
|
|
426
657
|
# @param body [CreateSignatureRequestEventRequest] The event to record.
|
|
427
658
|
# @param [Hash] opts the optional parameters
|
|
659
|
+
# @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.
|
|
428
660
|
# @return [SignatureRequestEvent]
|
|
429
661
|
def create_signature_request_event(signature_request_id, body, opts = {})
|
|
430
662
|
data, _status_code, _headers = create_signature_request_event_with_http_info(signature_request_id, body, opts)
|
|
@@ -436,6 +668,7 @@ end
|
|
|
436
668
|
# @param signature_request_id [String] The signature request's ID.
|
|
437
669
|
# @param body [CreateSignatureRequestEventRequest] The event to record.
|
|
438
670
|
# @param [Hash] opts the optional parameters
|
|
671
|
+
# @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.
|
|
439
672
|
# @return [Array<(SignatureRequestEvent, Integer, Hash)>] SignatureRequestEvent data, response status code and response headers
|
|
440
673
|
def create_signature_request_event_with_http_info(signature_request_id, body, opts = {})
|
|
441
674
|
if @api_client.config.debugging
|
|
@@ -464,6 +697,7 @@ end
|
|
|
464
697
|
if !content_type.nil?
|
|
465
698
|
header_params['Content-Type'] = content_type
|
|
466
699
|
end
|
|
700
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
467
701
|
|
|
468
702
|
# form parameters
|
|
469
703
|
form_params = opts[:form_params] || {}
|
|
@@ -499,6 +733,7 @@ end
|
|
|
499
733
|
# @param signature_request_id [String] The signature request's ID.
|
|
500
734
|
# @param [Hash] opts the optional parameters
|
|
501
735
|
# @option opts [CreateSignatureRequestTokenRequest] :body The kind of link to make. Send no body for an `api` token.
|
|
736
|
+
# @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.
|
|
502
737
|
# @return [SignatureRequestToken]
|
|
503
738
|
def create_signature_request_token(signature_request_id, opts = {})
|
|
504
739
|
data, _status_code, _headers = create_signature_request_token_with_http_info(signature_request_id, opts)
|
|
@@ -510,6 +745,7 @@ end
|
|
|
510
745
|
# @param signature_request_id [String] The signature request's ID.
|
|
511
746
|
# @param [Hash] opts the optional parameters
|
|
512
747
|
# @option opts [CreateSignatureRequestTokenRequest] :body The kind of link to make. Send no body for an `api` token.
|
|
748
|
+
# @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.
|
|
513
749
|
# @return [Array<(SignatureRequestToken, Integer, Hash)>] SignatureRequestToken data, response status code and response headers
|
|
514
750
|
def create_signature_request_token_with_http_info(signature_request_id, opts = {})
|
|
515
751
|
if @api_client.config.debugging
|
|
@@ -534,6 +770,7 @@ end
|
|
|
534
770
|
if !content_type.nil?
|
|
535
771
|
header_params['Content-Type'] = content_type
|
|
536
772
|
end
|
|
773
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
537
774
|
|
|
538
775
|
# form parameters
|
|
539
776
|
form_params = opts[:form_params] || {}
|
|
@@ -565,13 +802,13 @@ end
|
|
|
565
802
|
end
|
|
566
803
|
|
|
567
804
|
# Generate a PDF
|
|
568
|
-
# 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.
|
|
805
|
+
# 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.
|
|
569
806
|
# @param template_id [String] The template's ID.
|
|
570
807
|
# @param body [CreateSubmissionRequest] The submission's data and settings.
|
|
571
808
|
# @param [Hash] opts the optional parameters
|
|
572
|
-
# @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
809
|
+
# @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`.
|
|
573
810
|
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
574
|
-
# @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
|
|
811
|
+
# @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.
|
|
575
812
|
# @return [Submission]
|
|
576
813
|
def create_submission(template_id, body, opts = {})
|
|
577
814
|
data, _status_code, _headers = create_submission_with_http_info(template_id, body, opts)
|
|
@@ -579,13 +816,13 @@ end
|
|
|
579
816
|
end
|
|
580
817
|
|
|
581
818
|
# Generate a PDF
|
|
582
|
-
# 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.
|
|
819
|
+
# 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.
|
|
583
820
|
# @param template_id [String] The template's ID.
|
|
584
821
|
# @param body [CreateSubmissionRequest] The submission's data and settings.
|
|
585
822
|
# @param [Hash] opts the optional parameters
|
|
586
|
-
# @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
823
|
+
# @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`.
|
|
587
824
|
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
588
|
-
# @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
|
|
825
|
+
# @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.
|
|
589
826
|
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
590
827
|
def create_submission_with_http_info(template_id, body, opts = {})
|
|
591
828
|
if @api_client.config.debugging
|
|
@@ -652,7 +889,7 @@ end
|
|
|
652
889
|
# @param body [CreateSubmissionBatchRequest] The submissions to create, and the settings they share.
|
|
653
890
|
# @param [Hash] opts the optional parameters
|
|
654
891
|
# @option opts [Boolean] :wait Wait until every file in the batch has been generated before responding. Default true on sync.api hosts.
|
|
655
|
-
# @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
|
|
892
|
+
# @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.
|
|
656
893
|
# @return [SubmissionBatch]
|
|
657
894
|
def create_submission_batch(body, opts = {})
|
|
658
895
|
data, _status_code, _headers = create_submission_batch_with_http_info(body, opts)
|
|
@@ -664,7 +901,7 @@ end
|
|
|
664
901
|
# @param body [CreateSubmissionBatchRequest] The submissions to create, and the settings they share.
|
|
665
902
|
# @param [Hash] opts the optional parameters
|
|
666
903
|
# @option opts [Boolean] :wait Wait until every file in the batch has been generated before responding. Default true on sync.api hosts.
|
|
667
|
-
# @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
|
|
904
|
+
# @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.
|
|
668
905
|
# @return [Array<(SubmissionBatch, Integer, Hash)>] SubmissionBatch data, response status code and response headers
|
|
669
906
|
def create_submission_batch_with_http_info(body, opts = {})
|
|
670
907
|
if @api_client.config.debugging
|
|
@@ -722,10 +959,11 @@ end
|
|
|
722
959
|
end
|
|
723
960
|
|
|
724
961
|
# Create a template
|
|
725
|
-
# 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`.
|
|
962
|
+
# 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`.
|
|
726
963
|
# @param body [CreateTemplateRequest] The template to create.
|
|
727
964
|
# @param [Hash] opts the optional parameters
|
|
728
965
|
# @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.
|
|
966
|
+
# @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.
|
|
729
967
|
# @return [Template]
|
|
730
968
|
def create_template(body, opts = {})
|
|
731
969
|
data, _status_code, _headers = create_template_with_http_info(body, opts)
|
|
@@ -733,10 +971,11 @@ end
|
|
|
733
971
|
end
|
|
734
972
|
|
|
735
973
|
# Create a template
|
|
736
|
-
# 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`.
|
|
974
|
+
# 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`.
|
|
737
975
|
# @param body [CreateTemplateRequest] The template to create.
|
|
738
976
|
# @param [Hash] opts the optional parameters
|
|
739
977
|
# @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.
|
|
978
|
+
# @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.
|
|
740
979
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
741
980
|
def create_template_with_http_info(body, opts = {})
|
|
742
981
|
if @api_client.config.debugging
|
|
@@ -762,6 +1001,7 @@ end
|
|
|
762
1001
|
if !content_type.nil?
|
|
763
1002
|
header_params['Content-Type'] = content_type
|
|
764
1003
|
end
|
|
1004
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
765
1005
|
|
|
766
1006
|
# form parameters
|
|
767
1007
|
form_params = opts[:form_params] || {}
|
|
@@ -793,11 +1033,12 @@ end
|
|
|
793
1033
|
end
|
|
794
1034
|
|
|
795
1035
|
# Preview a template with data
|
|
796
|
-
# 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`.
|
|
1036
|
+
# 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`.
|
|
797
1037
|
# @param template_id [String] The template's ID.
|
|
798
1038
|
# @param body [CreateTemplatePreviewRequest] The data to render the template with.
|
|
799
1039
|
# @param [Hash] opts the optional parameters
|
|
800
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1040
|
+
# @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`.
|
|
1041
|
+
# @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.
|
|
801
1042
|
# @return [TemplatePreview]
|
|
802
1043
|
def create_template_preview(template_id, body, opts = {})
|
|
803
1044
|
data, _status_code, _headers = create_template_preview_with_http_info(template_id, body, opts)
|
|
@@ -805,11 +1046,12 @@ end
|
|
|
805
1046
|
end
|
|
806
1047
|
|
|
807
1048
|
# Preview a template with data
|
|
808
|
-
# 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`.
|
|
1049
|
+
# 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`.
|
|
809
1050
|
# @param template_id [String] The template's ID.
|
|
810
1051
|
# @param body [CreateTemplatePreviewRequest] The data to render the template with.
|
|
811
1052
|
# @param [Hash] opts the optional parameters
|
|
812
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1053
|
+
# @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`.
|
|
1054
|
+
# @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.
|
|
813
1055
|
# @return [Array<(TemplatePreview, Integer, Hash)>] TemplatePreview data, response status code and response headers
|
|
814
1056
|
def create_template_preview_with_http_info(template_id, body, opts = {})
|
|
815
1057
|
if @api_client.config.debugging
|
|
@@ -839,6 +1081,7 @@ end
|
|
|
839
1081
|
if !content_type.nil?
|
|
840
1082
|
header_params['Content-Type'] = content_type
|
|
841
1083
|
end
|
|
1084
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
842
1085
|
|
|
843
1086
|
# form parameters
|
|
844
1087
|
form_params = opts[:form_params] || {}
|
|
@@ -873,6 +1116,7 @@ end
|
|
|
873
1116
|
# 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.
|
|
874
1117
|
# @param body [CreateWebhookRequest] The webhook to create.
|
|
875
1118
|
# @param [Hash] opts the optional parameters
|
|
1119
|
+
# @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.
|
|
876
1120
|
# @return [Webhook]
|
|
877
1121
|
def create_webhook(body, opts = {})
|
|
878
1122
|
data, _status_code, _headers = create_webhook_with_http_info(body, opts)
|
|
@@ -883,6 +1127,7 @@ end
|
|
|
883
1127
|
# 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.
|
|
884
1128
|
# @param body [CreateWebhookRequest] The webhook to create.
|
|
885
1129
|
# @param [Hash] opts the optional parameters
|
|
1130
|
+
# @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.
|
|
886
1131
|
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
887
1132
|
def create_webhook_with_http_info(body, opts = {})
|
|
888
1133
|
if @api_client.config.debugging
|
|
@@ -907,6 +1152,7 @@ end
|
|
|
907
1152
|
if !content_type.nil?
|
|
908
1153
|
header_params['Content-Type'] = content_type
|
|
909
1154
|
end
|
|
1155
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
910
1156
|
|
|
911
1157
|
# form parameters
|
|
912
1158
|
form_params = opts[:form_params] || {}
|
|
@@ -937,31 +1183,33 @@ end
|
|
|
937
1183
|
return data, status_code, headers
|
|
938
1184
|
end
|
|
939
1185
|
|
|
940
|
-
# Delete
|
|
941
|
-
# Deletes
|
|
942
|
-
# @param
|
|
1186
|
+
# Delete an account email action
|
|
1187
|
+
# 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.
|
|
1188
|
+
# @param email_action_id [String] The account email action's ID.
|
|
943
1189
|
# @param [Hash] opts the optional parameters
|
|
944
|
-
# @
|
|
945
|
-
|
|
946
|
-
|
|
1190
|
+
# @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.
|
|
1191
|
+
# @return [EmailAction]
|
|
1192
|
+
def delete_account_email_action(email_action_id, opts = {})
|
|
1193
|
+
data, _status_code, _headers = delete_account_email_action_with_http_info(email_action_id, opts)
|
|
947
1194
|
data
|
|
948
1195
|
end
|
|
949
1196
|
|
|
950
|
-
# Delete
|
|
951
|
-
# Deletes
|
|
952
|
-
# @param
|
|
1197
|
+
# Delete an account email action
|
|
1198
|
+
# 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.
|
|
1199
|
+
# @param email_action_id [String] The account email action's ID.
|
|
953
1200
|
# @param [Hash] opts the optional parameters
|
|
954
|
-
# @
|
|
955
|
-
|
|
1201
|
+
# @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.
|
|
1202
|
+
# @return [Array<(EmailAction, Integer, Hash)>] EmailAction data, response status code and response headers
|
|
1203
|
+
def delete_account_email_action_with_http_info(email_action_id, opts = {})
|
|
956
1204
|
if @api_client.config.debugging
|
|
957
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1205
|
+
@api_client.config.logger.debug 'Calling API: Client.delete_account_email_action ...'
|
|
958
1206
|
end
|
|
959
|
-
# verify the required parameter '
|
|
960
|
-
if @api_client.config.client_side_validation &&
|
|
961
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1207
|
+
# verify the required parameter 'email_action_id' is set
|
|
1208
|
+
if @api_client.config.client_side_validation && email_action_id.nil?
|
|
1209
|
+
fail ArgumentError, "Missing the required parameter 'email_action_id' when calling Client.delete_account_email_action"
|
|
962
1210
|
end
|
|
963
1211
|
# resource path
|
|
964
|
-
local_var_path = '/
|
|
1212
|
+
local_var_path = '/email_actions/{email_action_id}'.sub('{email_action_id}', CGI.escape(email_action_id.to_s))
|
|
965
1213
|
|
|
966
1214
|
# query parameters
|
|
967
1215
|
query_params = opts[:query_params] || {}
|
|
@@ -970,6 +1218,7 @@ end
|
|
|
970
1218
|
header_params = opts[:header_params] || {}
|
|
971
1219
|
# HTTP header 'Accept' (if needed)
|
|
972
1220
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1221
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
973
1222
|
|
|
974
1223
|
# form parameters
|
|
975
1224
|
form_params = opts[:form_params] || {}
|
|
@@ -978,13 +1227,13 @@ end
|
|
|
978
1227
|
post_body = opts[:debug_body]
|
|
979
1228
|
|
|
980
1229
|
# return_type
|
|
981
|
-
return_type = opts[:debug_return_type] || '
|
|
1230
|
+
return_type = opts[:debug_return_type] || 'EmailAction'
|
|
982
1231
|
|
|
983
1232
|
# auth_names
|
|
984
1233
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
985
1234
|
|
|
986
1235
|
new_options = opts.merge(
|
|
987
|
-
:operation => :"Client.
|
|
1236
|
+
:operation => :"Client.delete_account_email_action",
|
|
988
1237
|
:header_params => header_params,
|
|
989
1238
|
:query_params => query_params,
|
|
990
1239
|
:form_params => form_params,
|
|
@@ -995,36 +1244,38 @@ end
|
|
|
995
1244
|
|
|
996
1245
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
997
1246
|
if @api_client.config.debugging
|
|
998
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1247
|
+
@api_client.config.logger.debug "API called: Client#delete_account_email_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
999
1248
|
end
|
|
1000
1249
|
return data, status_code, headers
|
|
1001
1250
|
end
|
|
1002
1251
|
|
|
1003
|
-
# Delete a
|
|
1004
|
-
# Deletes
|
|
1005
|
-
# @param
|
|
1252
|
+
# Delete a custom file
|
|
1253
|
+
# Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
1254
|
+
# @param custom_file_id [String] The custom file's ID.
|
|
1006
1255
|
# @param [Hash] opts the optional parameters
|
|
1007
|
-
# @
|
|
1008
|
-
|
|
1009
|
-
|
|
1256
|
+
# @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.
|
|
1257
|
+
# @return [CustomFile]
|
|
1258
|
+
def delete_custom_file(custom_file_id, opts = {})
|
|
1259
|
+
data, _status_code, _headers = delete_custom_file_with_http_info(custom_file_id, opts)
|
|
1010
1260
|
data
|
|
1011
1261
|
end
|
|
1012
1262
|
|
|
1013
|
-
# Delete a
|
|
1014
|
-
# Deletes
|
|
1015
|
-
# @param
|
|
1263
|
+
# Delete a custom file
|
|
1264
|
+
# Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
1265
|
+
# @param custom_file_id [String] The custom file's ID.
|
|
1016
1266
|
# @param [Hash] opts the optional parameters
|
|
1017
|
-
# @
|
|
1018
|
-
|
|
1267
|
+
# @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.
|
|
1268
|
+
# @return [Array<(CustomFile, Integer, Hash)>] CustomFile data, response status code and response headers
|
|
1269
|
+
def delete_custom_file_with_http_info(custom_file_id, opts = {})
|
|
1019
1270
|
if @api_client.config.debugging
|
|
1020
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1271
|
+
@api_client.config.logger.debug 'Calling API: Client.delete_custom_file ...'
|
|
1021
1272
|
end
|
|
1022
|
-
# verify the required parameter '
|
|
1023
|
-
if @api_client.config.client_side_validation &&
|
|
1024
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1273
|
+
# verify the required parameter 'custom_file_id' is set
|
|
1274
|
+
if @api_client.config.client_side_validation && custom_file_id.nil?
|
|
1275
|
+
fail ArgumentError, "Missing the required parameter 'custom_file_id' when calling Client.delete_custom_file"
|
|
1025
1276
|
end
|
|
1026
1277
|
# resource path
|
|
1027
|
-
local_var_path = '/
|
|
1278
|
+
local_var_path = '/custom_files/{custom_file_id}'.sub('{custom_file_id}', CGI.escape(custom_file_id.to_s))
|
|
1028
1279
|
|
|
1029
1280
|
# query parameters
|
|
1030
1281
|
query_params = opts[:query_params] || {}
|
|
@@ -1033,6 +1284,7 @@ end
|
|
|
1033
1284
|
header_params = opts[:header_params] || {}
|
|
1034
1285
|
# HTTP header 'Accept' (if needed)
|
|
1035
1286
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1287
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1036
1288
|
|
|
1037
1289
|
# form parameters
|
|
1038
1290
|
form_params = opts[:form_params] || {}
|
|
@@ -1041,13 +1293,13 @@ end
|
|
|
1041
1293
|
post_body = opts[:debug_body]
|
|
1042
1294
|
|
|
1043
1295
|
# return_type
|
|
1044
|
-
return_type = opts[:debug_return_type] || '
|
|
1296
|
+
return_type = opts[:debug_return_type] || 'CustomFile'
|
|
1045
1297
|
|
|
1046
1298
|
# auth_names
|
|
1047
1299
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1048
1300
|
|
|
1049
1301
|
new_options = opts.merge(
|
|
1050
|
-
:operation => :"Client.
|
|
1302
|
+
:operation => :"Client.delete_custom_file",
|
|
1051
1303
|
:header_params => header_params,
|
|
1052
1304
|
:query_params => query_params,
|
|
1053
1305
|
:form_params => form_params,
|
|
@@ -1058,47 +1310,53 @@ end
|
|
|
1058
1310
|
|
|
1059
1311
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1060
1312
|
if @api_client.config.debugging
|
|
1061
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1313
|
+
@api_client.config.logger.debug "API called: Client#delete_custom_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1062
1314
|
end
|
|
1063
1315
|
return data, status_code, headers
|
|
1064
1316
|
end
|
|
1065
1317
|
|
|
1066
|
-
# Delete
|
|
1067
|
-
# Deletes
|
|
1318
|
+
# Delete an email action
|
|
1319
|
+
# Deletes an email action. Emails it has already queued for submissions aren't sent. Submissions keep the record of the emails it sent.
|
|
1068
1320
|
# @param template_id [String] The template's ID.
|
|
1321
|
+
# @param email_action_id [String] The email action's ID.
|
|
1069
1322
|
# @param [Hash] opts the optional parameters
|
|
1070
|
-
# @option opts [String] :
|
|
1071
|
-
# @return [
|
|
1072
|
-
def
|
|
1073
|
-
data, _status_code, _headers =
|
|
1323
|
+
# @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.
|
|
1324
|
+
# @return [EmailAction]
|
|
1325
|
+
def delete_email_action(template_id, email_action_id, opts = {})
|
|
1326
|
+
data, _status_code, _headers = delete_email_action_with_http_info(template_id, email_action_id, opts)
|
|
1074
1327
|
data
|
|
1075
1328
|
end
|
|
1076
1329
|
|
|
1077
|
-
# Delete
|
|
1078
|
-
# Deletes
|
|
1330
|
+
# Delete an email action
|
|
1331
|
+
# Deletes an email action. Emails it has already queued for submissions aren't sent. Submissions keep the record of the emails it sent.
|
|
1079
1332
|
# @param template_id [String] The template's ID.
|
|
1333
|
+
# @param email_action_id [String] The email action's ID.
|
|
1080
1334
|
# @param [Hash] opts the optional parameters
|
|
1081
|
-
# @option opts [String] :
|
|
1082
|
-
# @return [Array<(
|
|
1083
|
-
def
|
|
1335
|
+
# @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.
|
|
1336
|
+
# @return [Array<(EmailAction, Integer, Hash)>] EmailAction data, response status code and response headers
|
|
1337
|
+
def delete_email_action_with_http_info(template_id, email_action_id, opts = {})
|
|
1084
1338
|
if @api_client.config.debugging
|
|
1085
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1339
|
+
@api_client.config.logger.debug 'Calling API: Client.delete_email_action ...'
|
|
1086
1340
|
end
|
|
1087
1341
|
# verify the required parameter 'template_id' is set
|
|
1088
1342
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
1089
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.
|
|
1343
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.delete_email_action"
|
|
1344
|
+
end
|
|
1345
|
+
# verify the required parameter 'email_action_id' is set
|
|
1346
|
+
if @api_client.config.client_side_validation && email_action_id.nil?
|
|
1347
|
+
fail ArgumentError, "Missing the required parameter 'email_action_id' when calling Client.delete_email_action"
|
|
1090
1348
|
end
|
|
1091
1349
|
# resource path
|
|
1092
|
-
local_var_path = '/templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
1350
|
+
local_var_path = '/templates/{template_id}/email_actions/{email_action_id}'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{email_action_id}', CGI.escape(email_action_id.to_s))
|
|
1093
1351
|
|
|
1094
1352
|
# query parameters
|
|
1095
1353
|
query_params = opts[:query_params] || {}
|
|
1096
|
-
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1097
1354
|
|
|
1098
1355
|
# header parameters
|
|
1099
1356
|
header_params = opts[:header_params] || {}
|
|
1100
1357
|
# HTTP header 'Accept' (if needed)
|
|
1101
1358
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1359
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1102
1360
|
|
|
1103
1361
|
# form parameters
|
|
1104
1362
|
form_params = opts[:form_params] || {}
|
|
@@ -1107,13 +1365,13 @@ end
|
|
|
1107
1365
|
post_body = opts[:debug_body]
|
|
1108
1366
|
|
|
1109
1367
|
# return_type
|
|
1110
|
-
return_type = opts[:debug_return_type] || '
|
|
1368
|
+
return_type = opts[:debug_return_type] || 'EmailAction'
|
|
1111
1369
|
|
|
1112
1370
|
# auth_names
|
|
1113
1371
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1114
1372
|
|
|
1115
1373
|
new_options = opts.merge(
|
|
1116
|
-
:operation => :"Client.
|
|
1374
|
+
:operation => :"Client.delete_email_action",
|
|
1117
1375
|
:header_params => header_params,
|
|
1118
1376
|
:query_params => query_params,
|
|
1119
1377
|
:form_params => form_params,
|
|
@@ -1124,18 +1382,292 @@ end
|
|
|
1124
1382
|
|
|
1125
1383
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1126
1384
|
if @api_client.config.debugging
|
|
1127
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1385
|
+
@api_client.config.logger.debug "API called: Client#delete_email_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1128
1386
|
end
|
|
1129
1387
|
return data, status_code, headers
|
|
1130
1388
|
end
|
|
1131
1389
|
|
|
1132
|
-
#
|
|
1133
|
-
#
|
|
1134
|
-
# @param
|
|
1390
|
+
# Reset an account email action's customization
|
|
1391
|
+
# 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.
|
|
1392
|
+
# @param template_id [String] The template's ID.
|
|
1393
|
+
# @param email_action_id [String] The ID of one of your account's email actions that sends for the template.
|
|
1135
1394
|
# @param [Hash] opts the optional parameters
|
|
1136
|
-
# @
|
|
1137
|
-
|
|
1138
|
-
|
|
1395
|
+
# @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.
|
|
1396
|
+
# @return [EmailAction]
|
|
1397
|
+
def delete_email_action_customization(template_id, email_action_id, opts = {})
|
|
1398
|
+
data, _status_code, _headers = delete_email_action_customization_with_http_info(template_id, email_action_id, opts)
|
|
1399
|
+
data
|
|
1400
|
+
end
|
|
1401
|
+
|
|
1402
|
+
# Reset an account email action's customization
|
|
1403
|
+
# 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.
|
|
1404
|
+
# @param template_id [String] The template's ID.
|
|
1405
|
+
# @param email_action_id [String] The ID of one of your account's email actions that sends for the template.
|
|
1406
|
+
# @param [Hash] opts the optional parameters
|
|
1407
|
+
# @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.
|
|
1408
|
+
# @return [Array<(EmailAction, Integer, Hash)>] EmailAction data, response status code and response headers
|
|
1409
|
+
def delete_email_action_customization_with_http_info(template_id, email_action_id, opts = {})
|
|
1410
|
+
if @api_client.config.debugging
|
|
1411
|
+
@api_client.config.logger.debug 'Calling API: Client.delete_email_action_customization ...'
|
|
1412
|
+
end
|
|
1413
|
+
# verify the required parameter 'template_id' is set
|
|
1414
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
1415
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.delete_email_action_customization"
|
|
1416
|
+
end
|
|
1417
|
+
# verify the required parameter 'email_action_id' is set
|
|
1418
|
+
if @api_client.config.client_side_validation && email_action_id.nil?
|
|
1419
|
+
fail ArgumentError, "Missing the required parameter 'email_action_id' when calling Client.delete_email_action_customization"
|
|
1420
|
+
end
|
|
1421
|
+
# resource path
|
|
1422
|
+
local_var_path = '/templates/{template_id}/email_actions/{email_action_id}/customization'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{email_action_id}', CGI.escape(email_action_id.to_s))
|
|
1423
|
+
|
|
1424
|
+
# query parameters
|
|
1425
|
+
query_params = opts[:query_params] || {}
|
|
1426
|
+
|
|
1427
|
+
# header parameters
|
|
1428
|
+
header_params = opts[:header_params] || {}
|
|
1429
|
+
# HTTP header 'Accept' (if needed)
|
|
1430
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1431
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1432
|
+
|
|
1433
|
+
# form parameters
|
|
1434
|
+
form_params = opts[:form_params] || {}
|
|
1435
|
+
|
|
1436
|
+
# http body (model)
|
|
1437
|
+
post_body = opts[:debug_body]
|
|
1438
|
+
|
|
1439
|
+
# return_type
|
|
1440
|
+
return_type = opts[:debug_return_type] || 'EmailAction'
|
|
1441
|
+
|
|
1442
|
+
# auth_names
|
|
1443
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1444
|
+
|
|
1445
|
+
new_options = opts.merge(
|
|
1446
|
+
:operation => :"Client.delete_email_action_customization",
|
|
1447
|
+
:header_params => header_params,
|
|
1448
|
+
:query_params => query_params,
|
|
1449
|
+
:form_params => form_params,
|
|
1450
|
+
:body => post_body,
|
|
1451
|
+
:auth_names => auth_names,
|
|
1452
|
+
:return_type => return_type
|
|
1453
|
+
)
|
|
1454
|
+
|
|
1455
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1456
|
+
if @api_client.config.debugging
|
|
1457
|
+
@api_client.config.logger.debug "API called: Client#delete_email_action_customization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1458
|
+
end
|
|
1459
|
+
return data, status_code, headers
|
|
1460
|
+
end
|
|
1461
|
+
|
|
1462
|
+
# Remove an email domain
|
|
1463
|
+
# 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.
|
|
1464
|
+
# @param email_domain_id [String] The email domain's ID.
|
|
1465
|
+
# @param [Hash] opts the optional parameters
|
|
1466
|
+
# @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.
|
|
1467
|
+
# @return [EmailDomain]
|
|
1468
|
+
def delete_email_domain(email_domain_id, opts = {})
|
|
1469
|
+
data, _status_code, _headers = delete_email_domain_with_http_info(email_domain_id, opts)
|
|
1470
|
+
data
|
|
1471
|
+
end
|
|
1472
|
+
|
|
1473
|
+
# Remove an email domain
|
|
1474
|
+
# 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.
|
|
1475
|
+
# @param email_domain_id [String] The email domain's ID.
|
|
1476
|
+
# @param [Hash] opts the optional parameters
|
|
1477
|
+
# @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.
|
|
1478
|
+
# @return [Array<(EmailDomain, Integer, Hash)>] EmailDomain data, response status code and response headers
|
|
1479
|
+
def delete_email_domain_with_http_info(email_domain_id, opts = {})
|
|
1480
|
+
if @api_client.config.debugging
|
|
1481
|
+
@api_client.config.logger.debug 'Calling API: Client.delete_email_domain ...'
|
|
1482
|
+
end
|
|
1483
|
+
# verify the required parameter 'email_domain_id' is set
|
|
1484
|
+
if @api_client.config.client_side_validation && email_domain_id.nil?
|
|
1485
|
+
fail ArgumentError, "Missing the required parameter 'email_domain_id' when calling Client.delete_email_domain"
|
|
1486
|
+
end
|
|
1487
|
+
# resource path
|
|
1488
|
+
local_var_path = '/email_domains/{email_domain_id}'.sub('{email_domain_id}', CGI.escape(email_domain_id.to_s))
|
|
1489
|
+
|
|
1490
|
+
# query parameters
|
|
1491
|
+
query_params = opts[:query_params] || {}
|
|
1492
|
+
|
|
1493
|
+
# header parameters
|
|
1494
|
+
header_params = opts[:header_params] || {}
|
|
1495
|
+
# HTTP header 'Accept' (if needed)
|
|
1496
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1497
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1498
|
+
|
|
1499
|
+
# form parameters
|
|
1500
|
+
form_params = opts[:form_params] || {}
|
|
1501
|
+
|
|
1502
|
+
# http body (model)
|
|
1503
|
+
post_body = opts[:debug_body]
|
|
1504
|
+
|
|
1505
|
+
# return_type
|
|
1506
|
+
return_type = opts[:debug_return_type] || 'EmailDomain'
|
|
1507
|
+
|
|
1508
|
+
# auth_names
|
|
1509
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1510
|
+
|
|
1511
|
+
new_options = opts.merge(
|
|
1512
|
+
:operation => :"Client.delete_email_domain",
|
|
1513
|
+
:header_params => header_params,
|
|
1514
|
+
:query_params => query_params,
|
|
1515
|
+
:form_params => form_params,
|
|
1516
|
+
:body => post_body,
|
|
1517
|
+
:auth_names => auth_names,
|
|
1518
|
+
:return_type => return_type
|
|
1519
|
+
)
|
|
1520
|
+
|
|
1521
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1522
|
+
if @api_client.config.debugging
|
|
1523
|
+
@api_client.config.logger.debug "API called: Client#delete_email_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1524
|
+
end
|
|
1525
|
+
return data, status_code, headers
|
|
1526
|
+
end
|
|
1527
|
+
|
|
1528
|
+
# Delete a folder
|
|
1529
|
+
# Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
1530
|
+
# @param folder_id [String] The folder's ID.
|
|
1531
|
+
# @param [Hash] opts the optional parameters
|
|
1532
|
+
# @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.
|
|
1533
|
+
# @return [Folder]
|
|
1534
|
+
def delete_folder(folder_id, opts = {})
|
|
1535
|
+
data, _status_code, _headers = delete_folder_with_http_info(folder_id, opts)
|
|
1536
|
+
data
|
|
1537
|
+
end
|
|
1538
|
+
|
|
1539
|
+
# Delete a folder
|
|
1540
|
+
# Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
1541
|
+
# @param folder_id [String] The folder's ID.
|
|
1542
|
+
# @param [Hash] opts the optional parameters
|
|
1543
|
+
# @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.
|
|
1544
|
+
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
1545
|
+
def delete_folder_with_http_info(folder_id, opts = {})
|
|
1546
|
+
if @api_client.config.debugging
|
|
1547
|
+
@api_client.config.logger.debug 'Calling API: Client.delete_folder ...'
|
|
1548
|
+
end
|
|
1549
|
+
# verify the required parameter 'folder_id' is set
|
|
1550
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
1551
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.delete_folder"
|
|
1552
|
+
end
|
|
1553
|
+
# resource path
|
|
1554
|
+
local_var_path = '/folders/{folder_id}'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
1555
|
+
|
|
1556
|
+
# query parameters
|
|
1557
|
+
query_params = opts[:query_params] || {}
|
|
1558
|
+
|
|
1559
|
+
# header parameters
|
|
1560
|
+
header_params = opts[:header_params] || {}
|
|
1561
|
+
# HTTP header 'Accept' (if needed)
|
|
1562
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1563
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1564
|
+
|
|
1565
|
+
# form parameters
|
|
1566
|
+
form_params = opts[:form_params] || {}
|
|
1567
|
+
|
|
1568
|
+
# http body (model)
|
|
1569
|
+
post_body = opts[:debug_body]
|
|
1570
|
+
|
|
1571
|
+
# return_type
|
|
1572
|
+
return_type = opts[:debug_return_type] || 'Folder'
|
|
1573
|
+
|
|
1574
|
+
# auth_names
|
|
1575
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1576
|
+
|
|
1577
|
+
new_options = opts.merge(
|
|
1578
|
+
:operation => :"Client.delete_folder",
|
|
1579
|
+
:header_params => header_params,
|
|
1580
|
+
:query_params => query_params,
|
|
1581
|
+
:form_params => form_params,
|
|
1582
|
+
:body => post_body,
|
|
1583
|
+
:auth_names => auth_names,
|
|
1584
|
+
:return_type => return_type
|
|
1585
|
+
)
|
|
1586
|
+
|
|
1587
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1588
|
+
if @api_client.config.debugging
|
|
1589
|
+
@api_client.config.logger.debug "API called: Client#delete_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1590
|
+
end
|
|
1591
|
+
return data, status_code, headers
|
|
1592
|
+
end
|
|
1593
|
+
|
|
1594
|
+
# Delete a template
|
|
1595
|
+
# Deletes a template's draft and all of its published versions, or one published version (`version`). Returns the template as it was before it was deleted.
|
|
1596
|
+
# @param template_id [String] The template's ID.
|
|
1597
|
+
# @param [Hash] opts the optional parameters
|
|
1598
|
+
# @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.
|
|
1599
|
+
# @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.
|
|
1600
|
+
# @return [Template]
|
|
1601
|
+
def delete_template(template_id, opts = {})
|
|
1602
|
+
data, _status_code, _headers = delete_template_with_http_info(template_id, opts)
|
|
1603
|
+
data
|
|
1604
|
+
end
|
|
1605
|
+
|
|
1606
|
+
# Delete a template
|
|
1607
|
+
# Deletes a template's draft and all of its published versions, or one published version (`version`). Returns the template as it was before it was deleted.
|
|
1608
|
+
# @param template_id [String] The template's ID.
|
|
1609
|
+
# @param [Hash] opts the optional parameters
|
|
1610
|
+
# @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.
|
|
1611
|
+
# @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.
|
|
1612
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
1613
|
+
def delete_template_with_http_info(template_id, opts = {})
|
|
1614
|
+
if @api_client.config.debugging
|
|
1615
|
+
@api_client.config.logger.debug 'Calling API: Client.delete_template ...'
|
|
1616
|
+
end
|
|
1617
|
+
# verify the required parameter 'template_id' is set
|
|
1618
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
1619
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.delete_template"
|
|
1620
|
+
end
|
|
1621
|
+
# resource path
|
|
1622
|
+
local_var_path = '/templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
1623
|
+
|
|
1624
|
+
# query parameters
|
|
1625
|
+
query_params = opts[:query_params] || {}
|
|
1626
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1627
|
+
|
|
1628
|
+
# header parameters
|
|
1629
|
+
header_params = opts[:header_params] || {}
|
|
1630
|
+
# HTTP header 'Accept' (if needed)
|
|
1631
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1632
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1633
|
+
|
|
1634
|
+
# form parameters
|
|
1635
|
+
form_params = opts[:form_params] || {}
|
|
1636
|
+
|
|
1637
|
+
# http body (model)
|
|
1638
|
+
post_body = opts[:debug_body]
|
|
1639
|
+
|
|
1640
|
+
# return_type
|
|
1641
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
1642
|
+
|
|
1643
|
+
# auth_names
|
|
1644
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1645
|
+
|
|
1646
|
+
new_options = opts.merge(
|
|
1647
|
+
:operation => :"Client.delete_template",
|
|
1648
|
+
:header_params => header_params,
|
|
1649
|
+
:query_params => query_params,
|
|
1650
|
+
:form_params => form_params,
|
|
1651
|
+
:body => post_body,
|
|
1652
|
+
:auth_names => auth_names,
|
|
1653
|
+
:return_type => return_type
|
|
1654
|
+
)
|
|
1655
|
+
|
|
1656
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1657
|
+
if @api_client.config.debugging
|
|
1658
|
+
@api_client.config.logger.debug "API called: Client#delete_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1659
|
+
end
|
|
1660
|
+
return data, status_code, headers
|
|
1661
|
+
end
|
|
1662
|
+
|
|
1663
|
+
# Delete a webhook
|
|
1664
|
+
# Deletes a webhook so it stops receiving events, and returns it.
|
|
1665
|
+
# @param webhook_id [String] The webhook's ID.
|
|
1666
|
+
# @param [Hash] opts the optional parameters
|
|
1667
|
+
# @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.
|
|
1668
|
+
# @return [Webhook]
|
|
1669
|
+
def delete_webhook(webhook_id, opts = {})
|
|
1670
|
+
data, _status_code, _headers = delete_webhook_with_http_info(webhook_id, opts)
|
|
1139
1671
|
data
|
|
1140
1672
|
end
|
|
1141
1673
|
|
|
@@ -1143,6 +1675,7 @@ end
|
|
|
1143
1675
|
# Deletes a webhook so it stops receiving events, and returns it.
|
|
1144
1676
|
# @param webhook_id [String] The webhook's ID.
|
|
1145
1677
|
# @param [Hash] opts the optional parameters
|
|
1678
|
+
# @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.
|
|
1146
1679
|
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
1147
1680
|
def delete_webhook_with_http_info(webhook_id, opts = {})
|
|
1148
1681
|
if @api_client.config.debugging
|
|
@@ -1162,6 +1695,7 @@ end
|
|
|
1162
1695
|
header_params = opts[:header_params] || {}
|
|
1163
1696
|
# HTTP header 'Accept' (if needed)
|
|
1164
1697
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1698
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1165
1699
|
|
|
1166
1700
|
# form parameters
|
|
1167
1701
|
form_params = opts[:form_params] || {}
|
|
@@ -1196,6 +1730,7 @@ end
|
|
|
1196
1730
|
# Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
1197
1731
|
# @param combined_pdf_id [String] The combined PDF's ID.
|
|
1198
1732
|
# @param [Hash] opts the optional parameters
|
|
1733
|
+
# @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.
|
|
1199
1734
|
# @return [CombinedPdf]
|
|
1200
1735
|
def expire_combined_pdf(combined_pdf_id, opts = {})
|
|
1201
1736
|
data, _status_code, _headers = expire_combined_pdf_with_http_info(combined_pdf_id, opts)
|
|
@@ -1206,6 +1741,7 @@ end
|
|
|
1206
1741
|
# Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
1207
1742
|
# @param combined_pdf_id [String] The combined PDF's ID.
|
|
1208
1743
|
# @param [Hash] opts the optional parameters
|
|
1744
|
+
# @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.
|
|
1209
1745
|
# @return [Array<(CombinedPdf, Integer, Hash)>] CombinedPdf data, response status code and response headers
|
|
1210
1746
|
def expire_combined_pdf_with_http_info(combined_pdf_id, opts = {})
|
|
1211
1747
|
if @api_client.config.debugging
|
|
@@ -1225,6 +1761,7 @@ end
|
|
|
1225
1761
|
header_params = opts[:header_params] || {}
|
|
1226
1762
|
# HTTP header 'Accept' (if needed)
|
|
1227
1763
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1764
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1228
1765
|
|
|
1229
1766
|
# form parameters
|
|
1230
1767
|
form_params = opts[:form_params] || {}
|
|
@@ -1259,6 +1796,7 @@ end
|
|
|
1259
1796
|
# Deletes a submission's data and PDF now, and returns the expired submission.
|
|
1260
1797
|
# @param submission_id [String] The submission's ID.
|
|
1261
1798
|
# @param [Hash] opts the optional parameters
|
|
1799
|
+
# @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.
|
|
1262
1800
|
# @return [Submission]
|
|
1263
1801
|
def expire_submission(submission_id, opts = {})
|
|
1264
1802
|
data, _status_code, _headers = expire_submission_with_http_info(submission_id, opts)
|
|
@@ -1269,6 +1807,7 @@ end
|
|
|
1269
1807
|
# Deletes a submission's data and PDF now, and returns the expired submission.
|
|
1270
1808
|
# @param submission_id [String] The submission's ID.
|
|
1271
1809
|
# @param [Hash] opts the optional parameters
|
|
1810
|
+
# @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.
|
|
1272
1811
|
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
1273
1812
|
def expire_submission_with_http_info(submission_id, opts = {})
|
|
1274
1813
|
if @api_client.config.debugging
|
|
@@ -1288,6 +1827,7 @@ end
|
|
|
1288
1827
|
header_params = opts[:header_params] || {}
|
|
1289
1828
|
# HTTP header 'Accept' (if needed)
|
|
1290
1829
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1830
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1291
1831
|
|
|
1292
1832
|
# form parameters
|
|
1293
1833
|
form_params = opts[:form_params] || {}
|
|
@@ -1324,6 +1864,7 @@ end
|
|
|
1324
1864
|
# @param body [GenerateSubmissionFilesRequest] The formats to make.
|
|
1325
1865
|
# @param [Hash] opts the optional parameters
|
|
1326
1866
|
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
1867
|
+
# @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.
|
|
1327
1868
|
# @return [Submission]
|
|
1328
1869
|
def generate_submission_files(submission_id, body, opts = {})
|
|
1329
1870
|
data, _status_code, _headers = generate_submission_files_with_http_info(submission_id, body, opts)
|
|
@@ -1336,6 +1877,7 @@ end
|
|
|
1336
1877
|
# @param body [GenerateSubmissionFilesRequest] The formats to make.
|
|
1337
1878
|
# @param [Hash] opts the optional parameters
|
|
1338
1879
|
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
1880
|
+
# @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.
|
|
1339
1881
|
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
1340
1882
|
def generate_submission_files_with_http_info(submission_id, body, opts = {})
|
|
1341
1883
|
if @api_client.config.debugging
|
|
@@ -1365,6 +1907,7 @@ end
|
|
|
1365
1907
|
if !content_type.nil?
|
|
1366
1908
|
header_params['Content-Type'] = content_type
|
|
1367
1909
|
end
|
|
1910
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1368
1911
|
|
|
1369
1912
|
# form parameters
|
|
1370
1913
|
form_params = opts[:form_params] || {}
|
|
@@ -1399,6 +1942,7 @@ end
|
|
|
1399
1942
|
# 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.
|
|
1400
1943
|
# @param submission_id [String] The submission's ID.
|
|
1401
1944
|
# @param [Hash] opts the optional parameters
|
|
1945
|
+
# @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.
|
|
1402
1946
|
# @return [Submission]
|
|
1403
1947
|
def generate_submission_preview(submission_id, opts = {})
|
|
1404
1948
|
data, _status_code, _headers = generate_submission_preview_with_http_info(submission_id, opts)
|
|
@@ -1409,6 +1953,7 @@ end
|
|
|
1409
1953
|
# 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.
|
|
1410
1954
|
# @param submission_id [String] The submission's ID.
|
|
1411
1955
|
# @param [Hash] opts the optional parameters
|
|
1956
|
+
# @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.
|
|
1412
1957
|
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
1413
1958
|
def generate_submission_preview_with_http_info(submission_id, opts = {})
|
|
1414
1959
|
if @api_client.config.debugging
|
|
@@ -1428,6 +1973,7 @@ end
|
|
|
1428
1973
|
header_params = opts[:header_params] || {}
|
|
1429
1974
|
# HTTP header 'Accept' (if needed)
|
|
1430
1975
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1976
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1431
1977
|
|
|
1432
1978
|
# form parameters
|
|
1433
1979
|
form_params = opts[:form_params] || {}
|
|
@@ -1458,31 +2004,31 @@ end
|
|
|
1458
2004
|
return data, status_code, headers
|
|
1459
2005
|
end
|
|
1460
2006
|
|
|
1461
|
-
# Get
|
|
1462
|
-
# Returns
|
|
1463
|
-
# @param
|
|
2007
|
+
# Get an account email action
|
|
2008
|
+
# Returns one of your account's email actions, with its settings and whether its emails are failing.
|
|
2009
|
+
# @param email_action_id [String] The account email action's ID.
|
|
1464
2010
|
# @param [Hash] opts the optional parameters
|
|
1465
|
-
# @return [
|
|
1466
|
-
def
|
|
1467
|
-
data, _status_code, _headers =
|
|
2011
|
+
# @return [EmailAction]
|
|
2012
|
+
def get_account_email_action(email_action_id, opts = {})
|
|
2013
|
+
data, _status_code, _headers = get_account_email_action_with_http_info(email_action_id, opts)
|
|
1468
2014
|
data
|
|
1469
2015
|
end
|
|
1470
2016
|
|
|
1471
|
-
# Get
|
|
1472
|
-
# Returns
|
|
1473
|
-
# @param
|
|
2017
|
+
# Get an account email action
|
|
2018
|
+
# Returns one of your account's email actions, with its settings and whether its emails are failing.
|
|
2019
|
+
# @param email_action_id [String] The account email action's ID.
|
|
1474
2020
|
# @param [Hash] opts the optional parameters
|
|
1475
|
-
# @return [Array<(
|
|
1476
|
-
def
|
|
2021
|
+
# @return [Array<(EmailAction, Integer, Hash)>] EmailAction data, response status code and response headers
|
|
2022
|
+
def get_account_email_action_with_http_info(email_action_id, opts = {})
|
|
1477
2023
|
if @api_client.config.debugging
|
|
1478
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
2024
|
+
@api_client.config.logger.debug 'Calling API: Client.get_account_email_action ...'
|
|
1479
2025
|
end
|
|
1480
|
-
# verify the required parameter '
|
|
1481
|
-
if @api_client.config.client_side_validation &&
|
|
1482
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2026
|
+
# verify the required parameter 'email_action_id' is set
|
|
2027
|
+
if @api_client.config.client_side_validation && email_action_id.nil?
|
|
2028
|
+
fail ArgumentError, "Missing the required parameter 'email_action_id' when calling Client.get_account_email_action"
|
|
1483
2029
|
end
|
|
1484
2030
|
# resource path
|
|
1485
|
-
local_var_path = '/
|
|
2031
|
+
local_var_path = '/email_actions/{email_action_id}'.sub('{email_action_id}', CGI.escape(email_action_id.to_s))
|
|
1486
2032
|
|
|
1487
2033
|
# query parameters
|
|
1488
2034
|
query_params = opts[:query_params] || {}
|
|
@@ -1499,13 +2045,13 @@ end
|
|
|
1499
2045
|
post_body = opts[:debug_body]
|
|
1500
2046
|
|
|
1501
2047
|
# return_type
|
|
1502
|
-
return_type = opts[:debug_return_type] || '
|
|
2048
|
+
return_type = opts[:debug_return_type] || 'EmailAction'
|
|
1503
2049
|
|
|
1504
2050
|
# auth_names
|
|
1505
2051
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1506
2052
|
|
|
1507
2053
|
new_options = opts.merge(
|
|
1508
|
-
:operation => :"Client.
|
|
2054
|
+
:operation => :"Client.get_account_email_action",
|
|
1509
2055
|
:header_params => header_params,
|
|
1510
2056
|
:query_params => query_params,
|
|
1511
2057
|
:form_params => form_params,
|
|
@@ -1516,12 +2062,75 @@ end
|
|
|
1516
2062
|
|
|
1517
2063
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1518
2064
|
if @api_client.config.debugging
|
|
1519
|
-
@api_client.config.logger.debug "API called: Client#
|
|
2065
|
+
@api_client.config.logger.debug "API called: Client#get_account_email_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1520
2066
|
end
|
|
1521
2067
|
return data, status_code, headers
|
|
1522
2068
|
end
|
|
1523
2069
|
|
|
1524
|
-
# Get a
|
|
2070
|
+
# Get a combined PDF
|
|
2071
|
+
# Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
2072
|
+
# @param combined_pdf_id [String] The combined PDF's ID.
|
|
2073
|
+
# @param [Hash] opts the optional parameters
|
|
2074
|
+
# @return [CombinedPdf]
|
|
2075
|
+
def get_combined_pdf(combined_pdf_id, opts = {})
|
|
2076
|
+
data, _status_code, _headers = get_combined_pdf_with_http_info(combined_pdf_id, opts)
|
|
2077
|
+
data
|
|
2078
|
+
end
|
|
2079
|
+
|
|
2080
|
+
# Get a combined PDF
|
|
2081
|
+
# Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
2082
|
+
# @param combined_pdf_id [String] The combined PDF's ID.
|
|
2083
|
+
# @param [Hash] opts the optional parameters
|
|
2084
|
+
# @return [Array<(CombinedPdf, Integer, Hash)>] CombinedPdf data, response status code and response headers
|
|
2085
|
+
def get_combined_pdf_with_http_info(combined_pdf_id, opts = {})
|
|
2086
|
+
if @api_client.config.debugging
|
|
2087
|
+
@api_client.config.logger.debug 'Calling API: Client.get_combined_pdf ...'
|
|
2088
|
+
end
|
|
2089
|
+
# verify the required parameter 'combined_pdf_id' is set
|
|
2090
|
+
if @api_client.config.client_side_validation && combined_pdf_id.nil?
|
|
2091
|
+
fail ArgumentError, "Missing the required parameter 'combined_pdf_id' when calling Client.get_combined_pdf"
|
|
2092
|
+
end
|
|
2093
|
+
# resource path
|
|
2094
|
+
local_var_path = '/combined_pdfs/{combined_pdf_id}'.sub('{combined_pdf_id}', CGI.escape(combined_pdf_id.to_s))
|
|
2095
|
+
|
|
2096
|
+
# query parameters
|
|
2097
|
+
query_params = opts[:query_params] || {}
|
|
2098
|
+
|
|
2099
|
+
# header parameters
|
|
2100
|
+
header_params = opts[:header_params] || {}
|
|
2101
|
+
# HTTP header 'Accept' (if needed)
|
|
2102
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2103
|
+
|
|
2104
|
+
# form parameters
|
|
2105
|
+
form_params = opts[:form_params] || {}
|
|
2106
|
+
|
|
2107
|
+
# http body (model)
|
|
2108
|
+
post_body = opts[:debug_body]
|
|
2109
|
+
|
|
2110
|
+
# return_type
|
|
2111
|
+
return_type = opts[:debug_return_type] || 'CombinedPdf'
|
|
2112
|
+
|
|
2113
|
+
# auth_names
|
|
2114
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2115
|
+
|
|
2116
|
+
new_options = opts.merge(
|
|
2117
|
+
:operation => :"Client.get_combined_pdf",
|
|
2118
|
+
:header_params => header_params,
|
|
2119
|
+
:query_params => query_params,
|
|
2120
|
+
:form_params => form_params,
|
|
2121
|
+
:body => post_body,
|
|
2122
|
+
:auth_names => auth_names,
|
|
2123
|
+
:return_type => return_type
|
|
2124
|
+
)
|
|
2125
|
+
|
|
2126
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2127
|
+
if @api_client.config.debugging
|
|
2128
|
+
@api_client.config.logger.debug "API called: Client#get_combined_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2129
|
+
end
|
|
2130
|
+
return data, status_code, headers
|
|
2131
|
+
end
|
|
2132
|
+
|
|
2133
|
+
# Get a custom file
|
|
1525
2134
|
# Returns a custom file, with a temporary URL to download it.
|
|
1526
2135
|
# @param custom_file_id [String] The custom file's ID.
|
|
1527
2136
|
# @param [Hash] opts the optional parameters
|
|
@@ -1584,6 +2193,138 @@ end
|
|
|
1584
2193
|
return data, status_code, headers
|
|
1585
2194
|
end
|
|
1586
2195
|
|
|
2196
|
+
# Get an email action
|
|
2197
|
+
# Returns one of a template's email actions, with its settings and whether its emails are failing.
|
|
2198
|
+
# @param template_id [String] The template's ID.
|
|
2199
|
+
# @param email_action_id [String] The email action's ID.
|
|
2200
|
+
# @param [Hash] opts the optional parameters
|
|
2201
|
+
# @return [EmailAction]
|
|
2202
|
+
def get_email_action(template_id, email_action_id, opts = {})
|
|
2203
|
+
data, _status_code, _headers = get_email_action_with_http_info(template_id, email_action_id, opts)
|
|
2204
|
+
data
|
|
2205
|
+
end
|
|
2206
|
+
|
|
2207
|
+
# Get an email action
|
|
2208
|
+
# Returns one of a template's email actions, with its settings and whether its emails are failing.
|
|
2209
|
+
# @param template_id [String] The template's ID.
|
|
2210
|
+
# @param email_action_id [String] The email action's ID.
|
|
2211
|
+
# @param [Hash] opts the optional parameters
|
|
2212
|
+
# @return [Array<(EmailAction, Integer, Hash)>] EmailAction data, response status code and response headers
|
|
2213
|
+
def get_email_action_with_http_info(template_id, email_action_id, opts = {})
|
|
2214
|
+
if @api_client.config.debugging
|
|
2215
|
+
@api_client.config.logger.debug 'Calling API: Client.get_email_action ...'
|
|
2216
|
+
end
|
|
2217
|
+
# verify the required parameter 'template_id' is set
|
|
2218
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
2219
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.get_email_action"
|
|
2220
|
+
end
|
|
2221
|
+
# verify the required parameter 'email_action_id' is set
|
|
2222
|
+
if @api_client.config.client_side_validation && email_action_id.nil?
|
|
2223
|
+
fail ArgumentError, "Missing the required parameter 'email_action_id' when calling Client.get_email_action"
|
|
2224
|
+
end
|
|
2225
|
+
# resource path
|
|
2226
|
+
local_var_path = '/templates/{template_id}/email_actions/{email_action_id}'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{email_action_id}', CGI.escape(email_action_id.to_s))
|
|
2227
|
+
|
|
2228
|
+
# query parameters
|
|
2229
|
+
query_params = opts[:query_params] || {}
|
|
2230
|
+
|
|
2231
|
+
# header parameters
|
|
2232
|
+
header_params = opts[:header_params] || {}
|
|
2233
|
+
# HTTP header 'Accept' (if needed)
|
|
2234
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2235
|
+
|
|
2236
|
+
# form parameters
|
|
2237
|
+
form_params = opts[:form_params] || {}
|
|
2238
|
+
|
|
2239
|
+
# http body (model)
|
|
2240
|
+
post_body = opts[:debug_body]
|
|
2241
|
+
|
|
2242
|
+
# return_type
|
|
2243
|
+
return_type = opts[:debug_return_type] || 'EmailAction'
|
|
2244
|
+
|
|
2245
|
+
# auth_names
|
|
2246
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2247
|
+
|
|
2248
|
+
new_options = opts.merge(
|
|
2249
|
+
:operation => :"Client.get_email_action",
|
|
2250
|
+
:header_params => header_params,
|
|
2251
|
+
:query_params => query_params,
|
|
2252
|
+
:form_params => form_params,
|
|
2253
|
+
:body => post_body,
|
|
2254
|
+
:auth_names => auth_names,
|
|
2255
|
+
:return_type => return_type
|
|
2256
|
+
)
|
|
2257
|
+
|
|
2258
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2259
|
+
if @api_client.config.debugging
|
|
2260
|
+
@api_client.config.logger.debug "API called: Client#get_email_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2261
|
+
end
|
|
2262
|
+
return data, status_code, headers
|
|
2263
|
+
end
|
|
2264
|
+
|
|
2265
|
+
# Get an email domain
|
|
2266
|
+
# Returns an email domain, whether it's verified, and the DNS records to add to it.
|
|
2267
|
+
# @param email_domain_id [String] The email domain's ID.
|
|
2268
|
+
# @param [Hash] opts the optional parameters
|
|
2269
|
+
# @return [EmailDomain]
|
|
2270
|
+
def get_email_domain(email_domain_id, opts = {})
|
|
2271
|
+
data, _status_code, _headers = get_email_domain_with_http_info(email_domain_id, opts)
|
|
2272
|
+
data
|
|
2273
|
+
end
|
|
2274
|
+
|
|
2275
|
+
# Get an email domain
|
|
2276
|
+
# Returns an email domain, whether it's verified, and the DNS records to add to it.
|
|
2277
|
+
# @param email_domain_id [String] The email domain's ID.
|
|
2278
|
+
# @param [Hash] opts the optional parameters
|
|
2279
|
+
# @return [Array<(EmailDomain, Integer, Hash)>] EmailDomain data, response status code and response headers
|
|
2280
|
+
def get_email_domain_with_http_info(email_domain_id, opts = {})
|
|
2281
|
+
if @api_client.config.debugging
|
|
2282
|
+
@api_client.config.logger.debug 'Calling API: Client.get_email_domain ...'
|
|
2283
|
+
end
|
|
2284
|
+
# verify the required parameter 'email_domain_id' is set
|
|
2285
|
+
if @api_client.config.client_side_validation && email_domain_id.nil?
|
|
2286
|
+
fail ArgumentError, "Missing the required parameter 'email_domain_id' when calling Client.get_email_domain"
|
|
2287
|
+
end
|
|
2288
|
+
# resource path
|
|
2289
|
+
local_var_path = '/email_domains/{email_domain_id}'.sub('{email_domain_id}', CGI.escape(email_domain_id.to_s))
|
|
2290
|
+
|
|
2291
|
+
# query parameters
|
|
2292
|
+
query_params = opts[:query_params] || {}
|
|
2293
|
+
|
|
2294
|
+
# header parameters
|
|
2295
|
+
header_params = opts[:header_params] || {}
|
|
2296
|
+
# HTTP header 'Accept' (if needed)
|
|
2297
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2298
|
+
|
|
2299
|
+
# form parameters
|
|
2300
|
+
form_params = opts[:form_params] || {}
|
|
2301
|
+
|
|
2302
|
+
# http body (model)
|
|
2303
|
+
post_body = opts[:debug_body]
|
|
2304
|
+
|
|
2305
|
+
# return_type
|
|
2306
|
+
return_type = opts[:debug_return_type] || 'EmailDomain'
|
|
2307
|
+
|
|
2308
|
+
# auth_names
|
|
2309
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2310
|
+
|
|
2311
|
+
new_options = opts.merge(
|
|
2312
|
+
:operation => :"Client.get_email_domain",
|
|
2313
|
+
:header_params => header_params,
|
|
2314
|
+
:query_params => query_params,
|
|
2315
|
+
:form_params => form_params,
|
|
2316
|
+
:body => post_body,
|
|
2317
|
+
:auth_names => auth_names,
|
|
2318
|
+
:return_type => return_type
|
|
2319
|
+
)
|
|
2320
|
+
|
|
2321
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2322
|
+
if @api_client.config.debugging
|
|
2323
|
+
@api_client.config.logger.debug "API called: Client#get_email_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2324
|
+
end
|
|
2325
|
+
return data, status_code, headers
|
|
2326
|
+
end
|
|
2327
|
+
|
|
1587
2328
|
# Get a folder
|
|
1588
2329
|
# Returns a folder.
|
|
1589
2330
|
# @param folder_id [String] The folder's ID.
|
|
@@ -1900,7 +2641,7 @@ end
|
|
|
1900
2641
|
# Returns a template: its draft, or one of its published versions.
|
|
1901
2642
|
# @param template_id [String] The template's ID.
|
|
1902
2643
|
# @param [Hash] opts the optional parameters
|
|
1903
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2644
|
+
# @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`.
|
|
1904
2645
|
# @return [Template]
|
|
1905
2646
|
def get_template(template_id, opts = {})
|
|
1906
2647
|
data, _status_code, _headers = get_template_with_http_info(template_id, opts)
|
|
@@ -1911,7 +2652,7 @@ end
|
|
|
1911
2652
|
# Returns a template: its draft, or one of its published versions.
|
|
1912
2653
|
# @param template_id [String] The template's ID.
|
|
1913
2654
|
# @param [Hash] opts the optional parameters
|
|
1914
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2655
|
+
# @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`.
|
|
1915
2656
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
1916
2657
|
def get_template_with_http_info(template_id, opts = {})
|
|
1917
2658
|
if @api_client.config.debugging
|
|
@@ -1966,7 +2707,7 @@ end
|
|
|
1966
2707
|
# 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.
|
|
1967
2708
|
# @param template_id [String] The template's ID.
|
|
1968
2709
|
# @param [Hash] opts the optional parameters
|
|
1969
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2710
|
+
# @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`.
|
|
1970
2711
|
# @return [TemplateDiff]
|
|
1971
2712
|
def get_template_diff(template_id, opts = {})
|
|
1972
2713
|
data, _status_code, _headers = get_template_diff_with_http_info(template_id, opts)
|
|
@@ -1977,7 +2718,7 @@ end
|
|
|
1977
2718
|
# 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.
|
|
1978
2719
|
# @param template_id [String] The template's ID.
|
|
1979
2720
|
# @param [Hash] opts the optional parameters
|
|
1980
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2721
|
+
# @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`.
|
|
1981
2722
|
# @return [Array<(TemplateDiff, Integer, Hash)>] TemplateDiff data, response status code and response headers
|
|
1982
2723
|
def get_template_diff_with_http_info(template_id, opts = {})
|
|
1983
2724
|
if @api_client.config.debugging
|
|
@@ -2033,7 +2774,7 @@ end
|
|
|
2033
2774
|
# @param template_id [String] The template's ID.
|
|
2034
2775
|
# @param lang [ModelCodeLanguage] The language to generate the code in.
|
|
2035
2776
|
# @param [Hash] opts the optional parameters
|
|
2036
|
-
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
2777
|
+
# @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.
|
|
2037
2778
|
# @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.
|
|
2038
2779
|
# @return [TemplateModelCode]
|
|
2039
2780
|
def get_template_model_code(template_id, lang, opts = {})
|
|
@@ -2046,7 +2787,7 @@ end
|
|
|
2046
2787
|
# @param template_id [String] The template's ID.
|
|
2047
2788
|
# @param lang [ModelCodeLanguage] The language to generate the code in.
|
|
2048
2789
|
# @param [Hash] opts the optional parameters
|
|
2049
|
-
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
2790
|
+
# @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.
|
|
2050
2791
|
# @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.
|
|
2051
2792
|
# @return [Array<(TemplateModelCode, Integer, Hash)>] TemplateModelCode data, response status code and response headers
|
|
2052
2793
|
def get_template_model_code_with_http_info(template_id, lang, opts = {})
|
|
@@ -2108,7 +2849,7 @@ end
|
|
|
2108
2849
|
# 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.
|
|
2109
2850
|
# @param template_id [String] The template's ID.
|
|
2110
2851
|
# @param [Hash] opts the optional parameters
|
|
2111
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2852
|
+
# @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`.
|
|
2112
2853
|
# @return [TemplatePageImages]
|
|
2113
2854
|
def get_template_page_images(template_id, opts = {})
|
|
2114
2855
|
data, _status_code, _headers = get_template_page_images_with_http_info(template_id, opts)
|
|
@@ -2119,7 +2860,7 @@ end
|
|
|
2119
2860
|
# 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.
|
|
2120
2861
|
# @param template_id [String] The template's ID.
|
|
2121
2862
|
# @param [Hash] opts the optional parameters
|
|
2122
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2863
|
+
# @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`.
|
|
2123
2864
|
# @return [Array<(TemplatePageImages, Integer, Hash)>] TemplatePageImages data, response status code and response headers
|
|
2124
2865
|
def get_template_page_images_with_http_info(template_id, opts = {})
|
|
2125
2866
|
if @api_client.config.debugging
|
|
@@ -2243,7 +2984,7 @@ end
|
|
|
2243
2984
|
# 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.
|
|
2244
2985
|
# @param template_id [String] The template's ID.
|
|
2245
2986
|
# @param [Hash] opts the optional parameters
|
|
2246
|
-
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
2987
|
+
# @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.
|
|
2247
2988
|
# @return [Hash<String, Object>]
|
|
2248
2989
|
def get_template_schema(template_id, opts = {})
|
|
2249
2990
|
data, _status_code, _headers = get_template_schema_with_http_info(template_id, opts)
|
|
@@ -2254,7 +2995,7 @@ end
|
|
|
2254
2995
|
# 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.
|
|
2255
2996
|
# @param template_id [String] The template's ID.
|
|
2256
2997
|
# @param [Hash] opts the optional parameters
|
|
2257
|
-
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
2998
|
+
# @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.
|
|
2258
2999
|
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
2259
3000
|
def get_template_schema_with_http_info(template_id, opts = {})
|
|
2260
3001
|
if @api_client.config.debugging
|
|
@@ -2368,6 +3109,69 @@ end
|
|
|
2368
3109
|
return data, status_code, headers
|
|
2369
3110
|
end
|
|
2370
3111
|
|
|
3112
|
+
# List account email actions
|
|
3113
|
+
# 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`).
|
|
3114
|
+
# @param [Hash] opts the optional parameters
|
|
3115
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
3116
|
+
# @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.
|
|
3117
|
+
# @return [EmailActionList]
|
|
3118
|
+
def list_account_email_actions(opts = {})
|
|
3119
|
+
data, _status_code, _headers = list_account_email_actions_with_http_info(opts)
|
|
3120
|
+
data
|
|
3121
|
+
end
|
|
3122
|
+
|
|
3123
|
+
# List account email actions
|
|
3124
|
+
# 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`).
|
|
3125
|
+
# @param [Hash] opts the optional parameters
|
|
3126
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
3127
|
+
# @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.
|
|
3128
|
+
# @return [Array<(EmailActionList, Integer, Hash)>] EmailActionList data, response status code and response headers
|
|
3129
|
+
def list_account_email_actions_with_http_info(opts = {})
|
|
3130
|
+
if @api_client.config.debugging
|
|
3131
|
+
@api_client.config.logger.debug 'Calling API: Client.list_account_email_actions ...'
|
|
3132
|
+
end
|
|
3133
|
+
# resource path
|
|
3134
|
+
local_var_path = '/email_actions'
|
|
3135
|
+
|
|
3136
|
+
# query parameters
|
|
3137
|
+
query_params = opts[:query_params] || {}
|
|
3138
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3139
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
3140
|
+
|
|
3141
|
+
# header parameters
|
|
3142
|
+
header_params = opts[:header_params] || {}
|
|
3143
|
+
# HTTP header 'Accept' (if needed)
|
|
3144
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3145
|
+
|
|
3146
|
+
# form parameters
|
|
3147
|
+
form_params = opts[:form_params] || {}
|
|
3148
|
+
|
|
3149
|
+
# http body (model)
|
|
3150
|
+
post_body = opts[:debug_body]
|
|
3151
|
+
|
|
3152
|
+
# return_type
|
|
3153
|
+
return_type = opts[:debug_return_type] || 'EmailActionList'
|
|
3154
|
+
|
|
3155
|
+
# auth_names
|
|
3156
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3157
|
+
|
|
3158
|
+
new_options = opts.merge(
|
|
3159
|
+
:operation => :"Client.list_account_email_actions",
|
|
3160
|
+
:header_params => header_params,
|
|
3161
|
+
:query_params => query_params,
|
|
3162
|
+
:form_params => form_params,
|
|
3163
|
+
:body => post_body,
|
|
3164
|
+
:auth_names => auth_names,
|
|
3165
|
+
:return_type => return_type
|
|
3166
|
+
)
|
|
3167
|
+
|
|
3168
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3169
|
+
if @api_client.config.debugging
|
|
3170
|
+
@api_client.config.logger.debug "API called: Client#list_account_email_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3171
|
+
end
|
|
3172
|
+
return data, status_code, headers
|
|
3173
|
+
end
|
|
3174
|
+
|
|
2371
3175
|
# List combined PDFs
|
|
2372
3176
|
# Returns the combined PDFs in your account, newest first, one page at a time.
|
|
2373
3177
|
# @param [Hash] opts the optional parameters
|
|
@@ -2494,35 +3298,38 @@ end
|
|
|
2494
3298
|
return data, status_code, headers
|
|
2495
3299
|
end
|
|
2496
3300
|
|
|
2497
|
-
# List
|
|
2498
|
-
# Returns the
|
|
3301
|
+
# List email actions
|
|
3302
|
+
# 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`.
|
|
3303
|
+
# @param template_id [String] The template's ID.
|
|
2499
3304
|
# @param [Hash] opts the optional parameters
|
|
2500
|
-
# @option opts [String] :parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
2501
3305
|
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2502
3306
|
# @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.
|
|
2503
|
-
# @return [
|
|
2504
|
-
def
|
|
2505
|
-
data, _status_code, _headers =
|
|
3307
|
+
# @return [EmailActionList]
|
|
3308
|
+
def list_email_actions(template_id, opts = {})
|
|
3309
|
+
data, _status_code, _headers = list_email_actions_with_http_info(template_id, opts)
|
|
2506
3310
|
data
|
|
2507
3311
|
end
|
|
2508
3312
|
|
|
2509
|
-
# List
|
|
2510
|
-
# Returns the
|
|
3313
|
+
# List email actions
|
|
3314
|
+
# 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`.
|
|
3315
|
+
# @param template_id [String] The template's ID.
|
|
2511
3316
|
# @param [Hash] opts the optional parameters
|
|
2512
|
-
# @option opts [String] :parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
2513
3317
|
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2514
3318
|
# @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.
|
|
2515
|
-
# @return [Array<(
|
|
2516
|
-
def
|
|
3319
|
+
# @return [Array<(EmailActionList, Integer, Hash)>] EmailActionList data, response status code and response headers
|
|
3320
|
+
def list_email_actions_with_http_info(template_id, opts = {})
|
|
2517
3321
|
if @api_client.config.debugging
|
|
2518
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
3322
|
+
@api_client.config.logger.debug 'Calling API: Client.list_email_actions ...'
|
|
3323
|
+
end
|
|
3324
|
+
# verify the required parameter 'template_id' is set
|
|
3325
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
3326
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.list_email_actions"
|
|
2519
3327
|
end
|
|
2520
3328
|
# resource path
|
|
2521
|
-
local_var_path = '/
|
|
3329
|
+
local_var_path = '/templates/{template_id}/email_actions'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
2522
3330
|
|
|
2523
3331
|
# query parameters
|
|
2524
3332
|
query_params = opts[:query_params] || {}
|
|
2525
|
-
query_params[:'parent_folder_id'] = opts[:'parent_folder_id'] if !opts[:'parent_folder_id'].nil?
|
|
2526
3333
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2527
3334
|
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2528
3335
|
|
|
@@ -2538,13 +3345,13 @@ end
|
|
|
2538
3345
|
post_body = opts[:debug_body]
|
|
2539
3346
|
|
|
2540
3347
|
# return_type
|
|
2541
|
-
return_type = opts[:debug_return_type] || '
|
|
3348
|
+
return_type = opts[:debug_return_type] || 'EmailActionList'
|
|
2542
3349
|
|
|
2543
3350
|
# auth_names
|
|
2544
3351
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2545
3352
|
|
|
2546
3353
|
new_options = opts.merge(
|
|
2547
|
-
:operation => :"Client.
|
|
3354
|
+
:operation => :"Client.list_email_actions",
|
|
2548
3355
|
:header_params => header_params,
|
|
2549
3356
|
:query_params => query_params,
|
|
2550
3357
|
:form_params => form_params,
|
|
@@ -2555,54 +3362,183 @@ end
|
|
|
2555
3362
|
|
|
2556
3363
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2557
3364
|
if @api_client.config.debugging
|
|
2558
|
-
@api_client.config.logger.debug "API called: Client#
|
|
3365
|
+
@api_client.config.logger.debug "API called: Client#list_email_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2559
3366
|
end
|
|
2560
3367
|
return data, status_code, headers
|
|
2561
3368
|
end
|
|
2562
3369
|
|
|
2563
|
-
# List
|
|
2564
|
-
# Returns the
|
|
3370
|
+
# List email domains
|
|
3371
|
+
# Returns the domains in your account that email actions can send from once they're verified, newest first, one page at a time.
|
|
2565
3372
|
# @param [Hash] opts the optional parameters
|
|
2566
|
-
# @option opts [String] :template_id Only list this template's submissions.
|
|
2567
|
-
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
2568
|
-
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
2569
|
-
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
2570
|
-
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
2571
3373
|
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2572
3374
|
# @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.
|
|
2573
|
-
# @
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
def list_submissions(opts = {})
|
|
2577
|
-
data, _status_code, _headers = list_submissions_with_http_info(opts)
|
|
3375
|
+
# @return [EmailDomainList]
|
|
3376
|
+
def list_email_domains(opts = {})
|
|
3377
|
+
data, _status_code, _headers = list_email_domains_with_http_info(opts)
|
|
2578
3378
|
data
|
|
2579
3379
|
end
|
|
2580
3380
|
|
|
2581
|
-
# List
|
|
2582
|
-
# Returns the
|
|
3381
|
+
# List email domains
|
|
3382
|
+
# Returns the domains in your account that email actions can send from once they're verified, newest first, one page at a time.
|
|
2583
3383
|
# @param [Hash] opts the optional parameters
|
|
2584
|
-
# @option opts [String] :template_id Only list this template's submissions.
|
|
2585
|
-
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
2586
|
-
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
2587
|
-
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
2588
|
-
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
2589
3384
|
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2590
3385
|
# @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.
|
|
2591
|
-
# @
|
|
2592
|
-
|
|
2593
|
-
# @return [Array<(SubmissionList, Integer, Hash)>] SubmissionList data, response status code and response headers
|
|
2594
|
-
def list_submissions_with_http_info(opts = {})
|
|
3386
|
+
# @return [Array<(EmailDomainList, Integer, Hash)>] EmailDomainList data, response status code and response headers
|
|
3387
|
+
def list_email_domains_with_http_info(opts = {})
|
|
2595
3388
|
if @api_client.config.debugging
|
|
2596
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
3389
|
+
@api_client.config.logger.debug 'Calling API: Client.list_email_domains ...'
|
|
2597
3390
|
end
|
|
2598
3391
|
# resource path
|
|
2599
|
-
local_var_path = '/
|
|
3392
|
+
local_var_path = '/email_domains'
|
|
2600
3393
|
|
|
2601
3394
|
# query parameters
|
|
2602
3395
|
query_params = opts[:query_params] || {}
|
|
2603
|
-
query_params[:'
|
|
2604
|
-
query_params[:'
|
|
2605
|
-
|
|
3396
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3397
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
3398
|
+
|
|
3399
|
+
# header parameters
|
|
3400
|
+
header_params = opts[:header_params] || {}
|
|
3401
|
+
# HTTP header 'Accept' (if needed)
|
|
3402
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3403
|
+
|
|
3404
|
+
# form parameters
|
|
3405
|
+
form_params = opts[:form_params] || {}
|
|
3406
|
+
|
|
3407
|
+
# http body (model)
|
|
3408
|
+
post_body = opts[:debug_body]
|
|
3409
|
+
|
|
3410
|
+
# return_type
|
|
3411
|
+
return_type = opts[:debug_return_type] || 'EmailDomainList'
|
|
3412
|
+
|
|
3413
|
+
# auth_names
|
|
3414
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3415
|
+
|
|
3416
|
+
new_options = opts.merge(
|
|
3417
|
+
:operation => :"Client.list_email_domains",
|
|
3418
|
+
:header_params => header_params,
|
|
3419
|
+
:query_params => query_params,
|
|
3420
|
+
:form_params => form_params,
|
|
3421
|
+
:body => post_body,
|
|
3422
|
+
:auth_names => auth_names,
|
|
3423
|
+
:return_type => return_type
|
|
3424
|
+
)
|
|
3425
|
+
|
|
3426
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3427
|
+
if @api_client.config.debugging
|
|
3428
|
+
@api_client.config.logger.debug "API called: Client#list_email_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3429
|
+
end
|
|
3430
|
+
return data, status_code, headers
|
|
3431
|
+
end
|
|
3432
|
+
|
|
3433
|
+
# List folders
|
|
3434
|
+
# Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
3435
|
+
# @param [Hash] opts the optional parameters
|
|
3436
|
+
# @option opts [String] :parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
3437
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
3438
|
+
# @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.
|
|
3439
|
+
# @return [FolderList]
|
|
3440
|
+
def list_folders(opts = {})
|
|
3441
|
+
data, _status_code, _headers = list_folders_with_http_info(opts)
|
|
3442
|
+
data
|
|
3443
|
+
end
|
|
3444
|
+
|
|
3445
|
+
# List folders
|
|
3446
|
+
# Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
3447
|
+
# @param [Hash] opts the optional parameters
|
|
3448
|
+
# @option opts [String] :parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
3449
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
3450
|
+
# @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.
|
|
3451
|
+
# @return [Array<(FolderList, Integer, Hash)>] FolderList data, response status code and response headers
|
|
3452
|
+
def list_folders_with_http_info(opts = {})
|
|
3453
|
+
if @api_client.config.debugging
|
|
3454
|
+
@api_client.config.logger.debug 'Calling API: Client.list_folders ...'
|
|
3455
|
+
end
|
|
3456
|
+
# resource path
|
|
3457
|
+
local_var_path = '/folders'
|
|
3458
|
+
|
|
3459
|
+
# query parameters
|
|
3460
|
+
query_params = opts[:query_params] || {}
|
|
3461
|
+
query_params[:'parent_folder_id'] = opts[:'parent_folder_id'] if !opts[:'parent_folder_id'].nil?
|
|
3462
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3463
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
3464
|
+
|
|
3465
|
+
# header parameters
|
|
3466
|
+
header_params = opts[:header_params] || {}
|
|
3467
|
+
# HTTP header 'Accept' (if needed)
|
|
3468
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3469
|
+
|
|
3470
|
+
# form parameters
|
|
3471
|
+
form_params = opts[:form_params] || {}
|
|
3472
|
+
|
|
3473
|
+
# http body (model)
|
|
3474
|
+
post_body = opts[:debug_body]
|
|
3475
|
+
|
|
3476
|
+
# return_type
|
|
3477
|
+
return_type = opts[:debug_return_type] || 'FolderList'
|
|
3478
|
+
|
|
3479
|
+
# auth_names
|
|
3480
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3481
|
+
|
|
3482
|
+
new_options = opts.merge(
|
|
3483
|
+
:operation => :"Client.list_folders",
|
|
3484
|
+
:header_params => header_params,
|
|
3485
|
+
:query_params => query_params,
|
|
3486
|
+
:form_params => form_params,
|
|
3487
|
+
:body => post_body,
|
|
3488
|
+
:auth_names => auth_names,
|
|
3489
|
+
:return_type => return_type
|
|
3490
|
+
)
|
|
3491
|
+
|
|
3492
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3493
|
+
if @api_client.config.debugging
|
|
3494
|
+
@api_client.config.logger.debug "API called: Client#list_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3495
|
+
end
|
|
3496
|
+
return data, status_code, headers
|
|
3497
|
+
end
|
|
3498
|
+
|
|
3499
|
+
# List submissions
|
|
3500
|
+
# Returns the submissions in your account, newest first, one page at a time. Each one is a summary: its `data` is null unless you pass `include_data=true`, and its `files` are empty unless you pass `include_files=true`. Get a submission by its ID for its signature requests, uploads and page images.
|
|
3501
|
+
# @param [Hash] opts the optional parameters
|
|
3502
|
+
# @option opts [String] :template_id Only list this template's submissions.
|
|
3503
|
+
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
3504
|
+
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
3505
|
+
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
3506
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
3507
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
3508
|
+
# @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.
|
|
3509
|
+
# @option opts [SubmissionState] :state Only list submissions in this state (one state per request). The ones that failed are `invalid_data`, `error`, `syntax_error`, `image_download_failed` and `image_processing_failed`, and one still `pending` an hour after it was created is stuck.
|
|
3510
|
+
# @option opts [Boolean] :include_files Include each submission's generated files and their download links (`files`, empty without it), without the page images' links.
|
|
3511
|
+
# @return [SubmissionList]
|
|
3512
|
+
def list_submissions(opts = {})
|
|
3513
|
+
data, _status_code, _headers = list_submissions_with_http_info(opts)
|
|
3514
|
+
data
|
|
3515
|
+
end
|
|
3516
|
+
|
|
3517
|
+
# List submissions
|
|
3518
|
+
# Returns the submissions in your account, newest first, one page at a time. Each one is a summary: its `data` is null unless you pass `include_data=true`, and its `files` are empty unless you pass `include_files=true`. Get a submission by its ID for its signature requests, uploads and page images.
|
|
3519
|
+
# @param [Hash] opts the optional parameters
|
|
3520
|
+
# @option opts [String] :template_id Only list this template's submissions.
|
|
3521
|
+
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
3522
|
+
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
3523
|
+
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
3524
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
3525
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
3526
|
+
# @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.
|
|
3527
|
+
# @option opts [SubmissionState] :state Only list submissions in this state (one state per request). The ones that failed are `invalid_data`, `error`, `syntax_error`, `image_download_failed` and `image_processing_failed`, and one still `pending` an hour after it was created is stuck.
|
|
3528
|
+
# @option opts [Boolean] :include_files Include each submission's generated files and their download links (`files`, empty without it), without the page images' links.
|
|
3529
|
+
# @return [Array<(SubmissionList, Integer, Hash)>] SubmissionList data, response status code and response headers
|
|
3530
|
+
def list_submissions_with_http_info(opts = {})
|
|
3531
|
+
if @api_client.config.debugging
|
|
3532
|
+
@api_client.config.logger.debug 'Calling API: Client.list_submissions ...'
|
|
3533
|
+
end
|
|
3534
|
+
# resource path
|
|
3535
|
+
local_var_path = '/submissions'
|
|
3536
|
+
|
|
3537
|
+
# query parameters
|
|
3538
|
+
query_params = opts[:query_params] || {}
|
|
3539
|
+
query_params[:'template_id'] = opts[:'template_id'] if !opts[:'template_id'].nil?
|
|
3540
|
+
query_params[:'test'] = opts[:'test'] if !opts[:'test'].nil?
|
|
3541
|
+
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
|
2606
3542
|
query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
|
2607
3543
|
query_params[:'include_data'] = opts[:'include_data'] if !opts[:'include_data'].nil?
|
|
2608
3544
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
@@ -2648,7 +3584,7 @@ end
|
|
|
2648
3584
|
# 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.
|
|
2649
3585
|
# @param template_id [String] The template's ID.
|
|
2650
3586
|
# @param [Hash] opts the optional parameters
|
|
2651
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
3587
|
+
# @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`.
|
|
2652
3588
|
# @return [TemplateFields]
|
|
2653
3589
|
def list_template_fields(template_id, opts = {})
|
|
2654
3590
|
data, _status_code, _headers = list_template_fields_with_http_info(template_id, opts)
|
|
@@ -2659,7 +3595,7 @@ end
|
|
|
2659
3595
|
# 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.
|
|
2660
3596
|
# @param template_id [String] The template's ID.
|
|
2661
3597
|
# @param [Hash] opts the optional parameters
|
|
2662
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
3598
|
+
# @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`.
|
|
2663
3599
|
# @return [Array<(TemplateFields, Integer, Hash)>] TemplateFields data, response status code and response headers
|
|
2664
3600
|
def list_template_fields_with_http_info(template_id, opts = {})
|
|
2665
3601
|
if @api_client.config.debugging
|
|
@@ -2800,7 +3736,7 @@ end
|
|
|
2800
3736
|
# List templates
|
|
2801
3737
|
# 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.
|
|
2802
3738
|
# @param [Hash] opts the optional parameters
|
|
2803
|
-
# @option opts [String] :query Only list templates whose name contains this text (ignoring case).
|
|
3739
|
+
# @option opts [String] :query Only list templates whose name contains this text (ignoring case). `%` and `_` match themselves.
|
|
2804
3740
|
# @option opts [String] :parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
2805
3741
|
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2806
3742
|
# @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.
|
|
@@ -2813,7 +3749,7 @@ end
|
|
|
2813
3749
|
# List templates
|
|
2814
3750
|
# 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.
|
|
2815
3751
|
# @param [Hash] opts the optional parameters
|
|
2816
|
-
# @option opts [String] :query Only list templates whose name contains this text (ignoring case).
|
|
3752
|
+
# @option opts [String] :query Only list templates whose name contains this text (ignoring case). `%` and `_` match themselves.
|
|
2817
3753
|
# @option opts [String] :parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
2818
3754
|
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2819
3755
|
# @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.
|
|
@@ -2949,6 +3885,7 @@ end
|
|
|
2949
3885
|
# @param folder_id [String] The folder's ID.
|
|
2950
3886
|
# @param body [MoveFolderRequest] Where to move the folder.
|
|
2951
3887
|
# @param [Hash] opts the optional parameters
|
|
3888
|
+
# @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.
|
|
2952
3889
|
# @return [Folder]
|
|
2953
3890
|
def move_folder(folder_id, body, opts = {})
|
|
2954
3891
|
data, _status_code, _headers = move_folder_with_http_info(folder_id, body, opts)
|
|
@@ -2960,6 +3897,7 @@ end
|
|
|
2960
3897
|
# @param folder_id [String] The folder's ID.
|
|
2961
3898
|
# @param body [MoveFolderRequest] Where to move the folder.
|
|
2962
3899
|
# @param [Hash] opts the optional parameters
|
|
3900
|
+
# @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.
|
|
2963
3901
|
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
2964
3902
|
def move_folder_with_http_info(folder_id, body, opts = {})
|
|
2965
3903
|
if @api_client.config.debugging
|
|
@@ -2988,6 +3926,7 @@ end
|
|
|
2988
3926
|
if !content_type.nil?
|
|
2989
3927
|
header_params['Content-Type'] = content_type
|
|
2990
3928
|
end
|
|
3929
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
2991
3930
|
|
|
2992
3931
|
# form parameters
|
|
2993
3932
|
form_params = opts[:form_params] || {}
|
|
@@ -3023,6 +3962,7 @@ end
|
|
|
3023
3962
|
# @param template_id [String] The template's ID.
|
|
3024
3963
|
# @param body [MoveTemplateRequest] Where to move the template.
|
|
3025
3964
|
# @param [Hash] opts the optional parameters
|
|
3965
|
+
# @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.
|
|
3026
3966
|
# @return [Template]
|
|
3027
3967
|
def move_template(template_id, body, opts = {})
|
|
3028
3968
|
data, _status_code, _headers = move_template_with_http_info(template_id, body, opts)
|
|
@@ -3032,23 +3972,409 @@ end
|
|
|
3032
3972
|
# Move a template to a folder
|
|
3033
3973
|
# Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
3034
3974
|
# @param template_id [String] The template's ID.
|
|
3035
|
-
# @param body [MoveTemplateRequest] Where to move the template.
|
|
3975
|
+
# @param body [MoveTemplateRequest] Where to move the template.
|
|
3976
|
+
# @param [Hash] opts the optional parameters
|
|
3977
|
+
# @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.
|
|
3978
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3979
|
+
def move_template_with_http_info(template_id, body, opts = {})
|
|
3980
|
+
if @api_client.config.debugging
|
|
3981
|
+
@api_client.config.logger.debug 'Calling API: Client.move_template ...'
|
|
3982
|
+
end
|
|
3983
|
+
# verify the required parameter 'template_id' is set
|
|
3984
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
3985
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.move_template"
|
|
3986
|
+
end
|
|
3987
|
+
# verify the required parameter 'body' is set
|
|
3988
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3989
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.move_template"
|
|
3990
|
+
end
|
|
3991
|
+
# resource path
|
|
3992
|
+
local_var_path = '/templates/{template_id}/move'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
3993
|
+
|
|
3994
|
+
# query parameters
|
|
3995
|
+
query_params = opts[:query_params] || {}
|
|
3996
|
+
|
|
3997
|
+
# header parameters
|
|
3998
|
+
header_params = opts[:header_params] || {}
|
|
3999
|
+
# HTTP header 'Accept' (if needed)
|
|
4000
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4001
|
+
# HTTP header 'Content-Type'
|
|
4002
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4003
|
+
if !content_type.nil?
|
|
4004
|
+
header_params['Content-Type'] = content_type
|
|
4005
|
+
end
|
|
4006
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
4007
|
+
|
|
4008
|
+
# form parameters
|
|
4009
|
+
form_params = opts[:form_params] || {}
|
|
4010
|
+
|
|
4011
|
+
# http body (model)
|
|
4012
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
4013
|
+
|
|
4014
|
+
# return_type
|
|
4015
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
4016
|
+
|
|
4017
|
+
# auth_names
|
|
4018
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
4019
|
+
|
|
4020
|
+
new_options = opts.merge(
|
|
4021
|
+
:operation => :"Client.move_template",
|
|
4022
|
+
:header_params => header_params,
|
|
4023
|
+
:query_params => query_params,
|
|
4024
|
+
:form_params => form_params,
|
|
4025
|
+
:body => post_body,
|
|
4026
|
+
:auth_names => auth_names,
|
|
4027
|
+
:return_type => return_type
|
|
4028
|
+
)
|
|
4029
|
+
|
|
4030
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
4031
|
+
if @api_client.config.debugging
|
|
4032
|
+
@api_client.config.logger.debug "API called: Client#move_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4033
|
+
end
|
|
4034
|
+
return data, status_code, headers
|
|
4035
|
+
end
|
|
4036
|
+
|
|
4037
|
+
# Publish a template version
|
|
4038
|
+
# Publishes the template's draft as a new version. Its content (the PDF or HTML, fields, name and description) never changes, while settings such as `webhook_url` and `public_submissions` keep following the draft. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
|
|
4039
|
+
# @param template_id [String] The template's ID.
|
|
4040
|
+
# @param body [PublishTemplateVersionRequest] The version to publish.
|
|
4041
|
+
# @param [Hash] opts the optional parameters
|
|
4042
|
+
# @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.
|
|
4043
|
+
# @return [TemplateVersion]
|
|
4044
|
+
def publish_template_version(template_id, body, opts = {})
|
|
4045
|
+
data, _status_code, _headers = publish_template_version_with_http_info(template_id, body, opts)
|
|
4046
|
+
data
|
|
4047
|
+
end
|
|
4048
|
+
|
|
4049
|
+
# Publish a template version
|
|
4050
|
+
# Publishes the template's draft as a new version. Its content (the PDF or HTML, fields, name and description) never changes, while settings such as `webhook_url` and `public_submissions` keep following the draft. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
|
|
4051
|
+
# @param template_id [String] The template's ID.
|
|
4052
|
+
# @param body [PublishTemplateVersionRequest] The version to publish.
|
|
4053
|
+
# @param [Hash] opts the optional parameters
|
|
4054
|
+
# @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.
|
|
4055
|
+
# @return [Array<(TemplateVersion, Integer, Hash)>] TemplateVersion data, response status code and response headers
|
|
4056
|
+
def publish_template_version_with_http_info(template_id, body, opts = {})
|
|
4057
|
+
if @api_client.config.debugging
|
|
4058
|
+
@api_client.config.logger.debug 'Calling API: Client.publish_template_version ...'
|
|
4059
|
+
end
|
|
4060
|
+
# verify the required parameter 'template_id' is set
|
|
4061
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
4062
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.publish_template_version"
|
|
4063
|
+
end
|
|
4064
|
+
# verify the required parameter 'body' is set
|
|
4065
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
4066
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.publish_template_version"
|
|
4067
|
+
end
|
|
4068
|
+
# resource path
|
|
4069
|
+
local_var_path = '/templates/{template_id}/publish_version'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
4070
|
+
|
|
4071
|
+
# query parameters
|
|
4072
|
+
query_params = opts[:query_params] || {}
|
|
4073
|
+
|
|
4074
|
+
# header parameters
|
|
4075
|
+
header_params = opts[:header_params] || {}
|
|
4076
|
+
# HTTP header 'Accept' (if needed)
|
|
4077
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4078
|
+
# HTTP header 'Content-Type'
|
|
4079
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4080
|
+
if !content_type.nil?
|
|
4081
|
+
header_params['Content-Type'] = content_type
|
|
4082
|
+
end
|
|
4083
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
4084
|
+
|
|
4085
|
+
# form parameters
|
|
4086
|
+
form_params = opts[:form_params] || {}
|
|
4087
|
+
|
|
4088
|
+
# http body (model)
|
|
4089
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
4090
|
+
|
|
4091
|
+
# return_type
|
|
4092
|
+
return_type = opts[:debug_return_type] || 'TemplateVersion'
|
|
4093
|
+
|
|
4094
|
+
# auth_names
|
|
4095
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
4096
|
+
|
|
4097
|
+
new_options = opts.merge(
|
|
4098
|
+
:operation => :"Client.publish_template_version",
|
|
4099
|
+
:header_params => header_params,
|
|
4100
|
+
:query_params => query_params,
|
|
4101
|
+
:form_params => form_params,
|
|
4102
|
+
:body => post_body,
|
|
4103
|
+
:auth_names => auth_names,
|
|
4104
|
+
:return_type => return_type
|
|
4105
|
+
)
|
|
4106
|
+
|
|
4107
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
4108
|
+
if @api_client.config.debugging
|
|
4109
|
+
@api_client.config.logger.debug "API called: Client#publish_template_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4110
|
+
end
|
|
4111
|
+
return data, status_code, headers
|
|
4112
|
+
end
|
|
4113
|
+
|
|
4114
|
+
# Remove fields from a template
|
|
4115
|
+
# Removes fields from a template's draft and returns the fields that are left. Conditional logic that used only the removed fields is removed too.
|
|
4116
|
+
# @param template_id [String] The template's ID.
|
|
4117
|
+
# @param body [RemoveTemplateFieldsRequest] The fields to remove from the template's draft.
|
|
4118
|
+
# @param [Hash] opts the optional parameters
|
|
4119
|
+
# @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.
|
|
4120
|
+
# @return [TemplateFields]
|
|
4121
|
+
def remove_template_fields(template_id, body, opts = {})
|
|
4122
|
+
data, _status_code, _headers = remove_template_fields_with_http_info(template_id, body, opts)
|
|
4123
|
+
data
|
|
4124
|
+
end
|
|
4125
|
+
|
|
4126
|
+
# Remove fields from a template
|
|
4127
|
+
# Removes fields from a template's draft and returns the fields that are left. Conditional logic that used only the removed fields is removed too.
|
|
4128
|
+
# @param template_id [String] The template's ID.
|
|
4129
|
+
# @param body [RemoveTemplateFieldsRequest] The fields to remove from the template's draft.
|
|
4130
|
+
# @param [Hash] opts the optional parameters
|
|
4131
|
+
# @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.
|
|
4132
|
+
# @return [Array<(TemplateFields, Integer, Hash)>] TemplateFields data, response status code and response headers
|
|
4133
|
+
def remove_template_fields_with_http_info(template_id, body, opts = {})
|
|
4134
|
+
if @api_client.config.debugging
|
|
4135
|
+
@api_client.config.logger.debug 'Calling API: Client.remove_template_fields ...'
|
|
4136
|
+
end
|
|
4137
|
+
# verify the required parameter 'template_id' is set
|
|
4138
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
4139
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.remove_template_fields"
|
|
4140
|
+
end
|
|
4141
|
+
# verify the required parameter 'body' is set
|
|
4142
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
4143
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.remove_template_fields"
|
|
4144
|
+
end
|
|
4145
|
+
# resource path
|
|
4146
|
+
local_var_path = '/templates/{template_id}/fields/remove'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
4147
|
+
|
|
4148
|
+
# query parameters
|
|
4149
|
+
query_params = opts[:query_params] || {}
|
|
4150
|
+
|
|
4151
|
+
# header parameters
|
|
4152
|
+
header_params = opts[:header_params] || {}
|
|
4153
|
+
# HTTP header 'Accept' (if needed)
|
|
4154
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4155
|
+
# HTTP header 'Content-Type'
|
|
4156
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4157
|
+
if !content_type.nil?
|
|
4158
|
+
header_params['Content-Type'] = content_type
|
|
4159
|
+
end
|
|
4160
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
4161
|
+
|
|
4162
|
+
# form parameters
|
|
4163
|
+
form_params = opts[:form_params] || {}
|
|
4164
|
+
|
|
4165
|
+
# http body (model)
|
|
4166
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
4167
|
+
|
|
4168
|
+
# return_type
|
|
4169
|
+
return_type = opts[:debug_return_type] || 'TemplateFields'
|
|
4170
|
+
|
|
4171
|
+
# auth_names
|
|
4172
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
4173
|
+
|
|
4174
|
+
new_options = opts.merge(
|
|
4175
|
+
:operation => :"Client.remove_template_fields",
|
|
4176
|
+
:header_params => header_params,
|
|
4177
|
+
:query_params => query_params,
|
|
4178
|
+
:form_params => form_params,
|
|
4179
|
+
:body => post_body,
|
|
4180
|
+
:auth_names => auth_names,
|
|
4181
|
+
:return_type => return_type
|
|
4182
|
+
)
|
|
4183
|
+
|
|
4184
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
4185
|
+
if @api_client.config.debugging
|
|
4186
|
+
@api_client.config.logger.debug "API called: Client#remove_template_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4187
|
+
end
|
|
4188
|
+
return data, status_code, headers
|
|
4189
|
+
end
|
|
4190
|
+
|
|
4191
|
+
# Rename a folder
|
|
4192
|
+
# Renames a folder. The name must be unique within its parent folder.
|
|
4193
|
+
# @param folder_id [String] The folder's ID.
|
|
4194
|
+
# @param body [RenameFolderRequest] The folder's new name.
|
|
4195
|
+
# @param [Hash] opts the optional parameters
|
|
4196
|
+
# @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.
|
|
4197
|
+
# @return [Folder]
|
|
4198
|
+
def rename_folder(folder_id, body, opts = {})
|
|
4199
|
+
data, _status_code, _headers = rename_folder_with_http_info(folder_id, body, opts)
|
|
4200
|
+
data
|
|
4201
|
+
end
|
|
4202
|
+
|
|
4203
|
+
# Rename a folder
|
|
4204
|
+
# Renames a folder. The name must be unique within its parent folder.
|
|
4205
|
+
# @param folder_id [String] The folder's ID.
|
|
4206
|
+
# @param body [RenameFolderRequest] The folder's new name.
|
|
4207
|
+
# @param [Hash] opts the optional parameters
|
|
4208
|
+
# @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.
|
|
4209
|
+
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
4210
|
+
def rename_folder_with_http_info(folder_id, body, opts = {})
|
|
4211
|
+
if @api_client.config.debugging
|
|
4212
|
+
@api_client.config.logger.debug 'Calling API: Client.rename_folder ...'
|
|
4213
|
+
end
|
|
4214
|
+
# verify the required parameter 'folder_id' is set
|
|
4215
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
4216
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.rename_folder"
|
|
4217
|
+
end
|
|
4218
|
+
# verify the required parameter 'body' is set
|
|
4219
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
4220
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.rename_folder"
|
|
4221
|
+
end
|
|
4222
|
+
# resource path
|
|
4223
|
+
local_var_path = '/folders/{folder_id}/rename'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
4224
|
+
|
|
4225
|
+
# query parameters
|
|
4226
|
+
query_params = opts[:query_params] || {}
|
|
4227
|
+
|
|
4228
|
+
# header parameters
|
|
4229
|
+
header_params = opts[:header_params] || {}
|
|
4230
|
+
# HTTP header 'Accept' (if needed)
|
|
4231
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4232
|
+
# HTTP header 'Content-Type'
|
|
4233
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4234
|
+
if !content_type.nil?
|
|
4235
|
+
header_params['Content-Type'] = content_type
|
|
4236
|
+
end
|
|
4237
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
4238
|
+
|
|
4239
|
+
# form parameters
|
|
4240
|
+
form_params = opts[:form_params] || {}
|
|
4241
|
+
|
|
4242
|
+
# http body (model)
|
|
4243
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
4244
|
+
|
|
4245
|
+
# return_type
|
|
4246
|
+
return_type = opts[:debug_return_type] || 'Folder'
|
|
4247
|
+
|
|
4248
|
+
# auth_names
|
|
4249
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
4250
|
+
|
|
4251
|
+
new_options = opts.merge(
|
|
4252
|
+
:operation => :"Client.rename_folder",
|
|
4253
|
+
:header_params => header_params,
|
|
4254
|
+
:query_params => query_params,
|
|
4255
|
+
:form_params => form_params,
|
|
4256
|
+
:body => post_body,
|
|
4257
|
+
:auth_names => auth_names,
|
|
4258
|
+
:return_type => return_type
|
|
4259
|
+
)
|
|
4260
|
+
|
|
4261
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
4262
|
+
if @api_client.config.debugging
|
|
4263
|
+
@api_client.config.logger.debug "API called: Client#rename_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4264
|
+
end
|
|
4265
|
+
return data, status_code, headers
|
|
4266
|
+
end
|
|
4267
|
+
|
|
4268
|
+
# Reorder a template's fields
|
|
4269
|
+
# Changes the order of the fields in a template's draft and returns them in their new order. Send every field's ID: each field stays on its page, and a page's fields are printed in this order, so a later field prints over an earlier one where they overlap. Their values are in this order in the template's data schema and forms.
|
|
4270
|
+
# @param template_id [String] The template's ID.
|
|
4271
|
+
# @param body [ReorderTemplateFieldsRequest] The new order of the fields in the template's draft.
|
|
4272
|
+
# @param [Hash] opts the optional parameters
|
|
4273
|
+
# @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.
|
|
4274
|
+
# @return [TemplateFields]
|
|
4275
|
+
def reorder_template_fields(template_id, body, opts = {})
|
|
4276
|
+
data, _status_code, _headers = reorder_template_fields_with_http_info(template_id, body, opts)
|
|
4277
|
+
data
|
|
4278
|
+
end
|
|
4279
|
+
|
|
4280
|
+
# Reorder a template's fields
|
|
4281
|
+
# Changes the order of the fields in a template's draft and returns them in their new order. Send every field's ID: each field stays on its page, and a page's fields are printed in this order, so a later field prints over an earlier one where they overlap. Their values are in this order in the template's data schema and forms.
|
|
4282
|
+
# @param template_id [String] The template's ID.
|
|
4283
|
+
# @param body [ReorderTemplateFieldsRequest] The new order of the fields in the template's draft.
|
|
4284
|
+
# @param [Hash] opts the optional parameters
|
|
4285
|
+
# @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.
|
|
4286
|
+
# @return [Array<(TemplateFields, Integer, Hash)>] TemplateFields data, response status code and response headers
|
|
4287
|
+
def reorder_template_fields_with_http_info(template_id, body, opts = {})
|
|
4288
|
+
if @api_client.config.debugging
|
|
4289
|
+
@api_client.config.logger.debug 'Calling API: Client.reorder_template_fields ...'
|
|
4290
|
+
end
|
|
4291
|
+
# verify the required parameter 'template_id' is set
|
|
4292
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
4293
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.reorder_template_fields"
|
|
4294
|
+
end
|
|
4295
|
+
# verify the required parameter 'body' is set
|
|
4296
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
4297
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.reorder_template_fields"
|
|
4298
|
+
end
|
|
4299
|
+
# resource path
|
|
4300
|
+
local_var_path = '/templates/{template_id}/fields/reorder'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
4301
|
+
|
|
4302
|
+
# query parameters
|
|
4303
|
+
query_params = opts[:query_params] || {}
|
|
4304
|
+
|
|
4305
|
+
# header parameters
|
|
4306
|
+
header_params = opts[:header_params] || {}
|
|
4307
|
+
# HTTP header 'Accept' (if needed)
|
|
4308
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4309
|
+
# HTTP header 'Content-Type'
|
|
4310
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4311
|
+
if !content_type.nil?
|
|
4312
|
+
header_params['Content-Type'] = content_type
|
|
4313
|
+
end
|
|
4314
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
4315
|
+
|
|
4316
|
+
# form parameters
|
|
4317
|
+
form_params = opts[:form_params] || {}
|
|
4318
|
+
|
|
4319
|
+
# http body (model)
|
|
4320
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
4321
|
+
|
|
4322
|
+
# return_type
|
|
4323
|
+
return_type = opts[:debug_return_type] || 'TemplateFields'
|
|
4324
|
+
|
|
4325
|
+
# auth_names
|
|
4326
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
4327
|
+
|
|
4328
|
+
new_options = opts.merge(
|
|
4329
|
+
:operation => :"Client.reorder_template_fields",
|
|
4330
|
+
:header_params => header_params,
|
|
4331
|
+
:query_params => query_params,
|
|
4332
|
+
:form_params => form_params,
|
|
4333
|
+
:body => post_body,
|
|
4334
|
+
:auth_names => auth_names,
|
|
4335
|
+
:return_type => return_type
|
|
4336
|
+
)
|
|
4337
|
+
|
|
4338
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
4339
|
+
if @api_client.config.debugging
|
|
4340
|
+
@api_client.config.logger.debug "API called: Client#reorder_template_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4341
|
+
end
|
|
4342
|
+
return data, status_code, headers
|
|
4343
|
+
end
|
|
4344
|
+
|
|
4345
|
+
# Restore a template version
|
|
4346
|
+
# Replaces the template's draft with a copy of one of its published versions. The draft keeps its settings that apply to every version, such as `webhook_url`.
|
|
4347
|
+
# @param template_id [String] The template's ID.
|
|
4348
|
+
# @param body [RestoreTemplateVersionRequest] The version to restore.
|
|
4349
|
+
# @param [Hash] opts the optional parameters
|
|
4350
|
+
# @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.
|
|
4351
|
+
# @return [Template]
|
|
4352
|
+
def restore_template_version(template_id, body, opts = {})
|
|
4353
|
+
data, _status_code, _headers = restore_template_version_with_http_info(template_id, body, opts)
|
|
4354
|
+
data
|
|
4355
|
+
end
|
|
4356
|
+
|
|
4357
|
+
# Restore a template version
|
|
4358
|
+
# Replaces the template's draft with a copy of one of its published versions. The draft keeps its settings that apply to every version, such as `webhook_url`.
|
|
4359
|
+
# @param template_id [String] The template's ID.
|
|
4360
|
+
# @param body [RestoreTemplateVersionRequest] The version to restore.
|
|
3036
4361
|
# @param [Hash] opts the optional parameters
|
|
4362
|
+
# @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.
|
|
3037
4363
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3038
|
-
def
|
|
4364
|
+
def restore_template_version_with_http_info(template_id, body, opts = {})
|
|
3039
4365
|
if @api_client.config.debugging
|
|
3040
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
4366
|
+
@api_client.config.logger.debug 'Calling API: Client.restore_template_version ...'
|
|
3041
4367
|
end
|
|
3042
4368
|
# verify the required parameter 'template_id' is set
|
|
3043
4369
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
3044
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.
|
|
4370
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.restore_template_version"
|
|
3045
4371
|
end
|
|
3046
4372
|
# verify the required parameter 'body' is set
|
|
3047
4373
|
if @api_client.config.client_side_validation && body.nil?
|
|
3048
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling Client.
|
|
4374
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.restore_template_version"
|
|
3049
4375
|
end
|
|
3050
4376
|
# resource path
|
|
3051
|
-
local_var_path = '/templates/{template_id}/
|
|
4377
|
+
local_var_path = '/templates/{template_id}/restore_version'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
3052
4378
|
|
|
3053
4379
|
# query parameters
|
|
3054
4380
|
query_params = opts[:query_params] || {}
|
|
@@ -3062,6 +4388,7 @@ end
|
|
|
3062
4388
|
if !content_type.nil?
|
|
3063
4389
|
header_params['Content-Type'] = content_type
|
|
3064
4390
|
end
|
|
4391
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3065
4392
|
|
|
3066
4393
|
# form parameters
|
|
3067
4394
|
form_params = opts[:form_params] || {}
|
|
@@ -3076,7 +4403,7 @@ end
|
|
|
3076
4403
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3077
4404
|
|
|
3078
4405
|
new_options = opts.merge(
|
|
3079
|
-
:operation => :"Client.
|
|
4406
|
+
:operation => :"Client.restore_template_version",
|
|
3080
4407
|
:header_params => header_params,
|
|
3081
4408
|
:query_params => query_params,
|
|
3082
4409
|
:form_params => form_params,
|
|
@@ -3087,42 +4414,40 @@ end
|
|
|
3087
4414
|
|
|
3088
4415
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3089
4416
|
if @api_client.config.debugging
|
|
3090
|
-
@api_client.config.logger.debug "API called: Client#
|
|
4417
|
+
@api_client.config.logger.debug "API called: Client#restore_template_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3091
4418
|
end
|
|
3092
4419
|
return data, status_code, headers
|
|
3093
4420
|
end
|
|
3094
4421
|
|
|
3095
|
-
#
|
|
3096
|
-
#
|
|
3097
|
-
# @param
|
|
3098
|
-
# @param body [PublishTemplateVersionRequest] The version to publish.
|
|
4422
|
+
# Send a test email for an account email action
|
|
4423
|
+
# 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.
|
|
4424
|
+
# @param email_action_id [String] The account email action's ID.
|
|
3099
4425
|
# @param [Hash] opts the optional parameters
|
|
3100
|
-
# @
|
|
3101
|
-
|
|
3102
|
-
|
|
4426
|
+
# @option opts [SendAccountEmailActionTestEmailRequest] :body Which template the test email is for.
|
|
4427
|
+
# @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.
|
|
4428
|
+
# @return [EmailActionTestEmail]
|
|
4429
|
+
def send_account_email_action_test_email(email_action_id, opts = {})
|
|
4430
|
+
data, _status_code, _headers = send_account_email_action_test_email_with_http_info(email_action_id, opts)
|
|
3103
4431
|
data
|
|
3104
4432
|
end
|
|
3105
4433
|
|
|
3106
|
-
#
|
|
3107
|
-
#
|
|
3108
|
-
# @param
|
|
3109
|
-
# @param body [PublishTemplateVersionRequest] The version to publish.
|
|
4434
|
+
# Send a test email for an account email action
|
|
4435
|
+
# 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.
|
|
4436
|
+
# @param email_action_id [String] The account email action's ID.
|
|
3110
4437
|
# @param [Hash] opts the optional parameters
|
|
3111
|
-
# @
|
|
3112
|
-
|
|
4438
|
+
# @option opts [SendAccountEmailActionTestEmailRequest] :body Which template the test email is for.
|
|
4439
|
+
# @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.
|
|
4440
|
+
# @return [Array<(EmailActionTestEmail, Integer, Hash)>] EmailActionTestEmail data, response status code and response headers
|
|
4441
|
+
def send_account_email_action_test_email_with_http_info(email_action_id, opts = {})
|
|
3113
4442
|
if @api_client.config.debugging
|
|
3114
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
4443
|
+
@api_client.config.logger.debug 'Calling API: Client.send_account_email_action_test_email ...'
|
|
3115
4444
|
end
|
|
3116
|
-
# verify the required parameter '
|
|
3117
|
-
if @api_client.config.client_side_validation &&
|
|
3118
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3119
|
-
end
|
|
3120
|
-
# verify the required parameter 'body' is set
|
|
3121
|
-
if @api_client.config.client_side_validation && body.nil?
|
|
3122
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling Client.publish_template_version"
|
|
4445
|
+
# verify the required parameter 'email_action_id' is set
|
|
4446
|
+
if @api_client.config.client_side_validation && email_action_id.nil?
|
|
4447
|
+
fail ArgumentError, "Missing the required parameter 'email_action_id' when calling Client.send_account_email_action_test_email"
|
|
3123
4448
|
end
|
|
3124
4449
|
# resource path
|
|
3125
|
-
local_var_path = '/
|
|
4450
|
+
local_var_path = '/email_actions/{email_action_id}/test_email'.sub('{email_action_id}', CGI.escape(email_action_id.to_s))
|
|
3126
4451
|
|
|
3127
4452
|
# query parameters
|
|
3128
4453
|
query_params = opts[:query_params] || {}
|
|
@@ -3136,21 +4461,22 @@ end
|
|
|
3136
4461
|
if !content_type.nil?
|
|
3137
4462
|
header_params['Content-Type'] = content_type
|
|
3138
4463
|
end
|
|
4464
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3139
4465
|
|
|
3140
4466
|
# form parameters
|
|
3141
4467
|
form_params = opts[:form_params] || {}
|
|
3142
4468
|
|
|
3143
4469
|
# http body (model)
|
|
3144
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
4470
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
|
3145
4471
|
|
|
3146
4472
|
# return_type
|
|
3147
|
-
return_type = opts[:debug_return_type] || '
|
|
4473
|
+
return_type = opts[:debug_return_type] || 'EmailActionTestEmail'
|
|
3148
4474
|
|
|
3149
4475
|
# auth_names
|
|
3150
4476
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3151
4477
|
|
|
3152
4478
|
new_options = opts.merge(
|
|
3153
|
-
:operation => :"Client.
|
|
4479
|
+
:operation => :"Client.send_account_email_action_test_email",
|
|
3154
4480
|
:header_params => header_params,
|
|
3155
4481
|
:query_params => query_params,
|
|
3156
4482
|
:form_params => form_params,
|
|
@@ -3161,42 +4487,44 @@ end
|
|
|
3161
4487
|
|
|
3162
4488
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3163
4489
|
if @api_client.config.debugging
|
|
3164
|
-
@api_client.config.logger.debug "API called: Client#
|
|
4490
|
+
@api_client.config.logger.debug "API called: Client#send_account_email_action_test_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3165
4491
|
end
|
|
3166
4492
|
return data, status_code, headers
|
|
3167
4493
|
end
|
|
3168
4494
|
|
|
3169
|
-
#
|
|
3170
|
-
#
|
|
4495
|
+
# Send a test email
|
|
4496
|
+
# 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.
|
|
3171
4497
|
# @param template_id [String] The template's ID.
|
|
3172
|
-
# @param
|
|
4498
|
+
# @param email_action_id [String] The email action's ID.
|
|
3173
4499
|
# @param [Hash] opts the optional parameters
|
|
3174
|
-
# @
|
|
3175
|
-
|
|
3176
|
-
|
|
4500
|
+
# @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.
|
|
4501
|
+
# @return [EmailActionTestEmail]
|
|
4502
|
+
def send_email_action_test_email(template_id, email_action_id, opts = {})
|
|
4503
|
+
data, _status_code, _headers = send_email_action_test_email_with_http_info(template_id, email_action_id, opts)
|
|
3177
4504
|
data
|
|
3178
4505
|
end
|
|
3179
4506
|
|
|
3180
|
-
#
|
|
3181
|
-
#
|
|
4507
|
+
# Send a test email
|
|
4508
|
+
# 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.
|
|
3182
4509
|
# @param template_id [String] The template's ID.
|
|
3183
|
-
# @param
|
|
4510
|
+
# @param email_action_id [String] The email action's ID.
|
|
3184
4511
|
# @param [Hash] opts the optional parameters
|
|
3185
|
-
# @
|
|
3186
|
-
|
|
4512
|
+
# @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.
|
|
4513
|
+
# @return [Array<(EmailActionTestEmail, Integer, Hash)>] EmailActionTestEmail data, response status code and response headers
|
|
4514
|
+
def send_email_action_test_email_with_http_info(template_id, email_action_id, opts = {})
|
|
3187
4515
|
if @api_client.config.debugging
|
|
3188
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
4516
|
+
@api_client.config.logger.debug 'Calling API: Client.send_email_action_test_email ...'
|
|
3189
4517
|
end
|
|
3190
4518
|
# verify the required parameter 'template_id' is set
|
|
3191
4519
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
3192
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.
|
|
4520
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.send_email_action_test_email"
|
|
3193
4521
|
end
|
|
3194
|
-
# verify the required parameter '
|
|
3195
|
-
if @api_client.config.client_side_validation &&
|
|
3196
|
-
fail ArgumentError, "Missing the required parameter '
|
|
4522
|
+
# verify the required parameter 'email_action_id' is set
|
|
4523
|
+
if @api_client.config.client_side_validation && email_action_id.nil?
|
|
4524
|
+
fail ArgumentError, "Missing the required parameter 'email_action_id' when calling Client.send_email_action_test_email"
|
|
3197
4525
|
end
|
|
3198
4526
|
# resource path
|
|
3199
|
-
local_var_path = '/templates/{template_id}/
|
|
4527
|
+
local_var_path = '/templates/{template_id}/email_actions/{email_action_id}/test_email'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{email_action_id}', CGI.escape(email_action_id.to_s))
|
|
3200
4528
|
|
|
3201
4529
|
# query parameters
|
|
3202
4530
|
query_params = opts[:query_params] || {}
|
|
@@ -3205,26 +4533,22 @@ end
|
|
|
3205
4533
|
header_params = opts[:header_params] || {}
|
|
3206
4534
|
# HTTP header 'Accept' (if needed)
|
|
3207
4535
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3208
|
-
|
|
3209
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3210
|
-
if !content_type.nil?
|
|
3211
|
-
header_params['Content-Type'] = content_type
|
|
3212
|
-
end
|
|
4536
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3213
4537
|
|
|
3214
4538
|
# form parameters
|
|
3215
4539
|
form_params = opts[:form_params] || {}
|
|
3216
4540
|
|
|
3217
4541
|
# http body (model)
|
|
3218
|
-
post_body = opts[:debug_body]
|
|
4542
|
+
post_body = opts[:debug_body]
|
|
3219
4543
|
|
|
3220
4544
|
# return_type
|
|
3221
|
-
return_type = opts[:debug_return_type] || '
|
|
4545
|
+
return_type = opts[:debug_return_type] || 'EmailActionTestEmail'
|
|
3222
4546
|
|
|
3223
4547
|
# auth_names
|
|
3224
4548
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3225
4549
|
|
|
3226
4550
|
new_options = opts.merge(
|
|
3227
|
-
:operation => :"Client.
|
|
4551
|
+
:operation => :"Client.send_email_action_test_email",
|
|
3228
4552
|
:header_params => header_params,
|
|
3229
4553
|
:query_params => query_params,
|
|
3230
4554
|
:form_params => form_params,
|
|
@@ -3235,42 +4559,30 @@ end
|
|
|
3235
4559
|
|
|
3236
4560
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3237
4561
|
if @api_client.config.debugging
|
|
3238
|
-
@api_client.config.logger.debug "API called: Client#
|
|
4562
|
+
@api_client.config.logger.debug "API called: Client#send_email_action_test_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3239
4563
|
end
|
|
3240
4564
|
return data, status_code, headers
|
|
3241
4565
|
end
|
|
3242
4566
|
|
|
3243
|
-
#
|
|
3244
|
-
#
|
|
3245
|
-
# @param folder_id [String] The folder's ID.
|
|
3246
|
-
# @param body [RenameFolderRequest] The folder's new name.
|
|
4567
|
+
# Test authentication
|
|
4568
|
+
# Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
|
|
3247
4569
|
# @param [Hash] opts the optional parameters
|
|
3248
|
-
# @return [
|
|
3249
|
-
def
|
|
3250
|
-
data, _status_code, _headers =
|
|
4570
|
+
# @return [AuthenticationCheck]
|
|
4571
|
+
def test_authentication(opts = {})
|
|
4572
|
+
data, _status_code, _headers = test_authentication_with_http_info(opts)
|
|
3251
4573
|
data
|
|
3252
4574
|
end
|
|
3253
4575
|
|
|
3254
|
-
#
|
|
3255
|
-
#
|
|
3256
|
-
# @param folder_id [String] The folder's ID.
|
|
3257
|
-
# @param body [RenameFolderRequest] The folder's new name.
|
|
4576
|
+
# Test authentication
|
|
4577
|
+
# Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
|
|
3258
4578
|
# @param [Hash] opts the optional parameters
|
|
3259
|
-
# @return [Array<(
|
|
3260
|
-
def
|
|
4579
|
+
# @return [Array<(AuthenticationCheck, Integer, Hash)>] AuthenticationCheck data, response status code and response headers
|
|
4580
|
+
def test_authentication_with_http_info(opts = {})
|
|
3261
4581
|
if @api_client.config.debugging
|
|
3262
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
3263
|
-
end
|
|
3264
|
-
# verify the required parameter 'folder_id' is set
|
|
3265
|
-
if @api_client.config.client_side_validation && folder_id.nil?
|
|
3266
|
-
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.rename_folder"
|
|
3267
|
-
end
|
|
3268
|
-
# verify the required parameter 'body' is set
|
|
3269
|
-
if @api_client.config.client_side_validation && body.nil?
|
|
3270
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling Client.rename_folder"
|
|
4582
|
+
@api_client.config.logger.debug 'Calling API: Client.test_authentication ...'
|
|
3271
4583
|
end
|
|
3272
4584
|
# resource path
|
|
3273
|
-
local_var_path = '/
|
|
4585
|
+
local_var_path = '/authentication'
|
|
3274
4586
|
|
|
3275
4587
|
# query parameters
|
|
3276
4588
|
query_params = opts[:query_params] || {}
|
|
@@ -3279,26 +4591,21 @@ end
|
|
|
3279
4591
|
header_params = opts[:header_params] || {}
|
|
3280
4592
|
# HTTP header 'Accept' (if needed)
|
|
3281
4593
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3282
|
-
# HTTP header 'Content-Type'
|
|
3283
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3284
|
-
if !content_type.nil?
|
|
3285
|
-
header_params['Content-Type'] = content_type
|
|
3286
|
-
end
|
|
3287
4594
|
|
|
3288
4595
|
# form parameters
|
|
3289
4596
|
form_params = opts[:form_params] || {}
|
|
3290
4597
|
|
|
3291
4598
|
# http body (model)
|
|
3292
|
-
post_body = opts[:debug_body]
|
|
4599
|
+
post_body = opts[:debug_body]
|
|
3293
4600
|
|
|
3294
4601
|
# return_type
|
|
3295
|
-
return_type = opts[:debug_return_type] || '
|
|
4602
|
+
return_type = opts[:debug_return_type] || 'AuthenticationCheck'
|
|
3296
4603
|
|
|
3297
4604
|
# auth_names
|
|
3298
4605
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3299
4606
|
|
|
3300
4607
|
new_options = opts.merge(
|
|
3301
|
-
:operation => :"Client.
|
|
4608
|
+
:operation => :"Client.test_authentication",
|
|
3302
4609
|
:header_params => header_params,
|
|
3303
4610
|
:query_params => query_params,
|
|
3304
4611
|
:form_params => form_params,
|
|
@@ -3307,44 +4614,46 @@ end
|
|
|
3307
4614
|
:return_type => return_type
|
|
3308
4615
|
)
|
|
3309
4616
|
|
|
3310
|
-
data, status_code, headers = @api_client.call_api(:
|
|
4617
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3311
4618
|
if @api_client.config.debugging
|
|
3312
|
-
@api_client.config.logger.debug "API called: Client#
|
|
4619
|
+
@api_client.config.logger.debug "API called: Client#test_authentication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3313
4620
|
end
|
|
3314
4621
|
return data, status_code, headers
|
|
3315
4622
|
end
|
|
3316
4623
|
|
|
3317
|
-
#
|
|
3318
|
-
# Changes
|
|
3319
|
-
# @param
|
|
3320
|
-
# @param body [
|
|
4624
|
+
# Update an account email action
|
|
4625
|
+
# 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.
|
|
4626
|
+
# @param email_action_id [String] The account email action's ID.
|
|
4627
|
+
# @param body [UpdateAccountEmailActionRequest] The settings to change. Properties left out keep their values.
|
|
3321
4628
|
# @param [Hash] opts the optional parameters
|
|
3322
|
-
# @
|
|
3323
|
-
|
|
3324
|
-
|
|
4629
|
+
# @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.
|
|
4630
|
+
# @return [EmailAction]
|
|
4631
|
+
def update_account_email_action(email_action_id, body, opts = {})
|
|
4632
|
+
data, _status_code, _headers = update_account_email_action_with_http_info(email_action_id, body, opts)
|
|
3325
4633
|
data
|
|
3326
4634
|
end
|
|
3327
4635
|
|
|
3328
|
-
#
|
|
3329
|
-
# Changes
|
|
3330
|
-
# @param
|
|
3331
|
-
# @param body [
|
|
4636
|
+
# Update an account email action
|
|
4637
|
+
# 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.
|
|
4638
|
+
# @param email_action_id [String] The account email action's ID.
|
|
4639
|
+
# @param body [UpdateAccountEmailActionRequest] The settings to change. Properties left out keep their values.
|
|
3332
4640
|
# @param [Hash] opts the optional parameters
|
|
3333
|
-
# @
|
|
3334
|
-
|
|
4641
|
+
# @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.
|
|
4642
|
+
# @return [Array<(EmailAction, Integer, Hash)>] EmailAction data, response status code and response headers
|
|
4643
|
+
def update_account_email_action_with_http_info(email_action_id, body, opts = {})
|
|
3335
4644
|
if @api_client.config.debugging
|
|
3336
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
4645
|
+
@api_client.config.logger.debug 'Calling API: Client.update_account_email_action ...'
|
|
3337
4646
|
end
|
|
3338
|
-
# verify the required parameter '
|
|
3339
|
-
if @api_client.config.client_side_validation &&
|
|
3340
|
-
fail ArgumentError, "Missing the required parameter '
|
|
4647
|
+
# verify the required parameter 'email_action_id' is set
|
|
4648
|
+
if @api_client.config.client_side_validation && email_action_id.nil?
|
|
4649
|
+
fail ArgumentError, "Missing the required parameter 'email_action_id' when calling Client.update_account_email_action"
|
|
3341
4650
|
end
|
|
3342
4651
|
# verify the required parameter 'body' is set
|
|
3343
4652
|
if @api_client.config.client_side_validation && body.nil?
|
|
3344
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling Client.
|
|
4653
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.update_account_email_action"
|
|
3345
4654
|
end
|
|
3346
4655
|
# resource path
|
|
3347
|
-
local_var_path = '/
|
|
4656
|
+
local_var_path = '/email_actions/{email_action_id}'.sub('{email_action_id}', CGI.escape(email_action_id.to_s))
|
|
3348
4657
|
|
|
3349
4658
|
# query parameters
|
|
3350
4659
|
query_params = opts[:query_params] || {}
|
|
@@ -3358,6 +4667,7 @@ end
|
|
|
3358
4667
|
if !content_type.nil?
|
|
3359
4668
|
header_params['Content-Type'] = content_type
|
|
3360
4669
|
end
|
|
4670
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3361
4671
|
|
|
3362
4672
|
# form parameters
|
|
3363
4673
|
form_params = opts[:form_params] || {}
|
|
@@ -3366,13 +4676,13 @@ end
|
|
|
3366
4676
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3367
4677
|
|
|
3368
4678
|
# return_type
|
|
3369
|
-
return_type = opts[:debug_return_type] || '
|
|
4679
|
+
return_type = opts[:debug_return_type] || 'EmailAction'
|
|
3370
4680
|
|
|
3371
4681
|
# auth_names
|
|
3372
4682
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3373
4683
|
|
|
3374
4684
|
new_options = opts.merge(
|
|
3375
|
-
:operation => :"Client.
|
|
4685
|
+
:operation => :"Client.update_account_email_action",
|
|
3376
4686
|
:header_params => header_params,
|
|
3377
4687
|
:query_params => query_params,
|
|
3378
4688
|
:form_params => form_params,
|
|
@@ -3381,44 +4691,52 @@ end
|
|
|
3381
4691
|
:return_type => return_type
|
|
3382
4692
|
)
|
|
3383
4693
|
|
|
3384
|
-
data, status_code, headers = @api_client.call_api(:
|
|
4694
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3385
4695
|
if @api_client.config.debugging
|
|
3386
|
-
@api_client.config.logger.debug "API called: Client#
|
|
4696
|
+
@api_client.config.logger.debug "API called: Client#update_account_email_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3387
4697
|
end
|
|
3388
4698
|
return data, status_code, headers
|
|
3389
4699
|
end
|
|
3390
4700
|
|
|
3391
|
-
#
|
|
3392
|
-
#
|
|
4701
|
+
# Update an email action
|
|
4702
|
+
# 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.
|
|
3393
4703
|
# @param template_id [String] The template's ID.
|
|
3394
|
-
# @param
|
|
4704
|
+
# @param email_action_id [String] The email action's ID.
|
|
4705
|
+
# @param body [UpdateEmailActionRequest] The settings to change. Properties left out keep their values.
|
|
3395
4706
|
# @param [Hash] opts the optional parameters
|
|
3396
|
-
# @
|
|
3397
|
-
|
|
3398
|
-
|
|
4707
|
+
# @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.
|
|
4708
|
+
# @return [EmailAction]
|
|
4709
|
+
def update_email_action(template_id, email_action_id, body, opts = {})
|
|
4710
|
+
data, _status_code, _headers = update_email_action_with_http_info(template_id, email_action_id, body, opts)
|
|
3399
4711
|
data
|
|
3400
4712
|
end
|
|
3401
4713
|
|
|
3402
|
-
#
|
|
3403
|
-
#
|
|
4714
|
+
# Update an email action
|
|
4715
|
+
# 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.
|
|
3404
4716
|
# @param template_id [String] The template's ID.
|
|
3405
|
-
# @param
|
|
4717
|
+
# @param email_action_id [String] The email action's ID.
|
|
4718
|
+
# @param body [UpdateEmailActionRequest] The settings to change. Properties left out keep their values.
|
|
3406
4719
|
# @param [Hash] opts the optional parameters
|
|
3407
|
-
# @
|
|
3408
|
-
|
|
4720
|
+
# @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.
|
|
4721
|
+
# @return [Array<(EmailAction, Integer, Hash)>] EmailAction data, response status code and response headers
|
|
4722
|
+
def update_email_action_with_http_info(template_id, email_action_id, body, opts = {})
|
|
3409
4723
|
if @api_client.config.debugging
|
|
3410
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
4724
|
+
@api_client.config.logger.debug 'Calling API: Client.update_email_action ...'
|
|
3411
4725
|
end
|
|
3412
4726
|
# verify the required parameter 'template_id' is set
|
|
3413
4727
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
3414
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.
|
|
4728
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.update_email_action"
|
|
4729
|
+
end
|
|
4730
|
+
# verify the required parameter 'email_action_id' is set
|
|
4731
|
+
if @api_client.config.client_side_validation && email_action_id.nil?
|
|
4732
|
+
fail ArgumentError, "Missing the required parameter 'email_action_id' when calling Client.update_email_action"
|
|
3415
4733
|
end
|
|
3416
4734
|
# verify the required parameter 'body' is set
|
|
3417
4735
|
if @api_client.config.client_side_validation && body.nil?
|
|
3418
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling Client.
|
|
4736
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.update_email_action"
|
|
3419
4737
|
end
|
|
3420
4738
|
# resource path
|
|
3421
|
-
local_var_path = '/templates/{template_id}/
|
|
4739
|
+
local_var_path = '/templates/{template_id}/email_actions/{email_action_id}'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{email_action_id}', CGI.escape(email_action_id.to_s))
|
|
3422
4740
|
|
|
3423
4741
|
# query parameters
|
|
3424
4742
|
query_params = opts[:query_params] || {}
|
|
@@ -3432,6 +4750,7 @@ end
|
|
|
3432
4750
|
if !content_type.nil?
|
|
3433
4751
|
header_params['Content-Type'] = content_type
|
|
3434
4752
|
end
|
|
4753
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3435
4754
|
|
|
3436
4755
|
# form parameters
|
|
3437
4756
|
form_params = opts[:form_params] || {}
|
|
@@ -3440,13 +4759,13 @@ end
|
|
|
3440
4759
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3441
4760
|
|
|
3442
4761
|
# return_type
|
|
3443
|
-
return_type = opts[:debug_return_type] || '
|
|
4762
|
+
return_type = opts[:debug_return_type] || 'EmailAction'
|
|
3444
4763
|
|
|
3445
4764
|
# auth_names
|
|
3446
4765
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3447
4766
|
|
|
3448
4767
|
new_options = opts.merge(
|
|
3449
|
-
:operation => :"Client.
|
|
4768
|
+
:operation => :"Client.update_email_action",
|
|
3450
4769
|
:header_params => header_params,
|
|
3451
4770
|
:query_params => query_params,
|
|
3452
4771
|
:form_params => form_params,
|
|
@@ -3455,32 +4774,52 @@ end
|
|
|
3455
4774
|
:return_type => return_type
|
|
3456
4775
|
)
|
|
3457
4776
|
|
|
3458
|
-
data, status_code, headers = @api_client.call_api(:
|
|
4777
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3459
4778
|
if @api_client.config.debugging
|
|
3460
|
-
@api_client.config.logger.debug "API called: Client#
|
|
4779
|
+
@api_client.config.logger.debug "API called: Client#update_email_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3461
4780
|
end
|
|
3462
4781
|
return data, status_code, headers
|
|
3463
4782
|
end
|
|
3464
4783
|
|
|
3465
|
-
#
|
|
3466
|
-
#
|
|
4784
|
+
# Customize an account email action for a template
|
|
4785
|
+
# 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.
|
|
4786
|
+
# @param template_id [String] The template's ID.
|
|
4787
|
+
# @param email_action_id [String] The ID of one of your account's email actions that sends for the template.
|
|
4788
|
+
# @param body [UpdateEmailActionCustomizationRequest] 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.
|
|
3467
4789
|
# @param [Hash] opts the optional parameters
|
|
3468
|
-
# @
|
|
3469
|
-
|
|
3470
|
-
|
|
4790
|
+
# @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.
|
|
4791
|
+
# @return [EmailAction]
|
|
4792
|
+
def update_email_action_customization(template_id, email_action_id, body, opts = {})
|
|
4793
|
+
data, _status_code, _headers = update_email_action_customization_with_http_info(template_id, email_action_id, body, opts)
|
|
3471
4794
|
data
|
|
3472
4795
|
end
|
|
3473
4796
|
|
|
3474
|
-
#
|
|
3475
|
-
#
|
|
4797
|
+
# Customize an account email action for a template
|
|
4798
|
+
# 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.
|
|
4799
|
+
# @param template_id [String] The template's ID.
|
|
4800
|
+
# @param email_action_id [String] The ID of one of your account's email actions that sends for the template.
|
|
4801
|
+
# @param body [UpdateEmailActionCustomizationRequest] 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.
|
|
3476
4802
|
# @param [Hash] opts the optional parameters
|
|
3477
|
-
# @
|
|
3478
|
-
|
|
4803
|
+
# @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.
|
|
4804
|
+
# @return [Array<(EmailAction, Integer, Hash)>] EmailAction data, response status code and response headers
|
|
4805
|
+
def update_email_action_customization_with_http_info(template_id, email_action_id, body, opts = {})
|
|
3479
4806
|
if @api_client.config.debugging
|
|
3480
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
4807
|
+
@api_client.config.logger.debug 'Calling API: Client.update_email_action_customization ...'
|
|
4808
|
+
end
|
|
4809
|
+
# verify the required parameter 'template_id' is set
|
|
4810
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
4811
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.update_email_action_customization"
|
|
4812
|
+
end
|
|
4813
|
+
# verify the required parameter 'email_action_id' is set
|
|
4814
|
+
if @api_client.config.client_side_validation && email_action_id.nil?
|
|
4815
|
+
fail ArgumentError, "Missing the required parameter 'email_action_id' when calling Client.update_email_action_customization"
|
|
4816
|
+
end
|
|
4817
|
+
# verify the required parameter 'body' is set
|
|
4818
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
4819
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.update_email_action_customization"
|
|
3481
4820
|
end
|
|
3482
4821
|
# resource path
|
|
3483
|
-
local_var_path = '/
|
|
4822
|
+
local_var_path = '/templates/{template_id}/email_actions/{email_action_id}/customization'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{email_action_id}', CGI.escape(email_action_id.to_s))
|
|
3484
4823
|
|
|
3485
4824
|
# query parameters
|
|
3486
4825
|
query_params = opts[:query_params] || {}
|
|
@@ -3489,21 +4828,27 @@ end
|
|
|
3489
4828
|
header_params = opts[:header_params] || {}
|
|
3490
4829
|
# HTTP header 'Accept' (if needed)
|
|
3491
4830
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4831
|
+
# HTTP header 'Content-Type'
|
|
4832
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4833
|
+
if !content_type.nil?
|
|
4834
|
+
header_params['Content-Type'] = content_type
|
|
4835
|
+
end
|
|
4836
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3492
4837
|
|
|
3493
4838
|
# form parameters
|
|
3494
4839
|
form_params = opts[:form_params] || {}
|
|
3495
4840
|
|
|
3496
4841
|
# http body (model)
|
|
3497
|
-
post_body = opts[:debug_body]
|
|
4842
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3498
4843
|
|
|
3499
4844
|
# return_type
|
|
3500
|
-
return_type = opts[:debug_return_type] || '
|
|
4845
|
+
return_type = opts[:debug_return_type] || 'EmailAction'
|
|
3501
4846
|
|
|
3502
4847
|
# auth_names
|
|
3503
4848
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3504
4849
|
|
|
3505
4850
|
new_options = opts.merge(
|
|
3506
|
-
:operation => :"Client.
|
|
4851
|
+
:operation => :"Client.update_email_action_customization",
|
|
3507
4852
|
:header_params => header_params,
|
|
3508
4853
|
:query_params => query_params,
|
|
3509
4854
|
:form_params => form_params,
|
|
@@ -3512,9 +4857,9 @@ end
|
|
|
3512
4857
|
:return_type => return_type
|
|
3513
4858
|
)
|
|
3514
4859
|
|
|
3515
|
-
data, status_code, headers = @api_client.call_api(:
|
|
4860
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3516
4861
|
if @api_client.config.debugging
|
|
3517
|
-
@api_client.config.logger.debug "API called: Client#
|
|
4862
|
+
@api_client.config.logger.debug "API called: Client#update_email_action_customization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3518
4863
|
end
|
|
3519
4864
|
return data, status_code, headers
|
|
3520
4865
|
end
|
|
@@ -3524,6 +4869,7 @@ end
|
|
|
3524
4869
|
# @param signature_request_id [String] The signature request's ID.
|
|
3525
4870
|
# @param body [UpdateSignatureRequestRequest] The settings to change. Properties left out keep their values.
|
|
3526
4871
|
# @param [Hash] opts the optional parameters
|
|
4872
|
+
# @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.
|
|
3527
4873
|
# @return [SignatureRequest]
|
|
3528
4874
|
def update_signature_request(signature_request_id, body, opts = {})
|
|
3529
4875
|
data, _status_code, _headers = update_signature_request_with_http_info(signature_request_id, body, opts)
|
|
@@ -3535,6 +4881,7 @@ end
|
|
|
3535
4881
|
# @param signature_request_id [String] The signature request's ID.
|
|
3536
4882
|
# @param body [UpdateSignatureRequestRequest] The settings to change. Properties left out keep their values.
|
|
3537
4883
|
# @param [Hash] opts the optional parameters
|
|
4884
|
+
# @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.
|
|
3538
4885
|
# @return [Array<(SignatureRequest, Integer, Hash)>] SignatureRequest data, response status code and response headers
|
|
3539
4886
|
def update_signature_request_with_http_info(signature_request_id, body, opts = {})
|
|
3540
4887
|
if @api_client.config.debugging
|
|
@@ -3563,6 +4910,7 @@ end
|
|
|
3563
4910
|
if !content_type.nil?
|
|
3564
4911
|
header_params['Content-Type'] = content_type
|
|
3565
4912
|
end
|
|
4913
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3566
4914
|
|
|
3567
4915
|
# form parameters
|
|
3568
4916
|
form_params = opts[:form_params] || {}
|
|
@@ -3594,10 +4942,11 @@ end
|
|
|
3594
4942
|
end
|
|
3595
4943
|
|
|
3596
4944
|
# Update a template
|
|
3597
|
-
# Changes a template's draft. Properties left out keep their values. `defaults` and `
|
|
4945
|
+
# 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.
|
|
3598
4946
|
# @param template_id [String] The template's ID.
|
|
3599
4947
|
# @param body [UpdateTemplateRequest] The settings to change. Properties left out keep their values.
|
|
3600
4948
|
# @param [Hash] opts the optional parameters
|
|
4949
|
+
# @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.
|
|
3601
4950
|
# @return [Template]
|
|
3602
4951
|
def update_template(template_id, body, opts = {})
|
|
3603
4952
|
data, _status_code, _headers = update_template_with_http_info(template_id, body, opts)
|
|
@@ -3605,10 +4954,11 @@ end
|
|
|
3605
4954
|
end
|
|
3606
4955
|
|
|
3607
4956
|
# Update a template
|
|
3608
|
-
# Changes a template's draft. Properties left out keep their values. `defaults` and `
|
|
4957
|
+
# 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.
|
|
3609
4958
|
# @param template_id [String] The template's ID.
|
|
3610
4959
|
# @param body [UpdateTemplateRequest] The settings to change. Properties left out keep their values.
|
|
3611
4960
|
# @param [Hash] opts the optional parameters
|
|
4961
|
+
# @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.
|
|
3612
4962
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3613
4963
|
def update_template_with_http_info(template_id, body, opts = {})
|
|
3614
4964
|
if @api_client.config.debugging
|
|
@@ -3637,6 +4987,7 @@ end
|
|
|
3637
4987
|
if !content_type.nil?
|
|
3638
4988
|
header_params['Content-Type'] = content_type
|
|
3639
4989
|
end
|
|
4990
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3640
4991
|
|
|
3641
4992
|
# form parameters
|
|
3642
4993
|
form_params = opts[:form_params] || {}
|
|
@@ -3673,6 +5024,7 @@ end
|
|
|
3673
5024
|
# @param body [UpdateTemplateDocumentRequest] The new PDF, or a Word template's new Word document, as one of `cache_id`, `document_url` and `document_base64`.
|
|
3674
5025
|
# @param [Hash] opts the optional parameters
|
|
3675
5026
|
# @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.
|
|
5027
|
+
# @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.
|
|
3676
5028
|
# @return [Template]
|
|
3677
5029
|
def update_template_document(template_id, body, opts = {})
|
|
3678
5030
|
data, _status_code, _headers = update_template_document_with_http_info(template_id, body, opts)
|
|
@@ -3685,6 +5037,7 @@ end
|
|
|
3685
5037
|
# @param body [UpdateTemplateDocumentRequest] The new PDF, or a Word template's new Word document, as one of `cache_id`, `document_url` and `document_base64`.
|
|
3686
5038
|
# @param [Hash] opts the optional parameters
|
|
3687
5039
|
# @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.
|
|
5040
|
+
# @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.
|
|
3688
5041
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3689
5042
|
def update_template_document_with_http_info(template_id, body, opts = {})
|
|
3690
5043
|
if @api_client.config.debugging
|
|
@@ -3714,6 +5067,7 @@ end
|
|
|
3714
5067
|
if !content_type.nil?
|
|
3715
5068
|
header_params['Content-Type'] = content_type
|
|
3716
5069
|
end
|
|
5070
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3717
5071
|
|
|
3718
5072
|
# form parameters
|
|
3719
5073
|
form_params = opts[:form_params] || {}
|
|
@@ -3749,6 +5103,7 @@ end
|
|
|
3749
5103
|
# @param template_id [String] The template's ID.
|
|
3750
5104
|
# @param body [UpdateTemplateFieldsRequest] The fields to change in the template's draft.
|
|
3751
5105
|
# @param [Hash] opts the optional parameters
|
|
5106
|
+
# @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.
|
|
3752
5107
|
# @return [TemplateFields]
|
|
3753
5108
|
def update_template_fields(template_id, body, opts = {})
|
|
3754
5109
|
data, _status_code, _headers = update_template_fields_with_http_info(template_id, body, opts)
|
|
@@ -3760,6 +5115,7 @@ end
|
|
|
3760
5115
|
# @param template_id [String] The template's ID.
|
|
3761
5116
|
# @param body [UpdateTemplateFieldsRequest] The fields to change in the template's draft.
|
|
3762
5117
|
# @param [Hash] opts the optional parameters
|
|
5118
|
+
# @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.
|
|
3763
5119
|
# @return [Array<(TemplateFields, Integer, Hash)>] TemplateFields data, response status code and response headers
|
|
3764
5120
|
def update_template_fields_with_http_info(template_id, body, opts = {})
|
|
3765
5121
|
if @api_client.config.debugging
|
|
@@ -3788,6 +5144,7 @@ end
|
|
|
3788
5144
|
if !content_type.nil?
|
|
3789
5145
|
header_params['Content-Type'] = content_type
|
|
3790
5146
|
end
|
|
5147
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3791
5148
|
|
|
3792
5149
|
# form parameters
|
|
3793
5150
|
form_params = opts[:form_params] || {}
|
|
@@ -3823,6 +5180,7 @@ end
|
|
|
3823
5180
|
# @param webhook_id [String] The webhook's ID.
|
|
3824
5181
|
# @param body [UpdateWebhookRequest] The settings to change. Properties left out keep their values.
|
|
3825
5182
|
# @param [Hash] opts the optional parameters
|
|
5183
|
+
# @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.
|
|
3826
5184
|
# @return [Webhook]
|
|
3827
5185
|
def update_webhook(webhook_id, body, opts = {})
|
|
3828
5186
|
data, _status_code, _headers = update_webhook_with_http_info(webhook_id, body, opts)
|
|
@@ -3834,6 +5192,7 @@ end
|
|
|
3834
5192
|
# @param webhook_id [String] The webhook's ID.
|
|
3835
5193
|
# @param body [UpdateWebhookRequest] The settings to change. Properties left out keep their values.
|
|
3836
5194
|
# @param [Hash] opts the optional parameters
|
|
5195
|
+
# @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.
|
|
3837
5196
|
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
3838
5197
|
def update_webhook_with_http_info(webhook_id, body, opts = {})
|
|
3839
5198
|
if @api_client.config.debugging
|
|
@@ -3862,6 +5221,7 @@ end
|
|
|
3862
5221
|
if !content_type.nil?
|
|
3863
5222
|
header_params['Content-Type'] = content_type
|
|
3864
5223
|
end
|
|
5224
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3865
5225
|
|
|
3866
5226
|
# form parameters
|
|
3867
5227
|
form_params = opts[:form_params] || {}
|
|
@@ -3906,6 +5266,7 @@ end
|
|
|
3906
5266
|
# @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`.
|
|
3907
5267
|
# @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.
|
|
3908
5268
|
# @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.
|
|
5269
|
+
# @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.
|
|
3909
5270
|
# @return [Template]
|
|
3910
5271
|
def upload_template(document, opts = {})
|
|
3911
5272
|
data, _status_code, _headers = upload_template_with_http_info(document, opts)
|
|
@@ -3926,6 +5287,7 @@ end
|
|
|
3926
5287
|
# @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`.
|
|
3927
5288
|
# @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.
|
|
3928
5289
|
# @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.
|
|
5290
|
+
# @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.
|
|
3929
5291
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3930
5292
|
def upload_template_with_http_info(document, opts = {})
|
|
3931
5293
|
if @api_client.config.debugging
|
|
@@ -3951,6 +5313,7 @@ end
|
|
|
3951
5313
|
if !content_type.nil?
|
|
3952
5314
|
header_params['Content-Type'] = content_type
|
|
3953
5315
|
end
|
|
5316
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3954
5317
|
|
|
3955
5318
|
# form parameters
|
|
3956
5319
|
form_params = opts[:form_params] || {}
|
|
@@ -3998,6 +5361,7 @@ end
|
|
|
3998
5361
|
# @param [Hash] opts the optional parameters
|
|
3999
5362
|
# @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.
|
|
4000
5363
|
# @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.
|
|
5364
|
+
# @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.
|
|
4001
5365
|
# @return [Template]
|
|
4002
5366
|
def upload_template_document(template_id, document, opts = {})
|
|
4003
5367
|
data, _status_code, _headers = upload_template_document_with_http_info(template_id, document, opts)
|
|
@@ -4011,6 +5375,7 @@ end
|
|
|
4011
5375
|
# @param [Hash] opts the optional parameters
|
|
4012
5376
|
# @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.
|
|
4013
5377
|
# @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.
|
|
5378
|
+
# @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.
|
|
4014
5379
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
4015
5380
|
def upload_template_document_with_http_info(template_id, document, opts = {})
|
|
4016
5381
|
if @api_client.config.debugging
|
|
@@ -4040,6 +5405,7 @@ end
|
|
|
4040
5405
|
if !content_type.nil?
|
|
4041
5406
|
header_params['Content-Type'] = content_type
|
|
4042
5407
|
end
|
|
5408
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
4043
5409
|
|
|
4044
5410
|
# form parameters
|
|
4045
5411
|
form_params = opts[:form_params] || {}
|
|
@@ -4077,7 +5443,8 @@ end
|
|
|
4077
5443
|
# @param template_id [String] The template's ID.
|
|
4078
5444
|
# @param body [ValidateSubmissionRequest] The submission's data and settings.
|
|
4079
5445
|
# @param [Hash] opts the optional parameters
|
|
4080
|
-
# @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
5446
|
+
# @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`.
|
|
5447
|
+
# @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.
|
|
4081
5448
|
# @return [SubmissionValidation]
|
|
4082
5449
|
def validate_submission(template_id, body, opts = {})
|
|
4083
5450
|
data, _status_code, _headers = validate_submission_with_http_info(template_id, body, opts)
|
|
@@ -4089,7 +5456,8 @@ end
|
|
|
4089
5456
|
# @param template_id [String] The template's ID.
|
|
4090
5457
|
# @param body [ValidateSubmissionRequest] The submission's data and settings.
|
|
4091
5458
|
# @param [Hash] opts the optional parameters
|
|
4092
|
-
# @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
5459
|
+
# @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`.
|
|
5460
|
+
# @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.
|
|
4093
5461
|
# @return [Array<(SubmissionValidation, Integer, Hash)>] SubmissionValidation data, response status code and response headers
|
|
4094
5462
|
def validate_submission_with_http_info(template_id, body, opts = {})
|
|
4095
5463
|
if @api_client.config.debugging
|
|
@@ -4119,6 +5487,7 @@ end
|
|
|
4119
5487
|
if !content_type.nil?
|
|
4120
5488
|
header_params['Content-Type'] = content_type
|
|
4121
5489
|
end
|
|
5490
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
4122
5491
|
|
|
4123
5492
|
# form parameters
|
|
4124
5493
|
form_params = opts[:form_params] || {}
|
|
@@ -4148,5 +5517,71 @@ end
|
|
|
4148
5517
|
end
|
|
4149
5518
|
return data, status_code, headers
|
|
4150
5519
|
end
|
|
5520
|
+
|
|
5521
|
+
# Verify an email domain
|
|
5522
|
+
# 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.
|
|
5523
|
+
# @param email_domain_id [String] The email domain's ID.
|
|
5524
|
+
# @param [Hash] opts the optional parameters
|
|
5525
|
+
# @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.
|
|
5526
|
+
# @return [EmailDomain]
|
|
5527
|
+
def verify_email_domain(email_domain_id, opts = {})
|
|
5528
|
+
data, _status_code, _headers = verify_email_domain_with_http_info(email_domain_id, opts)
|
|
5529
|
+
data
|
|
5530
|
+
end
|
|
5531
|
+
|
|
5532
|
+
# Verify an email domain
|
|
5533
|
+
# 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.
|
|
5534
|
+
# @param email_domain_id [String] The email domain's ID.
|
|
5535
|
+
# @param [Hash] opts the optional parameters
|
|
5536
|
+
# @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.
|
|
5537
|
+
# @return [Array<(EmailDomain, Integer, Hash)>] EmailDomain data, response status code and response headers
|
|
5538
|
+
def verify_email_domain_with_http_info(email_domain_id, opts = {})
|
|
5539
|
+
if @api_client.config.debugging
|
|
5540
|
+
@api_client.config.logger.debug 'Calling API: Client.verify_email_domain ...'
|
|
5541
|
+
end
|
|
5542
|
+
# verify the required parameter 'email_domain_id' is set
|
|
5543
|
+
if @api_client.config.client_side_validation && email_domain_id.nil?
|
|
5544
|
+
fail ArgumentError, "Missing the required parameter 'email_domain_id' when calling Client.verify_email_domain"
|
|
5545
|
+
end
|
|
5546
|
+
# resource path
|
|
5547
|
+
local_var_path = '/email_domains/{email_domain_id}/verify'.sub('{email_domain_id}', CGI.escape(email_domain_id.to_s))
|
|
5548
|
+
|
|
5549
|
+
# query parameters
|
|
5550
|
+
query_params = opts[:query_params] || {}
|
|
5551
|
+
|
|
5552
|
+
# header parameters
|
|
5553
|
+
header_params = opts[:header_params] || {}
|
|
5554
|
+
# HTTP header 'Accept' (if needed)
|
|
5555
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
5556
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
5557
|
+
|
|
5558
|
+
# form parameters
|
|
5559
|
+
form_params = opts[:form_params] || {}
|
|
5560
|
+
|
|
5561
|
+
# http body (model)
|
|
5562
|
+
post_body = opts[:debug_body]
|
|
5563
|
+
|
|
5564
|
+
# return_type
|
|
5565
|
+
return_type = opts[:debug_return_type] || 'EmailDomain'
|
|
5566
|
+
|
|
5567
|
+
# auth_names
|
|
5568
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
5569
|
+
|
|
5570
|
+
new_options = opts.merge(
|
|
5571
|
+
:operation => :"Client.verify_email_domain",
|
|
5572
|
+
:header_params => header_params,
|
|
5573
|
+
:query_params => query_params,
|
|
5574
|
+
:form_params => form_params,
|
|
5575
|
+
:body => post_body,
|
|
5576
|
+
:auth_names => auth_names,
|
|
5577
|
+
:return_type => return_type
|
|
5578
|
+
)
|
|
5579
|
+
|
|
5580
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
5581
|
+
if @api_client.config.debugging
|
|
5582
|
+
@api_client.config.logger.debug "API called: Client#verify_email_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
5583
|
+
end
|
|
5584
|
+
return data, status_code, headers
|
|
5585
|
+
end
|
|
4151
5586
|
end
|
|
4152
5587
|
end
|