docspring 4.5.0 → 4.6.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/CHANGELOG.md +38 -0
- data/README.md +1 -1
- data/lib/docspring/api/client.rb +10 -4
- data/lib/docspring/api_client.rb +1 -1
- data/lib/docspring/models/combined_pdf.rb +1 -1
- data/lib/docspring/models/create_account_email_action_request.rb +1 -1
- data/lib/docspring/models/create_combined_pdf_request.rb +1 -1
- data/lib/docspring/models/create_email_action_request.rb +1 -1
- data/lib/docspring/models/create_submission_request.rb +5 -5
- data/lib/docspring/models/create_template_request.rb +76 -12
- data/lib/docspring/models/email_action.rb +1 -1
- data/lib/docspring/models/error_info.rb +1 -1
- data/lib/docspring/models/field.rb +166 -3
- data/lib/docspring/models/field_input.rb +77 -3
- data/lib/docspring/models/field_override.rb +55 -2
- data/lib/docspring/models/generated_file.rb +2 -2
- data/lib/docspring/models/number_part.rb +42 -0
- data/lib/docspring/models/predefined_field.rb +14 -1
- data/lib/docspring/models/predefined_field_input.rb +14 -1
- data/lib/docspring/models/signature_request.rb +3 -3
- data/lib/docspring/models/signature_request_input.rb +3 -10
- data/lib/docspring/models/submission.rb +3 -3
- data/lib/docspring/models/submission_files.rb +11 -1
- data/lib/docspring/models/submission_input.rb +2 -2
- data/lib/docspring/models/submission_summary.rb +1 -1
- data/lib/docspring/models/template.rb +154 -15
- data/lib/docspring/models/template_defaults.rb +1 -1
- data/lib/docspring/models/template_defaults_input.rb +1 -1
- data/lib/docspring/models/template_signer_role.rb +265 -0
- data/lib/docspring/models/template_signer_role_input.rb +227 -0
- data/lib/docspring/models/update_account_email_action_request.rb +1 -1
- data/lib/docspring/models/update_email_action_customization_request.rb +1 -1
- data/lib/docspring/models/update_email_action_request.rb +1 -1
- data/lib/docspring/models/update_template_document_request.rb +14 -4
- data/lib/docspring/models/update_template_request.rb +80 -16
- data/lib/docspring/models/validate_submission_request.rb +5 -5
- data/lib/docspring/request_schemas.json +278 -12
- data/lib/docspring/version.rb +1 -1
- data/lib/docspring.rb +3 -0
- metadata +5 -591
- data/.github/workflows/release.yml +0 -80
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -593
- data/.openapi-generator/VERSION +0 -1
- data/.openapi-generator-ignore +0 -23
- data/.rspec +0 -2
- data/.rubocop.yml +0 -148
- data/Gemfile +0 -9
- data/Gemfile.lock +0 -146
- data/Rakefile +0 -10
- data/docs/AddTemplateFieldsRequest.md +0 -18
- data/docs/AiFieldNamingLanguage.md +0 -15
- data/docs/AuthenticationCheck.md +0 -18
- data/docs/BarcodeSymbology.md +0 -15
- data/docs/CheckCharacter.md +0 -15
- data/docs/Client.md +0 -5890
- data/docs/CombinedFieldType.md +0 -15
- data/docs/CombinedPdf.md +0 -44
- data/docs/CombinedPdfFiles.md +0 -18
- data/docs/CombinedPdfList.md +0 -20
- data/docs/CombinedPdfSource.md +0 -26
- data/docs/CombinedPdfSourceInput.md +0 -88
- data/docs/CombinedPdfSourcePdf.md +0 -20
- data/docs/CombinedPdfSourceType.md +0 -15
- data/docs/CombinedPdfState.md +0 -15
- data/docs/CopyTemplateRequest.md +0 -22
- data/docs/CreateAccountEmailActionRequest.md +0 -54
- data/docs/CreateCombinedPdfRequest.md +0 -26
- data/docs/CreateCustomFileFromUploadRequest.md +0 -18
- data/docs/CreateEmailActionRequest.md +0 -50
- data/docs/CreateEmailDomainRequest.md +0 -18
- data/docs/CreateFolderRequest.md +0 -20
- data/docs/CreateSignatureRequestEventRequest.md +0 -24
- data/docs/CreateSignatureRequestTokenRequest.md +0 -18
- data/docs/CreateSubmissionBatchRequest.md +0 -28
- data/docs/CreateSubmissionRequest.md +0 -56
- data/docs/CreateTemplatePreviewRequest.md +0 -18
- data/docs/CreateTemplateRequest.md +0 -130
- data/docs/CreateWebhookRequest.md +0 -38
- data/docs/CustomFile.md +0 -28
- data/docs/CustomFileList.md +0 -20
- data/docs/CustomFileSourcePdf.md +0 -20
- data/docs/DnsRecordType.md +0 -15
- data/docs/EmailAction.md +0 -76
- data/docs/EmailActionConditions.md +0 -20
- data/docs/EmailActionConditionsInput.md +0 -20
- data/docs/EmailActionCustomization.md +0 -36
- data/docs/EmailActionDelivery.md +0 -15
- data/docs/EmailActionFileFormats.md +0 -15
- data/docs/EmailActionList.md +0 -20
- data/docs/EmailActionSetting.md +0 -15
- data/docs/EmailActionSubmissionType.md +0 -15
- data/docs/EmailActionTestEmail.md +0 -18
- data/docs/EmailDomain.md +0 -38
- data/docs/EmailDomainDnsRecord.md +0 -24
- data/docs/EmailDomainDnsRecordPurpose.md +0 -15
- data/docs/EmailDomainList.md +0 -20
- data/docs/EmailDomainRecordState.md +0 -15
- data/docs/EmailDomainState.md +0 -15
- data/docs/ErrorCode.md +0 -15
- data/docs/ErrorDetail.md +0 -26
- data/docs/ErrorInfo.md +0 -42
- data/docs/ErrorResponse.md +0 -18
- data/docs/ExpirationInterval.md +0 -15
- data/docs/Field.md +0 -198
- data/docs/FieldComparisonCondition.md +0 -22
- data/docs/FieldComparisonOperator.md +0 -15
- data/docs/FieldDependency.md +0 -22
- data/docs/FieldDependencyInput.md +0 -22
- data/docs/FieldDisplayType.md +0 -15
- data/docs/FieldEqualsCondition.md +0 -22
- data/docs/FieldEqualsOperator.md +0 -15
- data/docs/FieldGroup.md +0 -32
- data/docs/FieldGroupInput.md +0 -30
- data/docs/FieldGroupType.md +0 -15
- data/docs/FieldInCondition.md +0 -22
- data/docs/FieldInput.md +0 -196
- data/docs/FieldOverride.md +0 -142
- data/docs/FieldPresenceCondition.md +0 -20
- data/docs/FieldPresenceOperator.md +0 -15
- data/docs/FieldRangeCondition.md +0 -24
- data/docs/FieldReimportState.md +0 -15
- data/docs/FieldSetupLogic.md +0 -15
- data/docs/FieldSetupNaming.md +0 -15
- data/docs/FieldSetupSource.md +0 -15
- data/docs/FieldType.md +0 -15
- data/docs/Folder.md +0 -28
- data/docs/FolderList.md +0 -20
- data/docs/GenerateFilesFormat.md +0 -15
- data/docs/GenerateSubmissionFilesRequest.md +0 -18
- data/docs/GeneratedFile.md +0 -32
- data/docs/GeneratedFileState.md +0 -15
- data/docs/HtmlEngineOptions.md +0 -36
- data/docs/HtmlEngineOptionsInput.md +0 -36
- data/docs/ImageGravity.md +0 -15
- data/docs/ImageScaleType.md +0 -15
- data/docs/ModelCodeLanguage.md +0 -15
- data/docs/MoveFolderRequest.md +0 -18
- data/docs/MoveTemplateRequest.md +0 -18
- data/docs/NumberConditionType.md +0 -15
- data/docs/OutputFormat.md +0 -15
- data/docs/PageFormat.md +0 -15
- data/docs/PageImage.md +0 -34
- data/docs/PageImages.md +0 -24
- data/docs/PredefinedField.md +0 -30
- data/docs/PredefinedFieldInput.md +0 -30
- data/docs/PublishTemplateVersionRequest.md +0 -20
- data/docs/RemoveTemplateFieldsRequest.md +0 -18
- data/docs/RenameFolderRequest.md +0 -18
- data/docs/ReorderTemplateFieldsRequest.md +0 -18
- data/docs/RestoreTemplateVersionRequest.md +0 -18
- data/docs/SendAccountEmailActionTestEmailRequest.md +0 -18
- data/docs/ShapeType.md +0 -15
- data/docs/SignatureRequest.md +0 -74
- data/docs/SignatureRequestAuthSecondFactorType.md +0 -15
- data/docs/SignatureRequestAuthType.md +0 -15
- data/docs/SignatureRequestEmailAttachments.md +0 -15
- data/docs/SignatureRequestEmailStatus.md +0 -15
- data/docs/SignatureRequestEvent.md +0 -32
- data/docs/SignatureRequestEventType.md +0 -15
- data/docs/SignatureRequestInput.md +0 -50
- data/docs/SignatureRequestMessageType.md +0 -15
- data/docs/SignatureRequestReminders.md +0 -20
- data/docs/SignatureRequestState.md +0 -15
- data/docs/SignatureRequestToken.md +0 -30
- data/docs/SignatureRequestTokenType.md +0 -15
- data/docs/SigningOrder.md +0 -15
- data/docs/StringConditionType.md +0 -15
- data/docs/Submission.md +0 -68
- data/docs/SubmissionAction.md +0 -30
- data/docs/SubmissionActionState.md +0 -15
- data/docs/SubmissionActionType.md +0 -15
- data/docs/SubmissionBatch.md +0 -38
- data/docs/SubmissionBatchState.md +0 -15
- data/docs/SubmissionFiles.md +0 -28
- data/docs/SubmissionInput.md +0 -40
- data/docs/SubmissionList.md +0 -20
- data/docs/SubmissionSource.md +0 -15
- data/docs/SubmissionSourcePdf.md +0 -20
- data/docs/SubmissionState.md +0 -15
- data/docs/SubmissionSummary.md +0 -54
- data/docs/SubmissionValidation.md +0 -24
- data/docs/Template.md +0 -142
- data/docs/TemplateActor.md +0 -26
- data/docs/TemplateActorType.md +0 -15
- data/docs/TemplateDefaults.md +0 -56
- data/docs/TemplateDefaultsInput.md +0 -56
- data/docs/TemplateDiff.md +0 -30
- data/docs/TemplateDiffSummary.md +0 -28
- data/docs/TemplateDocument.md +0 -40
- data/docs/TemplateDocumentState.md +0 -15
- data/docs/TemplateDocumentSummary.md +0 -24
- data/docs/TemplateFieldChange.md +0 -24
- data/docs/TemplateFieldChanges.md +0 -24
- data/docs/TemplateFieldDependency.md +0 -26
- data/docs/TemplateFieldDependencyAction.md +0 -15
- data/docs/TemplateFieldDependencyCondition.md +0 -24
- data/docs/TemplateFieldDependencyConditionInput.md +0 -93
- data/docs/TemplateFieldDependencyInput.md +0 -26
- data/docs/TemplateFieldDependencyMatch.md +0 -15
- data/docs/TemplateFieldDependencyOperator.md +0 -15
- data/docs/TemplateFieldLogicStatus.md +0 -15
- data/docs/TemplateFieldMove.md +0 -22
- data/docs/TemplateFields.md +0 -22
- data/docs/TemplateFormMode.md +0 -15
- data/docs/TemplateFormSection.md +0 -24
- data/docs/TemplateFormSectionInput.md +0 -24
- data/docs/TemplateModelCode.md +0 -22
- data/docs/TemplatePageAiError.md +0 -15
- data/docs/TemplatePageAiNamingStatus.md +0 -15
- data/docs/TemplatePageFieldsStatus.md +0 -15
- data/docs/TemplatePageImageStatus.md +0 -15
- data/docs/TemplatePageImages.md +0 -24
- data/docs/TemplatePageProcessingStatus.md +0 -26
- data/docs/TemplatePreview.md +0 -32
- data/docs/TemplatePreviewState.md +0 -15
- data/docs/TemplateSourcePdf.md +0 -24
- data/docs/TemplateSummary.md +0 -46
- data/docs/TemplateSummaryList.md +0 -20
- data/docs/TemplateType.md +0 -15
- data/docs/TemplateVersion.md +0 -24
- data/docs/TemplateVersionType.md +0 -15
- data/docs/TextAlignment.md +0 -15
- data/docs/TextOverflow.md +0 -15
- data/docs/TextVerticalAlignment.md +0 -15
- data/docs/Typeface.md +0 -15
- data/docs/UpdateAccountEmailActionRequest.md +0 -54
- data/docs/UpdateEmailActionCustomizationRequest.md +0 -46
- data/docs/UpdateEmailActionRequest.md +0 -50
- data/docs/UpdateSignatureRequestRequest.md +0 -34
- data/docs/UpdateTemplateDocumentRequest.md +0 -26
- data/docs/UpdateTemplateFieldsRequest.md +0 -18
- data/docs/UpdateTemplateRequest.md +0 -114
- data/docs/UpdateWebhookRequest.md +0 -38
- data/docs/UploadMethod.md +0 -15
- data/docs/UploadPresign.md +0 -24
- data/docs/UrlSourcePdf.md +0 -20
- data/docs/ValidateSubmissionRequest.md +0 -56
- data/docs/Webhook.md +0 -56
- data/docs/WebhookEventType.md +0 -15
- data/docs/WebhookList.md +0 -20
- data/docs/WebhookMode.md +0 -15
- data/docspring.gemspec +0 -40
- data/spec/api/client_spec.rb +0 -1103
- data/spec/models/add_template_fields_request_spec.rb +0 -36
- data/spec/models/ai_field_naming_language_spec.rb +0 -30
- data/spec/models/authentication_check_spec.rb +0 -36
- data/spec/models/barcode_symbology_spec.rb +0 -30
- data/spec/models/check_character_spec.rb +0 -30
- data/spec/models/combined_field_type_spec.rb +0 -30
- data/spec/models/combined_pdf_files_spec.rb +0 -36
- data/spec/models/combined_pdf_list_spec.rb +0 -42
- data/spec/models/combined_pdf_source_input_spec.rb +0 -44
- data/spec/models/combined_pdf_source_pdf_spec.rb +0 -42
- data/spec/models/combined_pdf_source_spec.rb +0 -60
- data/spec/models/combined_pdf_source_type_spec.rb +0 -30
- data/spec/models/combined_pdf_spec.rb +0 -114
- data/spec/models/combined_pdf_state_spec.rb +0 -30
- data/spec/models/copy_template_request_spec.rb +0 -48
- data/spec/models/create_account_email_action_request_spec.rb +0 -144
- data/spec/models/create_combined_pdf_request_spec.rb +0 -60
- data/spec/models/create_custom_file_from_upload_request_spec.rb +0 -36
- data/spec/models/create_email_action_request_spec.rb +0 -132
- data/spec/models/create_email_domain_request_spec.rb +0 -36
- data/spec/models/create_folder_request_spec.rb +0 -42
- data/spec/models/create_signature_request_event_request_spec.rb +0 -54
- data/spec/models/create_signature_request_token_request_spec.rb +0 -36
- data/spec/models/create_submission_batch_request_spec.rb +0 -66
- data/spec/models/create_submission_request_spec.rb +0 -150
- data/spec/models/create_template_preview_request_spec.rb +0 -36
- data/spec/models/create_template_request_spec.rb +0 -372
- data/spec/models/create_webhook_request_spec.rb +0 -96
- data/spec/models/custom_file_list_spec.rb +0 -42
- data/spec/models/custom_file_source_pdf_spec.rb +0 -42
- data/spec/models/custom_file_spec.rb +0 -66
- data/spec/models/dns_record_type_spec.rb +0 -30
- data/spec/models/email_action_conditions_input_spec.rb +0 -42
- data/spec/models/email_action_conditions_spec.rb +0 -42
- data/spec/models/email_action_customization_spec.rb +0 -90
- data/spec/models/email_action_delivery_spec.rb +0 -30
- data/spec/models/email_action_file_formats_spec.rb +0 -30
- data/spec/models/email_action_list_spec.rb +0 -42
- data/spec/models/email_action_setting_spec.rb +0 -30
- data/spec/models/email_action_spec.rb +0 -210
- data/spec/models/email_action_submission_type_spec.rb +0 -30
- data/spec/models/email_action_test_email_spec.rb +0 -36
- data/spec/models/email_domain_dns_record_purpose_spec.rb +0 -30
- data/spec/models/email_domain_dns_record_spec.rb +0 -54
- data/spec/models/email_domain_list_spec.rb +0 -42
- data/spec/models/email_domain_record_state_spec.rb +0 -30
- data/spec/models/email_domain_spec.rb +0 -96
- data/spec/models/email_domain_state_spec.rb +0 -30
- data/spec/models/error_code_spec.rb +0 -30
- data/spec/models/error_detail_spec.rb +0 -60
- data/spec/models/error_info_spec.rb +0 -108
- data/spec/models/error_response_spec.rb +0 -36
- data/spec/models/expiration_interval_spec.rb +0 -30
- data/spec/models/field_comparison_condition_spec.rb +0 -48
- data/spec/models/field_comparison_operator_spec.rb +0 -30
- data/spec/models/field_dependency_input_spec.rb +0 -48
- data/spec/models/field_dependency_spec.rb +0 -48
- data/spec/models/field_display_type_spec.rb +0 -30
- data/spec/models/field_equals_condition_spec.rb +0 -48
- data/spec/models/field_equals_operator_spec.rb +0 -30
- data/spec/models/field_group_input_spec.rb +0 -72
- data/spec/models/field_group_spec.rb +0 -78
- data/spec/models/field_group_type_spec.rb +0 -30
- data/spec/models/field_in_condition_spec.rb +0 -48
- data/spec/models/field_input_spec.rb +0 -570
- data/spec/models/field_override_spec.rb +0 -408
- data/spec/models/field_presence_condition_spec.rb +0 -42
- data/spec/models/field_presence_operator_spec.rb +0 -30
- data/spec/models/field_range_condition_spec.rb +0 -54
- data/spec/models/field_reimport_state_spec.rb +0 -30
- data/spec/models/field_setup_logic_spec.rb +0 -30
- data/spec/models/field_setup_naming_spec.rb +0 -30
- data/spec/models/field_setup_source_spec.rb +0 -30
- data/spec/models/field_spec.rb +0 -576
- data/spec/models/field_type_spec.rb +0 -30
- data/spec/models/folder_list_spec.rb +0 -42
- data/spec/models/folder_spec.rb +0 -66
- data/spec/models/generate_files_format_spec.rb +0 -30
- data/spec/models/generate_submission_files_request_spec.rb +0 -36
- data/spec/models/generated_file_spec.rb +0 -78
- data/spec/models/generated_file_state_spec.rb +0 -30
- data/spec/models/html_engine_options_input_spec.rb +0 -90
- data/spec/models/html_engine_options_spec.rb +0 -90
- data/spec/models/image_gravity_spec.rb +0 -30
- data/spec/models/image_scale_type_spec.rb +0 -30
- data/spec/models/model_code_language_spec.rb +0 -30
- data/spec/models/move_folder_request_spec.rb +0 -36
- data/spec/models/move_template_request_spec.rb +0 -36
- data/spec/models/number_condition_type_spec.rb +0 -30
- data/spec/models/output_format_spec.rb +0 -30
- data/spec/models/page_format_spec.rb +0 -30
- data/spec/models/page_image_spec.rb +0 -84
- data/spec/models/page_images_spec.rb +0 -54
- data/spec/models/predefined_field_input_spec.rb +0 -72
- data/spec/models/predefined_field_spec.rb +0 -72
- data/spec/models/publish_template_version_request_spec.rb +0 -42
- data/spec/models/remove_template_fields_request_spec.rb +0 -36
- data/spec/models/rename_folder_request_spec.rb +0 -36
- data/spec/models/reorder_template_fields_request_spec.rb +0 -36
- data/spec/models/restore_template_version_request_spec.rb +0 -36
- data/spec/models/send_account_email_action_test_email_request_spec.rb +0 -36
- data/spec/models/shape_type_spec.rb +0 -30
- data/spec/models/signature_request_auth_second_factor_type_spec.rb +0 -30
- data/spec/models/signature_request_auth_type_spec.rb +0 -30
- data/spec/models/signature_request_email_attachments_spec.rb +0 -30
- data/spec/models/signature_request_email_status_spec.rb +0 -30
- data/spec/models/signature_request_event_spec.rb +0 -78
- data/spec/models/signature_request_event_type_spec.rb +0 -30
- data/spec/models/signature_request_input_spec.rb +0 -132
- data/spec/models/signature_request_message_type_spec.rb +0 -30
- data/spec/models/signature_request_reminders_spec.rb +0 -42
- data/spec/models/signature_request_spec.rb +0 -204
- data/spec/models/signature_request_state_spec.rb +0 -30
- data/spec/models/signature_request_token_spec.rb +0 -72
- data/spec/models/signature_request_token_type_spec.rb +0 -30
- data/spec/models/signing_order_spec.rb +0 -30
- data/spec/models/string_condition_type_spec.rb +0 -30
- data/spec/models/submission_action_spec.rb +0 -72
- data/spec/models/submission_action_state_spec.rb +0 -30
- data/spec/models/submission_action_type_spec.rb +0 -30
- data/spec/models/submission_batch_spec.rb +0 -96
- data/spec/models/submission_batch_state_spec.rb +0 -30
- data/spec/models/submission_files_spec.rb +0 -66
- data/spec/models/submission_input_spec.rb +0 -102
- data/spec/models/submission_list_spec.rb +0 -42
- data/spec/models/submission_source_pdf_spec.rb +0 -42
- data/spec/models/submission_source_spec.rb +0 -30
- data/spec/models/submission_spec.rb +0 -186
- data/spec/models/submission_state_spec.rb +0 -30
- data/spec/models/submission_summary_spec.rb +0 -144
- data/spec/models/submission_validation_spec.rb +0 -54
- data/spec/models/template_actor_spec.rb +0 -60
- data/spec/models/template_actor_type_spec.rb +0 -30
- data/spec/models/template_defaults_input_spec.rb +0 -150
- data/spec/models/template_defaults_spec.rb +0 -150
- data/spec/models/template_diff_spec.rb +0 -72
- data/spec/models/template_diff_summary_spec.rb +0 -66
- data/spec/models/template_document_spec.rb +0 -102
- data/spec/models/template_document_state_spec.rb +0 -30
- data/spec/models/template_document_summary_spec.rb +0 -54
- data/spec/models/template_field_change_spec.rb +0 -54
- data/spec/models/template_field_changes_spec.rb +0 -54
- data/spec/models/template_field_dependency_action_spec.rb +0 -30
- data/spec/models/template_field_dependency_condition_input_spec.rb +0 -44
- data/spec/models/template_field_dependency_condition_spec.rb +0 -54
- data/spec/models/template_field_dependency_input_spec.rb +0 -60
- data/spec/models/template_field_dependency_match_spec.rb +0 -30
- data/spec/models/template_field_dependency_operator_spec.rb +0 -30
- data/spec/models/template_field_dependency_spec.rb +0 -60
- data/spec/models/template_field_logic_status_spec.rb +0 -30
- data/spec/models/template_field_move_spec.rb +0 -48
- data/spec/models/template_fields_spec.rb +0 -48
- data/spec/models/template_form_mode_spec.rb +0 -30
- data/spec/models/template_form_section_input_spec.rb +0 -54
- data/spec/models/template_form_section_spec.rb +0 -54
- data/spec/models/template_model_code_spec.rb +0 -48
- data/spec/models/template_page_ai_error_spec.rb +0 -30
- data/spec/models/template_page_ai_naming_status_spec.rb +0 -30
- data/spec/models/template_page_fields_status_spec.rb +0 -30
- data/spec/models/template_page_image_status_spec.rb +0 -30
- data/spec/models/template_page_images_spec.rb +0 -54
- data/spec/models/template_page_processing_status_spec.rb +0 -60
- data/spec/models/template_preview_spec.rb +0 -78
- data/spec/models/template_preview_state_spec.rb +0 -30
- data/spec/models/template_source_pdf_spec.rb +0 -54
- data/spec/models/template_spec.rb +0 -408
- data/spec/models/template_summary_list_spec.rb +0 -42
- data/spec/models/template_summary_spec.rb +0 -120
- data/spec/models/template_type_spec.rb +0 -30
- data/spec/models/template_version_spec.rb +0 -54
- data/spec/models/template_version_type_spec.rb +0 -30
- data/spec/models/text_alignment_spec.rb +0 -30
- data/spec/models/text_overflow_spec.rb +0 -30
- data/spec/models/text_vertical_alignment_spec.rb +0 -30
- data/spec/models/typeface_spec.rb +0 -30
- data/spec/models/update_account_email_action_request_spec.rb +0 -144
- data/spec/models/update_email_action_customization_request_spec.rb +0 -120
- data/spec/models/update_email_action_request_spec.rb +0 -132
- data/spec/models/update_signature_request_request_spec.rb +0 -84
- data/spec/models/update_template_document_request_spec.rb +0 -60
- data/spec/models/update_template_fields_request_spec.rb +0 -36
- data/spec/models/update_template_request_spec.rb +0 -324
- data/spec/models/update_webhook_request_spec.rb +0 -96
- data/spec/models/upload_method_spec.rb +0 -30
- data/spec/models/upload_presign_spec.rb +0 -54
- data/spec/models/url_source_pdf_spec.rb +0 -42
- data/spec/models/validate_submission_request_spec.rb +0 -150
- data/spec/models/webhook_event_type_spec.rb +0 -30
- data/spec/models/webhook_list_spec.rb +0 -42
- data/spec/models/webhook_mode_spec.rb +0 -30
- data/spec/models/webhook_spec.rb +0 -150
- data/spec/spec_helper.rb +0 -111
data/spec/api/client_spec.rb
DELETED
|
@@ -1,1103 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#DocSpring API
|
|
3
|
-
|
|
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
|
-
|
|
6
|
-
The version of the OpenAPI document: v2
|
|
7
|
-
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.26.0-DOCSPRING
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'spec_helper'
|
|
14
|
-
require 'json'
|
|
15
|
-
|
|
16
|
-
# Unit tests for DocSpring::Client
|
|
17
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
-
# Please update as you see appropriate
|
|
19
|
-
describe 'Client' do
|
|
20
|
-
before do
|
|
21
|
-
# run before each test
|
|
22
|
-
@api_instance = DocSpring::Client.new
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
after do
|
|
26
|
-
# run after each test
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
describe 'test an instance of Client' do
|
|
30
|
-
it 'should create an instance of Client' do
|
|
31
|
-
expect(@api_instance).to be_instance_of(DocSpring::Client)
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# unit tests for add_template_fields
|
|
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. 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
|
-
# @param template_id The template's ID.
|
|
39
|
-
# @param body The fields to add to the template's draft.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
42
|
-
# @return [TemplateFields]
|
|
43
|
-
describe 'add_template_fields test' do
|
|
44
|
-
it 'should work' do
|
|
45
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
# unit tests for copy_template
|
|
50
|
-
# Copy a template
|
|
51
|
-
# Copies a template (its draft, or a published version) into a new template.
|
|
52
|
-
# @param template_id The template's ID.
|
|
53
|
-
# @param [Hash] opts the optional parameters
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
56
|
-
# @return [Template]
|
|
57
|
-
describe 'copy_template test' do
|
|
58
|
-
it 'should work' do
|
|
59
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
60
|
-
end
|
|
61
|
-
end
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
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
|
-
|
|
76
|
-
# unit tests for create_combined_pdf
|
|
77
|
-
# Combine PDFs
|
|
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.
|
|
79
|
-
# @param body The PDFs to merge, and the combined PDF's settings.
|
|
80
|
-
# @param [Hash] opts the optional parameters
|
|
81
|
-
# @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
83
|
-
# @return [CombinedPdf]
|
|
84
|
-
describe 'create_combined_pdf test' do
|
|
85
|
-
it 'should work' do
|
|
86
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
# unit tests for create_custom_file_from_upload
|
|
91
|
-
# Create a custom file from an upload
|
|
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`.
|
|
93
|
-
# @param body The uploaded file to create the custom file from.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
96
|
-
# @return [CustomFile]
|
|
97
|
-
describe 'create_custom_file_from_upload test' do
|
|
98
|
-
it 'should work' do
|
|
99
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
100
|
-
end
|
|
101
|
-
end
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
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
|
-
|
|
130
|
-
# unit tests for create_folder
|
|
131
|
-
# Create a folder
|
|
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.
|
|
133
|
-
# @param body The folder to create.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
136
|
-
# @return [Folder]
|
|
137
|
-
describe 'create_folder test' do
|
|
138
|
-
it 'should work' do
|
|
139
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
140
|
-
end
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
# unit tests for create_signature_request_event
|
|
144
|
-
# Record a signature request event
|
|
145
|
-
# Records something that happened outside DocSpring in the signature request's audit trail: you sent the request to the person (`send_request`). The audit trail shows it as reported by your account. A finished (completed, declined or expired) signature request's audit trail takes no more events, and a test API token can't record one for a live signature request.
|
|
146
|
-
# @param signature_request_id The signature request's ID.
|
|
147
|
-
# @param body The event to record.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
150
|
-
# @return [SignatureRequestEvent]
|
|
151
|
-
describe 'create_signature_request_event test' do
|
|
152
|
-
it 'should work' do
|
|
153
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
# unit tests for create_signature_request_token
|
|
158
|
-
# Create a signature request token
|
|
159
|
-
# Creates a token that opens the signature request without signing in, in a form embedded in your app or from a link you send. The response is the only time the token's secret is returned. The link works for 24 hours, or 7 days for an `email` token, and a signing page that opened in time keeps working for 7 more days. A test API token can't create a token for a live signature request.
|
|
160
|
-
# @param signature_request_id The signature request's ID.
|
|
161
|
-
# @param [Hash] opts the optional parameters
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
164
|
-
# @return [SignatureRequestToken]
|
|
165
|
-
describe 'create_signature_request_token test' do
|
|
166
|
-
it 'should work' do
|
|
167
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
# unit tests for create_submission
|
|
172
|
-
# Generate a PDF
|
|
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.
|
|
174
|
-
# @param template_id The template's ID.
|
|
175
|
-
# @param body The submission's data and settings.
|
|
176
|
-
# @param [Hash] opts the optional parameters
|
|
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`.
|
|
178
|
-
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
180
|
-
# @return [Submission]
|
|
181
|
-
describe 'create_submission test' do
|
|
182
|
-
it 'should work' do
|
|
183
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
184
|
-
end
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
# unit tests for create_submission_batch
|
|
188
|
-
# Generate PDFs in a batch
|
|
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.
|
|
190
|
-
# @param body The submissions to create, and the settings they share.
|
|
191
|
-
# @param [Hash] opts the optional parameters
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
194
|
-
# @return [SubmissionBatch]
|
|
195
|
-
describe 'create_submission_batch test' do
|
|
196
|
-
it 'should work' do
|
|
197
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
198
|
-
end
|
|
199
|
-
end
|
|
200
|
-
|
|
201
|
-
# unit tests for create_template
|
|
202
|
-
# Create a template
|
|
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`.
|
|
204
|
-
# @param body The template to create.
|
|
205
|
-
# @param [Hash] opts the optional parameters
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
208
|
-
# @return [Template]
|
|
209
|
-
describe 'create_template test' do
|
|
210
|
-
it 'should work' do
|
|
211
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
212
|
-
end
|
|
213
|
-
end
|
|
214
|
-
|
|
215
|
-
# unit tests for create_template_preview
|
|
216
|
-
# Preview a template with data
|
|
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`.
|
|
218
|
-
# @param template_id The template's ID.
|
|
219
|
-
# @param body The data to render the template with.
|
|
220
|
-
# @param [Hash] opts the optional parameters
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
223
|
-
# @return [TemplatePreview]
|
|
224
|
-
describe 'create_template_preview test' do
|
|
225
|
-
it 'should work' do
|
|
226
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
227
|
-
end
|
|
228
|
-
end
|
|
229
|
-
|
|
230
|
-
# unit tests for create_webhook
|
|
231
|
-
# Create a webhook
|
|
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.
|
|
233
|
-
# @param body The webhook to create.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
236
|
-
# @return [Webhook]
|
|
237
|
-
describe 'create_webhook test' do
|
|
238
|
-
it 'should work' do
|
|
239
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
240
|
-
end
|
|
241
|
-
end
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
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
|
-
|
|
256
|
-
# unit tests for delete_custom_file
|
|
257
|
-
# Delete a custom file
|
|
258
|
-
# Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
259
|
-
# @param custom_file_id The custom file's ID.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
262
|
-
# @return [CustomFile]
|
|
263
|
-
describe 'delete_custom_file test' do
|
|
264
|
-
it 'should work' do
|
|
265
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
266
|
-
end
|
|
267
|
-
end
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
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
|
-
|
|
310
|
-
# unit tests for delete_folder
|
|
311
|
-
# Delete a folder
|
|
312
|
-
# Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
313
|
-
# @param folder_id The folder's ID.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
316
|
-
# @return [Folder]
|
|
317
|
-
describe 'delete_folder test' do
|
|
318
|
-
it 'should work' do
|
|
319
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
320
|
-
end
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
# unit tests for delete_template
|
|
324
|
-
# Delete a template
|
|
325
|
-
# Deletes a template's draft and all of its published versions, or one published version (`version`). Returns the template as it was before it was deleted.
|
|
326
|
-
# @param template_id The template's ID.
|
|
327
|
-
# @param [Hash] opts the optional parameters
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
330
|
-
# @return [Template]
|
|
331
|
-
describe 'delete_template test' do
|
|
332
|
-
it 'should work' do
|
|
333
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
334
|
-
end
|
|
335
|
-
end
|
|
336
|
-
|
|
337
|
-
# unit tests for delete_webhook
|
|
338
|
-
# Delete a webhook
|
|
339
|
-
# Deletes a webhook so it stops receiving events, and returns it.
|
|
340
|
-
# @param webhook_id The webhook's ID.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
343
|
-
# @return [Webhook]
|
|
344
|
-
describe 'delete_webhook test' do
|
|
345
|
-
it 'should work' do
|
|
346
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
347
|
-
end
|
|
348
|
-
end
|
|
349
|
-
|
|
350
|
-
# unit tests for expire_combined_pdf
|
|
351
|
-
# Expire a combined PDF
|
|
352
|
-
# Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
353
|
-
# @param combined_pdf_id The combined PDF's ID.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
356
|
-
# @return [CombinedPdf]
|
|
357
|
-
describe 'expire_combined_pdf test' do
|
|
358
|
-
it 'should work' do
|
|
359
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
360
|
-
end
|
|
361
|
-
end
|
|
362
|
-
|
|
363
|
-
# unit tests for expire_submission
|
|
364
|
-
# Expire a submission
|
|
365
|
-
# Deletes a submission's data and PDF now, and returns the expired submission.
|
|
366
|
-
# @param submission_id The submission's ID.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
369
|
-
# @return [Submission]
|
|
370
|
-
describe 'expire_submission test' do
|
|
371
|
-
it 'should work' do
|
|
372
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
373
|
-
end
|
|
374
|
-
end
|
|
375
|
-
|
|
376
|
-
# unit tests for generate_submission_files
|
|
377
|
-
# Generate more files
|
|
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.
|
|
379
|
-
# @param submission_id The submission's ID.
|
|
380
|
-
# @param body The formats to make.
|
|
381
|
-
# @param [Hash] opts the optional parameters
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
384
|
-
# @return [Submission]
|
|
385
|
-
describe 'generate_submission_files test' do
|
|
386
|
-
it 'should work' do
|
|
387
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
388
|
-
end
|
|
389
|
-
end
|
|
390
|
-
|
|
391
|
-
# unit tests for generate_submission_preview
|
|
392
|
-
# Generate a preview PDF
|
|
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.
|
|
394
|
-
# @param submission_id The submission's ID.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
397
|
-
# @return [Submission]
|
|
398
|
-
describe 'generate_submission_preview test' do
|
|
399
|
-
it 'should work' do
|
|
400
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
401
|
-
end
|
|
402
|
-
end
|
|
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
|
-
|
|
416
|
-
# unit tests for get_combined_pdf
|
|
417
|
-
# Get a combined PDF
|
|
418
|
-
# Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
419
|
-
# @param combined_pdf_id The combined PDF's ID.
|
|
420
|
-
# @param [Hash] opts the optional parameters
|
|
421
|
-
# @return [CombinedPdf]
|
|
422
|
-
describe 'get_combined_pdf test' do
|
|
423
|
-
it 'should work' do
|
|
424
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
425
|
-
end
|
|
426
|
-
end
|
|
427
|
-
|
|
428
|
-
# unit tests for get_custom_file
|
|
429
|
-
# Get a custom file
|
|
430
|
-
# Returns a custom file, with a temporary URL to download it.
|
|
431
|
-
# @param custom_file_id The custom file's ID.
|
|
432
|
-
# @param [Hash] opts the optional parameters
|
|
433
|
-
# @return [CustomFile]
|
|
434
|
-
describe 'get_custom_file test' do
|
|
435
|
-
it 'should work' do
|
|
436
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
437
|
-
end
|
|
438
|
-
end
|
|
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
|
-
|
|
465
|
-
# unit tests for get_folder
|
|
466
|
-
# Get a folder
|
|
467
|
-
# Returns a folder.
|
|
468
|
-
# @param folder_id The folder's ID.
|
|
469
|
-
# @param [Hash] opts the optional parameters
|
|
470
|
-
# @return [Folder]
|
|
471
|
-
describe 'get_folder test' do
|
|
472
|
-
it 'should work' do
|
|
473
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
474
|
-
end
|
|
475
|
-
end
|
|
476
|
-
|
|
477
|
-
# unit tests for get_presign_url
|
|
478
|
-
# Get a presigned URL to upload a file
|
|
479
|
-
# Returns a presigned S3 form for uploading a file directly to DocSpring, for files too large to send in a request body. POST the `fields` and the file (as `file`) to `url` as multipart/form-data, then pass `fields.key` as the `cache_id` when you create a custom file.
|
|
480
|
-
# @param [Hash] opts the optional parameters
|
|
481
|
-
# @return [UploadPresign]
|
|
482
|
-
describe 'get_presign_url test' do
|
|
483
|
-
it 'should work' do
|
|
484
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
485
|
-
end
|
|
486
|
-
end
|
|
487
|
-
|
|
488
|
-
# unit tests for get_signature_request
|
|
489
|
-
# Get a signature request
|
|
490
|
-
# Returns a signature request, with the values the person has entered so far.
|
|
491
|
-
# @param signature_request_id The signature request's ID.
|
|
492
|
-
# @param [Hash] opts the optional parameters
|
|
493
|
-
# @return [SignatureRequest]
|
|
494
|
-
describe 'get_signature_request test' do
|
|
495
|
-
it 'should work' do
|
|
496
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
497
|
-
end
|
|
498
|
-
end
|
|
499
|
-
|
|
500
|
-
# unit tests for get_submission
|
|
501
|
-
# Get a submission
|
|
502
|
-
# Returns a submission, with its data and links to download its PDF.
|
|
503
|
-
# @param submission_id The submission's ID.
|
|
504
|
-
# @param [Hash] opts the optional parameters
|
|
505
|
-
# @return [Submission]
|
|
506
|
-
describe 'get_submission test' do
|
|
507
|
-
it 'should work' do
|
|
508
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
509
|
-
end
|
|
510
|
-
end
|
|
511
|
-
|
|
512
|
-
# unit tests for get_submission_batch
|
|
513
|
-
# Get a batch
|
|
514
|
-
# Returns a batch with its submissions. The batch has finished once `processed_at` is set: its `state` is `processed` when every PDF was generated, or `error` when any submission failed.
|
|
515
|
-
# @param submission_batch_id The batch's ID.
|
|
516
|
-
# @param [Hash] opts the optional parameters
|
|
517
|
-
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
518
|
-
# @return [SubmissionBatch]
|
|
519
|
-
describe 'get_submission_batch test' do
|
|
520
|
-
it 'should work' do
|
|
521
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
522
|
-
end
|
|
523
|
-
end
|
|
524
|
-
|
|
525
|
-
# unit tests for get_template
|
|
526
|
-
# Get a template
|
|
527
|
-
# Returns a template: its draft, or one of its published versions.
|
|
528
|
-
# @param template_id The template's ID.
|
|
529
|
-
# @param [Hash] opts the optional parameters
|
|
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`.
|
|
531
|
-
# @return [Template]
|
|
532
|
-
describe 'get_template test' do
|
|
533
|
-
it 'should work' do
|
|
534
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
535
|
-
end
|
|
536
|
-
end
|
|
537
|
-
|
|
538
|
-
# unit tests for get_template_diff
|
|
539
|
-
# Compare a version of a template with the one before it
|
|
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.
|
|
541
|
-
# @param template_id The template's ID.
|
|
542
|
-
# @param [Hash] opts the optional parameters
|
|
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`.
|
|
544
|
-
# @return [TemplateDiff]
|
|
545
|
-
describe 'get_template_diff test' do
|
|
546
|
-
it 'should work' do
|
|
547
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
548
|
-
end
|
|
549
|
-
end
|
|
550
|
-
|
|
551
|
-
# unit tests for get_template_model_code
|
|
552
|
-
# Generate typed code for a template's submission data
|
|
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.
|
|
554
|
-
# @param template_id The template's ID.
|
|
555
|
-
# @param lang The language to generate the code in.
|
|
556
|
-
# @param [Hash] opts the optional parameters
|
|
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.
|
|
559
|
-
# @return [TemplateModelCode]
|
|
560
|
-
describe 'get_template_model_code test' do
|
|
561
|
-
it 'should work' do
|
|
562
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
563
|
-
end
|
|
564
|
-
end
|
|
565
|
-
|
|
566
|
-
# unit tests for get_template_page_images
|
|
567
|
-
# Get images of a template's pages
|
|
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.
|
|
569
|
-
# @param template_id The template's ID.
|
|
570
|
-
# @param [Hash] opts the optional parameters
|
|
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`.
|
|
572
|
-
# @return [TemplatePageImages]
|
|
573
|
-
describe 'get_template_page_images test' do
|
|
574
|
-
it 'should work' do
|
|
575
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
576
|
-
end
|
|
577
|
-
end
|
|
578
|
-
|
|
579
|
-
# unit tests for get_template_preview
|
|
580
|
-
# Get a template preview
|
|
581
|
-
# Returns a preview made with POST /templates/{template_id}/previews. Once it's `processed`, `pages` has a PNG image of each page with a temporary link to download it: a preview has no PDF. Previews are deleted an hour after they're created.
|
|
582
|
-
# @param template_id The template's ID.
|
|
583
|
-
# @param preview_id The preview's ID.
|
|
584
|
-
# @param [Hash] opts the optional parameters
|
|
585
|
-
# @return [TemplatePreview]
|
|
586
|
-
describe 'get_template_preview test' do
|
|
587
|
-
it 'should work' do
|
|
588
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
589
|
-
end
|
|
590
|
-
end
|
|
591
|
-
|
|
592
|
-
# unit tests for get_template_schema
|
|
593
|
-
# Get the JSON Schema of a template's submission data
|
|
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.
|
|
595
|
-
# @param template_id The template's ID.
|
|
596
|
-
# @param [Hash] opts the optional parameters
|
|
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.
|
|
598
|
-
# @return [Hash<String, Object>]
|
|
599
|
-
describe 'get_template_schema test' do
|
|
600
|
-
it 'should work' do
|
|
601
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
602
|
-
end
|
|
603
|
-
end
|
|
604
|
-
|
|
605
|
-
# unit tests for get_webhook
|
|
606
|
-
# Get a webhook
|
|
607
|
-
# Returns a webhook.
|
|
608
|
-
# @param webhook_id The webhook's ID.
|
|
609
|
-
# @param [Hash] opts the optional parameters
|
|
610
|
-
# @return [Webhook]
|
|
611
|
-
describe 'get_webhook test' do
|
|
612
|
-
it 'should work' do
|
|
613
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
614
|
-
end
|
|
615
|
-
end
|
|
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
|
-
|
|
630
|
-
# unit tests for list_combined_pdfs
|
|
631
|
-
# List combined PDFs
|
|
632
|
-
# Returns the combined PDFs in your account, newest first, one page at a time.
|
|
633
|
-
# @param [Hash] opts the optional parameters
|
|
634
|
-
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
635
|
-
# @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.
|
|
636
|
-
# @return [CombinedPdfList]
|
|
637
|
-
describe 'list_combined_pdfs test' do
|
|
638
|
-
it 'should work' do
|
|
639
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
640
|
-
end
|
|
641
|
-
end
|
|
642
|
-
|
|
643
|
-
# unit tests for list_custom_files
|
|
644
|
-
# List custom files
|
|
645
|
-
# Returns the custom files in your account, newest first, one page at a time.
|
|
646
|
-
# @param [Hash] opts the optional parameters
|
|
647
|
-
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
648
|
-
# @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.
|
|
649
|
-
# @return [CustomFileList]
|
|
650
|
-
describe 'list_custom_files test' do
|
|
651
|
-
it 'should work' do
|
|
652
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
653
|
-
end
|
|
654
|
-
end
|
|
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
|
-
|
|
683
|
-
# unit tests for list_folders
|
|
684
|
-
# List folders
|
|
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.
|
|
686
|
-
# @param [Hash] opts the optional parameters
|
|
687
|
-
# @option opts [String] :parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
688
|
-
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
689
|
-
# @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.
|
|
690
|
-
# @return [FolderList]
|
|
691
|
-
describe 'list_folders test' do
|
|
692
|
-
it 'should work' do
|
|
693
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
694
|
-
end
|
|
695
|
-
end
|
|
696
|
-
|
|
697
|
-
# unit tests for list_submissions
|
|
698
|
-
# List submissions
|
|
699
|
-
# Returns the submissions in your account, newest first, one page at a time. Each one is a summary: its `data` is null unless you pass `include_data=true`, and its `files` are empty unless you pass `include_files=true`. Get a submission by its ID for its signature requests, uploads and page images.
|
|
700
|
-
# @param [Hash] opts the optional parameters
|
|
701
|
-
# @option opts [String] :template_id Only list this template's submissions.
|
|
702
|
-
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
703
|
-
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
704
|
-
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
705
|
-
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
706
|
-
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
707
|
-
# @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.
|
|
708
|
-
# @option opts [SubmissionState] :state Only list submissions in this state (one state per request). The ones that failed are `invalid_data`, `error`, `syntax_error`, `image_download_failed` and `image_processing_failed`, and one still `pending` an hour after it was created is stuck.
|
|
709
|
-
# @option opts [Boolean] :include_files Include each submission's generated files and their download links (`files`, empty without it), without the page images' links.
|
|
710
|
-
# @return [SubmissionList]
|
|
711
|
-
describe 'list_submissions test' do
|
|
712
|
-
it 'should work' do
|
|
713
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
714
|
-
end
|
|
715
|
-
end
|
|
716
|
-
|
|
717
|
-
# unit tests for list_template_fields
|
|
718
|
-
# List a template's fields
|
|
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.
|
|
720
|
-
# @param template_id The template's ID.
|
|
721
|
-
# @param [Hash] opts the optional parameters
|
|
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`.
|
|
723
|
-
# @return [TemplateFields]
|
|
724
|
-
describe 'list_template_fields test' do
|
|
725
|
-
it 'should work' do
|
|
726
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
727
|
-
end
|
|
728
|
-
end
|
|
729
|
-
|
|
730
|
-
# unit tests for list_template_submissions
|
|
731
|
-
# List a template's submissions
|
|
732
|
-
# Returns a template's submissions (from every version of the template), newest first.
|
|
733
|
-
# @param template_id The template's ID.
|
|
734
|
-
# @param [Hash] opts the optional parameters
|
|
735
|
-
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
736
|
-
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
737
|
-
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
738
|
-
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
739
|
-
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
740
|
-
# @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.
|
|
741
|
-
# @option opts [SubmissionState] :state Only list submissions in this state (one state per request). The ones that failed are `invalid_data`, `error`, `syntax_error`, `image_download_failed` and `image_processing_failed`, and one still `pending` an hour after it was created is stuck.
|
|
742
|
-
# @option opts [Boolean] :include_files Include each submission's generated files and their download links (`files`, empty without it), without the page images' links.
|
|
743
|
-
# @return [SubmissionList]
|
|
744
|
-
describe 'list_template_submissions test' do
|
|
745
|
-
it 'should work' do
|
|
746
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
747
|
-
end
|
|
748
|
-
end
|
|
749
|
-
|
|
750
|
-
# unit tests for list_templates
|
|
751
|
-
# List templates
|
|
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.
|
|
753
|
-
# @param [Hash] opts the optional parameters
|
|
754
|
-
# @option opts [String] :query Only list templates whose name contains this text (ignoring case). `%` and `_` match themselves.
|
|
755
|
-
# @option opts [String] :parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
756
|
-
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
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.
|
|
758
|
-
# @return [TemplateSummaryList]
|
|
759
|
-
describe 'list_templates test' do
|
|
760
|
-
it 'should work' do
|
|
761
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
762
|
-
end
|
|
763
|
-
end
|
|
764
|
-
|
|
765
|
-
# unit tests for list_webhooks
|
|
766
|
-
# List webhooks
|
|
767
|
-
# Returns the webhooks in your account, newest first, one page at a time. Filter them by event type, mode, or the API token, template or folder they're scoped to.
|
|
768
|
-
# @param [Hash] opts the optional parameters
|
|
769
|
-
# @option opts [WebhookEventType] :event_type Only list webhooks that subscribe to this event.
|
|
770
|
-
# @option opts [WebhookMode] :mode Only list webhooks set to this mode.
|
|
771
|
-
# @option opts [String] :template_id Only list webhooks scoped to this template.
|
|
772
|
-
# @option opts [String] :folder_id Only list webhooks scoped to this folder.
|
|
773
|
-
# @option opts [String] :api_token_id Only list webhooks scoped to this API token.
|
|
774
|
-
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
775
|
-
# @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.
|
|
776
|
-
# @return [WebhookList]
|
|
777
|
-
describe 'list_webhooks test' do
|
|
778
|
-
it 'should work' do
|
|
779
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
780
|
-
end
|
|
781
|
-
end
|
|
782
|
-
|
|
783
|
-
# unit tests for move_folder
|
|
784
|
-
# Move a folder
|
|
785
|
-
# Moves a folder into another folder, or to the root with `parent_folder_id: null`. Its templates and folders move with it. A folder can't move into itself or one of its own folders.
|
|
786
|
-
# @param folder_id The folder's ID.
|
|
787
|
-
# @param body Where to move the folder.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
790
|
-
# @return [Folder]
|
|
791
|
-
describe 'move_folder test' do
|
|
792
|
-
it 'should work' do
|
|
793
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
794
|
-
end
|
|
795
|
-
end
|
|
796
|
-
|
|
797
|
-
# unit tests for move_template
|
|
798
|
-
# Move a template to a folder
|
|
799
|
-
# Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
800
|
-
# @param template_id The template's ID.
|
|
801
|
-
# @param body Where to move the template.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
804
|
-
# @return [Template]
|
|
805
|
-
describe 'move_template test' do
|
|
806
|
-
it 'should work' do
|
|
807
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
808
|
-
end
|
|
809
|
-
end
|
|
810
|
-
|
|
811
|
-
# unit tests for publish_template_version
|
|
812
|
-
# Publish a template 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.
|
|
814
|
-
# @param template_id The template's ID.
|
|
815
|
-
# @param body The version to publish.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
818
|
-
# @return [TemplateVersion]
|
|
819
|
-
describe 'publish_template_version test' do
|
|
820
|
-
it 'should work' do
|
|
821
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
822
|
-
end
|
|
823
|
-
end
|
|
824
|
-
|
|
825
|
-
# unit tests for remove_template_fields
|
|
826
|
-
# Remove fields from a template
|
|
827
|
-
# Removes fields from a template's draft and returns the fields that are left. Conditional logic that used only the removed fields is removed too.
|
|
828
|
-
# @param template_id The template's ID.
|
|
829
|
-
# @param body The fields to remove from the template's draft.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
832
|
-
# @return [TemplateFields]
|
|
833
|
-
describe 'remove_template_fields test' do
|
|
834
|
-
it 'should work' do
|
|
835
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
836
|
-
end
|
|
837
|
-
end
|
|
838
|
-
|
|
839
|
-
# unit tests for rename_folder
|
|
840
|
-
# Rename a folder
|
|
841
|
-
# Renames a folder. The name must be unique within its parent folder.
|
|
842
|
-
# @param folder_id The folder's ID.
|
|
843
|
-
# @param body The folder's new name.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
846
|
-
# @return [Folder]
|
|
847
|
-
describe 'rename_folder test' do
|
|
848
|
-
it 'should work' do
|
|
849
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
850
|
-
end
|
|
851
|
-
end
|
|
852
|
-
|
|
853
|
-
# unit tests for reorder_template_fields
|
|
854
|
-
# Reorder a template's fields
|
|
855
|
-
# Changes the order of the fields in a template's draft and returns them in their new order. Send every field's ID: each field stays on its page, and a page's fields are printed in this order, so a later field prints over an earlier one where they overlap. Their values are in this order in the template's data schema and forms.
|
|
856
|
-
# @param template_id The template's ID.
|
|
857
|
-
# @param body The new order of the fields in the template's draft.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
860
|
-
# @return [TemplateFields]
|
|
861
|
-
describe 'reorder_template_fields test' do
|
|
862
|
-
it 'should work' do
|
|
863
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
864
|
-
end
|
|
865
|
-
end
|
|
866
|
-
|
|
867
|
-
# unit tests for restore_template_version
|
|
868
|
-
# Restore a template version
|
|
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`.
|
|
870
|
-
# @param template_id The template's ID.
|
|
871
|
-
# @param body The version to restore.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
874
|
-
# @return [Template]
|
|
875
|
-
describe 'restore_template_version test' do
|
|
876
|
-
it 'should work' do
|
|
877
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
878
|
-
end
|
|
879
|
-
end
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
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
|
-
|
|
909
|
-
# unit tests for test_authentication
|
|
910
|
-
# Test authentication
|
|
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.
|
|
912
|
-
# @param [Hash] opts the optional parameters
|
|
913
|
-
# @return [AuthenticationCheck]
|
|
914
|
-
describe 'test_authentication test' do
|
|
915
|
-
it 'should work' do
|
|
916
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
917
|
-
end
|
|
918
|
-
end
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
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
|
-
|
|
964
|
-
# unit tests for update_signature_request
|
|
965
|
-
# Update a signature request
|
|
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.
|
|
967
|
-
# @param signature_request_id The signature request's ID.
|
|
968
|
-
# @param body The settings to change. Properties left out keep their values.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
971
|
-
# @return [SignatureRequest]
|
|
972
|
-
describe 'update_signature_request test' do
|
|
973
|
-
it 'should work' do
|
|
974
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
975
|
-
end
|
|
976
|
-
end
|
|
977
|
-
|
|
978
|
-
# unit tests for update_template
|
|
979
|
-
# Update a template
|
|
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.
|
|
981
|
-
# @param template_id The template's ID.
|
|
982
|
-
# @param body The settings to change. Properties left out keep their values.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
985
|
-
# @return [Template]
|
|
986
|
-
describe 'update_template test' do
|
|
987
|
-
it 'should work' do
|
|
988
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
989
|
-
end
|
|
990
|
-
end
|
|
991
|
-
|
|
992
|
-
# unit tests for update_template_document
|
|
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.
|
|
995
|
-
# @param template_id The template's ID.
|
|
996
|
-
# @param body The new PDF, or a Word template's new Word document, as one of `cache_id`, `document_url` and `document_base64`.
|
|
997
|
-
# @param [Hash] opts the optional parameters
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
1000
|
-
# @return [Template]
|
|
1001
|
-
describe 'update_template_document test' do
|
|
1002
|
-
it 'should work' do
|
|
1003
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1004
|
-
end
|
|
1005
|
-
end
|
|
1006
|
-
|
|
1007
|
-
# unit tests for update_template_fields
|
|
1008
|
-
# Update a template's fields
|
|
1009
|
-
# Changes fields of a template's draft and returns all of its fields. Settings left out keep their values. A shared setting (`type`, `required`, `default`, ...) changes for every field with the same name.
|
|
1010
|
-
# @param template_id The template's ID.
|
|
1011
|
-
# @param body The fields to change in the template's draft.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
1014
|
-
# @return [TemplateFields]
|
|
1015
|
-
describe 'update_template_fields test' do
|
|
1016
|
-
it 'should work' do
|
|
1017
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1018
|
-
end
|
|
1019
|
-
end
|
|
1020
|
-
|
|
1021
|
-
# unit tests for update_webhook
|
|
1022
|
-
# Update a webhook
|
|
1023
|
-
# Updates a webhook. Only the properties you send change.
|
|
1024
|
-
# @param webhook_id The webhook's ID.
|
|
1025
|
-
# @param body The settings to change. Properties left out keep their values.
|
|
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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
1028
|
-
# @return [Webhook]
|
|
1029
|
-
describe 'update_webhook test' do
|
|
1030
|
-
it 'should work' do
|
|
1031
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1032
|
-
end
|
|
1033
|
-
end
|
|
1034
|
-
|
|
1035
|
-
# unit tests for upload_template
|
|
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).
|
|
1039
|
-
# @param [Hash] opts the optional parameters
|
|
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.
|
|
1041
|
-
# @option opts [String] :name The template's name.
|
|
1042
|
-
# @option opts [String] :description The template's description.
|
|
1043
|
-
# @option opts [String] :parent_folder_id The folder to put the template in. Left out, it's created at the root.
|
|
1044
|
-
# @option opts [AiFieldNamingLanguage] :ai_field_naming_language The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. Default: your account's template settings.
|
|
1045
|
-
# @option opts [Boolean] :detect_fields Set up the PDF's fields as DocSpring's "Automatically detect fields" upload option does: import or detect the fields, name them with AI, and set up conditional logic. `field_source`, `field_naming` and `field_logic` choose how. Default false. `document.page_processing_statuses` and `document.field_logic_status` show how it's going, and `document.state` becomes `processed` once every page's fields are set up.
|
|
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.
|
|
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`.
|
|
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 [Boolean] :include_office_use_fields With `detect_fields`, whether AI field setup keeps the fields that only the office receiving the form fills in, such as a "For office use only" box (`true`), or leaves them out (`false`). Default: your account's template settings.
|
|
1051
|
-
# @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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
1052
|
-
# @return [Template]
|
|
1053
|
-
describe 'upload_template test' do
|
|
1054
|
-
it 'should work' do
|
|
1055
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1056
|
-
end
|
|
1057
|
-
end
|
|
1058
|
-
|
|
1059
|
-
# unit tests for upload_template_document
|
|
1060
|
-
# Replace a template's document with an uploaded file
|
|
1061
|
-
# 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.
|
|
1062
|
-
# @param template_id The template's ID.
|
|
1063
|
-
# @param document The new PDF, or the new Word document (.docx or .odt) of a Word template.
|
|
1064
|
-
# @param [Hash] opts the optional parameters
|
|
1065
|
-
# @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.
|
|
1066
|
-
# @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.
|
|
1067
|
-
# @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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
1068
|
-
# @return [Template]
|
|
1069
|
-
describe 'upload_template_document test' do
|
|
1070
|
-
it 'should work' do
|
|
1071
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1072
|
-
end
|
|
1073
|
-
end
|
|
1074
|
-
|
|
1075
|
-
# unit tests for validate_submission
|
|
1076
|
-
# Check a submission without creating it
|
|
1077
|
-
# Checks a submission as creating it would (its data against the template's fields, its settings and signature requests) without saving it, generating anything or using credits. It doesn't check your account's credits. The response says whether the submission is valid, and if not, has the error that creating it would return.
|
|
1078
|
-
# @param template_id The template's ID.
|
|
1079
|
-
# @param body The submission's data and settings.
|
|
1080
|
-
# @param [Hash] opts the optional parameters
|
|
1081
|
-
# @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`.
|
|
1082
|
-
# @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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
1083
|
-
# @return [SubmissionValidation]
|
|
1084
|
-
describe 'validate_submission test' do
|
|
1085
|
-
it 'should work' do
|
|
1086
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1087
|
-
end
|
|
1088
|
-
end
|
|
1089
|
-
|
|
1090
|
-
# unit tests for verify_email_domain
|
|
1091
|
-
# Verify an email domain
|
|
1092
|
-
# 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.
|
|
1093
|
-
# @param email_domain_id The email domain's ID.
|
|
1094
|
-
# @param [Hash] opts the optional parameters
|
|
1095
|
-
# @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. A repeated response is the first one as it was, so its `download_url` links may have expired: use `permanent_url`, or get the record again for new links.
|
|
1096
|
-
# @return [EmailDomain]
|
|
1097
|
-
describe 'verify_email_domain test' do
|
|
1098
|
-
it 'should work' do
|
|
1099
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
1100
|
-
end
|
|
1101
|
-
end
|
|
1102
|
-
|
|
1103
|
-
end
|