docspring 4.2.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/AGENTS.md +2 -2
- data/CHANGELOG.md +82 -0
- data/Gemfile.lock +4 -3
- data/README.md +26 -6
- data/docs/AddTemplateFieldsRequest.md +1 -1
- data/docs/Client.md +2400 -853
- 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 +24 -6
- data/docs/CreateTemplateRequest.md +29 -11
- 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/FieldGroup.md +2 -2
- data/docs/FieldGroupInput.md +1 -1
- data/docs/FieldInput.md +1 -1
- data/docs/GenerateSubmissionFilesRequest.md +1 -1
- data/docs/GeneratedFile.md +2 -2
- 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 +8 -6
- data/docs/SubmissionAction.md +5 -3
- data/docs/SubmissionBatch.md +3 -3
- data/docs/SubmissionFiles.md +4 -0
- data/docs/SubmissionInput.md +5 -5
- data/docs/SubmissionSummary.md +3 -3
- data/docs/Template.md +28 -10
- data/docs/TemplateDiff.md +2 -2
- data/docs/TemplateDocument.md +10 -10
- data/docs/TemplateDocumentSummary.md +4 -4
- data/docs/TemplatePreview.md +1 -1
- data/docs/TemplateSourcePdf.md +1 -1
- data/docs/TemplateSummary.md +5 -3
- data/docs/UpdateAccountEmailActionRequest.md +54 -0
- data/docs/UpdateEmailActionCustomizationRequest.md +46 -0
- data/docs/UpdateEmailActionRequest.md +50 -0
- data/docs/UpdateTemplateDocumentRequest.md +5 -5
- data/docs/UpdateTemplateRequest.md +25 -7
- data/docs/ValidateSubmissionRequest.md +24 -6
- data/docspring.gemspec +2 -2
- data/lib/docspring/api/client.rb +1791 -353
- data/lib/docspring/api_client.rb +2 -2
- data/lib/docspring/api_error.rb +1 -1
- data/lib/docspring/api_model_base.rb +1 -1
- data/lib/docspring/configuration.rb +1 -1
- data/lib/docspring/models/add_template_fields_request.rb +2 -2
- data/lib/docspring/models/ai_field_naming_language.rb +1 -1
- data/lib/docspring/models/authentication_check.rb +1 -1
- data/lib/docspring/models/barcode_symbology.rb +1 -1
- data/lib/docspring/models/check_character.rb +1 -1
- data/lib/docspring/models/combined_field_type.rb +1 -1
- data/lib/docspring/models/combined_pdf.rb +1 -1
- data/lib/docspring/models/combined_pdf_files.rb +1 -1
- data/lib/docspring/models/combined_pdf_list.rb +1 -1
- data/lib/docspring/models/combined_pdf_source.rb +2 -2
- data/lib/docspring/models/combined_pdf_source_input.rb +1 -1
- data/lib/docspring/models/combined_pdf_source_pdf.rb +1 -1
- data/lib/docspring/models/combined_pdf_source_type.rb +1 -1
- data/lib/docspring/models/combined_pdf_state.rb +1 -1
- data/lib/docspring/models/copy_template_request.rb +1 -1
- data/lib/docspring/models/create_account_email_action_request.rb +388 -0
- data/lib/docspring/models/create_combined_pdf_request.rb +1 -1
- data/lib/docspring/models/create_custom_file_from_upload_request.rb +1 -1
- 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_folder_request.rb +1 -1
- data/lib/docspring/models/create_signature_request_event_request.rb +1 -1
- data/lib/docspring/models/create_signature_request_token_request.rb +1 -1
- data/lib/docspring/models/create_submission_batch_request.rb +3 -3
- data/lib/docspring/models/create_submission_request.rb +146 -10
- data/lib/docspring/models/create_template_preview_request.rb +1 -1
- data/lib/docspring/models/create_template_request.rb +123 -13
- data/lib/docspring/models/create_webhook_request.rb +1 -1
- data/lib/docspring/models/custom_file.rb +1 -1
- data/lib/docspring/models/custom_file_list.rb +1 -1
- data/lib/docspring/models/custom_file_source_pdf.rb +1 -1
- 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 +4 -2
- data/lib/docspring/models/error_detail.rb +1 -1
- data/lib/docspring/models/error_info.rb +40 -10
- data/lib/docspring/models/error_response.rb +1 -1
- data/lib/docspring/models/expiration_interval.rb +1 -1
- data/lib/docspring/models/field.rb +3 -3
- data/lib/docspring/models/field_comparison_condition.rb +1 -1
- data/lib/docspring/models/field_comparison_operator.rb +1 -1
- data/lib/docspring/models/field_dependency.rb +1 -1
- data/lib/docspring/models/field_dependency_input.rb +1 -1
- data/lib/docspring/models/field_display_type.rb +1 -1
- data/lib/docspring/models/field_equals_condition.rb +1 -1
- data/lib/docspring/models/field_equals_operator.rb +1 -1
- data/lib/docspring/models/field_group.rb +3 -3
- data/lib/docspring/models/field_group_input.rb +2 -2
- data/lib/docspring/models/field_group_type.rb +1 -1
- data/lib/docspring/models/field_in_condition.rb +1 -1
- data/lib/docspring/models/field_input.rb +3 -3
- data/lib/docspring/models/field_override.rb +1 -1
- data/lib/docspring/models/field_presence_condition.rb +1 -1
- data/lib/docspring/models/field_presence_operator.rb +1 -1
- data/lib/docspring/models/field_range_condition.rb +1 -1
- data/lib/docspring/models/field_reimport_state.rb +1 -1
- data/lib/docspring/models/field_setup_logic.rb +1 -1
- data/lib/docspring/models/field_setup_naming.rb +1 -1
- data/lib/docspring/models/field_setup_source.rb +1 -1
- data/lib/docspring/models/field_type.rb +1 -1
- data/lib/docspring/models/folder.rb +1 -1
- data/lib/docspring/models/folder_list.rb +1 -1
- data/lib/docspring/models/generate_files_format.rb +5 -2
- data/lib/docspring/models/generate_submission_files_request.rb +2 -2
- data/lib/docspring/models/generated_file.rb +4 -4
- data/lib/docspring/models/generated_file_state.rb +1 -1
- data/lib/docspring/models/html_engine_options.rb +2 -2
- data/lib/docspring/models/html_engine_options_input.rb +2 -2
- data/lib/docspring/models/image_gravity.rb +1 -1
- data/lib/docspring/models/image_scale_type.rb +1 -1
- data/lib/docspring/models/model_code_language.rb +3 -2
- data/lib/docspring/models/move_folder_request.rb +1 -1
- data/lib/docspring/models/move_template_request.rb +1 -1
- data/lib/docspring/models/number_condition_type.rb +1 -1
- data/lib/docspring/models/output_format.rb +4 -2
- data/lib/docspring/models/page_format.rb +1 -1
- data/lib/docspring/models/page_image.rb +1 -1
- data/lib/docspring/models/page_images.rb +1 -1
- data/lib/docspring/models/predefined_field.rb +1 -1
- data/lib/docspring/models/predefined_field_input.rb +1 -1
- data/lib/docspring/models/publish_template_version_request.rb +1 -1
- data/lib/docspring/models/remove_template_fields_request.rb +1 -1
- data/lib/docspring/models/rename_folder_request.rb +1 -1
- data/lib/docspring/models/reorder_template_fields_request.rb +1 -1
- data/lib/docspring/models/restore_template_version_request.rb +1 -1
- data/lib/docspring/models/send_account_email_action_test_email_request.rb +168 -0
- data/lib/docspring/models/shape_type.rb +1 -1
- data/lib/docspring/models/signature_request.rb +69 -3
- data/lib/docspring/models/signature_request_auth_second_factor_type.rb +1 -1
- data/lib/docspring/models/signature_request_auth_type.rb +1 -1
- 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.rb +1 -1
- data/lib/docspring/models/signature_request_event_type.rb +4 -2
- data/lib/docspring/models/signature_request_input.rb +26 -23
- data/lib/docspring/models/signature_request_message_type.rb +1 -1
- data/lib/docspring/models/signature_request_reminders.rb +212 -0
- data/lib/docspring/models/signature_request_state.rb +1 -1
- data/lib/docspring/models/signature_request_token.rb +1 -1
- data/lib/docspring/models/signature_request_token_type.rb +1 -1
- data/lib/docspring/models/signing_order.rb +41 -0
- data/lib/docspring/models/string_condition_type.rb +9 -2
- data/lib/docspring/models/submission.rb +36 -9
- data/lib/docspring/models/submission_action.rb +19 -6
- data/lib/docspring/models/submission_action_state.rb +1 -1
- data/lib/docspring/models/submission_action_type.rb +1 -1
- data/lib/docspring/models/submission_batch.rb +5 -5
- data/lib/docspring/models/submission_batch_state.rb +1 -1
- data/lib/docspring/models/submission_files.rb +22 -2
- data/lib/docspring/models/submission_input.rb +6 -6
- data/lib/docspring/models/submission_list.rb +1 -1
- data/lib/docspring/models/submission_source.rb +1 -1
- data/lib/docspring/models/submission_source_pdf.rb +1 -1
- data/lib/docspring/models/submission_state.rb +1 -1
- data/lib/docspring/models/submission_summary.rb +4 -4
- data/lib/docspring/models/submission_validation.rb +1 -1
- data/lib/docspring/models/template.rb +175 -12
- data/lib/docspring/models/template_actor.rb +1 -1
- data/lib/docspring/models/template_actor_type.rb +1 -1
- data/lib/docspring/models/template_defaults.rb +1 -1
- data/lib/docspring/models/template_defaults_input.rb +1 -1
- data/lib/docspring/models/template_diff.rb +3 -3
- data/lib/docspring/models/template_diff_summary.rb +1 -1
- data/lib/docspring/models/template_document.rb +12 -12
- data/lib/docspring/models/template_document_state.rb +4 -2
- data/lib/docspring/models/template_document_summary.rb +6 -6
- data/lib/docspring/models/template_field_change.rb +1 -1
- data/lib/docspring/models/template_field_changes.rb +1 -1
- data/lib/docspring/models/template_field_dependency.rb +1 -1
- data/lib/docspring/models/template_field_dependency_action.rb +1 -1
- data/lib/docspring/models/template_field_dependency_condition.rb +1 -1
- data/lib/docspring/models/template_field_dependency_condition_input.rb +1 -1
- data/lib/docspring/models/template_field_dependency_input.rb +1 -1
- data/lib/docspring/models/template_field_dependency_match.rb +1 -1
- data/lib/docspring/models/template_field_dependency_operator.rb +1 -1
- data/lib/docspring/models/template_field_logic_status.rb +1 -1
- data/lib/docspring/models/template_field_move.rb +1 -1
- data/lib/docspring/models/template_fields.rb +1 -1
- data/lib/docspring/models/template_form_mode.rb +1 -1
- data/lib/docspring/models/template_model_code.rb +1 -1
- data/lib/docspring/models/template_page_ai_error.rb +1 -1
- data/lib/docspring/models/template_page_ai_naming_status.rb +1 -1
- data/lib/docspring/models/template_page_fields_status.rb +1 -1
- data/lib/docspring/models/template_page_image_status.rb +1 -1
- data/lib/docspring/models/template_page_images.rb +1 -1
- data/lib/docspring/models/template_page_processing_status.rb +1 -1
- data/lib/docspring/models/template_preview.rb +3 -3
- data/lib/docspring/models/template_preview_state.rb +1 -1
- data/lib/docspring/models/template_source_pdf.rb +2 -2
- data/lib/docspring/models/template_summary.rb +32 -5
- data/lib/docspring/models/template_summary_list.rb +1 -1
- data/lib/docspring/models/template_type.rb +4 -2
- data/lib/docspring/models/template_version.rb +1 -1
- data/lib/docspring/models/template_version_type.rb +1 -1
- data/lib/docspring/models/text_alignment.rb +1 -1
- data/lib/docspring/models/text_overflow.rb +1 -1
- data/lib/docspring/models/text_vertical_alignment.rb +1 -1
- data/lib/docspring/models/typeface.rb +1 -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_signature_request_request.rb +1 -1
- data/lib/docspring/models/update_template_document_request.rb +7 -7
- data/lib/docspring/models/update_template_fields_request.rb +1 -1
- data/lib/docspring/models/update_template_request.rb +121 -11
- data/lib/docspring/models/update_webhook_request.rb +1 -1
- data/lib/docspring/models/upload_method.rb +1 -1
- data/lib/docspring/models/upload_presign.rb +1 -1
- data/lib/docspring/models/url_source_pdf.rb +1 -1
- data/lib/docspring/models/validate_submission_request.rb +146 -10
- data/lib/docspring/models/webhook.rb +1 -1
- data/lib/docspring/models/webhook_event_type.rb +4 -2
- data/lib/docspring/models/webhook_list.rb +1 -1
- data/lib/docspring/models/webhook_mode.rb +1 -1
- data/lib/docspring/request_schemas.json +1692 -109
- data/lib/docspring/request_validator.rb +4 -0
- data/lib/docspring/version.rb +2 -2
- data/lib/docspring.rb +29 -1
- data/spec/api/client_spec.rb +328 -39
- data/spec/models/add_template_fields_request_spec.rb +1 -1
- data/spec/models/ai_field_naming_language_spec.rb +1 -1
- data/spec/models/authentication_check_spec.rb +1 -1
- data/spec/models/barcode_symbology_spec.rb +1 -1
- data/spec/models/check_character_spec.rb +1 -1
- data/spec/models/combined_field_type_spec.rb +1 -1
- data/spec/models/combined_pdf_files_spec.rb +1 -1
- data/spec/models/combined_pdf_list_spec.rb +1 -1
- data/spec/models/combined_pdf_source_input_spec.rb +1 -1
- data/spec/models/combined_pdf_source_pdf_spec.rb +1 -1
- data/spec/models/combined_pdf_source_spec.rb +1 -1
- data/spec/models/combined_pdf_source_type_spec.rb +1 -1
- data/spec/models/combined_pdf_spec.rb +1 -1
- data/spec/models/combined_pdf_state_spec.rb +1 -1
- data/spec/models/copy_template_request_spec.rb +1 -1
- data/spec/models/create_account_email_action_request_spec.rb +144 -0
- data/spec/models/create_combined_pdf_request_spec.rb +1 -1
- data/spec/models/create_custom_file_from_upload_request_spec.rb +1 -1
- 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_folder_request_spec.rb +1 -1
- data/spec/models/create_signature_request_event_request_spec.rb +1 -1
- data/spec/models/create_signature_request_token_request_spec.rb +1 -1
- data/spec/models/create_submission_batch_request_spec.rb +1 -1
- data/spec/models/create_submission_request_spec.rb +55 -1
- data/spec/models/create_template_preview_request_spec.rb +1 -1
- data/spec/models/create_template_request_spec.rb +55 -1
- data/spec/models/create_webhook_request_spec.rb +1 -1
- data/spec/models/custom_file_list_spec.rb +1 -1
- data/spec/models/custom_file_source_pdf_spec.rb +1 -1
- data/spec/models/custom_file_spec.rb +1 -1
- 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_code_spec.rb +1 -1
- data/spec/models/error_detail_spec.rb +1 -1
- data/spec/models/error_info_spec.rb +19 -1
- data/spec/models/error_response_spec.rb +1 -1
- data/spec/models/expiration_interval_spec.rb +1 -1
- data/spec/models/field_comparison_condition_spec.rb +1 -1
- data/spec/models/field_comparison_operator_spec.rb +1 -1
- data/spec/models/field_dependency_input_spec.rb +1 -1
- data/spec/models/field_dependency_spec.rb +1 -1
- data/spec/models/field_display_type_spec.rb +1 -1
- data/spec/models/field_equals_condition_spec.rb +1 -1
- data/spec/models/field_equals_operator_spec.rb +1 -1
- data/spec/models/field_group_input_spec.rb +1 -1
- data/spec/models/field_group_spec.rb +1 -1
- data/spec/models/field_group_type_spec.rb +1 -1
- data/spec/models/field_in_condition_spec.rb +1 -1
- data/spec/models/field_input_spec.rb +1 -1
- data/spec/models/field_override_spec.rb +1 -1
- data/spec/models/field_presence_condition_spec.rb +1 -1
- data/spec/models/field_presence_operator_spec.rb +1 -1
- data/spec/models/field_range_condition_spec.rb +1 -1
- data/spec/models/field_reimport_state_spec.rb +1 -1
- data/spec/models/field_setup_logic_spec.rb +1 -1
- data/spec/models/field_setup_naming_spec.rb +1 -1
- data/spec/models/field_setup_source_spec.rb +1 -1
- data/spec/models/field_spec.rb +1 -1
- data/spec/models/field_type_spec.rb +1 -1
- data/spec/models/folder_list_spec.rb +1 -1
- data/spec/models/folder_spec.rb +1 -1
- data/spec/models/generate_files_format_spec.rb +1 -1
- data/spec/models/generate_submission_files_request_spec.rb +1 -1
- data/spec/models/generated_file_spec.rb +1 -1
- data/spec/models/generated_file_state_spec.rb +1 -1
- data/spec/models/html_engine_options_input_spec.rb +1 -1
- data/spec/models/html_engine_options_spec.rb +1 -1
- data/spec/models/image_gravity_spec.rb +1 -1
- data/spec/models/image_scale_type_spec.rb +1 -1
- data/spec/models/model_code_language_spec.rb +1 -1
- data/spec/models/move_folder_request_spec.rb +1 -1
- data/spec/models/move_template_request_spec.rb +1 -1
- data/spec/models/number_condition_type_spec.rb +1 -1
- data/spec/models/output_format_spec.rb +1 -1
- data/spec/models/page_format_spec.rb +1 -1
- data/spec/models/page_image_spec.rb +1 -1
- data/spec/models/page_images_spec.rb +1 -1
- data/spec/models/predefined_field_input_spec.rb +1 -1
- data/spec/models/predefined_field_spec.rb +1 -1
- data/spec/models/publish_template_version_request_spec.rb +1 -1
- data/spec/models/remove_template_fields_request_spec.rb +1 -1
- data/spec/models/rename_folder_request_spec.rb +1 -1
- data/spec/models/reorder_template_fields_request_spec.rb +1 -1
- data/spec/models/restore_template_version_request_spec.rb +1 -1
- data/spec/models/send_account_email_action_test_email_request_spec.rb +36 -0
- data/spec/models/shape_type_spec.rb +1 -1
- data/spec/models/signature_request_auth_second_factor_type_spec.rb +1 -1
- data/spec/models/signature_request_auth_type_spec.rb +1 -1
- 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_event_spec.rb +1 -1
- data/spec/models/signature_request_event_type_spec.rb +1 -1
- data/spec/models/signature_request_input_spec.rb +13 -1
- data/spec/models/signature_request_message_type_spec.rb +1 -1
- data/spec/models/signature_request_reminders_spec.rb +42 -0
- data/spec/models/signature_request_spec.rb +25 -1
- data/spec/models/signature_request_state_spec.rb +1 -1
- data/spec/models/signature_request_token_spec.rb +1 -1
- data/spec/models/signature_request_token_type_spec.rb +1 -1
- data/spec/models/signing_order_spec.rb +30 -0
- data/spec/models/string_condition_type_spec.rb +1 -1
- data/spec/models/submission_action_spec.rb +7 -1
- data/spec/models/submission_action_state_spec.rb +1 -1
- data/spec/models/submission_action_type_spec.rb +1 -1
- data/spec/models/submission_batch_spec.rb +1 -1
- data/spec/models/submission_batch_state_spec.rb +1 -1
- data/spec/models/submission_files_spec.rb +13 -1
- data/spec/models/submission_input_spec.rb +1 -1
- data/spec/models/submission_list_spec.rb +1 -1
- data/spec/models/submission_source_pdf_spec.rb +1 -1
- data/spec/models/submission_source_spec.rb +1 -1
- data/spec/models/submission_spec.rb +7 -1
- data/spec/models/submission_state_spec.rb +1 -1
- data/spec/models/submission_summary_spec.rb +1 -1
- data/spec/models/submission_validation_spec.rb +1 -1
- data/spec/models/template_actor_spec.rb +1 -1
- data/spec/models/template_actor_type_spec.rb +1 -1
- data/spec/models/template_defaults_input_spec.rb +1 -1
- data/spec/models/template_defaults_spec.rb +1 -1
- data/spec/models/template_diff_spec.rb +1 -1
- data/spec/models/template_diff_summary_spec.rb +1 -1
- data/spec/models/template_document_spec.rb +1 -1
- data/spec/models/template_document_state_spec.rb +1 -1
- data/spec/models/template_document_summary_spec.rb +1 -1
- data/spec/models/template_field_change_spec.rb +1 -1
- data/spec/models/template_field_changes_spec.rb +1 -1
- data/spec/models/template_field_dependency_action_spec.rb +1 -1
- data/spec/models/template_field_dependency_condition_input_spec.rb +1 -1
- data/spec/models/template_field_dependency_condition_spec.rb +1 -1
- data/spec/models/template_field_dependency_input_spec.rb +1 -1
- data/spec/models/template_field_dependency_match_spec.rb +1 -1
- data/spec/models/template_field_dependency_operator_spec.rb +1 -1
- data/spec/models/template_field_dependency_spec.rb +1 -1
- data/spec/models/template_field_logic_status_spec.rb +1 -1
- data/spec/models/template_field_move_spec.rb +1 -1
- data/spec/models/template_fields_spec.rb +1 -1
- data/spec/models/template_form_mode_spec.rb +1 -1
- data/spec/models/template_model_code_spec.rb +1 -1
- data/spec/models/template_page_ai_error_spec.rb +1 -1
- data/spec/models/template_page_ai_naming_status_spec.rb +1 -1
- data/spec/models/template_page_fields_status_spec.rb +1 -1
- data/spec/models/template_page_image_status_spec.rb +1 -1
- data/spec/models/template_page_images_spec.rb +1 -1
- data/spec/models/template_page_processing_status_spec.rb +1 -1
- data/spec/models/template_preview_spec.rb +1 -1
- data/spec/models/template_preview_state_spec.rb +1 -1
- data/spec/models/template_source_pdf_spec.rb +1 -1
- data/spec/models/template_spec.rb +55 -1
- data/spec/models/template_summary_list_spec.rb +1 -1
- data/spec/models/template_summary_spec.rb +7 -1
- data/spec/models/template_type_spec.rb +1 -1
- data/spec/models/template_version_spec.rb +1 -1
- data/spec/models/template_version_type_spec.rb +1 -1
- data/spec/models/text_alignment_spec.rb +1 -1
- data/spec/models/text_overflow_spec.rb +1 -1
- data/spec/models/text_vertical_alignment_spec.rb +1 -1
- data/spec/models/typeface_spec.rb +1 -1
- 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_signature_request_request_spec.rb +1 -1
- data/spec/models/update_template_document_request_spec.rb +1 -1
- data/spec/models/update_template_fields_request_spec.rb +1 -1
- data/spec/models/update_template_request_spec.rb +55 -1
- data/spec/models/update_webhook_request_spec.rb +1 -1
- data/spec/models/upload_method_spec.rb +1 -1
- data/spec/models/upload_presign_spec.rb +1 -1
- data/spec/models/url_source_pdf_spec.rb +1 -1
- data/spec/models/validate_submission_request_spec.rb +55 -1
- data/spec/models/webhook_event_type_spec.rb +1 -1
- data/spec/models/webhook_list_spec.rb +1 -1
- data/spec/models/webhook_mode_spec.rb +1 -1
- data/spec/models/webhook_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +117 -5
- data/.gitlab-ci.yml +0 -26
- data/.travis.yml +0 -11
data/spec/api/client_spec.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -34,10 +34,11 @@ describe 'Client' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for add_template_fields
|
|
36
36
|
# Add fields to a template
|
|
37
|
-
# Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
|
|
37
|
+
# Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them. A field with the name of one of the template's fields shares its settings (`type`, `required`, `default`, ...), so a field that sets one to another value is refused: PUT /templates/{template_id}/fields changes them for every field with the name.
|
|
38
38
|
# @param template_id The template's ID.
|
|
39
39
|
# @param body The fields to add to the template's draft.
|
|
40
40
|
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
41
42
|
# @return [TemplateFields]
|
|
42
43
|
describe 'add_template_fields test' do
|
|
43
44
|
it 'should work' do
|
|
@@ -51,6 +52,7 @@ describe 'Client' do
|
|
|
51
52
|
# @param template_id The template's ID.
|
|
52
53
|
# @param [Hash] opts the optional parameters
|
|
53
54
|
# @option opts [CopyTemplateRequest] :body Settings for the copy.
|
|
55
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
54
56
|
# @return [Template]
|
|
55
57
|
describe 'copy_template test' do
|
|
56
58
|
it 'should work' do
|
|
@@ -58,13 +60,26 @@ describe 'Client' do
|
|
|
58
60
|
end
|
|
59
61
|
end
|
|
60
62
|
|
|
63
|
+
# unit tests for create_account_email_action
|
|
64
|
+
# Create an account email action
|
|
65
|
+
# Adds an email action to your account. It sends for every template, or only for the templates in `template_ids` and the templates in the folders in `folder_ids` (and the folders inside them). Each template can turn it off or change its settings for that template only (`PUT /templates/{template_id}/email_actions/{email_action_id}/customization`). Without a paid plan (Starter or higher), email actions only email your team: test submissions' emails go to your account's users, and live submissions' emails aren't sent.
|
|
66
|
+
# @param body The account email action to create. Properties left out get their defaults, and it sends for every template unless it lists `template_ids` or `folder_ids`.
|
|
67
|
+
# @param [Hash] opts the optional parameters
|
|
68
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
69
|
+
# @return [EmailAction]
|
|
70
|
+
describe 'create_account_email_action test' do
|
|
71
|
+
it 'should work' do
|
|
72
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
61
76
|
# unit tests for create_combined_pdf
|
|
62
77
|
# Combine PDFs
|
|
63
78
|
# Merges PDFs into one: submissions, other combined PDFs, templates, custom files (POST /custom_files) and PDFs from URLs, in the order of `source_pdfs`. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /combined_pdfs/{combined_pdf_id} until `state` isn't `pending`. A template source merges the template's processed PDF by default: the PDF submissions are filled in on, decrypted and with its form fields removed. Pass `processed: false` to merge the PDF as it was uploaded.
|
|
64
79
|
# @param body The PDFs to merge, and the combined PDF's settings.
|
|
65
80
|
# @param [Hash] opts the optional parameters
|
|
66
81
|
# @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
67
|
-
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of
|
|
82
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
68
83
|
# @return [CombinedPdf]
|
|
69
84
|
describe 'create_combined_pdf test' do
|
|
70
85
|
it 'should work' do
|
|
@@ -77,6 +92,7 @@ describe 'Client' do
|
|
|
77
92
|
# Creates a custom file from a PDF you uploaded, so you can merge it with other PDFs. Upload the file with the presigned upload (GET /uploads/presign) first, then pass its `fields.key` as `cache_id`.
|
|
78
93
|
# @param body The uploaded file to create the custom file from.
|
|
79
94
|
# @param [Hash] opts the optional parameters
|
|
95
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
80
96
|
# @return [CustomFile]
|
|
81
97
|
describe 'create_custom_file_from_upload test' do
|
|
82
98
|
it 'should work' do
|
|
@@ -84,11 +100,39 @@ describe 'Client' do
|
|
|
84
100
|
end
|
|
85
101
|
end
|
|
86
102
|
|
|
103
|
+
# unit tests for create_email_action
|
|
104
|
+
# Create an email action
|
|
105
|
+
# Adds an email action to a template's draft. From then on, each processed submission emails its PDF to the recipients in `to`, `cc` and `bcc`: addresses, and tags for the address in one of the submission's fields (`{{ data.tenant_email }}`) or in its metadata (`{{ metadata.agent_email }}`). With `send_when`, only the submissions whose values meet its conditions send one. Without a paid plan (Starter or higher), email actions only email your team: test submissions' emails go to your account's users, and live submissions' emails aren't sent.
|
|
106
|
+
# @param template_id The template's ID.
|
|
107
|
+
# @param body The email action to create. Properties left out get their defaults.
|
|
108
|
+
# @param [Hash] opts the optional parameters
|
|
109
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
110
|
+
# @return [EmailAction]
|
|
111
|
+
describe 'create_email_action test' do
|
|
112
|
+
it 'should work' do
|
|
113
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# unit tests for create_email_domain
|
|
118
|
+
# Add an email domain
|
|
119
|
+
# Adds a domain for email actions to send from, and returns the DNS records to add to it. DocSpring checks for them every few minutes, and the domain is verified once its DKIM and DMARC records are found. Needs a paid monthly plan.
|
|
120
|
+
# @param body The domain to add.
|
|
121
|
+
# @param [Hash] opts the optional parameters
|
|
122
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
123
|
+
# @return [EmailDomain]
|
|
124
|
+
describe 'create_email_domain test' do
|
|
125
|
+
it 'should work' do
|
|
126
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
87
130
|
# unit tests for create_folder
|
|
88
131
|
# Create a folder
|
|
89
132
|
# Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
90
133
|
# @param body The folder to create.
|
|
91
134
|
# @param [Hash] opts the optional parameters
|
|
135
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
92
136
|
# @return [Folder]
|
|
93
137
|
describe 'create_folder test' do
|
|
94
138
|
it 'should work' do
|
|
@@ -102,6 +146,7 @@ describe 'Client' do
|
|
|
102
146
|
# @param signature_request_id The signature request's ID.
|
|
103
147
|
# @param body The event to record.
|
|
104
148
|
# @param [Hash] opts the optional parameters
|
|
149
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
105
150
|
# @return [SignatureRequestEvent]
|
|
106
151
|
describe 'create_signature_request_event test' do
|
|
107
152
|
it 'should work' do
|
|
@@ -115,6 +160,7 @@ describe 'Client' do
|
|
|
115
160
|
# @param signature_request_id The signature request's ID.
|
|
116
161
|
# @param [Hash] opts the optional parameters
|
|
117
162
|
# @option opts [CreateSignatureRequestTokenRequest] :body The kind of link to make. Send no body for an `api` token.
|
|
163
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
118
164
|
# @return [SignatureRequestToken]
|
|
119
165
|
describe 'create_signature_request_token test' do
|
|
120
166
|
it 'should work' do
|
|
@@ -124,13 +170,13 @@ describe 'Client' do
|
|
|
124
170
|
|
|
125
171
|
# unit tests for create_submission
|
|
126
172
|
# Generate a PDF
|
|
127
|
-
# Creates a submission: fills in a template with your data and generates a PDF. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until `state` isn't `pending`. Data that doesn't match the template's fields returns a 422 with an `invalid_data` error. The submission is still saved, with its errors, so you can find it in DocSpring: the error's `submission_id` is its ID.
|
|
173
|
+
# Creates a submission: fills in a template with your data and generates a PDF. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until `state` isn't `pending`. Data that doesn't match the template's fields returns a 422 with an `invalid_data` error. The submission is still saved, with its errors, so you can find it in DocSpring: the error's `submission_id` is its ID. With `signature_requests`, the PDF is generated once everyone has signed. DocSpring emails each signer a link to sign, unless `send_email` is false, and can send reminders and the completed document.
|
|
128
174
|
# @param template_id The template's ID.
|
|
129
175
|
# @param body The submission's data and settings.
|
|
130
176
|
# @param [Hash] opts the optional parameters
|
|
131
|
-
# @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
177
|
+
# @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`.
|
|
132
178
|
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
133
|
-
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of
|
|
179
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
134
180
|
# @return [Submission]
|
|
135
181
|
describe 'create_submission test' do
|
|
136
182
|
it 'should work' do
|
|
@@ -143,8 +189,8 @@ describe 'Client' do
|
|
|
143
189
|
# Creates up to 50 submissions in one request, from one template or several. The PDFs are only generated when every submission is valid. On sync.api hosts the request waits until every PDF has been generated (unless you pass `wait=false`), otherwise poll GET /submissions/batches/{submission_batch_id} until `processed_at` is set. When any submission is invalid, nothing is generated and the request returns a 422. Submissions whose data doesn't match their template's fields are still saved with their errors (an `invalid_data` error, with each one's `submission_id` in its details), so you can find them in DocSpring. The other submissions aren't saved.
|
|
144
190
|
# @param body The submissions to create, and the settings they share.
|
|
145
191
|
# @param [Hash] opts the optional parameters
|
|
146
|
-
# @option opts [Boolean] :wait Wait until every
|
|
147
|
-
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of
|
|
192
|
+
# @option opts [Boolean] :wait Wait until every file in the batch has been generated before responding. Default true on sync.api hosts.
|
|
193
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
148
194
|
# @return [SubmissionBatch]
|
|
149
195
|
describe 'create_submission_batch test' do
|
|
150
196
|
it 'should work' do
|
|
@@ -154,10 +200,11 @@ describe 'Client' do
|
|
|
154
200
|
|
|
155
201
|
# unit tests for create_template
|
|
156
202
|
# Create a template
|
|
157
|
-
# Creates an HTML template, or a PDF template from a
|
|
203
|
+
# Creates an HTML template, or a PDF or Word template from a file you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. You can send a link to the file (`document_url`) or the file in base64 (`document_base64`) instead, or send the file with the request with POST /templates/upload. A Word template is made from a Word document (.docx) or an OpenDocument text file (.odt), which DocSpring converts to a Word document. It needs its `output_format`: what each submission makes, a Word document (`docx`), an OpenDocument file (`odt`) or a PDF. A page design (`page_designer`) takes its `layout` in the Page Designer layout format, or starts with an empty page without one. A PDF template is ready to generate PDFs once DocSpring has processed its PDF, a template created from a `document_url` once its document has been downloaded, and one created from an .odt once it has been converted (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
|
|
158
204
|
# @param body The template to create.
|
|
159
205
|
# @param [Hash] opts the optional parameters
|
|
160
|
-
# @option opts [Boolean] :wait Wait until the PDF has been processed,
|
|
206
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
207
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
161
208
|
# @return [Template]
|
|
162
209
|
describe 'create_template test' do
|
|
163
210
|
it 'should work' do
|
|
@@ -167,11 +214,12 @@ describe 'Client' do
|
|
|
167
214
|
|
|
168
215
|
# unit tests for create_template_preview
|
|
169
216
|
# Preview a template with data
|
|
170
|
-
# Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML or
|
|
217
|
+
# Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML, PDF or Word template or a page design prints with your data before you publish a version or send live data. A Word template's pages are its PDF's, whatever its `output_format`. It renders the template's draft, or the published `version` you ask for. A preview makes no submission and uses no credits, and its pages are watermarked like a test submission's PDF. It's `pending` while it renders: get it with GET /templates/{template_id}/previews/{preview_id} until it's `processed`, with an image of each page, or `error`.
|
|
171
218
|
# @param template_id The template's ID.
|
|
172
219
|
# @param body The data to render the template with.
|
|
173
220
|
# @param [Hash] opts the optional parameters
|
|
174
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
221
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
222
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
175
223
|
# @return [TemplatePreview]
|
|
176
224
|
describe 'create_template_preview test' do
|
|
177
225
|
it 'should work' do
|
|
@@ -184,6 +232,7 @@ describe 'Client' do
|
|
|
184
232
|
# Creates a webhook that sends a POST request to your endpoint whenever a subscribed event happens. Scope it to API tokens, templates or folders to receive only their events.
|
|
185
233
|
# @param body The webhook to create.
|
|
186
234
|
# @param [Hash] opts the optional parameters
|
|
235
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
187
236
|
# @return [Webhook]
|
|
188
237
|
describe 'create_webhook test' do
|
|
189
238
|
it 'should work' do
|
|
@@ -191,11 +240,25 @@ describe 'Client' do
|
|
|
191
240
|
end
|
|
192
241
|
end
|
|
193
242
|
|
|
243
|
+
# unit tests for delete_account_email_action
|
|
244
|
+
# Delete an account email action
|
|
245
|
+
# Deletes one of your account's email actions, with every template's customization of it. Emails it has already queued for submissions aren't sent. Submissions keep the record of the emails it sent.
|
|
246
|
+
# @param email_action_id The account email action's ID.
|
|
247
|
+
# @param [Hash] opts the optional parameters
|
|
248
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
249
|
+
# @return [EmailAction]
|
|
250
|
+
describe 'delete_account_email_action test' do
|
|
251
|
+
it 'should work' do
|
|
252
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
|
|
194
256
|
# unit tests for delete_custom_file
|
|
195
257
|
# Delete a custom file
|
|
196
258
|
# Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
197
259
|
# @param custom_file_id The custom file's ID.
|
|
198
260
|
# @param [Hash] opts the optional parameters
|
|
261
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
199
262
|
# @return [CustomFile]
|
|
200
263
|
describe 'delete_custom_file test' do
|
|
201
264
|
it 'should work' do
|
|
@@ -203,11 +266,53 @@ describe 'Client' do
|
|
|
203
266
|
end
|
|
204
267
|
end
|
|
205
268
|
|
|
269
|
+
# unit tests for delete_email_action
|
|
270
|
+
# Delete an email action
|
|
271
|
+
# Deletes an email action. Emails it has already queued for submissions aren't sent. Submissions keep the record of the emails it sent.
|
|
272
|
+
# @param template_id The template's ID.
|
|
273
|
+
# @param email_action_id The email action's ID.
|
|
274
|
+
# @param [Hash] opts the optional parameters
|
|
275
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
276
|
+
# @return [EmailAction]
|
|
277
|
+
describe 'delete_email_action test' do
|
|
278
|
+
it 'should work' do
|
|
279
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
280
|
+
end
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# unit tests for delete_email_action_customization
|
|
284
|
+
# Reset an account email action's customization
|
|
285
|
+
# Removes the template's changes to one of your account's email actions: it sends for this template as it is, and again if the template had turned it off.
|
|
286
|
+
# @param template_id The template's ID.
|
|
287
|
+
# @param email_action_id The ID of one of your account's email actions that sends for the template.
|
|
288
|
+
# @param [Hash] opts the optional parameters
|
|
289
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
290
|
+
# @return [EmailAction]
|
|
291
|
+
describe 'delete_email_action_customization test' do
|
|
292
|
+
it 'should work' do
|
|
293
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# unit tests for delete_email_domain
|
|
298
|
+
# Remove an email domain
|
|
299
|
+
# Removes an email domain. Email actions that send from an address at it fail until you add and verify it again, or change their `from_address`. You can then remove its DNS records.
|
|
300
|
+
# @param email_domain_id The email domain's ID.
|
|
301
|
+
# @param [Hash] opts the optional parameters
|
|
302
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
303
|
+
# @return [EmailDomain]
|
|
304
|
+
describe 'delete_email_domain test' do
|
|
305
|
+
it 'should work' do
|
|
306
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
|
|
206
310
|
# unit tests for delete_folder
|
|
207
311
|
# Delete a folder
|
|
208
312
|
# Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
209
313
|
# @param folder_id The folder's ID.
|
|
210
314
|
# @param [Hash] opts the optional parameters
|
|
315
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
211
316
|
# @return [Folder]
|
|
212
317
|
describe 'delete_folder test' do
|
|
213
318
|
it 'should work' do
|
|
@@ -221,6 +326,7 @@ describe 'Client' do
|
|
|
221
326
|
# @param template_id The template's ID.
|
|
222
327
|
# @param [Hash] opts the optional parameters
|
|
223
328
|
# @option opts [String] :version Delete only this published version (`1.2.0`) or the draft (`draft`, when no version has been published). Without it, the draft and every published version are deleted.
|
|
329
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
224
330
|
# @return [Template]
|
|
225
331
|
describe 'delete_template test' do
|
|
226
332
|
it 'should work' do
|
|
@@ -233,6 +339,7 @@ describe 'Client' do
|
|
|
233
339
|
# Deletes a webhook so it stops receiving events, and returns it.
|
|
234
340
|
# @param webhook_id The webhook's ID.
|
|
235
341
|
# @param [Hash] opts the optional parameters
|
|
342
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
236
343
|
# @return [Webhook]
|
|
237
344
|
describe 'delete_webhook test' do
|
|
238
345
|
it 'should work' do
|
|
@@ -245,6 +352,7 @@ describe 'Client' do
|
|
|
245
352
|
# Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
246
353
|
# @param combined_pdf_id The combined PDF's ID.
|
|
247
354
|
# @param [Hash] opts the optional parameters
|
|
355
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
248
356
|
# @return [CombinedPdf]
|
|
249
357
|
describe 'expire_combined_pdf test' do
|
|
250
358
|
it 'should work' do
|
|
@@ -257,6 +365,7 @@ describe 'Client' do
|
|
|
257
365
|
# Deletes a submission's data and PDF now, and returns the expired submission.
|
|
258
366
|
# @param submission_id The submission's ID.
|
|
259
367
|
# @param [Hash] opts the optional parameters
|
|
368
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
260
369
|
# @return [Submission]
|
|
261
370
|
describe 'expire_submission test' do
|
|
262
371
|
it 'should work' do
|
|
@@ -266,11 +375,12 @@ describe 'Client' do
|
|
|
266
375
|
|
|
267
376
|
# unit tests for generate_submission_files
|
|
268
377
|
# Generate more files
|
|
269
|
-
# Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
378
|
+
# Adds formats to a processed submission's files, in the background, without using credits again: `pdf`, the PDF of a Word template's submission that made only its Word document (converted from that document), `docx`, the Word document of a Word template's submission that made only its PDF (made again from its data and the template version it used), `odt`, a Word template's submission's OpenDocument file (converted from its Word document, or from one made again when it didn't keep one), and `png`, a PNG image of each page of the PDF (up to 100 pages), which makes the PDF first when the submission doesn't have one. To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
270
379
|
# @param submission_id The submission's ID.
|
|
271
380
|
# @param body The formats to make.
|
|
272
381
|
# @param [Hash] opts the optional parameters
|
|
273
382
|
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
383
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
274
384
|
# @return [Submission]
|
|
275
385
|
describe 'generate_submission_files test' do
|
|
276
386
|
it 'should work' do
|
|
@@ -283,6 +393,7 @@ describe 'Client' do
|
|
|
283
393
|
# Generates a preview of a submission's PDF in the background, such as for a submission still waiting for its signature requests. It's in `files.preview` once `preview_generated_at` changes.
|
|
284
394
|
# @param submission_id The submission's ID.
|
|
285
395
|
# @param [Hash] opts the optional parameters
|
|
396
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
286
397
|
# @return [Submission]
|
|
287
398
|
describe 'generate_submission_preview test' do
|
|
288
399
|
it 'should work' do
|
|
@@ -290,6 +401,18 @@ describe 'Client' do
|
|
|
290
401
|
end
|
|
291
402
|
end
|
|
292
403
|
|
|
404
|
+
# unit tests for get_account_email_action
|
|
405
|
+
# Get an account email action
|
|
406
|
+
# Returns one of your account's email actions, with its settings and whether its emails are failing.
|
|
407
|
+
# @param email_action_id The account email action's ID.
|
|
408
|
+
# @param [Hash] opts the optional parameters
|
|
409
|
+
# @return [EmailAction]
|
|
410
|
+
describe 'get_account_email_action test' do
|
|
411
|
+
it 'should work' do
|
|
412
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
413
|
+
end
|
|
414
|
+
end
|
|
415
|
+
|
|
293
416
|
# unit tests for get_combined_pdf
|
|
294
417
|
# Get a combined PDF
|
|
295
418
|
# Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
@@ -314,6 +437,31 @@ describe 'Client' do
|
|
|
314
437
|
end
|
|
315
438
|
end
|
|
316
439
|
|
|
440
|
+
# unit tests for get_email_action
|
|
441
|
+
# Get an email action
|
|
442
|
+
# Returns one of a template's email actions, with its settings and whether its emails are failing.
|
|
443
|
+
# @param template_id The template's ID.
|
|
444
|
+
# @param email_action_id The email action's ID.
|
|
445
|
+
# @param [Hash] opts the optional parameters
|
|
446
|
+
# @return [EmailAction]
|
|
447
|
+
describe 'get_email_action test' do
|
|
448
|
+
it 'should work' do
|
|
449
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
450
|
+
end
|
|
451
|
+
end
|
|
452
|
+
|
|
453
|
+
# unit tests for get_email_domain
|
|
454
|
+
# Get an email domain
|
|
455
|
+
# Returns an email domain, whether it's verified, and the DNS records to add to it.
|
|
456
|
+
# @param email_domain_id The email domain's ID.
|
|
457
|
+
# @param [Hash] opts the optional parameters
|
|
458
|
+
# @return [EmailDomain]
|
|
459
|
+
describe 'get_email_domain test' do
|
|
460
|
+
it 'should work' do
|
|
461
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
462
|
+
end
|
|
463
|
+
end
|
|
464
|
+
|
|
317
465
|
# unit tests for get_folder
|
|
318
466
|
# Get a folder
|
|
319
467
|
# Returns a folder.
|
|
@@ -379,7 +527,7 @@ describe 'Client' do
|
|
|
379
527
|
# Returns a template: its draft, or one of its published versions.
|
|
380
528
|
# @param template_id The template's ID.
|
|
381
529
|
# @param [Hash] opts the optional parameters
|
|
382
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
530
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
383
531
|
# @return [Template]
|
|
384
532
|
describe 'get_template test' do
|
|
385
533
|
it 'should work' do
|
|
@@ -392,7 +540,7 @@ describe 'Client' do
|
|
|
392
540
|
# Returns what changed in the template's draft since its latest published version (or in a published version since the one before it): fields added, removed, changed and moved, the settings that changed, and whether the document was replaced. Check it before you publish a version.
|
|
393
541
|
# @param template_id The template's ID.
|
|
394
542
|
# @param [Hash] opts the optional parameters
|
|
395
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
543
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
396
544
|
# @return [TemplateDiff]
|
|
397
545
|
describe 'get_template_diff test' do
|
|
398
546
|
it 'should work' do
|
|
@@ -402,12 +550,12 @@ describe 'Client' do
|
|
|
402
550
|
|
|
403
551
|
# unit tests for get_template_model_code
|
|
404
552
|
# Generate typed code for a template's submission data
|
|
405
|
-
# Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or
|
|
553
|
+
# Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir, Go or Rust, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object, and `just_types=true` leaves out the code that converts JSON to and from the types. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
|
|
406
554
|
# @param template_id The template's ID.
|
|
407
555
|
# @param lang The language to generate the code in.
|
|
408
556
|
# @param [Hash] opts the optional parameters
|
|
409
|
-
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
410
|
-
# @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
|
|
557
|
+
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`, the version a submission uses by default.
|
|
558
|
+
# @option opts [Boolean] :just_types Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types, PHP has no types-only code, and Rust's code is only types (serde converts the JSON), so theirs is the same either way.
|
|
411
559
|
# @return [TemplateModelCode]
|
|
412
560
|
describe 'get_template_model_code test' do
|
|
413
561
|
it 'should work' do
|
|
@@ -420,7 +568,7 @@ describe 'Client' do
|
|
|
420
568
|
# Returns a JPEG image of each page of a PDF template's PDF, with temporary links to download them: the draft's PDF, or a published version's. Use them to see the pages that fields are placed on.
|
|
421
569
|
# @param template_id The template's ID.
|
|
422
570
|
# @param [Hash] opts the optional parameters
|
|
423
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
571
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
424
572
|
# @return [TemplatePageImages]
|
|
425
573
|
describe 'get_template_page_images test' do
|
|
426
574
|
it 'should work' do
|
|
@@ -446,7 +594,7 @@ describe 'Client' do
|
|
|
446
594
|
# Returns the JSON Schema that a submission's `data` must match. Use it to check data before you create submissions, or to build a form for the template's fields.
|
|
447
595
|
# @param template_id The template's ID.
|
|
448
596
|
# @param [Hash] opts the optional parameters
|
|
449
|
-
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
597
|
+
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`, the version a submission uses by default.
|
|
450
598
|
# @return [Hash<String, Object>]
|
|
451
599
|
describe 'get_template_schema test' do
|
|
452
600
|
it 'should work' do
|
|
@@ -466,6 +614,19 @@ describe 'Client' do
|
|
|
466
614
|
end
|
|
467
615
|
end
|
|
468
616
|
|
|
617
|
+
# unit tests for list_account_email_actions
|
|
618
|
+
# List account email actions
|
|
619
|
+
# Returns your account's email actions, newest first, one page at a time. Each one emails the files of every template's processed submissions, or of the templates and folders it lists. A template's own email actions are listed with the template (`GET /templates/{template_id}/email_actions`).
|
|
620
|
+
# @param [Hash] opts the optional parameters
|
|
621
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
622
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
623
|
+
# @return [EmailActionList]
|
|
624
|
+
describe 'list_account_email_actions test' do
|
|
625
|
+
it 'should work' do
|
|
626
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
627
|
+
end
|
|
628
|
+
end
|
|
629
|
+
|
|
469
630
|
# unit tests for list_combined_pdfs
|
|
470
631
|
# List combined PDFs
|
|
471
632
|
# Returns the combined PDFs in your account, newest first, one page at a time.
|
|
@@ -492,6 +653,33 @@ describe 'Client' do
|
|
|
492
653
|
end
|
|
493
654
|
end
|
|
494
655
|
|
|
656
|
+
# unit tests for list_email_actions
|
|
657
|
+
# List email actions
|
|
658
|
+
# Returns the email actions of a template's draft, and your account's email actions that send for it, newest first, one page at a time. Each one emails every processed submission's files to the people it lists. An account email action (`template_id` null) shows the settings it sends for this template, with the template's changes in `customization`.
|
|
659
|
+
# @param template_id The template's ID.
|
|
660
|
+
# @param [Hash] opts the optional parameters
|
|
661
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
662
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
663
|
+
# @return [EmailActionList]
|
|
664
|
+
describe 'list_email_actions test' do
|
|
665
|
+
it 'should work' do
|
|
666
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
667
|
+
end
|
|
668
|
+
end
|
|
669
|
+
|
|
670
|
+
# unit tests for list_email_domains
|
|
671
|
+
# List email domains
|
|
672
|
+
# Returns the domains in your account that email actions can send from once they're verified, newest first, one page at a time.
|
|
673
|
+
# @param [Hash] opts the optional parameters
|
|
674
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
675
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
676
|
+
# @return [EmailDomainList]
|
|
677
|
+
describe 'list_email_domains test' do
|
|
678
|
+
it 'should work' do
|
|
679
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
680
|
+
end
|
|
681
|
+
end
|
|
682
|
+
|
|
495
683
|
# unit tests for list_folders
|
|
496
684
|
# List folders
|
|
497
685
|
# Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
@@ -531,7 +719,7 @@ describe 'Client' do
|
|
|
531
719
|
# Returns a template's fields with all of their settings, page by page: the draft's fields, or a published version's. A PDF template's fields are placed on its pages: GET /templates/{template_id}/page_images has images of the pages.
|
|
532
720
|
# @param template_id The template's ID.
|
|
533
721
|
# @param [Hash] opts the optional parameters
|
|
534
|
-
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
722
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `draft`.
|
|
535
723
|
# @return [TemplateFields]
|
|
536
724
|
describe 'list_template_fields test' do
|
|
537
725
|
it 'should work' do
|
|
@@ -563,7 +751,7 @@ describe 'Client' do
|
|
|
563
751
|
# List templates
|
|
564
752
|
# Returns the templates in your account (their drafts), newest first, one page at a time. Each one is a summary: get a template by its ID for its settings, its PDF in full, its HTML, defaults and published versions.
|
|
565
753
|
# @param [Hash] opts the optional parameters
|
|
566
|
-
# @option opts [String] :query Only list templates whose name contains this text (ignoring case).
|
|
754
|
+
# @option opts [String] :query Only list templates whose name contains this text (ignoring case). `%` and `_` match themselves.
|
|
567
755
|
# @option opts [String] :parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
568
756
|
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
569
757
|
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
@@ -598,6 +786,7 @@ describe 'Client' do
|
|
|
598
786
|
# @param folder_id The folder's ID.
|
|
599
787
|
# @param body Where to move the folder.
|
|
600
788
|
# @param [Hash] opts the optional parameters
|
|
789
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
601
790
|
# @return [Folder]
|
|
602
791
|
describe 'move_folder test' do
|
|
603
792
|
it 'should work' do
|
|
@@ -611,6 +800,7 @@ describe 'Client' do
|
|
|
611
800
|
# @param template_id The template's ID.
|
|
612
801
|
# @param body Where to move the template.
|
|
613
802
|
# @param [Hash] opts the optional parameters
|
|
803
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
614
804
|
# @return [Template]
|
|
615
805
|
describe 'move_template test' do
|
|
616
806
|
it 'should work' do
|
|
@@ -620,10 +810,11 @@ describe 'Client' do
|
|
|
620
810
|
|
|
621
811
|
# unit tests for publish_template_version
|
|
622
812
|
# Publish a template version
|
|
623
|
-
# Publishes the template's draft as a new version
|
|
813
|
+
# 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.
|
|
624
814
|
# @param template_id The template's ID.
|
|
625
815
|
# @param body The version to publish.
|
|
626
816
|
# @param [Hash] opts the optional parameters
|
|
817
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
627
818
|
# @return [TemplateVersion]
|
|
628
819
|
describe 'publish_template_version test' do
|
|
629
820
|
it 'should work' do
|
|
@@ -637,6 +828,7 @@ describe 'Client' do
|
|
|
637
828
|
# @param template_id The template's ID.
|
|
638
829
|
# @param body The fields to remove from the template's draft.
|
|
639
830
|
# @param [Hash] opts the optional parameters
|
|
831
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
640
832
|
# @return [TemplateFields]
|
|
641
833
|
describe 'remove_template_fields test' do
|
|
642
834
|
it 'should work' do
|
|
@@ -650,6 +842,7 @@ describe 'Client' do
|
|
|
650
842
|
# @param folder_id The folder's ID.
|
|
651
843
|
# @param body The folder's new name.
|
|
652
844
|
# @param [Hash] opts the optional parameters
|
|
845
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
653
846
|
# @return [Folder]
|
|
654
847
|
describe 'rename_folder test' do
|
|
655
848
|
it 'should work' do
|
|
@@ -663,6 +856,7 @@ describe 'Client' do
|
|
|
663
856
|
# @param template_id The template's ID.
|
|
664
857
|
# @param body The new order of the fields in the template's draft.
|
|
665
858
|
# @param [Hash] opts the optional parameters
|
|
859
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
666
860
|
# @return [TemplateFields]
|
|
667
861
|
describe 'reorder_template_fields test' do
|
|
668
862
|
it 'should work' do
|
|
@@ -672,10 +866,11 @@ describe 'Client' do
|
|
|
672
866
|
|
|
673
867
|
# unit tests for restore_template_version
|
|
674
868
|
# Restore a template version
|
|
675
|
-
# Replaces the template's draft with a copy of one of its published versions.
|
|
869
|
+
# 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`.
|
|
676
870
|
# @param template_id The template's ID.
|
|
677
871
|
# @param body The version to restore.
|
|
678
872
|
# @param [Hash] opts the optional parameters
|
|
873
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
679
874
|
# @return [Template]
|
|
680
875
|
describe 'restore_template_version test' do
|
|
681
876
|
it 'should work' do
|
|
@@ -683,6 +878,34 @@ describe 'Client' do
|
|
|
683
878
|
end
|
|
684
879
|
end
|
|
685
880
|
|
|
881
|
+
# unit tests for send_account_email_action_test_email
|
|
882
|
+
# Send a test email for an account email action
|
|
883
|
+
# Sends the account email action's email to the API token's user only, as it would go for one template it sends for, with each field shown as its name in brackets, so you can check how it looks. When the email action attaches its files and that template is a PDF template, the test attaches the template's blank PDF. It isn't recorded on any submission.
|
|
884
|
+
# @param email_action_id The account email action's ID.
|
|
885
|
+
# @param [Hash] opts the optional parameters
|
|
886
|
+
# @option opts [SendAccountEmailActionTestEmailRequest] :body Which template the test email is for.
|
|
887
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
888
|
+
# @return [EmailActionTestEmail]
|
|
889
|
+
describe 'send_account_email_action_test_email test' do
|
|
890
|
+
it 'should work' do
|
|
891
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
892
|
+
end
|
|
893
|
+
end
|
|
894
|
+
|
|
895
|
+
# unit tests for send_email_action_test_email
|
|
896
|
+
# Send a test email
|
|
897
|
+
# Sends the email action's email to the API token's user only, with each field and metadata value shown as its name in brackets, so you can check how it looks. When the email action attaches its files and the template is a PDF template, the test attaches the template's blank PDF. It isn't recorded on any submission. Without a paid plan, the user needs a confirmed email address.
|
|
898
|
+
# @param template_id The template's ID.
|
|
899
|
+
# @param email_action_id The email action's ID.
|
|
900
|
+
# @param [Hash] opts the optional parameters
|
|
901
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
902
|
+
# @return [EmailActionTestEmail]
|
|
903
|
+
describe 'send_email_action_test_email test' do
|
|
904
|
+
it 'should work' do
|
|
905
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
906
|
+
end
|
|
907
|
+
end
|
|
908
|
+
|
|
686
909
|
# unit tests for test_authentication
|
|
687
910
|
# Test authentication
|
|
688
911
|
# Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
|
|
@@ -694,12 +917,57 @@ describe 'Client' do
|
|
|
694
917
|
end
|
|
695
918
|
end
|
|
696
919
|
|
|
920
|
+
# unit tests for update_account_email_action
|
|
921
|
+
# Update an account email action
|
|
922
|
+
# Changes one of your account's email actions. Properties left out keep their values. Its templates' customizations keep their own changes, and follow the rest. Set `enabled` to false to stop its emails for every template.
|
|
923
|
+
# @param email_action_id The account email action's ID.
|
|
924
|
+
# @param body The settings to change. Properties left out keep their values.
|
|
925
|
+
# @param [Hash] opts the optional parameters
|
|
926
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
927
|
+
# @return [EmailAction]
|
|
928
|
+
describe 'update_account_email_action test' do
|
|
929
|
+
it 'should work' do
|
|
930
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
931
|
+
end
|
|
932
|
+
end
|
|
933
|
+
|
|
934
|
+
# unit tests for update_email_action
|
|
935
|
+
# Update an email action
|
|
936
|
+
# Changes an email action's settings. Properties left out keep their values. Set `enabled` to false to stop its emails, or to true to turn it back on after DocSpring turned it off.
|
|
937
|
+
# @param template_id The template's ID.
|
|
938
|
+
# @param email_action_id The email action's ID.
|
|
939
|
+
# @param body The settings to change. Properties left out keep their values.
|
|
940
|
+
# @param [Hash] opts the optional parameters
|
|
941
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
942
|
+
# @return [EmailAction]
|
|
943
|
+
describe 'update_email_action test' do
|
|
944
|
+
it 'should work' do
|
|
945
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
946
|
+
end
|
|
947
|
+
end
|
|
948
|
+
|
|
949
|
+
# unit tests for update_email_action_customization
|
|
950
|
+
# Customize an account email action for a template
|
|
951
|
+
# Changes one of your account's email actions for this template only, replacing any changes the template had. Each setting you send is changed for this template, and the ones you leave out follow the account email action, including later changes to it. Set `enabled` to false to stop it sending for this template.
|
|
952
|
+
# @param template_id The template's ID.
|
|
953
|
+
# @param email_action_id The ID of one of your account's email actions that sends for the template.
|
|
954
|
+
# @param body The template's changes to the account email action, replacing any it had. Each setting you send is changed for this template, and the ones you leave out follow the account email action. `enabled: false` stops it sending for this template; left out, it sends.
|
|
955
|
+
# @param [Hash] opts the optional parameters
|
|
956
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
957
|
+
# @return [EmailAction]
|
|
958
|
+
describe 'update_email_action_customization test' do
|
|
959
|
+
it 'should work' do
|
|
960
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
961
|
+
end
|
|
962
|
+
end
|
|
963
|
+
|
|
697
964
|
# unit tests for update_signature_request
|
|
698
965
|
# Update a signature request
|
|
699
966
|
# Changes a pending signature request's metadata, or how your app authenticated the person (for the audit trail). Once the person has opened it, only its metadata can be changed, and a completed or declined signature request can't be changed.
|
|
700
967
|
# @param signature_request_id The signature request's ID.
|
|
701
968
|
# @param body The settings to change. Properties left out keep their values.
|
|
702
969
|
# @param [Hash] opts the optional parameters
|
|
970
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
703
971
|
# @return [SignatureRequest]
|
|
704
972
|
describe 'update_signature_request test' do
|
|
705
973
|
it 'should work' do
|
|
@@ -709,10 +977,11 @@ describe 'Client' do
|
|
|
709
977
|
|
|
710
978
|
# unit tests for update_template
|
|
711
979
|
# Update a template
|
|
712
|
-
# Changes a template's draft. Properties left out keep their values. `defaults` and `
|
|
980
|
+
# Changes a template's draft. Properties left out keep their values. `defaults`, `html_engine_options` and a page design's `layout` replace the whole object, and `field_groups` changes only the groups it lists. A new layout adds a field for each new value it reads. Settings such as `webhook_url`, `public_submissions` and `expire_after` apply to every published version too, and setting `parent_folder_id` moves the template and all of its published versions.
|
|
713
981
|
# @param template_id The template's ID.
|
|
714
982
|
# @param body The settings to change. Properties left out keep their values.
|
|
715
983
|
# @param [Hash] opts the optional parameters
|
|
984
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
716
985
|
# @return [Template]
|
|
717
986
|
describe 'update_template test' do
|
|
718
987
|
it 'should work' do
|
|
@@ -721,12 +990,13 @@ describe 'Client' do
|
|
|
721
990
|
end
|
|
722
991
|
|
|
723
992
|
# unit tests for update_template_document
|
|
724
|
-
# Replace a template's
|
|
725
|
-
# Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`).
|
|
993
|
+
# Replace a template's document
|
|
994
|
+
# Replaces a PDF template's PDF, or a Word template's Word document (from a .docx or an .odt), with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). A PDF template's fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields, and a Word template gets a field for each new tag. To send the file as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
|
|
726
995
|
# @param template_id The template's ID.
|
|
727
|
-
# @param body The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
|
|
996
|
+
# @param body The new PDF, or a Word template's new Word document, as one of `cache_id`, `document_url` and `document_base64`.
|
|
728
997
|
# @param [Hash] opts the optional parameters
|
|
729
|
-
# @option opts [Boolean] :wait Wait until the PDF has been processed,
|
|
998
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
999
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
730
1000
|
# @return [Template]
|
|
731
1001
|
describe 'update_template_document test' do
|
|
732
1002
|
it 'should work' do
|
|
@@ -740,6 +1010,7 @@ describe 'Client' do
|
|
|
740
1010
|
# @param template_id The template's ID.
|
|
741
1011
|
# @param body The fields to change in the template's draft.
|
|
742
1012
|
# @param [Hash] opts the optional parameters
|
|
1013
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
743
1014
|
# @return [TemplateFields]
|
|
744
1015
|
describe 'update_template_fields test' do
|
|
745
1016
|
it 'should work' do
|
|
@@ -753,6 +1024,7 @@ describe 'Client' do
|
|
|
753
1024
|
# @param webhook_id The webhook's ID.
|
|
754
1025
|
# @param body The settings to change. Properties left out keep their values.
|
|
755
1026
|
# @param [Hash] opts the optional parameters
|
|
1027
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
756
1028
|
# @return [Webhook]
|
|
757
1029
|
describe 'update_webhook test' do
|
|
758
1030
|
it 'should work' do
|
|
@@ -761,11 +1033,11 @@ describe 'Client' do
|
|
|
761
1033
|
end
|
|
762
1034
|
|
|
763
1035
|
# unit tests for upload_template
|
|
764
|
-
# Create a
|
|
765
|
-
# Creates a PDF template from a PDF sent with the request (`multipart/form-data`). For large files, upload the
|
|
766
|
-
# @param document
|
|
1036
|
+
# Create a template from an uploaded PDF or Word document
|
|
1037
|
+
# Creates a PDF template from a PDF, or a Word template from a Word document (.docx) or an OpenDocument text file (.odt), sent with the request (`multipart/form-data`). A Word template needs its `output_format`. For large files, upload the file with the presigned upload (GET /uploads/presign) and create the template with POST /templates.
|
|
1038
|
+
# @param document A PDF (for a PDF template) or a Word document (.docx or .odt, for a Word template). DocSpring converts an OpenDocument text file (.odt) to a Word document after responding: the template's `document.state` is `converting` until then (sync.api hosts wait for it).
|
|
767
1039
|
# @param [Hash] opts the optional parameters
|
|
768
|
-
# @option opts [Boolean] :wait Wait until the PDF has been processed,
|
|
1040
|
+
# @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.
|
|
769
1041
|
# @option opts [String] :name The template's name.
|
|
770
1042
|
# @option opts [String] :description The template's description.
|
|
771
1043
|
# @option opts [String] :parent_folder_id The folder to put the template in. Left out, it's created at the root.
|
|
@@ -774,6 +1046,8 @@ describe 'Client' do
|
|
|
774
1046
|
# @option opts [FieldSetupSource] :field_source With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields.
|
|
775
1047
|
# @option opts [FieldSetupNaming] :field_naming With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`.
|
|
776
1048
|
# @option opts [FieldSetupLogic] :field_logic With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings.
|
|
1049
|
+
# @option opts [OutputFormat] :output_format What each submission of a Word template makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. Required when `document` is a Word document.
|
|
1050
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
777
1051
|
# @return [Template]
|
|
778
1052
|
describe 'upload_template test' do
|
|
779
1053
|
it 'should work' do
|
|
@@ -782,13 +1056,14 @@ describe 'Client' do
|
|
|
782
1056
|
end
|
|
783
1057
|
|
|
784
1058
|
# unit tests for upload_template_document
|
|
785
|
-
# Replace a template's
|
|
786
|
-
# Replaces a PDF template's PDF with one sent with the request (`multipart/form-data`).
|
|
1059
|
+
# Replace a template's document with an uploaded file
|
|
1060
|
+
# Replaces a PDF template's PDF, or a Word template's Word document, with one sent with the request (`multipart/form-data`). A PDF template's fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields, and a Word template gets a field for each new tag.
|
|
787
1061
|
# @param template_id The template's ID.
|
|
788
|
-
# @param document The new PDF.
|
|
1062
|
+
# @param document The new PDF, or the new Word document (.docx or .odt) of a Word template.
|
|
789
1063
|
# @param [Hash] opts the optional parameters
|
|
790
|
-
# @option opts [Boolean] :wait Wait until the PDF has been processed,
|
|
791
|
-
# @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.
|
|
1064
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
1065
|
+
# @option opts [Boolean] :reimport_fields Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields. Only for PDF templates: a Word template adds a field for each new tag.
|
|
1066
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
792
1067
|
# @return [Template]
|
|
793
1068
|
describe 'upload_template_document test' do
|
|
794
1069
|
it 'should work' do
|
|
@@ -802,7 +1077,8 @@ describe 'Client' do
|
|
|
802
1077
|
# @param template_id The template's ID.
|
|
803
1078
|
# @param body The submission's data and settings.
|
|
804
1079
|
# @param [Hash] opts the optional parameters
|
|
805
|
-
# @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest`
|
|
1080
|
+
# @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`.
|
|
1081
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
806
1082
|
# @return [SubmissionValidation]
|
|
807
1083
|
describe 'validate_submission test' do
|
|
808
1084
|
it 'should work' do
|
|
@@ -810,4 +1086,17 @@ describe 'Client' do
|
|
|
810
1086
|
end
|
|
811
1087
|
end
|
|
812
1088
|
|
|
1089
|
+
# unit tests for verify_email_domain
|
|
1090
|
+
# Verify an email domain
|
|
1091
|
+
# Checks the email domain's DNS records now, instead of waiting for the next check. If DocSpring has stopped looking for its DKIM records (3 days after they were created), it starts again with new ones: replace the CNAME records with them.
|
|
1092
|
+
# @param email_domain_id The email domain's ID.
|
|
1093
|
+
# @param [Hash] opts the optional parameters
|
|
1094
|
+
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of processing it again. Send a new key with each new request, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` with a `Retry-After` header means the first request is still being processed: send the request again then.
|
|
1095
|
+
# @return [EmailDomain]
|
|
1096
|
+
describe 'verify_email_domain test' do
|
|
1097
|
+
it 'should work' do
|
|
1098
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1099
|
+
end
|
|
1100
|
+
end
|
|
1101
|
+
|
|
813
1102
|
end
|