docspring 3.5.0 → 4.1.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/.openapi-generator/FILES +445 -150
- data/.openapi-generator/VERSION +1 -1
- data/.rubocop.yml +1 -1
- data/.travis.yml +1 -1
- data/AGENTS.md +79 -19
- data/CHANGELOG.md +147 -0
- data/Gemfile.lock +7 -7
- data/README.md +69 -53
- data/docs/AddTemplateFieldsRequest.md +18 -0
- data/docs/{RenameFolderData.md → AiFieldNamingLanguage.md} +2 -5
- data/docs/AuthenticationCheck.md +18 -0
- data/docs/{CreateFolderData.md → BarcodeSymbology.md} +2 -5
- data/docs/{CreateWebhookData.md → CheckCharacter.md} +2 -5
- data/docs/Client.md +1570 -786
- data/docs/{UpdateWebhookData.md → CombinedFieldType.md} +2 -5
- data/docs/CombinedPdf.md +44 -0
- data/docs/CombinedPdfFiles.md +18 -0
- data/docs/CombinedPdfList.md +20 -0
- data/docs/CombinedPdfSource.md +26 -0
- data/docs/CombinedPdfSourceInput.md +88 -0
- data/docs/CombinedPdfSourcePdf.md +20 -0
- data/docs/CombinedPdfSourceType.md +15 -0
- data/docs/CombinedPdfState.md +15 -0
- data/docs/CopyTemplateRequest.md +22 -0
- data/docs/CreateCombinedPdfRequest.md +26 -0
- data/docs/CreateCustomFileFromUploadRequest.md +18 -0
- data/docs/CreateFolderRequest.md +20 -0
- data/docs/CreateSignatureRequestEventRequest.md +24 -0
- data/docs/CreateSignatureRequestTokenRequest.md +18 -0
- data/docs/CreateSubmissionBatchRequest.md +28 -0
- data/docs/CreateSubmissionRequest.md +38 -0
- data/docs/CreateTemplateRequest.md +102 -0
- data/docs/CreateWebhookRequest.md +38 -0
- data/docs/CustomFile.md +11 -3
- data/docs/CustomFileList.md +20 -0
- data/docs/CustomFileSourcePdf.md +20 -0
- data/docs/ErrorCode.md +15 -0
- data/docs/ErrorDetail.md +26 -0
- data/docs/ErrorInfo.md +32 -0
- data/docs/ErrorResponse.md +1 -3
- data/docs/ExpirationInterval.md +15 -0
- data/docs/Field.md +198 -0
- data/docs/FieldComparisonCondition.md +22 -0
- data/docs/FieldComparisonOperator.md +15 -0
- data/docs/FieldDependency.md +22 -0
- data/docs/FieldDependencyInput.md +22 -0
- data/docs/FieldDisplayType.md +15 -0
- data/docs/FieldEqualsCondition.md +22 -0
- data/docs/FieldEqualsOperator.md +15 -0
- data/docs/FieldGroup.md +32 -0
- data/docs/FieldGroupInput.md +30 -0
- data/docs/FieldGroupType.md +15 -0
- data/docs/FieldInCondition.md +22 -0
- data/docs/FieldInput.md +196 -0
- data/docs/FieldOverride.md +142 -0
- data/docs/FieldPresenceCondition.md +20 -0
- data/docs/FieldPresenceOperator.md +15 -0
- data/docs/FieldRangeCondition.md +24 -0
- data/docs/FieldReimportState.md +15 -0
- data/docs/FieldSetupLogic.md +15 -0
- data/docs/FieldSetupNaming.md +15 -0
- data/docs/FieldSetupSource.md +15 -0
- data/docs/FieldType.md +15 -0
- data/docs/Folder.md +9 -5
- data/docs/FolderList.md +20 -0
- data/docs/GenerateFilesFormat.md +15 -0
- data/docs/GenerateSubmissionFilesRequest.md +18 -0
- data/docs/GeneratedFile.md +32 -0
- data/docs/GeneratedFileState.md +15 -0
- data/docs/HtmlEngineOptions.md +36 -0
- data/docs/HtmlEngineOptionsInput.md +36 -0
- data/docs/ImageGravity.md +15 -0
- data/docs/ImageScaleType.md +15 -0
- data/docs/ModelCodeLanguage.md +15 -0
- data/docs/MoveFolderRequest.md +18 -0
- data/docs/MoveTemplateRequest.md +18 -0
- data/docs/NumberConditionType.md +15 -0
- data/docs/OutputFormat.md +15 -0
- data/docs/PageFormat.md +15 -0
- data/docs/PageImage.md +34 -0
- data/docs/PageImages.md +24 -0
- data/docs/PredefinedField.md +30 -0
- data/docs/PredefinedFieldInput.md +30 -0
- data/docs/PublishTemplateVersionRequest.md +20 -0
- data/docs/RemoveTemplateFieldsRequest.md +18 -0
- data/docs/RenameFolderRequest.md +18 -0
- data/docs/ReorderTemplateFieldsRequest.md +18 -0
- data/docs/RestoreTemplateVersionRequest.md +18 -0
- data/docs/ShapeType.md +15 -0
- data/docs/SignatureRequest.md +66 -0
- data/docs/SignatureRequestAuthSecondFactorType.md +15 -0
- data/docs/SignatureRequestAuthType.md +15 -0
- data/docs/SignatureRequestEvent.md +32 -0
- data/docs/SignatureRequestEventType.md +15 -0
- data/docs/SignatureRequestInput.md +46 -0
- data/docs/SignatureRequestMessageType.md +15 -0
- data/docs/SignatureRequestState.md +15 -0
- data/docs/SignatureRequestToken.md +30 -0
- data/docs/SignatureRequestTokenType.md +15 -0
- data/docs/StringConditionType.md +15 -0
- data/docs/Submission.md +43 -47
- data/docs/SubmissionAction.md +6 -8
- data/docs/SubmissionActionState.md +15 -0
- data/docs/SubmissionActionType.md +15 -0
- data/docs/SubmissionBatch.md +16 -10
- data/docs/SubmissionBatchState.md +15 -0
- data/docs/SubmissionFiles.md +24 -0
- data/docs/SubmissionInput.md +40 -0
- data/docs/SubmissionList.md +20 -0
- data/docs/SubmissionSource.md +15 -0
- data/docs/SubmissionSourcePdf.md +20 -0
- data/docs/SubmissionState.md +15 -0
- data/docs/SubmissionValidation.md +24 -0
- data/docs/Template.md +79 -107
- data/docs/TemplateActor.md +26 -0
- data/docs/TemplateActorType.md +15 -0
- data/docs/TemplateDefaults.md +56 -0
- data/docs/TemplateDefaultsInput.md +56 -0
- data/docs/TemplateDiff.md +30 -0
- data/docs/TemplateDiffSummary.md +28 -0
- data/docs/TemplateDocument.md +40 -0
- data/docs/TemplateDocumentState.md +15 -0
- data/docs/TemplateFieldChange.md +24 -0
- data/docs/TemplateFieldChanges.md +24 -0
- data/docs/TemplateFieldDependency.md +26 -0
- data/docs/TemplateFieldDependencyAction.md +15 -0
- data/docs/TemplateFieldDependencyCondition.md +24 -0
- data/docs/TemplateFieldDependencyConditionInput.md +93 -0
- data/docs/TemplateFieldDependencyInput.md +26 -0
- data/docs/TemplateFieldDependencyMatch.md +15 -0
- data/docs/TemplateFieldDependencyOperator.md +15 -0
- data/docs/TemplateFieldLogicStatus.md +15 -0
- data/docs/TemplateFieldMove.md +22 -0
- data/docs/TemplateFields.md +22 -0
- data/docs/TemplateFormMode.md +15 -0
- data/docs/TemplateModelCode.md +22 -0
- data/docs/TemplatePageAiError.md +15 -0
- data/docs/TemplatePageAiNamingStatus.md +15 -0
- data/docs/TemplatePageFieldsStatus.md +15 -0
- data/docs/TemplatePageImageStatus.md +15 -0
- data/docs/TemplatePageImages.md +24 -0
- data/docs/TemplatePageProcessingStatus.md +26 -0
- data/docs/TemplateSourcePdf.md +24 -0
- data/docs/TemplateSummary.md +90 -0
- data/docs/TemplateSummaryList.md +20 -0
- data/docs/TemplateType.md +15 -0
- data/docs/TemplateVersion.md +24 -0
- data/docs/TemplateVersionType.md +15 -0
- data/docs/TextAlignment.md +15 -0
- data/docs/TextOverflow.md +15 -0
- data/docs/TextVerticalAlignment.md +15 -0
- data/docs/Typeface.md +15 -0
- data/docs/UpdateSignatureRequestRequest.md +34 -0
- data/docs/UpdateTemplateDocumentRequest.md +26 -0
- data/docs/UpdateTemplateFieldsRequest.md +18 -0
- data/docs/UpdateTemplateRequest.md +86 -0
- data/docs/UpdateWebhookRequest.md +38 -0
- data/docs/UploadMethod.md +15 -0
- data/docs/UploadPresign.md +24 -0
- data/docs/UrlSourcePdf.md +20 -0
- data/docs/ValidateSubmissionRequest.md +38 -0
- data/docs/Webhook.md +20 -20
- data/docs/WebhookEventType.md +15 -0
- data/docs/WebhookList.md +20 -0
- data/docs/WebhookMode.md +15 -0
- data/docspring.gemspec +3 -3
- data/lib/docspring/api/client.rb +1606 -905
- data/lib/docspring/api_client.rb +14 -6
- data/lib/docspring/api_error.rb +3 -3
- data/lib/docspring/api_model_base.rb +88 -0
- data/lib/docspring/configuration.rb +12 -7
- data/lib/docspring/models/add_template_fields_request.rb +187 -0
- data/lib/docspring/models/ai_field_naming_language.rb +42 -0
- data/lib/docspring/models/authentication_check.rb +185 -0
- data/lib/docspring/models/barcode_symbology.rb +47 -0
- data/lib/docspring/models/check_character.rb +44 -0
- data/lib/docspring/models/combined_field_type.rb +41 -0
- data/lib/docspring/models/{combined_submission.rb → combined_pdf.rb} +228 -206
- data/lib/docspring/models/combined_pdf_files.rb +167 -0
- data/lib/docspring/models/combined_pdf_list.rb +200 -0
- data/lib/docspring/models/{create_webhook_data.rb → combined_pdf_source.rb} +107 -103
- data/lib/docspring/models/combined_pdf_source_input.rb +62 -0
- data/lib/docspring/models/combined_pdf_source_pdf.rb +212 -0
- data/lib/docspring/models/combined_pdf_source_type.rb +44 -0
- data/lib/docspring/models/combined_pdf_state.rb +44 -0
- data/lib/docspring/models/{copy_template_options.rb → copy_template_request.rb} +32 -87
- data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +60 -123
- data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +29 -96
- data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +60 -102
- data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +50 -122
- data/lib/docspring/models/create_signature_request_token_request.rb +190 -0
- data/lib/docspring/models/{submission_batch_data.rb → create_submission_batch_request.rb} +75 -108
- data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +114 -144
- data/lib/docspring/models/create_template_request.rb +646 -0
- data/lib/docspring/models/create_webhook_request.rb +368 -0
- data/lib/docspring/models/custom_file.rb +132 -95
- data/lib/docspring/models/custom_file_list.rb +200 -0
- data/lib/docspring/models/custom_file_source_pdf.rb +212 -0
- data/lib/docspring/models/error_code.rb +60 -0
- data/lib/docspring/models/error_detail.rb +242 -0
- data/lib/docspring/models/error_info.rb +316 -0
- data/lib/docspring/models/error_response.rb +28 -138
- data/lib/docspring/models/expiration_interval.rb +42 -0
- data/lib/docspring/models/field.rb +2217 -0
- data/lib/docspring/models/field_comparison_condition.rb +247 -0
- data/lib/docspring/models/field_comparison_operator.rb +43 -0
- data/lib/docspring/models/field_dependency.rb +246 -0
- data/lib/docspring/models/field_dependency_input.rb +246 -0
- data/lib/docspring/models/field_display_type.rb +45 -0
- data/lib/docspring/models/field_equals_condition.rb +247 -0
- data/lib/docspring/models/field_equals_operator.rb +41 -0
- data/lib/docspring/models/field_group.rb +368 -0
- data/lib/docspring/models/field_group_input.rb +247 -0
- data/lib/docspring/models/field_group_type.rb +41 -0
- data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +101 -103
- data/lib/docspring/models/field_input.rb +1109 -0
- data/lib/docspring/models/field_override.rb +829 -0
- data/lib/docspring/models/field_presence_condition.rb +234 -0
- data/lib/docspring/models/field_presence_operator.rb +41 -0
- data/lib/docspring/models/field_range_condition.rb +234 -0
- data/lib/docspring/models/field_reimport_state.rb +43 -0
- data/lib/docspring/models/field_setup_logic.rb +41 -0
- data/lib/docspring/models/field_setup_naming.rb +41 -0
- data/lib/docspring/models/field_setup_source.rb +42 -0
- data/lib/docspring/models/field_type.rb +54 -0
- data/lib/docspring/models/folder.rb +134 -93
- data/lib/docspring/models/folder_list.rb +200 -0
- data/lib/docspring/models/generate_files_format.rb +40 -0
- data/lib/docspring/models/generate_submission_files_request.rb +187 -0
- data/lib/docspring/models/generated_file.rb +326 -0
- data/lib/docspring/models/generated_file_state.rb +42 -0
- data/lib/docspring/models/html_engine_options.rb +416 -0
- data/lib/docspring/models/html_engine_options_input.rb +280 -0
- data/lib/docspring/models/image_gravity.rb +48 -0
- data/lib/docspring/models/image_scale_type.rb +42 -0
- data/lib/docspring/models/model_code_language.rb +48 -0
- data/lib/docspring/models/{move_folder_data.rb → move_folder_request.rb} +31 -87
- data/lib/docspring/models/move_template_request.rb +171 -0
- data/lib/docspring/models/number_condition_type.rb +45 -0
- data/lib/docspring/models/output_format.rb +41 -0
- data/lib/docspring/models/page_format.rb +52 -0
- data/lib/docspring/models/page_image.rb +359 -0
- data/lib/docspring/models/page_images.rb +248 -0
- data/lib/docspring/models/predefined_field.rb +287 -0
- data/lib/docspring/models/predefined_field_input.rb +287 -0
- data/lib/docspring/models/{publish_version_data.rb → publish_template_version_request.rb} +64 -99
- data/lib/docspring/models/remove_template_fields_request.rb +187 -0
- data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +29 -87
- data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
- data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +29 -87
- data/lib/docspring/models/shape_type.rb +45 -0
- data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +240 -171
- data/lib/docspring/models/signature_request_auth_second_factor_type.rb +45 -0
- data/lib/docspring/models/signature_request_auth_type.rb +46 -0
- data/lib/docspring/models/{submission_data_request_event.rb → signature_request_event.rb} +137 -122
- data/lib/docspring/models/signature_request_event_type.rb +45 -0
- data/lib/docspring/models/{update_submission_data_request_data.rb → signature_request_input.rb} +156 -173
- data/lib/docspring/models/signature_request_message_type.rb +48 -0
- data/lib/docspring/models/signature_request_state.rb +42 -0
- data/lib/docspring/models/signature_request_token.rb +369 -0
- data/lib/docspring/models/signature_request_token_type.rb +41 -0
- data/lib/docspring/models/string_condition_type.rb +44 -0
- data/lib/docspring/models/submission.rb +399 -335
- data/lib/docspring/models/submission_action.rb +64 -136
- data/lib/docspring/models/submission_action_state.rb +43 -0
- data/lib/docspring/models/submission_action_type.rb +46 -0
- data/lib/docspring/models/submission_batch.rb +157 -112
- data/lib/docspring/models/submission_batch_state.rb +42 -0
- data/lib/docspring/models/submission_files.rb +197 -0
- data/lib/docspring/models/submission_input.rb +296 -0
- data/lib/docspring/models/submission_list.rb +200 -0
- data/lib/docspring/models/submission_source.rb +43 -0
- data/lib/docspring/models/submission_source_pdf.rb +212 -0
- data/lib/docspring/models/submission_state.rb +52 -0
- data/lib/docspring/models/submission_validation.rb +234 -0
- data/lib/docspring/models/template.rb +528 -736
- data/lib/docspring/models/template_actor.rb +259 -0
- data/lib/docspring/models/template_actor_type.rb +42 -0
- data/lib/docspring/models/template_defaults.rb +395 -0
- data/lib/docspring/models/template_defaults_input.rb +395 -0
- data/lib/docspring/models/template_diff.rb +321 -0
- data/lib/docspring/models/template_diff_summary.rb +320 -0
- data/lib/docspring/models/template_document.rb +396 -0
- data/lib/docspring/models/template_document_state.rb +46 -0
- data/lib/docspring/models/template_field_change.rb +266 -0
- data/lib/docspring/models/template_field_changes.rb +274 -0
- data/lib/docspring/models/{success_error_response.rb → template_field_dependency.rb} +122 -114
- data/lib/docspring/models/template_field_dependency_action.rb +42 -0
- data/lib/docspring/models/{create_pdf_template.rb → template_field_dependency_condition.rb} +116 -103
- data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
- data/lib/docspring/models/template_field_dependency_input.rb +285 -0
- data/lib/docspring/models/template_field_dependency_match.rb +41 -0
- data/lib/docspring/models/template_field_dependency_operator.rb +49 -0
- data/lib/docspring/models/template_field_logic_status.rb +44 -0
- data/lib/docspring/models/{update_webhook_data.rb → template_field_move.rb} +99 -103
- data/lib/docspring/models/{add_fields_data.rb → template_fields.rb} +71 -89
- data/lib/docspring/models/template_form_mode.rb +42 -0
- data/lib/docspring/models/{template_model_code_response.rb → template_model_code.rb} +37 -96
- data/lib/docspring/models/template_page_ai_error.rb +43 -0
- data/lib/docspring/models/template_page_ai_naming_status.rb +41 -0
- data/lib/docspring/models/template_page_fields_status.rb +44 -0
- data/lib/docspring/models/template_page_image_status.rb +41 -0
- data/lib/docspring/models/template_page_images.rb +254 -0
- data/lib/docspring/models/template_page_processing_status.rb +275 -0
- data/lib/docspring/models/{update_pdf_template.rb → template_source_pdf.rb} +92 -103
- data/lib/docspring/models/{template_preview.rb → template_summary.rb} +436 -589
- data/lib/docspring/models/template_summary_list.rb +200 -0
- data/lib/docspring/models/template_type.rb +41 -0
- data/lib/docspring/models/template_version.rb +238 -0
- data/lib/docspring/models/template_version_type.rb +42 -0
- data/lib/docspring/models/text_alignment.rb +43 -0
- data/lib/docspring/models/text_overflow.rb +41 -0
- data/lib/docspring/models/text_vertical_alignment.rb +42 -0
- data/lib/docspring/models/typeface.rb +56 -0
- data/lib/docspring/models/{create_submission_data_request_data.rb → update_signature_request_request.rb} +72 -196
- data/lib/docspring/models/update_template_document_request.rb +208 -0
- data/lib/docspring/models/update_template_fields_request.rb +187 -0
- data/lib/docspring/models/update_template_request.rb +551 -0
- data/lib/docspring/models/update_webhook_request.rb +344 -0
- data/lib/docspring/models/upload_method.rb +40 -0
- data/lib/docspring/models/{upload_presign_response.rb → upload_presign.rb} +93 -140
- data/lib/docspring/models/url_source_pdf.rb +212 -0
- data/lib/docspring/models/validate_submission_request.rb +288 -0
- data/lib/docspring/models/webhook.rb +97 -107
- data/lib/docspring/models/webhook_event_type.rb +64 -0
- data/lib/docspring/models/webhook_list.rb +200 -0
- data/lib/docspring/models/webhook_mode.rb +41 -0
- data/lib/docspring/request_schemas.json +4967 -0
- data/lib/docspring/request_validator.rb +396 -0
- data/lib/docspring/version.rb +4 -4
- data/lib/docspring.rb +153 -53
- data/spec/api/client_spec.rb +411 -265
- data/spec/models/add_template_fields_request_spec.rb +36 -0
- data/spec/models/ai_field_naming_language_spec.rb +30 -0
- data/spec/models/authentication_check_spec.rb +36 -0
- data/spec/models/barcode_symbology_spec.rb +30 -0
- data/spec/models/check_character_spec.rb +30 -0
- data/spec/models/combined_field_type_spec.rb +30 -0
- data/spec/models/combined_pdf_files_spec.rb +36 -0
- data/spec/models/combined_pdf_list_spec.rb +42 -0
- data/spec/models/combined_pdf_source_input_spec.rb +44 -0
- data/spec/models/combined_pdf_source_pdf_spec.rb +42 -0
- data/spec/models/{submission_data_request_token_spec.rb → combined_pdf_source_spec.rb} +18 -12
- data/spec/models/combined_pdf_source_type_spec.rb +30 -0
- data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +20 -24
- data/spec/models/combined_pdf_state_spec.rb +30 -0
- data/spec/models/{copy_template_options_spec.rb → copy_template_request_spec.rb} +9 -9
- data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +12 -18
- data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +9 -9
- data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +11 -11
- data/spec/models/{list_submissions_response_spec.rb → create_signature_request_event_request_spec.rb} +18 -12
- data/spec/models/create_signature_request_token_request_spec.rb +36 -0
- data/spec/models/{submission_batch_data_spec.rb → create_submission_batch_request_spec.rb} +19 -13
- data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +29 -17
- data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +49 -103
- data/spec/models/create_webhook_request_spec.rb +96 -0
- data/spec/models/custom_file_list_spec.rb +42 -0
- data/spec/models/custom_file_source_pdf_spec.rb +42 -0
- data/spec/models/custom_file_spec.rb +29 -5
- data/spec/models/error_code_spec.rb +30 -0
- data/spec/models/{create_submission_response_spec.rb → error_detail_spec.rb} +14 -18
- data/spec/models/{batch_generate_pdfs201_response_spec.rb → error_info_spec.rb} +27 -19
- data/spec/models/error_response_spec.rb +4 -14
- data/spec/models/expiration_interval_spec.rb +30 -0
- data/spec/models/field_comparison_condition_spec.rb +48 -0
- data/spec/models/field_comparison_operator_spec.rb +30 -0
- data/spec/models/field_dependency_input_spec.rb +48 -0
- data/spec/models/field_dependency_spec.rb +48 -0
- data/spec/models/field_display_type_spec.rb +30 -0
- data/spec/models/field_equals_condition_spec.rb +48 -0
- data/spec/models/field_equals_operator_spec.rb +30 -0
- data/spec/models/field_group_input_spec.rb +72 -0
- data/spec/models/field_group_spec.rb +78 -0
- data/spec/models/field_group_type_spec.rb +30 -0
- data/spec/models/field_in_condition_spec.rb +48 -0
- data/spec/models/field_input_spec.rb +570 -0
- data/spec/models/field_override_spec.rb +408 -0
- data/spec/models/field_presence_condition_spec.rb +42 -0
- data/spec/models/field_presence_operator_spec.rb +30 -0
- data/spec/models/field_range_condition_spec.rb +54 -0
- data/spec/models/field_reimport_state_spec.rb +30 -0
- data/spec/models/field_setup_logic_spec.rb +30 -0
- data/spec/models/field_setup_naming_spec.rb +30 -0
- data/spec/models/field_setup_source_spec.rb +30 -0
- data/spec/models/field_spec.rb +576 -0
- data/spec/models/field_type_spec.rb +30 -0
- data/spec/models/folder_list_spec.rb +42 -0
- data/spec/models/folder_spec.rb +16 -4
- data/spec/models/generate_files_format_spec.rb +30 -0
- data/spec/models/generate_submission_files_request_spec.rb +36 -0
- data/spec/models/generated_file_spec.rb +78 -0
- data/spec/models/generated_file_state_spec.rb +30 -0
- data/spec/models/html_engine_options_input_spec.rb +90 -0
- data/spec/models/html_engine_options_spec.rb +90 -0
- data/spec/models/image_gravity_spec.rb +30 -0
- data/spec/models/image_scale_type_spec.rb +30 -0
- data/spec/models/model_code_language_spec.rb +30 -0
- data/spec/models/move_folder_request_spec.rb +36 -0
- data/spec/models/move_template_request_spec.rb +36 -0
- data/spec/models/number_condition_type_spec.rb +30 -0
- data/spec/models/output_format_spec.rb +30 -0
- data/spec/models/page_format_spec.rb +30 -0
- data/spec/models/page_image_spec.rb +84 -0
- data/spec/models/page_images_spec.rb +54 -0
- data/spec/models/predefined_field_input_spec.rb +72 -0
- data/spec/models/predefined_field_spec.rb +72 -0
- data/spec/models/{publish_version_data_spec.rb → publish_template_version_request_spec.rb} +11 -11
- data/spec/models/remove_template_fields_request_spec.rb +36 -0
- data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +9 -9
- data/spec/models/reorder_template_fields_request_spec.rb +36 -0
- data/spec/models/restore_template_version_request_spec.rb +36 -0
- data/spec/models/shape_type_spec.rb +30 -0
- data/spec/models/signature_request_auth_second_factor_type_spec.rb +30 -0
- data/spec/models/signature_request_auth_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_event_spec.rb → signature_request_event_spec.rb} +16 -18
- data/spec/models/signature_request_event_type_spec.rb +30 -0
- data/spec/models/{create_submission_data_request_data_spec.rb → signature_request_input_spec.rb} +28 -30
- data/spec/models/signature_request_message_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_show_spec.rb → signature_request_spec.rb} +31 -31
- data/spec/models/signature_request_state_spec.rb +30 -0
- data/spec/models/signature_request_token_spec.rb +72 -0
- data/spec/models/signature_request_token_type_spec.rb +30 -0
- data/spec/models/string_condition_type_spec.rb +30 -0
- data/spec/models/submission_action_spec.rb +4 -22
- data/spec/models/submission_action_state_spec.rb +30 -0
- data/spec/models/submission_action_type_spec.rb +30 -0
- data/spec/models/submission_batch_spec.rb +27 -13
- data/spec/models/submission_batch_state_spec.rb +30 -0
- data/spec/models/submission_files_spec.rb +54 -0
- data/spec/models/{json_schema_spec.rb → submission_input_spec.rb} +21 -21
- data/spec/models/submission_list_spec.rb +42 -0
- data/spec/models/submission_source_pdf_spec.rb +42 -0
- data/spec/models/submission_source_spec.rb +30 -0
- data/spec/models/submission_spec.rb +27 -51
- data/spec/models/submission_state_spec.rb +30 -0
- data/spec/models/submission_validation_spec.rb +54 -0
- data/spec/models/template_actor_spec.rb +60 -0
- data/spec/models/template_actor_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_spec.rb → template_defaults_input_spec.rb} +29 -53
- data/spec/models/{submission_preview_spec.rb → template_defaults_spec.rb} +29 -61
- data/spec/models/template_diff_spec.rb +72 -0
- data/spec/models/template_diff_summary_spec.rb +66 -0
- data/spec/models/template_document_spec.rb +102 -0
- data/spec/models/template_document_state_spec.rb +30 -0
- data/spec/models/template_field_change_spec.rb +54 -0
- data/spec/models/template_field_changes_spec.rb +54 -0
- data/spec/models/template_field_dependency_action_spec.rb +30 -0
- data/spec/models/template_field_dependency_condition_input_spec.rb +44 -0
- data/spec/models/template_field_dependency_condition_spec.rb +54 -0
- data/spec/models/template_field_dependency_input_spec.rb +60 -0
- data/spec/models/template_field_dependency_match_spec.rb +30 -0
- data/spec/models/template_field_dependency_operator_spec.rb +30 -0
- data/spec/models/template_field_dependency_spec.rb +60 -0
- data/spec/models/template_field_logic_status_spec.rb +30 -0
- data/spec/models/template_field_move_spec.rb +48 -0
- data/spec/models/template_fields_spec.rb +48 -0
- data/spec/models/template_form_mode_spec.rb +30 -0
- data/spec/models/{template_model_code_response_spec.rb → template_model_code_spec.rb} +9 -13
- data/spec/models/template_page_ai_error_spec.rb +30 -0
- data/spec/models/template_page_ai_naming_status_spec.rb +30 -0
- data/spec/models/template_page_fields_status_spec.rb +30 -0
- data/spec/models/template_page_image_status_spec.rb +30 -0
- data/spec/models/template_page_images_spec.rb +54 -0
- data/spec/models/template_page_processing_status_spec.rb +60 -0
- data/spec/models/template_source_pdf_spec.rb +54 -0
- data/spec/models/template_spec.rb +44 -140
- data/spec/models/template_summary_list_spec.rb +42 -0
- data/spec/models/template_summary_spec.rb +252 -0
- data/spec/models/template_type_spec.rb +30 -0
- data/spec/models/template_version_spec.rb +54 -0
- data/spec/models/template_version_type_spec.rb +30 -0
- data/spec/models/text_alignment_spec.rb +30 -0
- data/spec/models/text_overflow_spec.rb +30 -0
- data/spec/models/text_vertical_alignment_spec.rb +30 -0
- data/spec/models/typeface_spec.rb +30 -0
- data/spec/models/{submission_batch_with_submissions_spec.rb → update_signature_request_request_spec.rb} +18 -22
- data/spec/models/update_template_document_request_spec.rb +60 -0
- data/spec/models/update_template_fields_request_spec.rb +36 -0
- data/spec/models/update_template_request_spec.rb +240 -0
- data/spec/models/update_webhook_request_spec.rb +96 -0
- data/spec/models/upload_method_spec.rb +30 -0
- data/spec/models/{upload_presign_response_spec.rb → upload_presign_spec.rb} +13 -17
- data/spec/models/url_source_pdf_spec.rb +42 -0
- data/spec/models/validate_submission_request_spec.rb +96 -0
- data/spec/models/webhook_event_type_spec.rb +30 -0
- data/spec/models/webhook_list_spec.rb +42 -0
- data/spec/models/webhook_mode_spec.rb +30 -0
- data/spec/models/webhook_spec.rb +4 -8
- data/spec/spec_helper.rb +3 -3
- metadata +597 -202
- data/docs/AddFieldsData.md +0 -18
- data/docs/BatchGeneratePdfs201Response.md +0 -28
- data/docs/CombinePdfsData.md +0 -28
- data/docs/CombinedSubmission.md +0 -44
- data/docs/CombinedSubmissionAction.md +0 -30
- data/docs/CopyTemplateOptions.md +0 -22
- data/docs/CreateCombinedSubmissionResponse.md +0 -26
- data/docs/CreateCustomFileData.md +0 -18
- data/docs/CreateCustomFileResponse.md +0 -24
- data/docs/CreateHtmlTemplate.md +0 -18
- data/docs/CreatePdfSubmissionData.md +0 -34
- data/docs/CreatePdfTemplate.md +0 -18
- data/docs/CreateSubmissionDataRequestData.md +0 -44
- data/docs/CreateSubmissionDataRequestEventRequest.md +0 -24
- data/docs/CreateSubmissionDataRequestEventResponse.md +0 -24
- data/docs/CreateSubmissionDataRequestResponse.md +0 -24
- data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -24
- data/docs/CreateSubmissionResponse.md +0 -26
- data/docs/ErrorOrMultipleErrorsResponse.md +0 -22
- data/docs/ForbiddenErrorResponse.md +0 -22
- data/docs/JsonSchema.md +0 -40
- data/docs/ListSubmissionsResponse.md +0 -22
- data/docs/MoveFolderData.md +0 -18
- data/docs/MoveTemplateData.md +0 -20
- data/docs/MultipleErrorsResponse.md +0 -20
- data/docs/PublishVersionData.md +0 -20
- data/docs/RestoreVersionData.md +0 -18
- data/docs/Submission422Response.md +0 -24
- data/docs/SubmissionBatchData.md +0 -26
- data/docs/SubmissionBatchWithSubmissions.md +0 -34
- data/docs/SubmissionDataRequest.md +0 -60
- data/docs/SubmissionDataRequestEvent.md +0 -30
- data/docs/SubmissionDataRequestShow.md +0 -62
- data/docs/SubmissionDataRequestToken.md +0 -24
- data/docs/SubmissionPreview.md +0 -64
- data/docs/SuccessErrorResponse.md +0 -20
- data/docs/SuccessMultipleErrorsResponse.md +0 -20
- data/docs/TemplateAddFieldsResponse.md +0 -22
- data/docs/TemplateDeleteResponse.md +0 -24
- data/docs/TemplateModelCodeResponse.md +0 -22
- data/docs/TemplatePreview.md +0 -116
- data/docs/TemplatePublishVersionResponse.md +0 -22
- data/docs/UpdateHtmlTemplate.md +0 -18
- data/docs/UpdatePdfTemplate.md +0 -18
- data/docs/UpdateSubmissionDataRequestData.md +0 -42
- data/docs/UploadPresignResponse.md +0 -24
- data/lib/docspring/models/batch_generate_pdfs201_response.rb +0 -352
- data/lib/docspring/models/combined_submission_action.rb +0 -384
- data/lib/docspring/models/create_combined_submission_response.rb +0 -324
- data/lib/docspring/models/create_custom_file_response.rb +0 -314
- data/lib/docspring/models/create_html_template.rb +0 -243
- data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -314
- data/lib/docspring/models/create_submission_data_request_response.rb +0 -314
- data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -314
- data/lib/docspring/models/create_submission_response.rb +0 -324
- data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
- data/lib/docspring/models/forbidden_error_response.rb +0 -323
- data/lib/docspring/models/json_schema.rb +0 -329
- data/lib/docspring/models/list_submissions_response.rb +0 -283
- data/lib/docspring/models/multiple_errors_response.rb +0 -296
- data/lib/docspring/models/submission422_response.rb +0 -299
- data/lib/docspring/models/submission_batch_with_submissions.rb +0 -433
- data/lib/docspring/models/submission_data_request.rb +0 -570
- data/lib/docspring/models/submission_data_request_token.rb +0 -279
- data/lib/docspring/models/submission_preview.rb +0 -637
- data/lib/docspring/models/success_multiple_errors_response.rb +0 -279
- data/lib/docspring/models/template_add_fields_response.rb +0 -290
- data/lib/docspring/models/template_delete_response.rb +0 -300
- data/lib/docspring/models/template_publish_version_response.rb +0 -305
- data/lib/docspring/models/update_html_template.rb +0 -243
- data/spec/models/add_fields_data_spec.rb +0 -36
- data/spec/models/combined_submission_action_spec.rb +0 -84
- data/spec/models/create_combined_submission_response_spec.rb +0 -64
- data/spec/models/create_custom_file_response_spec.rb +0 -58
- data/spec/models/create_folder_data_spec.rb +0 -36
- data/spec/models/create_html_template_spec.rb +0 -36
- data/spec/models/create_pdf_template_spec.rb +0 -36
- data/spec/models/create_submission_data_request_event_request_spec.rb +0 -62
- data/spec/models/create_submission_data_request_event_response_spec.rb +0 -58
- data/spec/models/create_submission_data_request_response_spec.rb +0 -58
- data/spec/models/create_submission_data_request_token_response_spec.rb +0 -58
- data/spec/models/create_webhook_data_spec.rb +0 -36
- data/spec/models/error_or_multiple_errors_response_spec.rb +0 -52
- data/spec/models/forbidden_error_response_spec.rb +0 -56
- data/spec/models/move_folder_data_spec.rb +0 -36
- data/spec/models/multiple_errors_response_spec.rb +0 -46
- data/spec/models/restore_version_data_spec.rb +0 -36
- data/spec/models/submission422_response_spec.rb +0 -58
- data/spec/models/success_error_response_spec.rb +0 -46
- data/spec/models/success_multiple_errors_response_spec.rb +0 -46
- data/spec/models/template_add_fields_response_spec.rb +0 -52
- data/spec/models/template_delete_response_spec.rb +0 -58
- data/spec/models/template_publish_version_response_spec.rb +0 -52
- data/spec/models/update_html_template_spec.rb +0 -36
- data/spec/models/update_pdf_template_spec.rb +0 -36
- data/spec/models/update_submission_data_request_data_spec.rb +0 -116
- data/spec/models/update_webhook_data_spec.rb +0 -36
data/spec/api/client_spec.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.26.0-DOCSPRING
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -32,142 +32,131 @@ describe 'Client' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
# unit tests for
|
|
36
|
-
# Add
|
|
37
|
-
# Adds fields to a
|
|
38
|
-
# @param template_id
|
|
39
|
-
# @param
|
|
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.
|
|
38
|
+
# @param template_id The template's ID.
|
|
39
|
+
# @param body The fields to add to the template's draft.
|
|
40
40
|
# @param [Hash] opts the optional parameters
|
|
41
|
-
# @return [
|
|
42
|
-
describe '
|
|
41
|
+
# @return [TemplateFields]
|
|
42
|
+
describe 'add_template_fields test' do
|
|
43
43
|
it 'should work' do
|
|
44
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
-
# unit tests for
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
# @param
|
|
52
|
-
# @param [Hash] opts the optional parameters
|
|
53
|
-
# @option opts [Boolean] :wait Wait for submission batch to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
|
|
54
|
-
# @return [BatchGeneratePdfs201Response]
|
|
55
|
-
describe 'batch_generate_pdfs test' do
|
|
56
|
-
it 'should work' do
|
|
57
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# unit tests for combine_pdfs
|
|
62
|
-
# Merge submission PDFs, template PDFs, or custom files
|
|
63
|
-
# Combines multiple PDFs from various sources into a single PDF file. Supports merging submission PDFs, template PDFs, custom files, other merged PDFs, and PDFs from URLs. Merges the PDFs in the order provided. Combining uses credits (4 per source PDF, plus 4 per unit of the combined PDF), even with a test API token or watermarked source PDFs. If your balance can't cover it, the API returns 402 and the combined submission waits in the `insufficient_credits` state until you add credits. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
64
|
-
# @param data
|
|
48
|
+
# unit tests for copy_template
|
|
49
|
+
# Copy a template
|
|
50
|
+
# Copies a template (its draft, or a published version) into a new template.
|
|
51
|
+
# @param template_id The template's ID.
|
|
65
52
|
# @param [Hash] opts the optional parameters
|
|
66
|
-
# @
|
|
67
|
-
|
|
53
|
+
# @option opts [CopyTemplateRequest] :body Settings for the copy.
|
|
54
|
+
# @return [Template]
|
|
55
|
+
describe 'copy_template test' do
|
|
68
56
|
it 'should work' do
|
|
69
57
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
70
58
|
end
|
|
71
59
|
end
|
|
72
60
|
|
|
73
|
-
# unit tests for
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
-
# @param
|
|
61
|
+
# unit tests for create_combined_pdf
|
|
62
|
+
# Combine PDFs
|
|
63
|
+
# Merges PDFs into one: submissions, other combined PDFs, templates, custom files (POST /custom_files) and PDFs from URLs, in the order of `source_pdfs`. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /combined_pdfs/{combined_pdf_id} until `state` isn't `pending`. A template source merges the template's processed PDF by default: the PDF submissions are filled in on, decrypted and with its form fields removed. Pass `processed: false` to merge the PDF as it was uploaded.
|
|
64
|
+
# @param body The PDFs to merge, and the combined PDF's settings.
|
|
77
65
|
# @param [Hash] opts the optional parameters
|
|
78
|
-
# @option opts [
|
|
79
|
-
# @return [
|
|
80
|
-
describe '
|
|
66
|
+
# @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
67
|
+
# @return [CombinedPdf]
|
|
68
|
+
describe 'create_combined_pdf test' do
|
|
81
69
|
it 'should work' do
|
|
82
70
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
83
71
|
end
|
|
84
72
|
end
|
|
85
73
|
|
|
86
74
|
# unit tests for create_custom_file_from_upload
|
|
87
|
-
# Create a
|
|
88
|
-
#
|
|
89
|
-
# @param
|
|
75
|
+
# Create a custom file from an upload
|
|
76
|
+
# 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`.
|
|
77
|
+
# @param body The uploaded file to create the custom file from.
|
|
90
78
|
# @param [Hash] opts the optional parameters
|
|
91
|
-
# @return [
|
|
79
|
+
# @return [CustomFile]
|
|
92
80
|
describe 'create_custom_file_from_upload test' do
|
|
93
81
|
it 'should work' do
|
|
94
82
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
95
83
|
end
|
|
96
84
|
end
|
|
97
85
|
|
|
98
|
-
# unit tests for
|
|
99
|
-
# Create a
|
|
100
|
-
#
|
|
101
|
-
# @param
|
|
102
|
-
# @param event
|
|
86
|
+
# unit tests for create_folder
|
|
87
|
+
# Create a folder
|
|
88
|
+
# Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
89
|
+
# @param body The folder to create.
|
|
103
90
|
# @param [Hash] opts the optional parameters
|
|
104
|
-
# @return [
|
|
105
|
-
describe '
|
|
91
|
+
# @return [Folder]
|
|
92
|
+
describe 'create_folder test' do
|
|
106
93
|
it 'should work' do
|
|
107
94
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
108
95
|
end
|
|
109
96
|
end
|
|
110
97
|
|
|
111
|
-
# unit tests for
|
|
112
|
-
#
|
|
113
|
-
#
|
|
114
|
-
# @param
|
|
98
|
+
# unit tests for create_signature_request_event
|
|
99
|
+
# Record a signature request event
|
|
100
|
+
# 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.
|
|
101
|
+
# @param signature_request_id The signature request's ID.
|
|
102
|
+
# @param body The event to record.
|
|
115
103
|
# @param [Hash] opts the optional parameters
|
|
116
|
-
# @
|
|
117
|
-
|
|
118
|
-
describe 'create_data_request_token test' do
|
|
104
|
+
# @return [SignatureRequestEvent]
|
|
105
|
+
describe 'create_signature_request_event test' do
|
|
119
106
|
it 'should work' do
|
|
120
107
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
121
108
|
end
|
|
122
109
|
end
|
|
123
110
|
|
|
124
|
-
# unit tests for
|
|
125
|
-
# Create a
|
|
126
|
-
# Creates a
|
|
127
|
-
# @param
|
|
111
|
+
# unit tests for create_signature_request_token
|
|
112
|
+
# Create a signature request token
|
|
113
|
+
# 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.
|
|
114
|
+
# @param signature_request_id The signature request's ID.
|
|
128
115
|
# @param [Hash] opts the optional parameters
|
|
129
|
-
# @
|
|
130
|
-
|
|
116
|
+
# @option opts [CreateSignatureRequestTokenRequest] :body The kind of link to make. Send no body for an `api` token.
|
|
117
|
+
# @return [SignatureRequestToken]
|
|
118
|
+
describe 'create_signature_request_token test' do
|
|
131
119
|
it 'should work' do
|
|
132
120
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
133
121
|
end
|
|
134
122
|
end
|
|
135
123
|
|
|
136
|
-
# unit tests for
|
|
137
|
-
#
|
|
138
|
-
# Creates a
|
|
139
|
-
# @param
|
|
124
|
+
# unit tests for create_submission
|
|
125
|
+
# Generate a PDF
|
|
126
|
+
# 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.
|
|
127
|
+
# @param template_id The template's ID.
|
|
128
|
+
# @param body The submission's data and settings.
|
|
140
129
|
# @param [Hash] opts the optional parameters
|
|
141
|
-
# @
|
|
142
|
-
|
|
130
|
+
# @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
|
|
131
|
+
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
132
|
+
# @return [Submission]
|
|
133
|
+
describe 'create_submission test' do
|
|
143
134
|
it 'should work' do
|
|
144
135
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
145
136
|
end
|
|
146
137
|
end
|
|
147
138
|
|
|
148
|
-
# unit tests for
|
|
149
|
-
#
|
|
150
|
-
# Creates
|
|
151
|
-
# @param
|
|
152
|
-
# @param template_name
|
|
139
|
+
# unit tests for create_submission_batch
|
|
140
|
+
# Generate PDFs in a batch
|
|
141
|
+
# 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.
|
|
142
|
+
# @param body The submissions to create, and the settings they share.
|
|
153
143
|
# @param [Hash] opts the optional parameters
|
|
154
|
-
# @option opts [Boolean] :wait Wait
|
|
155
|
-
# @
|
|
156
|
-
|
|
157
|
-
# @return [TemplatePreview]
|
|
158
|
-
describe 'create_pdf_template test' do
|
|
144
|
+
# @option opts [Boolean] :wait Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
|
|
145
|
+
# @return [SubmissionBatch]
|
|
146
|
+
describe 'create_submission_batch test' do
|
|
159
147
|
it 'should work' do
|
|
160
148
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
161
149
|
end
|
|
162
150
|
end
|
|
163
151
|
|
|
164
|
-
# unit tests for
|
|
165
|
-
# Create a
|
|
166
|
-
# Creates a
|
|
167
|
-
# @param
|
|
152
|
+
# unit tests for create_template
|
|
153
|
+
# Create a template
|
|
154
|
+
# Creates an HTML template, or a PDF template from a PDF you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. To send the PDF with the request instead, use POST /templates/upload. A PDF template is ready to generate PDFs once DocSpring has processed its PDF (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
|
|
155
|
+
# @param body The template to create.
|
|
168
156
|
# @param [Hash] opts the optional parameters
|
|
169
|
-
# @
|
|
170
|
-
|
|
157
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
158
|
+
# @return [Template]
|
|
159
|
+
describe 'create_template test' do
|
|
171
160
|
it 'should work' do
|
|
172
161
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
173
162
|
end
|
|
@@ -175,8 +164,8 @@ describe 'Client' do
|
|
|
175
164
|
|
|
176
165
|
# unit tests for create_webhook
|
|
177
166
|
# Create a webhook
|
|
178
|
-
# Creates a webhook that
|
|
179
|
-
# @param
|
|
167
|
+
# 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.
|
|
168
|
+
# @param body The webhook to create.
|
|
180
169
|
# @param [Hash] opts the optional parameters
|
|
181
170
|
# @return [Webhook]
|
|
182
171
|
describe 'create_webhook test' do
|
|
@@ -185,10 +174,22 @@ describe 'Client' do
|
|
|
185
174
|
end
|
|
186
175
|
end
|
|
187
176
|
|
|
177
|
+
# unit tests for delete_custom_file
|
|
178
|
+
# Delete a custom file
|
|
179
|
+
# Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
180
|
+
# @param custom_file_id The custom file's ID.
|
|
181
|
+
# @param [Hash] opts the optional parameters
|
|
182
|
+
# @return [CustomFile]
|
|
183
|
+
describe 'delete_custom_file test' do
|
|
184
|
+
it 'should work' do
|
|
185
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
188
189
|
# unit tests for delete_folder
|
|
189
190
|
# Delete a folder
|
|
190
|
-
# Deletes an empty folder.
|
|
191
|
-
# @param folder_id
|
|
191
|
+
# Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
192
|
+
# @param folder_id The folder's ID.
|
|
192
193
|
# @param [Hash] opts the optional parameters
|
|
193
194
|
# @return [Folder]
|
|
194
195
|
describe 'delete_folder test' do
|
|
@@ -199,11 +200,11 @@ describe 'Client' do
|
|
|
199
200
|
|
|
200
201
|
# unit tests for delete_template
|
|
201
202
|
# Delete a template
|
|
202
|
-
# Deletes a template
|
|
203
|
-
# @param template_id
|
|
203
|
+
# 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.
|
|
204
|
+
# @param template_id The template's ID.
|
|
204
205
|
# @param [Hash] opts the optional parameters
|
|
205
|
-
# @option opts [String] :version
|
|
206
|
-
# @return [
|
|
206
|
+
# @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.
|
|
207
|
+
# @return [Template]
|
|
207
208
|
describe 'delete_template test' do
|
|
208
209
|
it 'should work' do
|
|
209
210
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -212,8 +213,8 @@ describe 'Client' do
|
|
|
212
213
|
|
|
213
214
|
# unit tests for delete_webhook
|
|
214
215
|
# Delete a webhook
|
|
215
|
-
#
|
|
216
|
-
# @param webhook_id
|
|
216
|
+
# Deletes a webhook so it stops receiving events, and returns it.
|
|
217
|
+
# @param webhook_id The webhook's ID.
|
|
217
218
|
# @param [Hash] opts the optional parameters
|
|
218
219
|
# @return [Webhook]
|
|
219
220
|
describe 'delete_webhook test' do
|
|
@@ -222,109 +223,120 @@ describe 'Client' do
|
|
|
222
223
|
end
|
|
223
224
|
end
|
|
224
225
|
|
|
225
|
-
# unit tests for
|
|
226
|
-
# Expire a combined
|
|
227
|
-
#
|
|
228
|
-
# @param
|
|
226
|
+
# unit tests for expire_combined_pdf
|
|
227
|
+
# Expire a combined PDF
|
|
228
|
+
# Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
229
|
+
# @param combined_pdf_id The combined PDF's ID.
|
|
229
230
|
# @param [Hash] opts the optional parameters
|
|
230
|
-
# @return [
|
|
231
|
-
describe '
|
|
231
|
+
# @return [CombinedPdf]
|
|
232
|
+
describe 'expire_combined_pdf test' do
|
|
232
233
|
it 'should work' do
|
|
233
234
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
234
235
|
end
|
|
235
236
|
end
|
|
236
237
|
|
|
237
238
|
# unit tests for expire_submission
|
|
238
|
-
# Expire a
|
|
239
|
-
#
|
|
240
|
-
# @param submission_id
|
|
239
|
+
# Expire a submission
|
|
240
|
+
# Deletes a submission's data and PDF now, and returns the expired submission.
|
|
241
|
+
# @param submission_id The submission's ID.
|
|
241
242
|
# @param [Hash] opts the optional parameters
|
|
242
|
-
# @return [
|
|
243
|
+
# @return [Submission]
|
|
243
244
|
describe 'expire_submission test' do
|
|
244
245
|
it 'should work' do
|
|
245
246
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
246
247
|
end
|
|
247
248
|
end
|
|
248
249
|
|
|
249
|
-
# unit tests for
|
|
250
|
-
# Generate
|
|
251
|
-
#
|
|
252
|
-
# @param
|
|
253
|
-
# @param
|
|
250
|
+
# unit tests for generate_submission_files
|
|
251
|
+
# Generate more files
|
|
252
|
+
# Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
253
|
+
# @param submission_id The submission's ID.
|
|
254
|
+
# @param body The formats to make.
|
|
254
255
|
# @param [Hash] opts the optional parameters
|
|
255
|
-
# @option opts [Boolean] :wait Wait
|
|
256
|
-
# @return [
|
|
257
|
-
describe '
|
|
256
|
+
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
257
|
+
# @return [Submission]
|
|
258
|
+
describe 'generate_submission_files test' do
|
|
258
259
|
it 'should work' do
|
|
259
260
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
260
261
|
end
|
|
261
262
|
end
|
|
262
263
|
|
|
263
|
-
# unit tests for
|
|
264
|
-
# Generate a preview PDF
|
|
265
|
-
# Generates a preview
|
|
266
|
-
# @param submission_id
|
|
264
|
+
# unit tests for generate_submission_preview
|
|
265
|
+
# Generate a preview PDF
|
|
266
|
+
# 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.
|
|
267
|
+
# @param submission_id The submission's ID.
|
|
267
268
|
# @param [Hash] opts the optional parameters
|
|
268
|
-
# @return [
|
|
269
|
-
describe '
|
|
269
|
+
# @return [Submission]
|
|
270
|
+
describe 'generate_submission_preview test' do
|
|
270
271
|
it 'should work' do
|
|
271
272
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
272
273
|
end
|
|
273
274
|
end
|
|
274
275
|
|
|
275
|
-
# unit tests for
|
|
276
|
-
#
|
|
277
|
-
#
|
|
278
|
-
# @param
|
|
276
|
+
# unit tests for get_combined_pdf
|
|
277
|
+
# Get a combined PDF
|
|
278
|
+
# Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
279
|
+
# @param combined_pdf_id The combined PDF's ID.
|
|
279
280
|
# @param [Hash] opts the optional parameters
|
|
280
|
-
# @return [
|
|
281
|
-
describe '
|
|
281
|
+
# @return [CombinedPdf]
|
|
282
|
+
describe 'get_combined_pdf test' do
|
|
282
283
|
it 'should work' do
|
|
283
284
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
284
285
|
end
|
|
285
286
|
end
|
|
286
287
|
|
|
287
|
-
# unit tests for
|
|
288
|
-
#
|
|
289
|
-
#
|
|
290
|
-
# @param
|
|
288
|
+
# unit tests for get_custom_file
|
|
289
|
+
# Get a custom file
|
|
290
|
+
# Returns a custom file, with a temporary URL to download it.
|
|
291
|
+
# @param custom_file_id The custom file's ID.
|
|
291
292
|
# @param [Hash] opts the optional parameters
|
|
292
|
-
# @return [
|
|
293
|
-
describe '
|
|
293
|
+
# @return [CustomFile]
|
|
294
|
+
describe 'get_custom_file test' do
|
|
294
295
|
it 'should work' do
|
|
295
296
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
296
297
|
end
|
|
297
298
|
end
|
|
298
299
|
|
|
299
|
-
# unit tests for
|
|
300
|
-
#
|
|
301
|
-
#
|
|
302
|
-
# @param
|
|
300
|
+
# unit tests for get_folder
|
|
301
|
+
# Get a folder
|
|
302
|
+
# Returns a folder.
|
|
303
|
+
# @param folder_id The folder's ID.
|
|
303
304
|
# @param [Hash] opts the optional parameters
|
|
304
|
-
# @return [
|
|
305
|
-
describe '
|
|
305
|
+
# @return [Folder]
|
|
306
|
+
describe 'get_folder test' do
|
|
306
307
|
it 'should work' do
|
|
307
308
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
308
309
|
end
|
|
309
310
|
end
|
|
310
311
|
|
|
311
312
|
# unit tests for get_presign_url
|
|
312
|
-
# Get a presigned
|
|
313
|
-
# Returns a presigned S3
|
|
313
|
+
# Get a presigned URL to upload a file
|
|
314
|
+
# 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.
|
|
314
315
|
# @param [Hash] opts the optional parameters
|
|
315
|
-
# @return [
|
|
316
|
+
# @return [UploadPresign]
|
|
316
317
|
describe 'get_presign_url test' do
|
|
317
318
|
it 'should work' do
|
|
318
319
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
319
320
|
end
|
|
320
321
|
end
|
|
321
322
|
|
|
323
|
+
# unit tests for get_signature_request
|
|
324
|
+
# Get a signature request
|
|
325
|
+
# Returns a signature request, with the values the person has entered so far.
|
|
326
|
+
# @param signature_request_id The signature request's ID.
|
|
327
|
+
# @param [Hash] opts the optional parameters
|
|
328
|
+
# @return [SignatureRequest]
|
|
329
|
+
describe 'get_signature_request test' do
|
|
330
|
+
it 'should work' do
|
|
331
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
|
|
322
335
|
# unit tests for get_submission
|
|
323
|
-
#
|
|
324
|
-
#
|
|
325
|
-
# @param submission_id
|
|
336
|
+
# Get a submission
|
|
337
|
+
# Returns a submission, with its data and links to download its PDF.
|
|
338
|
+
# @param submission_id The submission's ID.
|
|
326
339
|
# @param [Hash] opts the optional parameters
|
|
327
|
-
# @option opts [Boolean] :include_data
|
|
328
340
|
# @return [Submission]
|
|
329
341
|
describe 'get_submission test' do
|
|
330
342
|
it 'should work' do
|
|
@@ -333,12 +345,12 @@ describe 'Client' do
|
|
|
333
345
|
end
|
|
334
346
|
|
|
335
347
|
# unit tests for get_submission_batch
|
|
336
|
-
#
|
|
337
|
-
#
|
|
338
|
-
# @param submission_batch_id
|
|
348
|
+
# Get a batch
|
|
349
|
+
# 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.
|
|
350
|
+
# @param submission_batch_id The batch's ID.
|
|
339
351
|
# @param [Hash] opts the optional parameters
|
|
340
|
-
# @option opts [Boolean] :
|
|
341
|
-
# @return [
|
|
352
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
353
|
+
# @return [SubmissionBatch]
|
|
342
354
|
describe 'get_submission_batch test' do
|
|
343
355
|
it 'should work' do
|
|
344
356
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -346,36 +358,65 @@ describe 'Client' do
|
|
|
346
358
|
end
|
|
347
359
|
|
|
348
360
|
# unit tests for get_template
|
|
349
|
-
#
|
|
350
|
-
#
|
|
351
|
-
# @param template_id
|
|
361
|
+
# Get a template
|
|
362
|
+
# Returns a template: its draft, or one of its published versions.
|
|
363
|
+
# @param template_id The template's ID.
|
|
352
364
|
# @param [Hash] opts the optional parameters
|
|
353
|
-
# @
|
|
365
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
366
|
+
# @return [Template]
|
|
354
367
|
describe 'get_template test' do
|
|
355
368
|
it 'should work' do
|
|
356
369
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
357
370
|
end
|
|
358
371
|
end
|
|
359
372
|
|
|
373
|
+
# unit tests for get_template_diff
|
|
374
|
+
# Compare a version of a template with the one before it
|
|
375
|
+
# 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.
|
|
376
|
+
# @param template_id The template's ID.
|
|
377
|
+
# @param [Hash] opts the optional parameters
|
|
378
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
379
|
+
# @return [TemplateDiff]
|
|
380
|
+
describe 'get_template_diff test' do
|
|
381
|
+
it 'should work' do
|
|
382
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
383
|
+
end
|
|
384
|
+
end
|
|
385
|
+
|
|
360
386
|
# unit tests for get_template_model_code
|
|
361
|
-
# Generate typed
|
|
362
|
-
# Generates
|
|
363
|
-
# @param template_id
|
|
364
|
-
# @param lang The language to generate code
|
|
387
|
+
# Generate typed code for a template's submission data
|
|
388
|
+
# Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or Go, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
|
|
389
|
+
# @param template_id The template's ID.
|
|
390
|
+
# @param lang The language to generate the code in.
|
|
365
391
|
# @param [Hash] opts the optional parameters
|
|
366
|
-
# @
|
|
392
|
+
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
|
|
393
|
+
# @return [TemplateModelCode]
|
|
367
394
|
describe 'get_template_model_code test' do
|
|
368
395
|
it 'should work' do
|
|
369
396
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
370
397
|
end
|
|
371
398
|
end
|
|
372
399
|
|
|
400
|
+
# unit tests for get_template_page_images
|
|
401
|
+
# Get images of a template's pages
|
|
402
|
+
# 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.
|
|
403
|
+
# @param template_id The template's ID.
|
|
404
|
+
# @param [Hash] opts the optional parameters
|
|
405
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
406
|
+
# @return [TemplatePageImages]
|
|
407
|
+
describe 'get_template_page_images test' do
|
|
408
|
+
it 'should work' do
|
|
409
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
410
|
+
end
|
|
411
|
+
end
|
|
412
|
+
|
|
373
413
|
# unit tests for get_template_schema
|
|
374
|
-
#
|
|
375
|
-
#
|
|
376
|
-
# @param template_id
|
|
414
|
+
# Get the JSON Schema of a template's submission data
|
|
415
|
+
# 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.
|
|
416
|
+
# @param template_id The template's ID.
|
|
377
417
|
# @param [Hash] opts the optional parameters
|
|
378
|
-
# @
|
|
418
|
+
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
|
|
419
|
+
# @return [Hash<String, Object>]
|
|
379
420
|
describe 'get_template_schema test' do
|
|
380
421
|
it 'should work' do
|
|
381
422
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -384,8 +425,8 @@ describe 'Client' do
|
|
|
384
425
|
|
|
385
426
|
# unit tests for get_webhook
|
|
386
427
|
# Get a webhook
|
|
387
|
-
#
|
|
388
|
-
# @param webhook_id
|
|
428
|
+
# Returns a webhook.
|
|
429
|
+
# @param webhook_id The webhook's ID.
|
|
389
430
|
# @param [Hash] opts the optional parameters
|
|
390
431
|
# @return [Webhook]
|
|
391
432
|
describe 'get_webhook test' do
|
|
@@ -394,25 +435,40 @@ describe 'Client' do
|
|
|
394
435
|
end
|
|
395
436
|
end
|
|
396
437
|
|
|
397
|
-
# unit tests for
|
|
398
|
-
#
|
|
399
|
-
# Returns
|
|
438
|
+
# unit tests for list_combined_pdfs
|
|
439
|
+
# List combined PDFs
|
|
440
|
+
# Returns the combined PDFs in your account, newest first, one page at a time.
|
|
400
441
|
# @param [Hash] opts the optional parameters
|
|
401
|
-
# @option opts [Integer] :
|
|
402
|
-
# @option opts [
|
|
403
|
-
# @return [
|
|
404
|
-
describe '
|
|
442
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
443
|
+
# @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.
|
|
444
|
+
# @return [CombinedPdfList]
|
|
445
|
+
describe 'list_combined_pdfs test' do
|
|
446
|
+
it 'should work' do
|
|
447
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
448
|
+
end
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
# unit tests for list_custom_files
|
|
452
|
+
# List custom files
|
|
453
|
+
# Returns the custom files in your account, newest first, one page at a time.
|
|
454
|
+
# @param [Hash] opts the optional parameters
|
|
455
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
456
|
+
# @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.
|
|
457
|
+
# @return [CustomFileList]
|
|
458
|
+
describe 'list_custom_files test' do
|
|
405
459
|
it 'should work' do
|
|
406
460
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
407
461
|
end
|
|
408
462
|
end
|
|
409
463
|
|
|
410
464
|
# unit tests for list_folders
|
|
411
|
-
#
|
|
412
|
-
# Returns
|
|
465
|
+
# List folders
|
|
466
|
+
# Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
413
467
|
# @param [Hash] opts the optional parameters
|
|
414
|
-
# @option opts [String] :parent_folder_id
|
|
415
|
-
# @
|
|
468
|
+
# @option opts [String] :parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
469
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
470
|
+
# @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.
|
|
471
|
+
# @return [FolderList]
|
|
416
472
|
describe 'list_folders test' do
|
|
417
473
|
it 'should work' do
|
|
418
474
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -420,34 +476,48 @@ describe 'Client' do
|
|
|
420
476
|
end
|
|
421
477
|
|
|
422
478
|
# unit tests for list_submissions
|
|
423
|
-
# List
|
|
424
|
-
# Returns
|
|
425
|
-
# @param [Hash] opts the optional parameters
|
|
426
|
-
# @option opts [String] :
|
|
427
|
-
# @option opts [
|
|
428
|
-
# @option opts [
|
|
429
|
-
# @option opts [
|
|
430
|
-
# @option opts [
|
|
431
|
-
# @option opts [
|
|
432
|
-
# @
|
|
479
|
+
# List submissions
|
|
480
|
+
# Returns the submissions in your account, newest first, one page at a time. Lists leave out each submission's `data` unless you pass `include_data=true`.
|
|
481
|
+
# @param [Hash] opts the optional parameters
|
|
482
|
+
# @option opts [String] :template_id Only list this template's submissions.
|
|
483
|
+
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
484
|
+
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
485
|
+
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
486
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
487
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
488
|
+
# @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.
|
|
489
|
+
# @return [SubmissionList]
|
|
433
490
|
describe 'list_submissions test' do
|
|
434
491
|
it 'should work' do
|
|
435
492
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
436
493
|
end
|
|
437
494
|
end
|
|
438
495
|
|
|
496
|
+
# unit tests for list_template_fields
|
|
497
|
+
# List a template's fields
|
|
498
|
+
# 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.
|
|
499
|
+
# @param template_id The template's ID.
|
|
500
|
+
# @param [Hash] opts the optional parameters
|
|
501
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
502
|
+
# @return [TemplateFields]
|
|
503
|
+
describe 'list_template_fields test' do
|
|
504
|
+
it 'should work' do
|
|
505
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
506
|
+
end
|
|
507
|
+
end
|
|
508
|
+
|
|
439
509
|
# unit tests for list_template_submissions
|
|
440
|
-
# List
|
|
441
|
-
# Returns a
|
|
442
|
-
# @param template_id
|
|
443
|
-
# @param [Hash] opts the optional parameters
|
|
444
|
-
# @option opts [
|
|
445
|
-
# @option opts [
|
|
446
|
-
# @option opts [
|
|
447
|
-
# @option opts [
|
|
448
|
-
# @option opts [
|
|
449
|
-
# @option opts [
|
|
450
|
-
# @return [
|
|
510
|
+
# List a template's submissions
|
|
511
|
+
# Returns a template's submissions (from every version of the template), newest first.
|
|
512
|
+
# @param template_id The template's ID.
|
|
513
|
+
# @param [Hash] opts the optional parameters
|
|
514
|
+
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
515
|
+
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
516
|
+
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
517
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
518
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
519
|
+
# @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.
|
|
520
|
+
# @return [SubmissionList]
|
|
451
521
|
describe 'list_template_submissions test' do
|
|
452
522
|
it 'should work' do
|
|
453
523
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -455,14 +525,14 @@ describe 'Client' do
|
|
|
455
525
|
end
|
|
456
526
|
|
|
457
527
|
# unit tests for list_templates
|
|
458
|
-
#
|
|
459
|
-
#
|
|
460
|
-
# @param [Hash] opts the optional parameters
|
|
461
|
-
# @option opts [String] :query
|
|
462
|
-
# @option opts [String] :parent_folder_id
|
|
463
|
-
# @option opts [Integer] :
|
|
464
|
-
# @option opts [
|
|
465
|
-
# @return [
|
|
528
|
+
# List templates
|
|
529
|
+
# Returns the templates in your account (their drafts), newest first, one page at a time. Get a template by its ID for its HTML, defaults and published versions.
|
|
530
|
+
# @param [Hash] opts the optional parameters
|
|
531
|
+
# @option opts [String] :query Only list templates whose name contains this text (ignoring case).
|
|
532
|
+
# @option opts [String] :parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
533
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
534
|
+
# @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.
|
|
535
|
+
# @return [TemplateSummaryList]
|
|
466
536
|
describe 'list_templates test' do
|
|
467
537
|
it 'should work' do
|
|
468
538
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -470,44 +540,44 @@ describe 'Client' do
|
|
|
470
540
|
end
|
|
471
541
|
|
|
472
542
|
# unit tests for list_webhooks
|
|
473
|
-
#
|
|
474
|
-
# Returns
|
|
475
|
-
# @param [Hash] opts the optional parameters
|
|
476
|
-
# @option opts [
|
|
477
|
-
# @option opts [
|
|
478
|
-
# @option opts [String] :
|
|
479
|
-
# @option opts [String] :
|
|
480
|
-
# @option opts [String] :
|
|
481
|
-
# @option opts [
|
|
482
|
-
# @option opts [String] :
|
|
483
|
-
# @return [
|
|
543
|
+
# List webhooks
|
|
544
|
+
# 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.
|
|
545
|
+
# @param [Hash] opts the optional parameters
|
|
546
|
+
# @option opts [WebhookEventType] :event_type Only list webhooks that subscribe to this event.
|
|
547
|
+
# @option opts [WebhookMode] :mode Only list webhooks set to this mode.
|
|
548
|
+
# @option opts [String] :template_id Only list webhooks scoped to this template.
|
|
549
|
+
# @option opts [String] :folder_id Only list webhooks scoped to this folder.
|
|
550
|
+
# @option opts [String] :api_token_id Only list webhooks scoped to this API token.
|
|
551
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50).
|
|
552
|
+
# @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.
|
|
553
|
+
# @return [WebhookList]
|
|
484
554
|
describe 'list_webhooks test' do
|
|
485
555
|
it 'should work' do
|
|
486
556
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
487
557
|
end
|
|
488
558
|
end
|
|
489
559
|
|
|
490
|
-
# unit tests for
|
|
560
|
+
# unit tests for move_folder
|
|
491
561
|
# Move a folder
|
|
492
|
-
# Moves a folder
|
|
493
|
-
# @param folder_id
|
|
494
|
-
# @param
|
|
562
|
+
# 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.
|
|
563
|
+
# @param folder_id The folder's ID.
|
|
564
|
+
# @param body Where to move the folder.
|
|
495
565
|
# @param [Hash] opts the optional parameters
|
|
496
566
|
# @return [Folder]
|
|
497
|
-
describe '
|
|
567
|
+
describe 'move_folder test' do
|
|
498
568
|
it 'should work' do
|
|
499
569
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
500
570
|
end
|
|
501
571
|
end
|
|
502
572
|
|
|
503
|
-
# unit tests for
|
|
504
|
-
# Move
|
|
505
|
-
# Moves a template
|
|
506
|
-
# @param template_id
|
|
507
|
-
# @param
|
|
573
|
+
# unit tests for move_template
|
|
574
|
+
# Move a template to a folder
|
|
575
|
+
# Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
576
|
+
# @param template_id The template's ID.
|
|
577
|
+
# @param body Where to move the template.
|
|
508
578
|
# @param [Hash] opts the optional parameters
|
|
509
|
-
# @return [
|
|
510
|
-
describe '
|
|
579
|
+
# @return [Template]
|
|
580
|
+
describe 'move_template test' do
|
|
511
581
|
it 'should work' do
|
|
512
582
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
513
583
|
end
|
|
@@ -515,22 +585,35 @@ describe 'Client' do
|
|
|
515
585
|
|
|
516
586
|
# unit tests for publish_template_version
|
|
517
587
|
# Publish a template version
|
|
518
|
-
# Publishes the
|
|
519
|
-
# @param template_id
|
|
520
|
-
# @param
|
|
588
|
+
# Publishes the template's draft as a new version that doesn't change. `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.
|
|
589
|
+
# @param template_id The template's ID.
|
|
590
|
+
# @param body The version to publish.
|
|
521
591
|
# @param [Hash] opts the optional parameters
|
|
522
|
-
# @return [
|
|
592
|
+
# @return [TemplateVersion]
|
|
523
593
|
describe 'publish_template_version test' do
|
|
524
594
|
it 'should work' do
|
|
525
595
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
526
596
|
end
|
|
527
597
|
end
|
|
528
598
|
|
|
599
|
+
# unit tests for remove_template_fields
|
|
600
|
+
# Remove fields from a template
|
|
601
|
+
# 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.
|
|
602
|
+
# @param template_id The template's ID.
|
|
603
|
+
# @param body The fields to remove from the template's draft.
|
|
604
|
+
# @param [Hash] opts the optional parameters
|
|
605
|
+
# @return [TemplateFields]
|
|
606
|
+
describe 'remove_template_fields test' do
|
|
607
|
+
it 'should work' do
|
|
608
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
609
|
+
end
|
|
610
|
+
end
|
|
611
|
+
|
|
529
612
|
# unit tests for rename_folder
|
|
530
613
|
# Rename a folder
|
|
531
|
-
# Renames
|
|
532
|
-
# @param folder_id
|
|
533
|
-
# @param
|
|
614
|
+
# Renames a folder. The name must be unique within its parent folder.
|
|
615
|
+
# @param folder_id The folder's ID.
|
|
616
|
+
# @param body The folder's new name.
|
|
534
617
|
# @param [Hash] opts the optional parameters
|
|
535
618
|
# @return [Folder]
|
|
536
619
|
describe 'rename_folder test' do
|
|
@@ -539,13 +622,26 @@ describe 'Client' do
|
|
|
539
622
|
end
|
|
540
623
|
end
|
|
541
624
|
|
|
625
|
+
# unit tests for reorder_template_fields
|
|
626
|
+
# Reorder a template's fields
|
|
627
|
+
# 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.
|
|
628
|
+
# @param template_id The template's ID.
|
|
629
|
+
# @param body The new order of the fields in the template's draft.
|
|
630
|
+
# @param [Hash] opts the optional parameters
|
|
631
|
+
# @return [TemplateFields]
|
|
632
|
+
describe 'reorder_template_fields test' do
|
|
633
|
+
it 'should work' do
|
|
634
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
635
|
+
end
|
|
636
|
+
end
|
|
637
|
+
|
|
542
638
|
# unit tests for restore_template_version
|
|
543
639
|
# Restore a template version
|
|
544
|
-
#
|
|
545
|
-
# @param template_id
|
|
546
|
-
# @param
|
|
640
|
+
# Replaces the template's draft with a copy of one of its published versions.
|
|
641
|
+
# @param template_id The template's ID.
|
|
642
|
+
# @param body The version to restore.
|
|
547
643
|
# @param [Hash] opts the optional parameters
|
|
548
|
-
# @return [
|
|
644
|
+
# @return [Template]
|
|
549
645
|
describe 'restore_template_version test' do
|
|
550
646
|
it 'should work' do
|
|
551
647
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -554,35 +650,35 @@ describe 'Client' do
|
|
|
554
650
|
|
|
555
651
|
# unit tests for test_authentication
|
|
556
652
|
# Test authentication
|
|
557
|
-
# Checks whether your API token is valid by making an authenticated request.
|
|
653
|
+
# Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
|
|
558
654
|
# @param [Hash] opts the optional parameters
|
|
559
|
-
# @return [
|
|
655
|
+
# @return [AuthenticationCheck]
|
|
560
656
|
describe 'test_authentication test' do
|
|
561
657
|
it 'should work' do
|
|
562
658
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
563
659
|
end
|
|
564
660
|
end
|
|
565
661
|
|
|
566
|
-
# unit tests for
|
|
567
|
-
# Update a
|
|
568
|
-
#
|
|
569
|
-
# @param
|
|
570
|
-
# @param
|
|
662
|
+
# unit tests for update_signature_request
|
|
663
|
+
# Update a signature request
|
|
664
|
+
# 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.
|
|
665
|
+
# @param signature_request_id The signature request's ID.
|
|
666
|
+
# @param body The settings to change. Properties left out keep their values.
|
|
571
667
|
# @param [Hash] opts the optional parameters
|
|
572
|
-
# @return [
|
|
573
|
-
describe '
|
|
668
|
+
# @return [SignatureRequest]
|
|
669
|
+
describe 'update_signature_request test' do
|
|
574
670
|
it 'should work' do
|
|
575
671
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
576
672
|
end
|
|
577
673
|
end
|
|
578
674
|
|
|
579
675
|
# unit tests for update_template
|
|
580
|
-
# Update a
|
|
581
|
-
#
|
|
582
|
-
# @param template_id
|
|
583
|
-
# @param
|
|
676
|
+
# Update a template
|
|
677
|
+
# Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists. Setting `parent_folder_id` moves the template and all of its published versions.
|
|
678
|
+
# @param template_id The template's ID.
|
|
679
|
+
# @param body The settings to change. Properties left out keep their values.
|
|
584
680
|
# @param [Hash] opts the optional parameters
|
|
585
|
-
# @return [
|
|
681
|
+
# @return [Template]
|
|
586
682
|
describe 'update_template test' do
|
|
587
683
|
it 'should work' do
|
|
588
684
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -590,27 +686,27 @@ describe 'Client' do
|
|
|
590
686
|
end
|
|
591
687
|
|
|
592
688
|
# unit tests for update_template_document
|
|
593
|
-
#
|
|
594
|
-
#
|
|
595
|
-
# @param template_id
|
|
596
|
-
# @param
|
|
689
|
+
# Replace a template's PDF
|
|
690
|
+
# Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
|
|
691
|
+
# @param template_id The template's ID.
|
|
692
|
+
# @param body The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
|
|
597
693
|
# @param [Hash] opts the optional parameters
|
|
598
|
-
# @option opts [
|
|
599
|
-
# @return [
|
|
694
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
695
|
+
# @return [Template]
|
|
600
696
|
describe 'update_template_document test' do
|
|
601
697
|
it 'should work' do
|
|
602
698
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
603
699
|
end
|
|
604
700
|
end
|
|
605
701
|
|
|
606
|
-
# unit tests for
|
|
607
|
-
# Update a template
|
|
608
|
-
#
|
|
609
|
-
# @param template_id
|
|
610
|
-
# @param
|
|
702
|
+
# unit tests for update_template_fields
|
|
703
|
+
# Update a template's fields
|
|
704
|
+
# 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.
|
|
705
|
+
# @param template_id The template's ID.
|
|
706
|
+
# @param body The fields to change in the template's draft.
|
|
611
707
|
# @param [Hash] opts the optional parameters
|
|
612
|
-
# @return [
|
|
613
|
-
describe '
|
|
708
|
+
# @return [TemplateFields]
|
|
709
|
+
describe 'update_template_fields test' do
|
|
614
710
|
it 'should work' do
|
|
615
711
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
616
712
|
end
|
|
@@ -618,9 +714,9 @@ describe 'Client' do
|
|
|
618
714
|
|
|
619
715
|
# unit tests for update_webhook
|
|
620
716
|
# Update a webhook
|
|
621
|
-
# Updates the
|
|
622
|
-
# @param webhook_id
|
|
623
|
-
# @param
|
|
717
|
+
# Updates a webhook. Only the properties you send change.
|
|
718
|
+
# @param webhook_id The webhook's ID.
|
|
719
|
+
# @param body The settings to change. Properties left out keep their values.
|
|
624
720
|
# @param [Hash] opts the optional parameters
|
|
625
721
|
# @return [Webhook]
|
|
626
722
|
describe 'update_webhook test' do
|
|
@@ -629,4 +725,54 @@ describe 'Client' do
|
|
|
629
725
|
end
|
|
630
726
|
end
|
|
631
727
|
|
|
728
|
+
# unit tests for upload_template
|
|
729
|
+
# Create a PDF template from an uploaded PDF
|
|
730
|
+
# Creates a PDF template from a PDF sent with the request (`multipart/form-data`). For large files, upload the PDF with the presigned upload (GET /uploads/presign) and create the template with POST /templates.
|
|
731
|
+
# @param document The PDF.
|
|
732
|
+
# @param [Hash] opts the optional parameters
|
|
733
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
734
|
+
# @option opts [String] :name The template's name.
|
|
735
|
+
# @option opts [String] :description The template's description.
|
|
736
|
+
# @option opts [String] :parent_folder_id The folder to put the template in. Left out, it's created at the root.
|
|
737
|
+
# @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.
|
|
738
|
+
# @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.
|
|
739
|
+
# @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.
|
|
740
|
+
# @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`.
|
|
741
|
+
# @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.
|
|
742
|
+
# @return [Template]
|
|
743
|
+
describe 'upload_template test' do
|
|
744
|
+
it 'should work' do
|
|
745
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
746
|
+
end
|
|
747
|
+
end
|
|
748
|
+
|
|
749
|
+
# unit tests for upload_template_document
|
|
750
|
+
# Replace a template's PDF with an uploaded PDF
|
|
751
|
+
# Replaces a PDF template's PDF with one sent with the request (`multipart/form-data`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields.
|
|
752
|
+
# @param template_id The template's ID.
|
|
753
|
+
# @param document The new PDF.
|
|
754
|
+
# @param [Hash] opts the optional parameters
|
|
755
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
756
|
+
# @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.
|
|
757
|
+
# @return [Template]
|
|
758
|
+
describe 'upload_template_document test' do
|
|
759
|
+
it 'should work' do
|
|
760
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
761
|
+
end
|
|
762
|
+
end
|
|
763
|
+
|
|
764
|
+
# unit tests for validate_submission
|
|
765
|
+
# Check a submission without creating it
|
|
766
|
+
# 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.
|
|
767
|
+
# @param template_id The template's ID.
|
|
768
|
+
# @param body The submission's data and settings.
|
|
769
|
+
# @param [Hash] opts the optional parameters
|
|
770
|
+
# @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
|
|
771
|
+
# @return [SubmissionValidation]
|
|
772
|
+
describe 'validate_submission test' do
|
|
773
|
+
it 'should work' do
|
|
774
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
775
|
+
end
|
|
776
|
+
end
|
|
777
|
+
|
|
632
778
|
end
|