docspring 3.5.0 → 4.0.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 +361 -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 +123 -0
- data/Gemfile.lock +7 -7
- data/README.md +60 -53
- 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 +890 -777
- 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 +26 -0
- data/docs/CreateSubmissionRequest.md +36 -0
- data/docs/CreateTemplateRequest.md +94 -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/FieldComparisonCondition.md +22 -0
- data/docs/FieldComparisonOperator.md +15 -0
- data/docs/FieldDisplayType.md +15 -0
- data/docs/FieldEqualsCondition.md +22 -0
- data/docs/FieldEqualsOperator.md +15 -0
- data/docs/FieldInCondition.md +22 -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/Folder.md +9 -5
- data/docs/FolderList.md +20 -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/PageFormat.md +15 -0
- data/docs/PublishTemplateVersionRequest.md +20 -0
- data/docs/RenameFolderRequest.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 +41 -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 +22 -0
- data/docs/SubmissionInput.md +38 -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/Template.md +73 -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/TemplateDocument.md +40 -0
- data/docs/TemplateDocumentState.md +15 -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/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/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 +22 -0
- data/docs/UpdateTemplateRequest.md +80 -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/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 +995 -942
- 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/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/{update_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} +53 -108
- data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +97 -149
- data/lib/docspring/models/create_template_request.rb +601 -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_comparison_condition.rb +247 -0
- data/lib/docspring/models/field_comparison_operator.rb +43 -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/{create_folder_data.rb → field_in_condition.rb} +101 -103
- 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/folder.rb +134 -93
- data/lib/docspring/models/folder_list.rb +200 -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/page_format.rb +52 -0
- data/lib/docspring/models/{publish_version_data.rb → publish_template_version_request.rb} +64 -99
- data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +29 -87
- 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 +374 -339
- 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 +188 -0
- data/lib/docspring/models/submission_input.rb +274 -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/template.rb +485 -766
- data/lib/docspring/models/{add_fields_data.rb → template_actor.rb} +119 -105
- 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_document.rb +396 -0
- data/lib/docspring/models/template_document_state.rb +44 -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/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_processing_status.rb +275 -0
- data/lib/docspring/models/{create_webhook_data.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 +205 -0
- data/lib/docspring/models/update_template_request.rb +514 -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/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 +3187 -0
- data/lib/docspring/request_validator.rb +396 -0
- data/lib/docspring/version.rb +4 -4
- data/lib/docspring.rb +125 -53
- data/spec/api/client_spec.rb +304 -277
- 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} +13 -13
- data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +24 -18
- data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +40 -118
- 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_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_in_condition_spec.rb +48 -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/folder_list_spec.rb +42 -0
- data/spec/models/folder_spec.rb +16 -4
- 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/page_format_spec.rb +30 -0
- data/spec/models/{publish_version_data_spec.rb → publish_template_version_request_spec.rb} +11 -11
- data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +9 -9
- 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 +48 -0
- data/spec/models/submission_input_spec.rb +96 -0
- 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 +26 -56
- data/spec/models/submission_state_spec.rb +30 -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/template_defaults_spec.rb +150 -0
- data/spec/models/{json_schema_spec.rb → template_document_spec.rb} +21 -21
- data/spec/models/template_document_state_spec.rb +30 -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_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_processing_status_spec.rb +60 -0
- data/spec/models/template_source_pdf_spec.rb +54 -0
- data/spec/models/template_spec.rb +40 -154
- 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 +48 -0
- data/spec/models/{submission_preview_spec.rb → update_template_request_spec.rb} +81 -41
- 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/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 +485 -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/lib/docspring/models/update_pdf_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/docs/Client.md
CHANGED
|
@@ -1,64 +1,65 @@
|
|
|
1
1
|
# DocSpring::Client
|
|
2
2
|
|
|
3
|
-
All URIs are relative to *https://sync.api.docspring.com/api/
|
|
3
|
+
All URIs are relative to *https://sync.api.docspring.com/api/v2*
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
-
| [**add_fields_to_template**](Client.md#add_fields_to_template) | **PUT** /templates/{template_id}/add_fields | Add new fields to a Template |
|
|
8
|
-
| [**batch_generate_pdfs**](Client.md#batch_generate_pdfs) | **POST** /submissions/batches | Generate multiple PDFs |
|
|
9
|
-
| [**combine_pdfs**](Client.md#combine_pdfs) | **POST** /combined_submissions | Merge submission PDFs, template PDFs, or custom files |
|
|
10
7
|
| [**copy_template**](Client.md#copy_template) | **POST** /templates/{template_id}/copy | Copy a template |
|
|
11
|
-
| [**
|
|
12
|
-
| [**
|
|
13
|
-
| [**
|
|
14
|
-
| [**
|
|
15
|
-
| [**
|
|
16
|
-
| [**
|
|
17
|
-
| [**
|
|
8
|
+
| [**create_combined_pdf**](Client.md#create_combined_pdf) | **POST** /combined_pdfs | Combine PDFs |
|
|
9
|
+
| [**create_custom_file_from_upload**](Client.md#create_custom_file_from_upload) | **POST** /custom_files | Create a custom file from an upload |
|
|
10
|
+
| [**create_folder**](Client.md#create_folder) | **POST** /folders | Create a folder |
|
|
11
|
+
| [**create_signature_request_event**](Client.md#create_signature_request_event) | **POST** /signature_requests/{signature_request_id}/events | Record a signature request event |
|
|
12
|
+
| [**create_signature_request_token**](Client.md#create_signature_request_token) | **POST** /signature_requests/{signature_request_id}/tokens | Create a signature request token |
|
|
13
|
+
| [**create_submission**](Client.md#create_submission) | **POST** /templates/{template_id}/submissions | Generate a PDF |
|
|
14
|
+
| [**create_submission_batch**](Client.md#create_submission_batch) | **POST** /submissions/batches | Generate PDFs in a batch |
|
|
15
|
+
| [**create_template**](Client.md#create_template) | **POST** /templates | Create a template |
|
|
18
16
|
| [**create_webhook**](Client.md#create_webhook) | **POST** /webhooks | Create a webhook |
|
|
17
|
+
| [**delete_custom_file**](Client.md#delete_custom_file) | **DELETE** /custom_files/{custom_file_id} | Delete a custom file |
|
|
19
18
|
| [**delete_folder**](Client.md#delete_folder) | **DELETE** /folders/{folder_id} | Delete a folder |
|
|
20
19
|
| [**delete_template**](Client.md#delete_template) | **DELETE** /templates/{template_id} | Delete a template |
|
|
21
20
|
| [**delete_webhook**](Client.md#delete_webhook) | **DELETE** /webhooks/{webhook_id} | Delete a webhook |
|
|
22
|
-
| [**
|
|
23
|
-
| [**expire_submission**](Client.md#expire_submission) | **DELETE** /submissions/{submission_id} | Expire a
|
|
24
|
-
| [**
|
|
25
|
-
| [**
|
|
26
|
-
| [**
|
|
27
|
-
| [**
|
|
28
|
-
| [**
|
|
29
|
-
| [**
|
|
30
|
-
| [**get_submission**](Client.md#get_submission) | **GET** /submissions/{submission_id} |
|
|
31
|
-
| [**get_submission_batch**](Client.md#get_submission_batch) | **GET** /submissions/batches/{submission_batch_id} |
|
|
32
|
-
| [**get_template**](Client.md#get_template) | **GET** /templates/{template_id} |
|
|
33
|
-
| [**get_template_model_code**](Client.md#get_template_model_code) | **GET** /templates/{template_id}/model_code | Generate typed
|
|
34
|
-
| [**get_template_schema**](Client.md#get_template_schema) | **GET** /templates/{template_id}/schema |
|
|
21
|
+
| [**expire_combined_pdf**](Client.md#expire_combined_pdf) | **DELETE** /combined_pdfs/{combined_pdf_id} | Expire a combined PDF |
|
|
22
|
+
| [**expire_submission**](Client.md#expire_submission) | **DELETE** /submissions/{submission_id} | Expire a submission |
|
|
23
|
+
| [**generate_submission_preview**](Client.md#generate_submission_preview) | **POST** /submissions/{submission_id}/generate_preview | Generate a preview PDF |
|
|
24
|
+
| [**get_combined_pdf**](Client.md#get_combined_pdf) | **GET** /combined_pdfs/{combined_pdf_id} | Get a combined PDF |
|
|
25
|
+
| [**get_custom_file**](Client.md#get_custom_file) | **GET** /custom_files/{custom_file_id} | Get a custom file |
|
|
26
|
+
| [**get_folder**](Client.md#get_folder) | **GET** /folders/{folder_id} | Get a folder |
|
|
27
|
+
| [**get_presign_url**](Client.md#get_presign_url) | **GET** /uploads/presign | Get a presigned URL to upload a file |
|
|
28
|
+
| [**get_signature_request**](Client.md#get_signature_request) | **GET** /signature_requests/{signature_request_id} | Get a signature request |
|
|
29
|
+
| [**get_submission**](Client.md#get_submission) | **GET** /submissions/{submission_id} | Get a submission |
|
|
30
|
+
| [**get_submission_batch**](Client.md#get_submission_batch) | **GET** /submissions/batches/{submission_batch_id} | Get a batch |
|
|
31
|
+
| [**get_template**](Client.md#get_template) | **GET** /templates/{template_id} | Get a template |
|
|
32
|
+
| [**get_template_model_code**](Client.md#get_template_model_code) | **GET** /templates/{template_id}/model_code | Generate typed code for a template's submission data |
|
|
33
|
+
| [**get_template_schema**](Client.md#get_template_schema) | **GET** /templates/{template_id}/schema | Get the JSON Schema of a template's submission data |
|
|
35
34
|
| [**get_webhook**](Client.md#get_webhook) | **GET** /webhooks/{webhook_id} | Get a webhook |
|
|
36
|
-
| [**
|
|
37
|
-
| [**
|
|
38
|
-
| [**
|
|
39
|
-
| [**
|
|
40
|
-
| [**
|
|
41
|
-
| [**
|
|
42
|
-
| [**
|
|
43
|
-
| [**
|
|
35
|
+
| [**list_combined_pdfs**](Client.md#list_combined_pdfs) | **GET** /combined_pdfs | List combined PDFs |
|
|
36
|
+
| [**list_custom_files**](Client.md#list_custom_files) | **GET** /custom_files | List custom files |
|
|
37
|
+
| [**list_folders**](Client.md#list_folders) | **GET** /folders | List folders |
|
|
38
|
+
| [**list_submissions**](Client.md#list_submissions) | **GET** /submissions | List submissions |
|
|
39
|
+
| [**list_template_submissions**](Client.md#list_template_submissions) | **GET** /templates/{template_id}/submissions | List a template's submissions |
|
|
40
|
+
| [**list_templates**](Client.md#list_templates) | **GET** /templates | List templates |
|
|
41
|
+
| [**list_webhooks**](Client.md#list_webhooks) | **GET** /webhooks | List webhooks |
|
|
42
|
+
| [**move_folder**](Client.md#move_folder) | **POST** /folders/{folder_id}/move | Move a folder |
|
|
43
|
+
| [**move_template**](Client.md#move_template) | **POST** /templates/{template_id}/move | Move a template to a folder |
|
|
44
44
|
| [**publish_template_version**](Client.md#publish_template_version) | **POST** /templates/{template_id}/publish_version | Publish a template version |
|
|
45
45
|
| [**rename_folder**](Client.md#rename_folder) | **POST** /folders/{folder_id}/rename | Rename a folder |
|
|
46
46
|
| [**restore_template_version**](Client.md#restore_template_version) | **POST** /templates/{template_id}/restore_version | Restore a template version |
|
|
47
47
|
| [**test_authentication**](Client.md#test_authentication) | **GET** /authentication | Test authentication |
|
|
48
|
-
| [**
|
|
49
|
-
| [**update_template**](Client.md#update_template) | **PUT** /templates/{template_id} | Update a
|
|
50
|
-
| [**update_template_document**](Client.md#update_template_document) | **PUT** /templates/{template_id}
|
|
51
|
-
| [**update_template_document_from_upload**](Client.md#update_template_document_from_upload) | **PUT** /templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload | Update a template's document with a cached S3 file upload |
|
|
48
|
+
| [**update_signature_request**](Client.md#update_signature_request) | **PUT** /signature_requests/{signature_request_id} | Update a signature request |
|
|
49
|
+
| [**update_template**](Client.md#update_template) | **PUT** /templates/{template_id} | Update a template |
|
|
50
|
+
| [**update_template_document**](Client.md#update_template_document) | **PUT** /templates/{template_id}/document | Replace a template's PDF |
|
|
52
51
|
| [**update_webhook**](Client.md#update_webhook) | **PUT** /webhooks/{webhook_id} | Update a webhook |
|
|
52
|
+
| [**upload_template**](Client.md#upload_template) | **POST** /templates/upload | Create a PDF template from an uploaded PDF |
|
|
53
|
+
| [**upload_template_document**](Client.md#upload_template_document) | **PUT** /templates/{template_id}/document/upload | Replace a template's PDF with an uploaded PDF |
|
|
53
54
|
|
|
54
55
|
|
|
55
|
-
##
|
|
56
|
+
## copy_template
|
|
56
57
|
|
|
57
|
-
> <
|
|
58
|
+
> <Template> copy_template(template_id, opts)
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
Copy a template
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
Copies a template (its draft, or a published version) into a new template.
|
|
62
63
|
|
|
63
64
|
### Examples
|
|
64
65
|
|
|
@@ -73,33 +74,35 @@ DocSpring.configure do |config|
|
|
|
73
74
|
end
|
|
74
75
|
|
|
75
76
|
api_instance = DocSpring::Client.new
|
|
76
|
-
template_id = '
|
|
77
|
-
|
|
77
|
+
template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
|
|
78
|
+
opts = {
|
|
79
|
+
body: DocSpring::CopyTemplateRequest.new # CopyTemplateRequest | Settings for the copy.
|
|
80
|
+
}
|
|
78
81
|
|
|
79
82
|
begin
|
|
80
|
-
#
|
|
81
|
-
result = api_instance.
|
|
83
|
+
# Copy a template
|
|
84
|
+
result = api_instance.copy_template(template_id, opts)
|
|
82
85
|
p result
|
|
83
86
|
rescue DocSpring::ApiError => e
|
|
84
|
-
puts "Error when calling Client->
|
|
87
|
+
puts "Error when calling Client->copy_template: #{e}"
|
|
85
88
|
end
|
|
86
89
|
```
|
|
87
90
|
|
|
88
|
-
#### Using the
|
|
91
|
+
#### Using the copy_template_with_http_info variant
|
|
89
92
|
|
|
90
93
|
This returns an Array which contains the response data, status code and headers.
|
|
91
94
|
|
|
92
|
-
> <Array(<
|
|
95
|
+
> <Array(<Template>, Integer, Hash)> copy_template_with_http_info(template_id, opts)
|
|
93
96
|
|
|
94
97
|
```ruby
|
|
95
98
|
begin
|
|
96
|
-
#
|
|
97
|
-
data, status_code, headers = api_instance.
|
|
99
|
+
# Copy a template
|
|
100
|
+
data, status_code, headers = api_instance.copy_template_with_http_info(template_id, opts)
|
|
98
101
|
p status_code # => 2xx
|
|
99
102
|
p headers # => { ... }
|
|
100
|
-
p data # => <
|
|
103
|
+
p data # => <Template>
|
|
101
104
|
rescue DocSpring::ApiError => e
|
|
102
|
-
puts "Error when calling Client->
|
|
105
|
+
puts "Error when calling Client->copy_template_with_http_info: #{e}"
|
|
103
106
|
end
|
|
104
107
|
```
|
|
105
108
|
|
|
@@ -107,12 +110,12 @@ end
|
|
|
107
110
|
|
|
108
111
|
| Name | Type | Description | Notes |
|
|
109
112
|
| ---- | ---- | ----------- | ----- |
|
|
110
|
-
| **template_id** | **String** |
|
|
111
|
-
| **
|
|
113
|
+
| **template_id** | **String** | The template's ID. | |
|
|
114
|
+
| **body** | [**CopyTemplateRequest**](CopyTemplateRequest.md) | Settings for the copy. | [optional] |
|
|
112
115
|
|
|
113
116
|
### Return type
|
|
114
117
|
|
|
115
|
-
[**
|
|
118
|
+
[**Template**](Template.md)
|
|
116
119
|
|
|
117
120
|
### Authorization
|
|
118
121
|
|
|
@@ -124,13 +127,13 @@ end
|
|
|
124
127
|
- **Accept**: application/json
|
|
125
128
|
|
|
126
129
|
|
|
127
|
-
##
|
|
130
|
+
## create_combined_pdf
|
|
128
131
|
|
|
129
|
-
> <
|
|
132
|
+
> <CombinedPdf> create_combined_pdf(body, opts)
|
|
130
133
|
|
|
131
|
-
|
|
134
|
+
Combine PDFs
|
|
132
135
|
|
|
133
|
-
|
|
136
|
+
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.
|
|
134
137
|
|
|
135
138
|
### Examples
|
|
136
139
|
|
|
@@ -145,35 +148,35 @@ DocSpring.configure do |config|
|
|
|
145
148
|
end
|
|
146
149
|
|
|
147
150
|
api_instance = DocSpring::Client.new
|
|
148
|
-
|
|
151
|
+
body = DocSpring::CreateCombinedPdfRequest.new({source_pdfs: [DocSpring::CombinedPdfSourcePdf.new({type: 'type_example', id: 'id_example'})]}) # CreateCombinedPdfRequest | The PDFs to merge, and the combined PDF's settings.
|
|
149
152
|
opts = {
|
|
150
|
-
wait: true # Boolean | Wait
|
|
153
|
+
wait: true # Boolean | Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
151
154
|
}
|
|
152
155
|
|
|
153
156
|
begin
|
|
154
|
-
#
|
|
155
|
-
result = api_instance.
|
|
157
|
+
# Combine PDFs
|
|
158
|
+
result = api_instance.create_combined_pdf(body, opts)
|
|
156
159
|
p result
|
|
157
160
|
rescue DocSpring::ApiError => e
|
|
158
|
-
puts "Error when calling Client->
|
|
161
|
+
puts "Error when calling Client->create_combined_pdf: #{e}"
|
|
159
162
|
end
|
|
160
163
|
```
|
|
161
164
|
|
|
162
|
-
#### Using the
|
|
165
|
+
#### Using the create_combined_pdf_with_http_info variant
|
|
163
166
|
|
|
164
167
|
This returns an Array which contains the response data, status code and headers.
|
|
165
168
|
|
|
166
|
-
> <Array(<
|
|
169
|
+
> <Array(<CombinedPdf>, Integer, Hash)> create_combined_pdf_with_http_info(body, opts)
|
|
167
170
|
|
|
168
171
|
```ruby
|
|
169
172
|
begin
|
|
170
|
-
#
|
|
171
|
-
data, status_code, headers = api_instance.
|
|
173
|
+
# Combine PDFs
|
|
174
|
+
data, status_code, headers = api_instance.create_combined_pdf_with_http_info(body, opts)
|
|
172
175
|
p status_code # => 2xx
|
|
173
176
|
p headers # => { ... }
|
|
174
|
-
p data # => <
|
|
177
|
+
p data # => <CombinedPdf>
|
|
175
178
|
rescue DocSpring::ApiError => e
|
|
176
|
-
puts "Error when calling Client->
|
|
179
|
+
puts "Error when calling Client->create_combined_pdf_with_http_info: #{e}"
|
|
177
180
|
end
|
|
178
181
|
```
|
|
179
182
|
|
|
@@ -181,12 +184,12 @@ end
|
|
|
181
184
|
|
|
182
185
|
| Name | Type | Description | Notes |
|
|
183
186
|
| ---- | ---- | ----------- | ----- |
|
|
184
|
-
| **
|
|
185
|
-
| **wait** | **Boolean** | Wait
|
|
187
|
+
| **body** | [**CreateCombinedPdfRequest**](CreateCombinedPdfRequest.md) | The PDFs to merge, and the combined PDF's settings. | |
|
|
188
|
+
| **wait** | **Boolean** | Wait until the PDF has been generated before responding. Default true on sync.api hosts. | [optional] |
|
|
186
189
|
|
|
187
190
|
### Return type
|
|
188
191
|
|
|
189
|
-
[**
|
|
192
|
+
[**CombinedPdf**](CombinedPdf.md)
|
|
190
193
|
|
|
191
194
|
### Authorization
|
|
192
195
|
|
|
@@ -198,13 +201,13 @@ end
|
|
|
198
201
|
- **Accept**: application/json
|
|
199
202
|
|
|
200
203
|
|
|
201
|
-
##
|
|
204
|
+
## create_custom_file_from_upload
|
|
202
205
|
|
|
203
|
-
> <
|
|
206
|
+
> <CustomFile> create_custom_file_from_upload(body)
|
|
204
207
|
|
|
205
|
-
|
|
208
|
+
Create a custom file from an upload
|
|
206
209
|
|
|
207
|
-
|
|
210
|
+
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`.
|
|
208
211
|
|
|
209
212
|
### Examples
|
|
210
213
|
|
|
@@ -219,32 +222,32 @@ DocSpring.configure do |config|
|
|
|
219
222
|
end
|
|
220
223
|
|
|
221
224
|
api_instance = DocSpring::Client.new
|
|
222
|
-
|
|
225
|
+
body = DocSpring::CreateCustomFileFromUploadRequest.new({cache_id: 'cache_id_example'}) # CreateCustomFileFromUploadRequest | The uploaded file to create the custom file from.
|
|
223
226
|
|
|
224
227
|
begin
|
|
225
|
-
#
|
|
226
|
-
result = api_instance.
|
|
228
|
+
# Create a custom file from an upload
|
|
229
|
+
result = api_instance.create_custom_file_from_upload(body)
|
|
227
230
|
p result
|
|
228
231
|
rescue DocSpring::ApiError => e
|
|
229
|
-
puts "Error when calling Client->
|
|
232
|
+
puts "Error when calling Client->create_custom_file_from_upload: #{e}"
|
|
230
233
|
end
|
|
231
234
|
```
|
|
232
235
|
|
|
233
|
-
#### Using the
|
|
236
|
+
#### Using the create_custom_file_from_upload_with_http_info variant
|
|
234
237
|
|
|
235
238
|
This returns an Array which contains the response data, status code and headers.
|
|
236
239
|
|
|
237
|
-
> <Array(<
|
|
240
|
+
> <Array(<CustomFile>, Integer, Hash)> create_custom_file_from_upload_with_http_info(body)
|
|
238
241
|
|
|
239
242
|
```ruby
|
|
240
243
|
begin
|
|
241
|
-
#
|
|
242
|
-
data, status_code, headers = api_instance.
|
|
244
|
+
# Create a custom file from an upload
|
|
245
|
+
data, status_code, headers = api_instance.create_custom_file_from_upload_with_http_info(body)
|
|
243
246
|
p status_code # => 2xx
|
|
244
247
|
p headers # => { ... }
|
|
245
|
-
p data # => <
|
|
248
|
+
p data # => <CustomFile>
|
|
246
249
|
rescue DocSpring::ApiError => e
|
|
247
|
-
puts "Error when calling Client->
|
|
250
|
+
puts "Error when calling Client->create_custom_file_from_upload_with_http_info: #{e}"
|
|
248
251
|
end
|
|
249
252
|
```
|
|
250
253
|
|
|
@@ -252,11 +255,11 @@ end
|
|
|
252
255
|
|
|
253
256
|
| Name | Type | Description | Notes |
|
|
254
257
|
| ---- | ---- | ----------- | ----- |
|
|
255
|
-
| **
|
|
258
|
+
| **body** | [**CreateCustomFileFromUploadRequest**](CreateCustomFileFromUploadRequest.md) | The uploaded file to create the custom file from. | |
|
|
256
259
|
|
|
257
260
|
### Return type
|
|
258
261
|
|
|
259
|
-
[**
|
|
262
|
+
[**CustomFile**](CustomFile.md)
|
|
260
263
|
|
|
261
264
|
### Authorization
|
|
262
265
|
|
|
@@ -268,13 +271,13 @@ end
|
|
|
268
271
|
- **Accept**: application/json
|
|
269
272
|
|
|
270
273
|
|
|
271
|
-
##
|
|
274
|
+
## create_folder
|
|
272
275
|
|
|
273
|
-
> <
|
|
276
|
+
> <Folder> create_folder(body)
|
|
274
277
|
|
|
275
|
-
|
|
278
|
+
Create a folder
|
|
276
279
|
|
|
277
|
-
Creates a
|
|
280
|
+
Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
278
281
|
|
|
279
282
|
### Examples
|
|
280
283
|
|
|
@@ -289,35 +292,32 @@ DocSpring.configure do |config|
|
|
|
289
292
|
end
|
|
290
293
|
|
|
291
294
|
api_instance = DocSpring::Client.new
|
|
292
|
-
|
|
293
|
-
opts = {
|
|
294
|
-
options: DocSpring::CopyTemplateOptions.new # CopyTemplateOptions |
|
|
295
|
-
}
|
|
295
|
+
body = DocSpring::CreateFolderRequest.new({name: 'name_example'}) # CreateFolderRequest | The folder to create.
|
|
296
296
|
|
|
297
297
|
begin
|
|
298
|
-
#
|
|
299
|
-
result = api_instance.
|
|
298
|
+
# Create a folder
|
|
299
|
+
result = api_instance.create_folder(body)
|
|
300
300
|
p result
|
|
301
301
|
rescue DocSpring::ApiError => e
|
|
302
|
-
puts "Error when calling Client->
|
|
302
|
+
puts "Error when calling Client->create_folder: #{e}"
|
|
303
303
|
end
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
#### Using the
|
|
306
|
+
#### Using the create_folder_with_http_info variant
|
|
307
307
|
|
|
308
308
|
This returns an Array which contains the response data, status code and headers.
|
|
309
309
|
|
|
310
|
-
> <Array(<
|
|
310
|
+
> <Array(<Folder>, Integer, Hash)> create_folder_with_http_info(body)
|
|
311
311
|
|
|
312
312
|
```ruby
|
|
313
313
|
begin
|
|
314
|
-
#
|
|
315
|
-
data, status_code, headers = api_instance.
|
|
314
|
+
# Create a folder
|
|
315
|
+
data, status_code, headers = api_instance.create_folder_with_http_info(body)
|
|
316
316
|
p status_code # => 2xx
|
|
317
317
|
p headers # => { ... }
|
|
318
|
-
p data # => <
|
|
318
|
+
p data # => <Folder>
|
|
319
319
|
rescue DocSpring::ApiError => e
|
|
320
|
-
puts "Error when calling Client->
|
|
320
|
+
puts "Error when calling Client->create_folder_with_http_info: #{e}"
|
|
321
321
|
end
|
|
322
322
|
```
|
|
323
323
|
|
|
@@ -325,12 +325,11 @@ end
|
|
|
325
325
|
|
|
326
326
|
| Name | Type | Description | Notes |
|
|
327
327
|
| ---- | ---- | ----------- | ----- |
|
|
328
|
-
| **
|
|
329
|
-
| **options** | [**CopyTemplateOptions**](CopyTemplateOptions.md) | | [optional] |
|
|
328
|
+
| **body** | [**CreateFolderRequest**](CreateFolderRequest.md) | The folder to create. | |
|
|
330
329
|
|
|
331
330
|
### Return type
|
|
332
331
|
|
|
333
|
-
[**
|
|
332
|
+
[**Folder**](Folder.md)
|
|
334
333
|
|
|
335
334
|
### Authorization
|
|
336
335
|
|
|
@@ -342,13 +341,13 @@ end
|
|
|
342
341
|
- **Accept**: application/json
|
|
343
342
|
|
|
344
343
|
|
|
345
|
-
##
|
|
344
|
+
## create_signature_request_event
|
|
346
345
|
|
|
347
|
-
> <
|
|
346
|
+
> <SignatureRequestEvent> create_signature_request_event(signature_request_id, body)
|
|
348
347
|
|
|
349
|
-
|
|
348
|
+
Record a signature request event
|
|
350
349
|
|
|
351
|
-
|
|
350
|
+
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.
|
|
352
351
|
|
|
353
352
|
### Examples
|
|
354
353
|
|
|
@@ -363,32 +362,33 @@ DocSpring.configure do |config|
|
|
|
363
362
|
end
|
|
364
363
|
|
|
365
364
|
api_instance = DocSpring::Client.new
|
|
366
|
-
|
|
365
|
+
signature_request_id = 'srq_1234567890abcdef01' # String | The signature request's ID.
|
|
366
|
+
body = DocSpring::CreateSignatureRequestEventRequest.new({event_type: DocSpring::SignatureRequestEventType::SEND_REQUEST}) # CreateSignatureRequestEventRequest | The event to record.
|
|
367
367
|
|
|
368
368
|
begin
|
|
369
|
-
#
|
|
370
|
-
result = api_instance.
|
|
369
|
+
# Record a signature request event
|
|
370
|
+
result = api_instance.create_signature_request_event(signature_request_id, body)
|
|
371
371
|
p result
|
|
372
372
|
rescue DocSpring::ApiError => e
|
|
373
|
-
puts "Error when calling Client->
|
|
373
|
+
puts "Error when calling Client->create_signature_request_event: #{e}"
|
|
374
374
|
end
|
|
375
375
|
```
|
|
376
376
|
|
|
377
|
-
#### Using the
|
|
377
|
+
#### Using the create_signature_request_event_with_http_info variant
|
|
378
378
|
|
|
379
379
|
This returns an Array which contains the response data, status code and headers.
|
|
380
380
|
|
|
381
|
-
> <Array(<
|
|
381
|
+
> <Array(<SignatureRequestEvent>, Integer, Hash)> create_signature_request_event_with_http_info(signature_request_id, body)
|
|
382
382
|
|
|
383
383
|
```ruby
|
|
384
384
|
begin
|
|
385
|
-
#
|
|
386
|
-
data, status_code, headers = api_instance.
|
|
385
|
+
# Record a signature request event
|
|
386
|
+
data, status_code, headers = api_instance.create_signature_request_event_with_http_info(signature_request_id, body)
|
|
387
387
|
p status_code # => 2xx
|
|
388
388
|
p headers # => { ... }
|
|
389
|
-
p data # => <
|
|
389
|
+
p data # => <SignatureRequestEvent>
|
|
390
390
|
rescue DocSpring::ApiError => e
|
|
391
|
-
puts "Error when calling Client->
|
|
391
|
+
puts "Error when calling Client->create_signature_request_event_with_http_info: #{e}"
|
|
392
392
|
end
|
|
393
393
|
```
|
|
394
394
|
|
|
@@ -396,11 +396,12 @@ end
|
|
|
396
396
|
|
|
397
397
|
| Name | Type | Description | Notes |
|
|
398
398
|
| ---- | ---- | ----------- | ----- |
|
|
399
|
-
| **
|
|
399
|
+
| **signature_request_id** | **String** | The signature request's ID. | |
|
|
400
|
+
| **body** | [**CreateSignatureRequestEventRequest**](CreateSignatureRequestEventRequest.md) | The event to record. | |
|
|
400
401
|
|
|
401
402
|
### Return type
|
|
402
403
|
|
|
403
|
-
[**
|
|
404
|
+
[**SignatureRequestEvent**](SignatureRequestEvent.md)
|
|
404
405
|
|
|
405
406
|
### Authorization
|
|
406
407
|
|
|
@@ -412,13 +413,13 @@ end
|
|
|
412
413
|
- **Accept**: application/json
|
|
413
414
|
|
|
414
415
|
|
|
415
|
-
##
|
|
416
|
+
## create_signature_request_token
|
|
416
417
|
|
|
417
|
-
> <
|
|
418
|
+
> <SignatureRequestToken> create_signature_request_token(signature_request_id, opts)
|
|
418
419
|
|
|
419
|
-
Create a
|
|
420
|
+
Create a signature request token
|
|
420
421
|
|
|
421
|
-
|
|
422
|
+
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.
|
|
422
423
|
|
|
423
424
|
### Examples
|
|
424
425
|
|
|
@@ -433,33 +434,35 @@ DocSpring.configure do |config|
|
|
|
433
434
|
end
|
|
434
435
|
|
|
435
436
|
api_instance = DocSpring::Client.new
|
|
436
|
-
|
|
437
|
-
|
|
437
|
+
signature_request_id = 'srq_1234567890abcdef01' # String | The signature request's ID.
|
|
438
|
+
opts = {
|
|
439
|
+
body: DocSpring::CreateSignatureRequestTokenRequest.new # CreateSignatureRequestTokenRequest | The kind of link to make. Send no body for an `api` token.
|
|
440
|
+
}
|
|
438
441
|
|
|
439
442
|
begin
|
|
440
|
-
# Create a
|
|
441
|
-
result = api_instance.
|
|
443
|
+
# Create a signature request token
|
|
444
|
+
result = api_instance.create_signature_request_token(signature_request_id, opts)
|
|
442
445
|
p result
|
|
443
446
|
rescue DocSpring::ApiError => e
|
|
444
|
-
puts "Error when calling Client->
|
|
447
|
+
puts "Error when calling Client->create_signature_request_token: #{e}"
|
|
445
448
|
end
|
|
446
449
|
```
|
|
447
450
|
|
|
448
|
-
#### Using the
|
|
451
|
+
#### Using the create_signature_request_token_with_http_info variant
|
|
449
452
|
|
|
450
453
|
This returns an Array which contains the response data, status code and headers.
|
|
451
454
|
|
|
452
|
-
> <Array(<
|
|
455
|
+
> <Array(<SignatureRequestToken>, Integer, Hash)> create_signature_request_token_with_http_info(signature_request_id, opts)
|
|
453
456
|
|
|
454
457
|
```ruby
|
|
455
458
|
begin
|
|
456
|
-
# Create a
|
|
457
|
-
data, status_code, headers = api_instance.
|
|
459
|
+
# Create a signature request token
|
|
460
|
+
data, status_code, headers = api_instance.create_signature_request_token_with_http_info(signature_request_id, opts)
|
|
458
461
|
p status_code # => 2xx
|
|
459
462
|
p headers # => { ... }
|
|
460
|
-
p data # => <
|
|
463
|
+
p data # => <SignatureRequestToken>
|
|
461
464
|
rescue DocSpring::ApiError => e
|
|
462
|
-
puts "Error when calling Client->
|
|
465
|
+
puts "Error when calling Client->create_signature_request_token_with_http_info: #{e}"
|
|
463
466
|
end
|
|
464
467
|
```
|
|
465
468
|
|
|
@@ -467,12 +470,12 @@ end
|
|
|
467
470
|
|
|
468
471
|
| Name | Type | Description | Notes |
|
|
469
472
|
| ---- | ---- | ----------- | ----- |
|
|
470
|
-
| **
|
|
471
|
-
| **
|
|
473
|
+
| **signature_request_id** | **String** | The signature request's ID. | |
|
|
474
|
+
| **body** | [**CreateSignatureRequestTokenRequest**](CreateSignatureRequestTokenRequest.md) | The kind of link to make. Send no body for an `api` token. | [optional] |
|
|
472
475
|
|
|
473
476
|
### Return type
|
|
474
477
|
|
|
475
|
-
[**
|
|
478
|
+
[**SignatureRequestToken**](SignatureRequestToken.md)
|
|
476
479
|
|
|
477
480
|
### Authorization
|
|
478
481
|
|
|
@@ -484,13 +487,13 @@ end
|
|
|
484
487
|
- **Accept**: application/json
|
|
485
488
|
|
|
486
489
|
|
|
487
|
-
##
|
|
490
|
+
## create_submission
|
|
488
491
|
|
|
489
|
-
> <
|
|
492
|
+
> <Submission> create_submission(template_id, body, opts)
|
|
490
493
|
|
|
491
|
-
|
|
494
|
+
Generate a PDF
|
|
492
495
|
|
|
493
|
-
Creates
|
|
496
|
+
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.
|
|
494
497
|
|
|
495
498
|
### Examples
|
|
496
499
|
|
|
@@ -505,106 +508,37 @@ DocSpring.configure do |config|
|
|
|
505
508
|
end
|
|
506
509
|
|
|
507
510
|
api_instance = DocSpring::Client.new
|
|
508
|
-
|
|
511
|
+
template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
|
|
512
|
+
body = DocSpring::CreateSubmissionRequest.new # CreateSubmissionRequest | The submission's data and settings.
|
|
509
513
|
opts = {
|
|
510
|
-
|
|
514
|
+
version: 'version_example', # String | 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).
|
|
515
|
+
wait: true # Boolean | Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
511
516
|
}
|
|
512
517
|
|
|
513
518
|
begin
|
|
514
|
-
#
|
|
515
|
-
result = api_instance.
|
|
516
|
-
p result
|
|
517
|
-
rescue DocSpring::ApiError => e
|
|
518
|
-
puts "Error when calling Client->create_data_request_token: #{e}"
|
|
519
|
-
end
|
|
520
|
-
```
|
|
521
|
-
|
|
522
|
-
#### Using the create_data_request_token_with_http_info variant
|
|
523
|
-
|
|
524
|
-
This returns an Array which contains the response data, status code and headers.
|
|
525
|
-
|
|
526
|
-
> <Array(<CreateSubmissionDataRequestTokenResponse>, Integer, Hash)> create_data_request_token_with_http_info(data_request_id, opts)
|
|
527
|
-
|
|
528
|
-
```ruby
|
|
529
|
-
begin
|
|
530
|
-
# Create a new data request token for form authentication
|
|
531
|
-
data, status_code, headers = api_instance.create_data_request_token_with_http_info(data_request_id, opts)
|
|
532
|
-
p status_code # => 2xx
|
|
533
|
-
p headers # => { ... }
|
|
534
|
-
p data # => <CreateSubmissionDataRequestTokenResponse>
|
|
535
|
-
rescue DocSpring::ApiError => e
|
|
536
|
-
puts "Error when calling Client->create_data_request_token_with_http_info: #{e}"
|
|
537
|
-
end
|
|
538
|
-
```
|
|
539
|
-
|
|
540
|
-
### Parameters
|
|
541
|
-
|
|
542
|
-
| Name | Type | Description | Notes |
|
|
543
|
-
| ---- | ---- | ----------- | ----- |
|
|
544
|
-
| **data_request_id** | **String** | | |
|
|
545
|
-
| **type** | **String** | | [optional] |
|
|
546
|
-
|
|
547
|
-
### Return type
|
|
548
|
-
|
|
549
|
-
[**CreateSubmissionDataRequestTokenResponse**](CreateSubmissionDataRequestTokenResponse.md)
|
|
550
|
-
|
|
551
|
-
### Authorization
|
|
552
|
-
|
|
553
|
-
[api_token_basic](../README.md#api_token_basic)
|
|
554
|
-
|
|
555
|
-
### HTTP request headers
|
|
556
|
-
|
|
557
|
-
- **Content-Type**: Not defined
|
|
558
|
-
- **Accept**: application/json
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
## create_folder
|
|
562
|
-
|
|
563
|
-
> <Folder> create_folder(data)
|
|
564
|
-
|
|
565
|
-
Create a folder
|
|
566
|
-
|
|
567
|
-
Creates a new folder for organizing templates. Folders can be nested within other folders by providing a `parent_folder_id`. Folder names must be unique within the same parent.
|
|
568
|
-
|
|
569
|
-
### Examples
|
|
570
|
-
|
|
571
|
-
```ruby
|
|
572
|
-
require 'time'
|
|
573
|
-
require 'docspring'
|
|
574
|
-
# setup authorization
|
|
575
|
-
DocSpring.configure do |config|
|
|
576
|
-
# Configure HTTP basic authorization: api_token_basic
|
|
577
|
-
config.username = 'YOUR USERNAME'
|
|
578
|
-
config.password = 'YOUR PASSWORD'
|
|
579
|
-
end
|
|
580
|
-
|
|
581
|
-
api_instance = DocSpring::Client.new
|
|
582
|
-
data = DocSpring::CreateFolderData.new({folder: 3.56}) # CreateFolderData |
|
|
583
|
-
|
|
584
|
-
begin
|
|
585
|
-
# Create a folder
|
|
586
|
-
result = api_instance.create_folder(data)
|
|
519
|
+
# Generate a PDF
|
|
520
|
+
result = api_instance.create_submission(template_id, body, opts)
|
|
587
521
|
p result
|
|
588
522
|
rescue DocSpring::ApiError => e
|
|
589
|
-
puts "Error when calling Client->
|
|
523
|
+
puts "Error when calling Client->create_submission: #{e}"
|
|
590
524
|
end
|
|
591
525
|
```
|
|
592
526
|
|
|
593
|
-
#### Using the
|
|
527
|
+
#### Using the create_submission_with_http_info variant
|
|
594
528
|
|
|
595
529
|
This returns an Array which contains the response data, status code and headers.
|
|
596
530
|
|
|
597
|
-
> <Array(<
|
|
531
|
+
> <Array(<Submission>, Integer, Hash)> create_submission_with_http_info(template_id, body, opts)
|
|
598
532
|
|
|
599
533
|
```ruby
|
|
600
534
|
begin
|
|
601
|
-
#
|
|
602
|
-
data, status_code, headers = api_instance.
|
|
535
|
+
# Generate a PDF
|
|
536
|
+
data, status_code, headers = api_instance.create_submission_with_http_info(template_id, body, opts)
|
|
603
537
|
p status_code # => 2xx
|
|
604
538
|
p headers # => { ... }
|
|
605
|
-
p data # => <
|
|
539
|
+
p data # => <Submission>
|
|
606
540
|
rescue DocSpring::ApiError => e
|
|
607
|
-
puts "Error when calling Client->
|
|
541
|
+
puts "Error when calling Client->create_submission_with_http_info: #{e}"
|
|
608
542
|
end
|
|
609
543
|
```
|
|
610
544
|
|
|
@@ -612,11 +546,14 @@ end
|
|
|
612
546
|
|
|
613
547
|
| Name | Type | Description | Notes |
|
|
614
548
|
| ---- | ---- | ----------- | ----- |
|
|
615
|
-
| **
|
|
549
|
+
| **template_id** | **String** | The template's ID. | |
|
|
550
|
+
| **body** | [**CreateSubmissionRequest**](CreateSubmissionRequest.md) | The submission's data and settings. | |
|
|
551
|
+
| **version** | **String** | 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). | [optional] |
|
|
552
|
+
| **wait** | **Boolean** | Wait until the PDF has been generated before responding. Default true on sync.api hosts. | [optional] |
|
|
616
553
|
|
|
617
554
|
### Return type
|
|
618
555
|
|
|
619
|
-
[**
|
|
556
|
+
[**Submission**](Submission.md)
|
|
620
557
|
|
|
621
558
|
### Authorization
|
|
622
559
|
|
|
@@ -628,13 +565,13 @@ end
|
|
|
628
565
|
- **Accept**: application/json
|
|
629
566
|
|
|
630
567
|
|
|
631
|
-
##
|
|
568
|
+
## create_submission_batch
|
|
632
569
|
|
|
633
|
-
> <
|
|
570
|
+
> <SubmissionBatch> create_submission_batch(body, opts)
|
|
634
571
|
|
|
635
|
-
|
|
572
|
+
Generate PDFs in a batch
|
|
636
573
|
|
|
637
|
-
Creates
|
|
574
|
+
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.
|
|
638
575
|
|
|
639
576
|
### Examples
|
|
640
577
|
|
|
@@ -649,32 +586,35 @@ DocSpring.configure do |config|
|
|
|
649
586
|
end
|
|
650
587
|
|
|
651
588
|
api_instance = DocSpring::Client.new
|
|
652
|
-
|
|
589
|
+
body = DocSpring::CreateSubmissionBatchRequest.new({submissions: [DocSpring::SubmissionInput.new]}) # CreateSubmissionBatchRequest | The submissions to create, and the settings they share.
|
|
590
|
+
opts = {
|
|
591
|
+
wait: true # Boolean | Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
|
|
592
|
+
}
|
|
653
593
|
|
|
654
594
|
begin
|
|
655
|
-
#
|
|
656
|
-
result = api_instance.
|
|
595
|
+
# Generate PDFs in a batch
|
|
596
|
+
result = api_instance.create_submission_batch(body, opts)
|
|
657
597
|
p result
|
|
658
598
|
rescue DocSpring::ApiError => e
|
|
659
|
-
puts "Error when calling Client->
|
|
599
|
+
puts "Error when calling Client->create_submission_batch: #{e}"
|
|
660
600
|
end
|
|
661
601
|
```
|
|
662
602
|
|
|
663
|
-
#### Using the
|
|
603
|
+
#### Using the create_submission_batch_with_http_info variant
|
|
664
604
|
|
|
665
605
|
This returns an Array which contains the response data, status code and headers.
|
|
666
606
|
|
|
667
|
-
> <Array(<
|
|
607
|
+
> <Array(<SubmissionBatch>, Integer, Hash)> create_submission_batch_with_http_info(body, opts)
|
|
668
608
|
|
|
669
609
|
```ruby
|
|
670
610
|
begin
|
|
671
|
-
#
|
|
672
|
-
data, status_code, headers = api_instance.
|
|
611
|
+
# Generate PDFs in a batch
|
|
612
|
+
data, status_code, headers = api_instance.create_submission_batch_with_http_info(body, opts)
|
|
673
613
|
p status_code # => 2xx
|
|
674
614
|
p headers # => { ... }
|
|
675
|
-
p data # => <
|
|
615
|
+
p data # => <SubmissionBatch>
|
|
676
616
|
rescue DocSpring::ApiError => e
|
|
677
|
-
puts "Error when calling Client->
|
|
617
|
+
puts "Error when calling Client->create_submission_batch_with_http_info: #{e}"
|
|
678
618
|
end
|
|
679
619
|
```
|
|
680
620
|
|
|
@@ -682,11 +622,12 @@ end
|
|
|
682
622
|
|
|
683
623
|
| Name | Type | Description | Notes |
|
|
684
624
|
| ---- | ---- | ----------- | ----- |
|
|
685
|
-
| **
|
|
625
|
+
| **body** | [**CreateSubmissionBatchRequest**](CreateSubmissionBatchRequest.md) | The submissions to create, and the settings they share. | |
|
|
626
|
+
| **wait** | **Boolean** | Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts. | [optional] |
|
|
686
627
|
|
|
687
628
|
### Return type
|
|
688
629
|
|
|
689
|
-
[**
|
|
630
|
+
[**SubmissionBatch**](SubmissionBatch.md)
|
|
690
631
|
|
|
691
632
|
### Authorization
|
|
692
633
|
|
|
@@ -698,13 +639,13 @@ end
|
|
|
698
639
|
- **Accept**: application/json
|
|
699
640
|
|
|
700
641
|
|
|
701
|
-
##
|
|
642
|
+
## create_template
|
|
702
643
|
|
|
703
|
-
> <
|
|
644
|
+
> <Template> create_template(body, opts)
|
|
704
645
|
|
|
705
|
-
Create a
|
|
646
|
+
Create a template
|
|
706
647
|
|
|
707
|
-
Creates a
|
|
648
|
+
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`.
|
|
708
649
|
|
|
709
650
|
### Examples
|
|
710
651
|
|
|
@@ -719,38 +660,35 @@ DocSpring.configure do |config|
|
|
|
719
660
|
end
|
|
720
661
|
|
|
721
662
|
api_instance = DocSpring::Client.new
|
|
722
|
-
|
|
723
|
-
template_name = 'template_name_example' # String |
|
|
663
|
+
body = DocSpring::CreateTemplateRequest.new({template_type: DocSpring::TemplateType::PDF}) # CreateTemplateRequest | The template to create.
|
|
724
664
|
opts = {
|
|
725
|
-
wait: true
|
|
726
|
-
template_description: 'template_description_example', # String |
|
|
727
|
-
template_parent_folder_id: 'template_parent_folder_id_example' # String |
|
|
665
|
+
wait: true # Boolean | Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
728
666
|
}
|
|
729
667
|
|
|
730
668
|
begin
|
|
731
|
-
# Create a
|
|
732
|
-
result = api_instance.
|
|
669
|
+
# Create a template
|
|
670
|
+
result = api_instance.create_template(body, opts)
|
|
733
671
|
p result
|
|
734
672
|
rescue DocSpring::ApiError => e
|
|
735
|
-
puts "Error when calling Client->
|
|
673
|
+
puts "Error when calling Client->create_template: #{e}"
|
|
736
674
|
end
|
|
737
675
|
```
|
|
738
676
|
|
|
739
|
-
#### Using the
|
|
677
|
+
#### Using the create_template_with_http_info variant
|
|
740
678
|
|
|
741
679
|
This returns an Array which contains the response data, status code and headers.
|
|
742
680
|
|
|
743
|
-
> <Array(<
|
|
681
|
+
> <Array(<Template>, Integer, Hash)> create_template_with_http_info(body, opts)
|
|
744
682
|
|
|
745
683
|
```ruby
|
|
746
684
|
begin
|
|
747
|
-
# Create a
|
|
748
|
-
data, status_code, headers = api_instance.
|
|
685
|
+
# Create a template
|
|
686
|
+
data, status_code, headers = api_instance.create_template_with_http_info(body, opts)
|
|
749
687
|
p status_code # => 2xx
|
|
750
688
|
p headers # => { ... }
|
|
751
|
-
p data # => <
|
|
689
|
+
p data # => <Template>
|
|
752
690
|
rescue DocSpring::ApiError => e
|
|
753
|
-
puts "Error when calling Client->
|
|
691
|
+
puts "Error when calling Client->create_template_with_http_info: #{e}"
|
|
754
692
|
end
|
|
755
693
|
```
|
|
756
694
|
|
|
@@ -758,15 +696,12 @@ end
|
|
|
758
696
|
|
|
759
697
|
| Name | Type | Description | Notes |
|
|
760
698
|
| ---- | ---- | ----------- | ----- |
|
|
761
|
-
| **
|
|
762
|
-
| **
|
|
763
|
-
| **wait** | **Boolean** | Wait for template document to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) | [optional][default to true] |
|
|
764
|
-
| **template_description** | **String** | | [optional] |
|
|
765
|
-
| **template_parent_folder_id** | **String** | | [optional] |
|
|
699
|
+
| **body** | [**CreateTemplateRequest**](CreateTemplateRequest.md) | The template to create. | |
|
|
700
|
+
| **wait** | **Boolean** | Wait until the PDF has been processed before responding. Default true on sync.api hosts. | [optional] |
|
|
766
701
|
|
|
767
702
|
### Return type
|
|
768
703
|
|
|
769
|
-
[**
|
|
704
|
+
[**Template**](Template.md)
|
|
770
705
|
|
|
771
706
|
### Authorization
|
|
772
707
|
|
|
@@ -774,17 +709,17 @@ end
|
|
|
774
709
|
|
|
775
710
|
### HTTP request headers
|
|
776
711
|
|
|
777
|
-
- **Content-Type**:
|
|
712
|
+
- **Content-Type**: application/json
|
|
778
713
|
- **Accept**: application/json
|
|
779
714
|
|
|
780
715
|
|
|
781
|
-
##
|
|
716
|
+
## create_webhook
|
|
782
717
|
|
|
783
|
-
> <
|
|
718
|
+
> <Webhook> create_webhook(body)
|
|
784
719
|
|
|
785
|
-
Create a
|
|
720
|
+
Create a webhook
|
|
786
721
|
|
|
787
|
-
Creates a
|
|
722
|
+
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.
|
|
788
723
|
|
|
789
724
|
### Examples
|
|
790
725
|
|
|
@@ -799,32 +734,32 @@ DocSpring.configure do |config|
|
|
|
799
734
|
end
|
|
800
735
|
|
|
801
736
|
api_instance = DocSpring::Client.new
|
|
802
|
-
|
|
737
|
+
body = DocSpring::CreateWebhookRequest.new({url: 'url_example', event_types: [DocSpring::WebhookEventType::SUBMISSION_PROCESSED]}) # CreateWebhookRequest | The webhook to create.
|
|
803
738
|
|
|
804
739
|
begin
|
|
805
|
-
# Create a
|
|
806
|
-
result = api_instance.
|
|
740
|
+
# Create a webhook
|
|
741
|
+
result = api_instance.create_webhook(body)
|
|
807
742
|
p result
|
|
808
743
|
rescue DocSpring::ApiError => e
|
|
809
|
-
puts "Error when calling Client->
|
|
744
|
+
puts "Error when calling Client->create_webhook: #{e}"
|
|
810
745
|
end
|
|
811
746
|
```
|
|
812
747
|
|
|
813
|
-
#### Using the
|
|
748
|
+
#### Using the create_webhook_with_http_info variant
|
|
814
749
|
|
|
815
750
|
This returns an Array which contains the response data, status code and headers.
|
|
816
751
|
|
|
817
|
-
> <Array(<
|
|
752
|
+
> <Array(<Webhook>, Integer, Hash)> create_webhook_with_http_info(body)
|
|
818
753
|
|
|
819
754
|
```ruby
|
|
820
755
|
begin
|
|
821
|
-
# Create a
|
|
822
|
-
data, status_code, headers = api_instance.
|
|
756
|
+
# Create a webhook
|
|
757
|
+
data, status_code, headers = api_instance.create_webhook_with_http_info(body)
|
|
823
758
|
p status_code # => 2xx
|
|
824
759
|
p headers # => { ... }
|
|
825
|
-
p data # => <
|
|
760
|
+
p data # => <Webhook>
|
|
826
761
|
rescue DocSpring::ApiError => e
|
|
827
|
-
puts "Error when calling Client->
|
|
762
|
+
puts "Error when calling Client->create_webhook_with_http_info: #{e}"
|
|
828
763
|
end
|
|
829
764
|
```
|
|
830
765
|
|
|
@@ -832,11 +767,11 @@ end
|
|
|
832
767
|
|
|
833
768
|
| Name | Type | Description | Notes |
|
|
834
769
|
| ---- | ---- | ----------- | ----- |
|
|
835
|
-
| **
|
|
770
|
+
| **body** | [**CreateWebhookRequest**](CreateWebhookRequest.md) | The webhook to create. | |
|
|
836
771
|
|
|
837
772
|
### Return type
|
|
838
773
|
|
|
839
|
-
[**
|
|
774
|
+
[**Webhook**](Webhook.md)
|
|
840
775
|
|
|
841
776
|
### Authorization
|
|
842
777
|
|
|
@@ -848,13 +783,13 @@ end
|
|
|
848
783
|
- **Accept**: application/json
|
|
849
784
|
|
|
850
785
|
|
|
851
|
-
##
|
|
786
|
+
## delete_custom_file
|
|
852
787
|
|
|
853
|
-
> <
|
|
788
|
+
> <CustomFile> delete_custom_file(custom_file_id)
|
|
854
789
|
|
|
855
|
-
|
|
790
|
+
Delete a custom file
|
|
856
791
|
|
|
857
|
-
|
|
792
|
+
Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
858
793
|
|
|
859
794
|
### Examples
|
|
860
795
|
|
|
@@ -869,32 +804,32 @@ DocSpring.configure do |config|
|
|
|
869
804
|
end
|
|
870
805
|
|
|
871
806
|
api_instance = DocSpring::Client.new
|
|
872
|
-
|
|
807
|
+
custom_file_id = 'custom_file_id_example' # String | The custom file's ID.
|
|
873
808
|
|
|
874
809
|
begin
|
|
875
|
-
#
|
|
876
|
-
result = api_instance.
|
|
810
|
+
# Delete a custom file
|
|
811
|
+
result = api_instance.delete_custom_file(custom_file_id)
|
|
877
812
|
p result
|
|
878
813
|
rescue DocSpring::ApiError => e
|
|
879
|
-
puts "Error when calling Client->
|
|
814
|
+
puts "Error when calling Client->delete_custom_file: #{e}"
|
|
880
815
|
end
|
|
881
816
|
```
|
|
882
817
|
|
|
883
|
-
#### Using the
|
|
818
|
+
#### Using the delete_custom_file_with_http_info variant
|
|
884
819
|
|
|
885
820
|
This returns an Array which contains the response data, status code and headers.
|
|
886
821
|
|
|
887
|
-
> <Array(<
|
|
822
|
+
> <Array(<CustomFile>, Integer, Hash)> delete_custom_file_with_http_info(custom_file_id)
|
|
888
823
|
|
|
889
824
|
```ruby
|
|
890
825
|
begin
|
|
891
|
-
#
|
|
892
|
-
data, status_code, headers = api_instance.
|
|
826
|
+
# Delete a custom file
|
|
827
|
+
data, status_code, headers = api_instance.delete_custom_file_with_http_info(custom_file_id)
|
|
893
828
|
p status_code # => 2xx
|
|
894
829
|
p headers # => { ... }
|
|
895
|
-
p data # => <
|
|
830
|
+
p data # => <CustomFile>
|
|
896
831
|
rescue DocSpring::ApiError => e
|
|
897
|
-
puts "Error when calling Client->
|
|
832
|
+
puts "Error when calling Client->delete_custom_file_with_http_info: #{e}"
|
|
898
833
|
end
|
|
899
834
|
```
|
|
900
835
|
|
|
@@ -902,11 +837,11 @@ end
|
|
|
902
837
|
|
|
903
838
|
| Name | Type | Description | Notes |
|
|
904
839
|
| ---- | ---- | ----------- | ----- |
|
|
905
|
-
| **
|
|
840
|
+
| **custom_file_id** | **String** | The custom file's ID. | |
|
|
906
841
|
|
|
907
842
|
### Return type
|
|
908
843
|
|
|
909
|
-
[**
|
|
844
|
+
[**CustomFile**](CustomFile.md)
|
|
910
845
|
|
|
911
846
|
### Authorization
|
|
912
847
|
|
|
@@ -914,7 +849,7 @@ end
|
|
|
914
849
|
|
|
915
850
|
### HTTP request headers
|
|
916
851
|
|
|
917
|
-
- **Content-Type**:
|
|
852
|
+
- **Content-Type**: Not defined
|
|
918
853
|
- **Accept**: application/json
|
|
919
854
|
|
|
920
855
|
|
|
@@ -924,7 +859,7 @@ end
|
|
|
924
859
|
|
|
925
860
|
Delete a folder
|
|
926
861
|
|
|
927
|
-
Deletes an empty folder.
|
|
862
|
+
Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
928
863
|
|
|
929
864
|
### Examples
|
|
930
865
|
|
|
@@ -939,7 +874,7 @@ DocSpring.configure do |config|
|
|
|
939
874
|
end
|
|
940
875
|
|
|
941
876
|
api_instance = DocSpring::Client.new
|
|
942
|
-
folder_id = '
|
|
877
|
+
folder_id = 'folder_id_example' # String | The folder's ID.
|
|
943
878
|
|
|
944
879
|
begin
|
|
945
880
|
# Delete a folder
|
|
@@ -972,7 +907,7 @@ end
|
|
|
972
907
|
|
|
973
908
|
| Name | Type | Description | Notes |
|
|
974
909
|
| ---- | ---- | ----------- | ----- |
|
|
975
|
-
| **folder_id** | **String** |
|
|
910
|
+
| **folder_id** | **String** | The folder's ID. | |
|
|
976
911
|
|
|
977
912
|
### Return type
|
|
978
913
|
|
|
@@ -990,11 +925,11 @@ end
|
|
|
990
925
|
|
|
991
926
|
## delete_template
|
|
992
927
|
|
|
993
|
-
> <
|
|
928
|
+
> <Template> delete_template(template_id, opts)
|
|
994
929
|
|
|
995
930
|
Delete a template
|
|
996
931
|
|
|
997
|
-
Deletes a template
|
|
932
|
+
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.
|
|
998
933
|
|
|
999
934
|
### Examples
|
|
1000
935
|
|
|
@@ -1009,9 +944,9 @@ DocSpring.configure do |config|
|
|
|
1009
944
|
end
|
|
1010
945
|
|
|
1011
946
|
api_instance = DocSpring::Client.new
|
|
1012
|
-
template_id = '
|
|
947
|
+
template_id = 'tpl_1234567890abcdef02' # String | The template's ID.
|
|
1013
948
|
opts = {
|
|
1014
|
-
version: '
|
|
949
|
+
version: 'version_example' # String | 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.
|
|
1015
950
|
}
|
|
1016
951
|
|
|
1017
952
|
begin
|
|
@@ -1027,7 +962,7 @@ end
|
|
|
1027
962
|
|
|
1028
963
|
This returns an Array which contains the response data, status code and headers.
|
|
1029
964
|
|
|
1030
|
-
> <Array(<
|
|
965
|
+
> <Array(<Template>, Integer, Hash)> delete_template_with_http_info(template_id, opts)
|
|
1031
966
|
|
|
1032
967
|
```ruby
|
|
1033
968
|
begin
|
|
@@ -1035,7 +970,7 @@ begin
|
|
|
1035
970
|
data, status_code, headers = api_instance.delete_template_with_http_info(template_id, opts)
|
|
1036
971
|
p status_code # => 2xx
|
|
1037
972
|
p headers # => { ... }
|
|
1038
|
-
p data # => <
|
|
973
|
+
p data # => <Template>
|
|
1039
974
|
rescue DocSpring::ApiError => e
|
|
1040
975
|
puts "Error when calling Client->delete_template_with_http_info: #{e}"
|
|
1041
976
|
end
|
|
@@ -1045,12 +980,12 @@ end
|
|
|
1045
980
|
|
|
1046
981
|
| Name | Type | Description | Notes |
|
|
1047
982
|
| ---- | ---- | ----------- | ----- |
|
|
1048
|
-
| **template_id** | **String** |
|
|
1049
|
-
| **version** | **String** |
|
|
983
|
+
| **template_id** | **String** | The template's ID. | |
|
|
984
|
+
| **version** | **String** | 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. | [optional] |
|
|
1050
985
|
|
|
1051
986
|
### Return type
|
|
1052
987
|
|
|
1053
|
-
[**
|
|
988
|
+
[**Template**](Template.md)
|
|
1054
989
|
|
|
1055
990
|
### Authorization
|
|
1056
991
|
|
|
@@ -1068,7 +1003,7 @@ end
|
|
|
1068
1003
|
|
|
1069
1004
|
Delete a webhook
|
|
1070
1005
|
|
|
1071
|
-
|
|
1006
|
+
Deletes a webhook so it stops receiving events, and returns it.
|
|
1072
1007
|
|
|
1073
1008
|
### Examples
|
|
1074
1009
|
|
|
@@ -1083,7 +1018,7 @@ DocSpring.configure do |config|
|
|
|
1083
1018
|
end
|
|
1084
1019
|
|
|
1085
1020
|
api_instance = DocSpring::Client.new
|
|
1086
|
-
webhook_id = '
|
|
1021
|
+
webhook_id = 'webhook_id_example' # String | The webhook's ID.
|
|
1087
1022
|
|
|
1088
1023
|
begin
|
|
1089
1024
|
# Delete a webhook
|
|
@@ -1116,7 +1051,7 @@ end
|
|
|
1116
1051
|
|
|
1117
1052
|
| Name | Type | Description | Notes |
|
|
1118
1053
|
| ---- | ---- | ----------- | ----- |
|
|
1119
|
-
| **webhook_id** | **String** |
|
|
1054
|
+
| **webhook_id** | **String** | The webhook's ID. | |
|
|
1120
1055
|
|
|
1121
1056
|
### Return type
|
|
1122
1057
|
|
|
@@ -1132,13 +1067,13 @@ end
|
|
|
1132
1067
|
- **Accept**: application/json
|
|
1133
1068
|
|
|
1134
1069
|
|
|
1135
|
-
##
|
|
1070
|
+
## expire_combined_pdf
|
|
1136
1071
|
|
|
1137
|
-
> <
|
|
1072
|
+
> <CombinedPdf> expire_combined_pdf(combined_pdf_id)
|
|
1138
1073
|
|
|
1139
|
-
Expire a combined
|
|
1074
|
+
Expire a combined PDF
|
|
1140
1075
|
|
|
1141
|
-
|
|
1076
|
+
Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
1142
1077
|
|
|
1143
1078
|
### Examples
|
|
1144
1079
|
|
|
@@ -1153,32 +1088,32 @@ DocSpring.configure do |config|
|
|
|
1153
1088
|
end
|
|
1154
1089
|
|
|
1155
1090
|
api_instance = DocSpring::Client.new
|
|
1156
|
-
|
|
1091
|
+
combined_pdf_id = 'com_1234567890abcdef05' # String | The combined PDF's ID.
|
|
1157
1092
|
|
|
1158
1093
|
begin
|
|
1159
|
-
# Expire a combined
|
|
1160
|
-
result = api_instance.
|
|
1094
|
+
# Expire a combined PDF
|
|
1095
|
+
result = api_instance.expire_combined_pdf(combined_pdf_id)
|
|
1161
1096
|
p result
|
|
1162
1097
|
rescue DocSpring::ApiError => e
|
|
1163
|
-
puts "Error when calling Client->
|
|
1098
|
+
puts "Error when calling Client->expire_combined_pdf: #{e}"
|
|
1164
1099
|
end
|
|
1165
1100
|
```
|
|
1166
1101
|
|
|
1167
|
-
#### Using the
|
|
1102
|
+
#### Using the expire_combined_pdf_with_http_info variant
|
|
1168
1103
|
|
|
1169
1104
|
This returns an Array which contains the response data, status code and headers.
|
|
1170
1105
|
|
|
1171
|
-
> <Array(<
|
|
1106
|
+
> <Array(<CombinedPdf>, Integer, Hash)> expire_combined_pdf_with_http_info(combined_pdf_id)
|
|
1172
1107
|
|
|
1173
1108
|
```ruby
|
|
1174
1109
|
begin
|
|
1175
|
-
# Expire a combined
|
|
1176
|
-
data, status_code, headers = api_instance.
|
|
1110
|
+
# Expire a combined PDF
|
|
1111
|
+
data, status_code, headers = api_instance.expire_combined_pdf_with_http_info(combined_pdf_id)
|
|
1177
1112
|
p status_code # => 2xx
|
|
1178
1113
|
p headers # => { ... }
|
|
1179
|
-
p data # => <
|
|
1114
|
+
p data # => <CombinedPdf>
|
|
1180
1115
|
rescue DocSpring::ApiError => e
|
|
1181
|
-
puts "Error when calling Client->
|
|
1116
|
+
puts "Error when calling Client->expire_combined_pdf_with_http_info: #{e}"
|
|
1182
1117
|
end
|
|
1183
1118
|
```
|
|
1184
1119
|
|
|
@@ -1186,11 +1121,11 @@ end
|
|
|
1186
1121
|
|
|
1187
1122
|
| Name | Type | Description | Notes |
|
|
1188
1123
|
| ---- | ---- | ----------- | ----- |
|
|
1189
|
-
| **
|
|
1124
|
+
| **combined_pdf_id** | **String** | The combined PDF's ID. | |
|
|
1190
1125
|
|
|
1191
1126
|
### Return type
|
|
1192
1127
|
|
|
1193
|
-
[**
|
|
1128
|
+
[**CombinedPdf**](CombinedPdf.md)
|
|
1194
1129
|
|
|
1195
1130
|
### Authorization
|
|
1196
1131
|
|
|
@@ -1204,11 +1139,11 @@ end
|
|
|
1204
1139
|
|
|
1205
1140
|
## expire_submission
|
|
1206
1141
|
|
|
1207
|
-
> <
|
|
1142
|
+
> <Submission> expire_submission(submission_id)
|
|
1208
1143
|
|
|
1209
|
-
Expire a
|
|
1144
|
+
Expire a submission
|
|
1210
1145
|
|
|
1211
|
-
|
|
1146
|
+
Deletes a submission's data and PDF now, and returns the expired submission.
|
|
1212
1147
|
|
|
1213
1148
|
### Examples
|
|
1214
1149
|
|
|
@@ -1223,10 +1158,10 @@ DocSpring.configure do |config|
|
|
|
1223
1158
|
end
|
|
1224
1159
|
|
|
1225
1160
|
api_instance = DocSpring::Client.new
|
|
1226
|
-
submission_id = 'sub_1234567890abcdef01' # String |
|
|
1161
|
+
submission_id = 'sub_1234567890abcdef01' # String | The submission's ID.
|
|
1227
1162
|
|
|
1228
1163
|
begin
|
|
1229
|
-
# Expire a
|
|
1164
|
+
# Expire a submission
|
|
1230
1165
|
result = api_instance.expire_submission(submission_id)
|
|
1231
1166
|
p result
|
|
1232
1167
|
rescue DocSpring::ApiError => e
|
|
@@ -1238,15 +1173,15 @@ end
|
|
|
1238
1173
|
|
|
1239
1174
|
This returns an Array which contains the response data, status code and headers.
|
|
1240
1175
|
|
|
1241
|
-
> <Array(<
|
|
1176
|
+
> <Array(<Submission>, Integer, Hash)> expire_submission_with_http_info(submission_id)
|
|
1242
1177
|
|
|
1243
1178
|
```ruby
|
|
1244
1179
|
begin
|
|
1245
|
-
# Expire a
|
|
1180
|
+
# Expire a submission
|
|
1246
1181
|
data, status_code, headers = api_instance.expire_submission_with_http_info(submission_id)
|
|
1247
1182
|
p status_code # => 2xx
|
|
1248
1183
|
p headers # => { ... }
|
|
1249
|
-
p data # => <
|
|
1184
|
+
p data # => <Submission>
|
|
1250
1185
|
rescue DocSpring::ApiError => e
|
|
1251
1186
|
puts "Error when calling Client->expire_submission_with_http_info: #{e}"
|
|
1252
1187
|
end
|
|
@@ -1256,11 +1191,11 @@ end
|
|
|
1256
1191
|
|
|
1257
1192
|
| Name | Type | Description | Notes |
|
|
1258
1193
|
| ---- | ---- | ----------- | ----- |
|
|
1259
|
-
| **submission_id** | **String** |
|
|
1194
|
+
| **submission_id** | **String** | The submission's ID. | |
|
|
1260
1195
|
|
|
1261
1196
|
### Return type
|
|
1262
1197
|
|
|
1263
|
-
[**
|
|
1198
|
+
[**Submission**](Submission.md)
|
|
1264
1199
|
|
|
1265
1200
|
### Authorization
|
|
1266
1201
|
|
|
@@ -1272,13 +1207,13 @@ end
|
|
|
1272
1207
|
- **Accept**: application/json
|
|
1273
1208
|
|
|
1274
1209
|
|
|
1275
|
-
##
|
|
1210
|
+
## generate_submission_preview
|
|
1276
1211
|
|
|
1277
|
-
> <
|
|
1212
|
+
> <Submission> generate_submission_preview(submission_id)
|
|
1278
1213
|
|
|
1279
|
-
Generate a PDF
|
|
1214
|
+
Generate a preview PDF
|
|
1280
1215
|
|
|
1281
|
-
|
|
1216
|
+
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.
|
|
1282
1217
|
|
|
1283
1218
|
### Examples
|
|
1284
1219
|
|
|
@@ -1293,36 +1228,32 @@ DocSpring.configure do |config|
|
|
|
1293
1228
|
end
|
|
1294
1229
|
|
|
1295
1230
|
api_instance = DocSpring::Client.new
|
|
1296
|
-
|
|
1297
|
-
submission = DocSpring::CreatePdfSubmissionData.new({data: 3.56}) # CreatePdfSubmissionData |
|
|
1298
|
-
opts = {
|
|
1299
|
-
wait: true # Boolean | Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
|
|
1300
|
-
}
|
|
1231
|
+
submission_id = 'sub_1234567890abcdef03' # String | The submission's ID.
|
|
1301
1232
|
|
|
1302
1233
|
begin
|
|
1303
|
-
# Generate a PDF
|
|
1304
|
-
result = api_instance.
|
|
1234
|
+
# Generate a preview PDF
|
|
1235
|
+
result = api_instance.generate_submission_preview(submission_id)
|
|
1305
1236
|
p result
|
|
1306
1237
|
rescue DocSpring::ApiError => e
|
|
1307
|
-
puts "Error when calling Client->
|
|
1238
|
+
puts "Error when calling Client->generate_submission_preview: #{e}"
|
|
1308
1239
|
end
|
|
1309
1240
|
```
|
|
1310
1241
|
|
|
1311
|
-
#### Using the
|
|
1242
|
+
#### Using the generate_submission_preview_with_http_info variant
|
|
1312
1243
|
|
|
1313
1244
|
This returns an Array which contains the response data, status code and headers.
|
|
1314
1245
|
|
|
1315
|
-
> <Array(<
|
|
1246
|
+
> <Array(<Submission>, Integer, Hash)> generate_submission_preview_with_http_info(submission_id)
|
|
1316
1247
|
|
|
1317
1248
|
```ruby
|
|
1318
1249
|
begin
|
|
1319
|
-
# Generate a PDF
|
|
1320
|
-
data, status_code, headers = api_instance.
|
|
1250
|
+
# Generate a preview PDF
|
|
1251
|
+
data, status_code, headers = api_instance.generate_submission_preview_with_http_info(submission_id)
|
|
1321
1252
|
p status_code # => 2xx
|
|
1322
1253
|
p headers # => { ... }
|
|
1323
|
-
p data # => <
|
|
1254
|
+
p data # => <Submission>
|
|
1324
1255
|
rescue DocSpring::ApiError => e
|
|
1325
|
-
puts "Error when calling Client->
|
|
1256
|
+
puts "Error when calling Client->generate_submission_preview_with_http_info: #{e}"
|
|
1326
1257
|
end
|
|
1327
1258
|
```
|
|
1328
1259
|
|
|
@@ -1330,13 +1261,11 @@ end
|
|
|
1330
1261
|
|
|
1331
1262
|
| Name | Type | Description | Notes |
|
|
1332
1263
|
| ---- | ---- | ----------- | ----- |
|
|
1333
|
-
| **
|
|
1334
|
-
| **submission** | [**CreatePdfSubmissionData**](CreatePdfSubmissionData.md) | | |
|
|
1335
|
-
| **wait** | **Boolean** | Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain) | [optional][default to true] |
|
|
1264
|
+
| **submission_id** | **String** | The submission's ID. | |
|
|
1336
1265
|
|
|
1337
1266
|
### Return type
|
|
1338
1267
|
|
|
1339
|
-
[**
|
|
1268
|
+
[**Submission**](Submission.md)
|
|
1340
1269
|
|
|
1341
1270
|
### Authorization
|
|
1342
1271
|
|
|
@@ -1344,17 +1273,17 @@ end
|
|
|
1344
1273
|
|
|
1345
1274
|
### HTTP request headers
|
|
1346
1275
|
|
|
1347
|
-
- **Content-Type**:
|
|
1276
|
+
- **Content-Type**: Not defined
|
|
1348
1277
|
- **Accept**: application/json
|
|
1349
1278
|
|
|
1350
1279
|
|
|
1351
|
-
##
|
|
1280
|
+
## get_combined_pdf
|
|
1352
1281
|
|
|
1353
|
-
> <
|
|
1282
|
+
> <CombinedPdf> get_combined_pdf(combined_pdf_id)
|
|
1354
1283
|
|
|
1355
|
-
|
|
1284
|
+
Get a combined PDF
|
|
1356
1285
|
|
|
1357
|
-
|
|
1286
|
+
Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
1358
1287
|
|
|
1359
1288
|
### Examples
|
|
1360
1289
|
|
|
@@ -1369,32 +1298,32 @@ DocSpring.configure do |config|
|
|
|
1369
1298
|
end
|
|
1370
1299
|
|
|
1371
1300
|
api_instance = DocSpring::Client.new
|
|
1372
|
-
|
|
1301
|
+
combined_pdf_id = 'com_1234567890abcdef05' # String | The combined PDF's ID.
|
|
1373
1302
|
|
|
1374
1303
|
begin
|
|
1375
|
-
#
|
|
1376
|
-
result = api_instance.
|
|
1304
|
+
# Get a combined PDF
|
|
1305
|
+
result = api_instance.get_combined_pdf(combined_pdf_id)
|
|
1377
1306
|
p result
|
|
1378
1307
|
rescue DocSpring::ApiError => e
|
|
1379
|
-
puts "Error when calling Client->
|
|
1308
|
+
puts "Error when calling Client->get_combined_pdf: #{e}"
|
|
1380
1309
|
end
|
|
1381
1310
|
```
|
|
1382
1311
|
|
|
1383
|
-
#### Using the
|
|
1312
|
+
#### Using the get_combined_pdf_with_http_info variant
|
|
1384
1313
|
|
|
1385
1314
|
This returns an Array which contains the response data, status code and headers.
|
|
1386
1315
|
|
|
1387
|
-
> <Array(<
|
|
1316
|
+
> <Array(<CombinedPdf>, Integer, Hash)> get_combined_pdf_with_http_info(combined_pdf_id)
|
|
1388
1317
|
|
|
1389
1318
|
```ruby
|
|
1390
1319
|
begin
|
|
1391
|
-
#
|
|
1392
|
-
data, status_code, headers = api_instance.
|
|
1320
|
+
# Get a combined PDF
|
|
1321
|
+
data, status_code, headers = api_instance.get_combined_pdf_with_http_info(combined_pdf_id)
|
|
1393
1322
|
p status_code # => 2xx
|
|
1394
1323
|
p headers # => { ... }
|
|
1395
|
-
p data # => <
|
|
1324
|
+
p data # => <CombinedPdf>
|
|
1396
1325
|
rescue DocSpring::ApiError => e
|
|
1397
|
-
puts "Error when calling Client->
|
|
1326
|
+
puts "Error when calling Client->get_combined_pdf_with_http_info: #{e}"
|
|
1398
1327
|
end
|
|
1399
1328
|
```
|
|
1400
1329
|
|
|
@@ -1402,11 +1331,11 @@ end
|
|
|
1402
1331
|
|
|
1403
1332
|
| Name | Type | Description | Notes |
|
|
1404
1333
|
| ---- | ---- | ----------- | ----- |
|
|
1405
|
-
| **
|
|
1334
|
+
| **combined_pdf_id** | **String** | The combined PDF's ID. | |
|
|
1406
1335
|
|
|
1407
1336
|
### Return type
|
|
1408
1337
|
|
|
1409
|
-
[**
|
|
1338
|
+
[**CombinedPdf**](CombinedPdf.md)
|
|
1410
1339
|
|
|
1411
1340
|
### Authorization
|
|
1412
1341
|
|
|
@@ -1418,13 +1347,13 @@ end
|
|
|
1418
1347
|
- **Accept**: application/json
|
|
1419
1348
|
|
|
1420
1349
|
|
|
1421
|
-
##
|
|
1350
|
+
## get_custom_file
|
|
1422
1351
|
|
|
1423
|
-
> <
|
|
1352
|
+
> <CustomFile> get_custom_file(custom_file_id)
|
|
1424
1353
|
|
|
1425
|
-
|
|
1354
|
+
Get a custom file
|
|
1426
1355
|
|
|
1427
|
-
|
|
1356
|
+
Returns a custom file, with a temporary URL to download it.
|
|
1428
1357
|
|
|
1429
1358
|
### Examples
|
|
1430
1359
|
|
|
@@ -1439,32 +1368,32 @@ DocSpring.configure do |config|
|
|
|
1439
1368
|
end
|
|
1440
1369
|
|
|
1441
1370
|
api_instance = DocSpring::Client.new
|
|
1442
|
-
|
|
1371
|
+
custom_file_id = 'custom_file_id_example' # String | The custom file's ID.
|
|
1443
1372
|
|
|
1444
1373
|
begin
|
|
1445
|
-
#
|
|
1446
|
-
result = api_instance.
|
|
1374
|
+
# Get a custom file
|
|
1375
|
+
result = api_instance.get_custom_file(custom_file_id)
|
|
1447
1376
|
p result
|
|
1448
1377
|
rescue DocSpring::ApiError => e
|
|
1449
|
-
puts "Error when calling Client->
|
|
1378
|
+
puts "Error when calling Client->get_custom_file: #{e}"
|
|
1450
1379
|
end
|
|
1451
1380
|
```
|
|
1452
1381
|
|
|
1453
|
-
#### Using the
|
|
1382
|
+
#### Using the get_custom_file_with_http_info variant
|
|
1454
1383
|
|
|
1455
1384
|
This returns an Array which contains the response data, status code and headers.
|
|
1456
1385
|
|
|
1457
|
-
> <Array(<
|
|
1386
|
+
> <Array(<CustomFile>, Integer, Hash)> get_custom_file_with_http_info(custom_file_id)
|
|
1458
1387
|
|
|
1459
1388
|
```ruby
|
|
1460
1389
|
begin
|
|
1461
|
-
#
|
|
1462
|
-
data, status_code, headers = api_instance.
|
|
1390
|
+
# Get a custom file
|
|
1391
|
+
data, status_code, headers = api_instance.get_custom_file_with_http_info(custom_file_id)
|
|
1463
1392
|
p status_code # => 2xx
|
|
1464
1393
|
p headers # => { ... }
|
|
1465
|
-
p data # => <
|
|
1394
|
+
p data # => <CustomFile>
|
|
1466
1395
|
rescue DocSpring::ApiError => e
|
|
1467
|
-
puts "Error when calling Client->
|
|
1396
|
+
puts "Error when calling Client->get_custom_file_with_http_info: #{e}"
|
|
1468
1397
|
end
|
|
1469
1398
|
```
|
|
1470
1399
|
|
|
@@ -1472,11 +1401,11 @@ end
|
|
|
1472
1401
|
|
|
1473
1402
|
| Name | Type | Description | Notes |
|
|
1474
1403
|
| ---- | ---- | ----------- | ----- |
|
|
1475
|
-
| **
|
|
1404
|
+
| **custom_file_id** | **String** | The custom file's ID. | |
|
|
1476
1405
|
|
|
1477
1406
|
### Return type
|
|
1478
1407
|
|
|
1479
|
-
[**
|
|
1408
|
+
[**CustomFile**](CustomFile.md)
|
|
1480
1409
|
|
|
1481
1410
|
### Authorization
|
|
1482
1411
|
|
|
@@ -1488,13 +1417,13 @@ end
|
|
|
1488
1417
|
- **Accept**: application/json
|
|
1489
1418
|
|
|
1490
1419
|
|
|
1491
|
-
##
|
|
1420
|
+
## get_folder
|
|
1492
1421
|
|
|
1493
|
-
> <
|
|
1422
|
+
> <Folder> get_folder(folder_id)
|
|
1494
1423
|
|
|
1495
|
-
|
|
1424
|
+
Get a folder
|
|
1496
1425
|
|
|
1497
|
-
|
|
1426
|
+
Returns a folder.
|
|
1498
1427
|
|
|
1499
1428
|
### Examples
|
|
1500
1429
|
|
|
@@ -1509,32 +1438,32 @@ DocSpring.configure do |config|
|
|
|
1509
1438
|
end
|
|
1510
1439
|
|
|
1511
1440
|
api_instance = DocSpring::Client.new
|
|
1512
|
-
|
|
1441
|
+
folder_id = 'folder_id_example' # String | The folder's ID.
|
|
1513
1442
|
|
|
1514
1443
|
begin
|
|
1515
|
-
#
|
|
1516
|
-
result = api_instance.
|
|
1444
|
+
# Get a folder
|
|
1445
|
+
result = api_instance.get_folder(folder_id)
|
|
1517
1446
|
p result
|
|
1518
1447
|
rescue DocSpring::ApiError => e
|
|
1519
|
-
puts "Error when calling Client->
|
|
1448
|
+
puts "Error when calling Client->get_folder: #{e}"
|
|
1520
1449
|
end
|
|
1521
1450
|
```
|
|
1522
1451
|
|
|
1523
|
-
#### Using the
|
|
1452
|
+
#### Using the get_folder_with_http_info variant
|
|
1524
1453
|
|
|
1525
1454
|
This returns an Array which contains the response data, status code and headers.
|
|
1526
1455
|
|
|
1527
|
-
> <Array(<
|
|
1456
|
+
> <Array(<Folder>, Integer, Hash)> get_folder_with_http_info(folder_id)
|
|
1528
1457
|
|
|
1529
1458
|
```ruby
|
|
1530
1459
|
begin
|
|
1531
|
-
#
|
|
1532
|
-
data, status_code, headers = api_instance.
|
|
1460
|
+
# Get a folder
|
|
1461
|
+
data, status_code, headers = api_instance.get_folder_with_http_info(folder_id)
|
|
1533
1462
|
p status_code # => 2xx
|
|
1534
1463
|
p headers # => { ... }
|
|
1535
|
-
p data # => <
|
|
1464
|
+
p data # => <Folder>
|
|
1536
1465
|
rescue DocSpring::ApiError => e
|
|
1537
|
-
puts "Error when calling Client->
|
|
1466
|
+
puts "Error when calling Client->get_folder_with_http_info: #{e}"
|
|
1538
1467
|
end
|
|
1539
1468
|
```
|
|
1540
1469
|
|
|
@@ -1542,11 +1471,11 @@ end
|
|
|
1542
1471
|
|
|
1543
1472
|
| Name | Type | Description | Notes |
|
|
1544
1473
|
| ---- | ---- | ----------- | ----- |
|
|
1545
|
-
| **
|
|
1474
|
+
| **folder_id** | **String** | The folder's ID. | |
|
|
1546
1475
|
|
|
1547
1476
|
### Return type
|
|
1548
1477
|
|
|
1549
|
-
[**
|
|
1478
|
+
[**Folder**](Folder.md)
|
|
1550
1479
|
|
|
1551
1480
|
### Authorization
|
|
1552
1481
|
|
|
@@ -1558,13 +1487,13 @@ end
|
|
|
1558
1487
|
- **Accept**: application/json
|
|
1559
1488
|
|
|
1560
1489
|
|
|
1561
|
-
##
|
|
1490
|
+
## get_presign_url
|
|
1562
1491
|
|
|
1563
|
-
> <
|
|
1492
|
+
> <UploadPresign> get_presign_url
|
|
1564
1493
|
|
|
1565
|
-
|
|
1494
|
+
Get a presigned URL to upload a file
|
|
1566
1495
|
|
|
1567
|
-
|
|
1496
|
+
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.
|
|
1568
1497
|
|
|
1569
1498
|
### Examples
|
|
1570
1499
|
|
|
@@ -1579,44 +1508,41 @@ DocSpring.configure do |config|
|
|
|
1579
1508
|
end
|
|
1580
1509
|
|
|
1581
1510
|
api_instance = DocSpring::Client.new
|
|
1582
|
-
template_id = 'tpl_1234567890abcdef01' # String |
|
|
1583
1511
|
|
|
1584
1512
|
begin
|
|
1585
|
-
#
|
|
1586
|
-
result = api_instance.
|
|
1513
|
+
# Get a presigned URL to upload a file
|
|
1514
|
+
result = api_instance.get_presign_url
|
|
1587
1515
|
p result
|
|
1588
1516
|
rescue DocSpring::ApiError => e
|
|
1589
|
-
puts "Error when calling Client->
|
|
1517
|
+
puts "Error when calling Client->get_presign_url: #{e}"
|
|
1590
1518
|
end
|
|
1591
1519
|
```
|
|
1592
1520
|
|
|
1593
|
-
#### Using the
|
|
1521
|
+
#### Using the get_presign_url_with_http_info variant
|
|
1594
1522
|
|
|
1595
1523
|
This returns an Array which contains the response data, status code and headers.
|
|
1596
1524
|
|
|
1597
|
-
> <Array(<
|
|
1525
|
+
> <Array(<UploadPresign>, Integer, Hash)> get_presign_url_with_http_info
|
|
1598
1526
|
|
|
1599
1527
|
```ruby
|
|
1600
1528
|
begin
|
|
1601
|
-
#
|
|
1602
|
-
data, status_code, headers = api_instance.
|
|
1529
|
+
# Get a presigned URL to upload a file
|
|
1530
|
+
data, status_code, headers = api_instance.get_presign_url_with_http_info
|
|
1603
1531
|
p status_code # => 2xx
|
|
1604
1532
|
p headers # => { ... }
|
|
1605
|
-
p data # => <
|
|
1533
|
+
p data # => <UploadPresign>
|
|
1606
1534
|
rescue DocSpring::ApiError => e
|
|
1607
|
-
puts "Error when calling Client->
|
|
1535
|
+
puts "Error when calling Client->get_presign_url_with_http_info: #{e}"
|
|
1608
1536
|
end
|
|
1609
1537
|
```
|
|
1610
1538
|
|
|
1611
1539
|
### Parameters
|
|
1612
1540
|
|
|
1613
|
-
|
|
1614
|
-
| ---- | ---- | ----------- | ----- |
|
|
1615
|
-
| **template_id** | **String** | | |
|
|
1541
|
+
This endpoint does not need any parameter.
|
|
1616
1542
|
|
|
1617
1543
|
### Return type
|
|
1618
1544
|
|
|
1619
|
-
[**
|
|
1545
|
+
[**UploadPresign**](UploadPresign.md)
|
|
1620
1546
|
|
|
1621
1547
|
### Authorization
|
|
1622
1548
|
|
|
@@ -1628,13 +1554,13 @@ end
|
|
|
1628
1554
|
- **Accept**: application/json
|
|
1629
1555
|
|
|
1630
1556
|
|
|
1631
|
-
##
|
|
1557
|
+
## get_signature_request
|
|
1632
1558
|
|
|
1633
|
-
> <
|
|
1559
|
+
> <SignatureRequest> get_signature_request(signature_request_id)
|
|
1634
1560
|
|
|
1635
|
-
Get a
|
|
1561
|
+
Get a signature request
|
|
1636
1562
|
|
|
1637
|
-
Returns a
|
|
1563
|
+
Returns a signature request, with the values the person has entered so far.
|
|
1638
1564
|
|
|
1639
1565
|
### Examples
|
|
1640
1566
|
|
|
@@ -1649,41 +1575,44 @@ DocSpring.configure do |config|
|
|
|
1649
1575
|
end
|
|
1650
1576
|
|
|
1651
1577
|
api_instance = DocSpring::Client.new
|
|
1578
|
+
signature_request_id = 'srq_1234567890abcdef01' # String | The signature request's ID.
|
|
1652
1579
|
|
|
1653
1580
|
begin
|
|
1654
|
-
# Get a
|
|
1655
|
-
result = api_instance.
|
|
1581
|
+
# Get a signature request
|
|
1582
|
+
result = api_instance.get_signature_request(signature_request_id)
|
|
1656
1583
|
p result
|
|
1657
1584
|
rescue DocSpring::ApiError => e
|
|
1658
|
-
puts "Error when calling Client->
|
|
1585
|
+
puts "Error when calling Client->get_signature_request: #{e}"
|
|
1659
1586
|
end
|
|
1660
1587
|
```
|
|
1661
1588
|
|
|
1662
|
-
#### Using the
|
|
1589
|
+
#### Using the get_signature_request_with_http_info variant
|
|
1663
1590
|
|
|
1664
1591
|
This returns an Array which contains the response data, status code and headers.
|
|
1665
1592
|
|
|
1666
|
-
> <Array(<
|
|
1593
|
+
> <Array(<SignatureRequest>, Integer, Hash)> get_signature_request_with_http_info(signature_request_id)
|
|
1667
1594
|
|
|
1668
1595
|
```ruby
|
|
1669
1596
|
begin
|
|
1670
|
-
# Get a
|
|
1671
|
-
data, status_code, headers = api_instance.
|
|
1597
|
+
# Get a signature request
|
|
1598
|
+
data, status_code, headers = api_instance.get_signature_request_with_http_info(signature_request_id)
|
|
1672
1599
|
p status_code # => 2xx
|
|
1673
1600
|
p headers # => { ... }
|
|
1674
|
-
p data # => <
|
|
1601
|
+
p data # => <SignatureRequest>
|
|
1675
1602
|
rescue DocSpring::ApiError => e
|
|
1676
|
-
puts "Error when calling Client->
|
|
1603
|
+
puts "Error when calling Client->get_signature_request_with_http_info: #{e}"
|
|
1677
1604
|
end
|
|
1678
1605
|
```
|
|
1679
1606
|
|
|
1680
1607
|
### Parameters
|
|
1681
1608
|
|
|
1682
|
-
|
|
1609
|
+
| Name | Type | Description | Notes |
|
|
1610
|
+
| ---- | ---- | ----------- | ----- |
|
|
1611
|
+
| **signature_request_id** | **String** | The signature request's ID. | |
|
|
1683
1612
|
|
|
1684
1613
|
### Return type
|
|
1685
1614
|
|
|
1686
|
-
[**
|
|
1615
|
+
[**SignatureRequest**](SignatureRequest.md)
|
|
1687
1616
|
|
|
1688
1617
|
### Authorization
|
|
1689
1618
|
|
|
@@ -1697,11 +1626,11 @@ This endpoint does not need any parameter.
|
|
|
1697
1626
|
|
|
1698
1627
|
## get_submission
|
|
1699
1628
|
|
|
1700
|
-
> <Submission> get_submission(submission_id
|
|
1629
|
+
> <Submission> get_submission(submission_id)
|
|
1701
1630
|
|
|
1702
|
-
|
|
1631
|
+
Get a submission
|
|
1703
1632
|
|
|
1704
|
-
|
|
1633
|
+
Returns a submission, with its data and links to download its PDF.
|
|
1705
1634
|
|
|
1706
1635
|
### Examples
|
|
1707
1636
|
|
|
@@ -1716,14 +1645,11 @@ DocSpring.configure do |config|
|
|
|
1716
1645
|
end
|
|
1717
1646
|
|
|
1718
1647
|
api_instance = DocSpring::Client.new
|
|
1719
|
-
submission_id = 'sub_1234567890abcdef01' # String |
|
|
1720
|
-
opts = {
|
|
1721
|
-
include_data: true # Boolean |
|
|
1722
|
-
}
|
|
1648
|
+
submission_id = 'sub_1234567890abcdef01' # String | The submission's ID.
|
|
1723
1649
|
|
|
1724
1650
|
begin
|
|
1725
|
-
#
|
|
1726
|
-
result = api_instance.get_submission(submission_id
|
|
1651
|
+
# Get a submission
|
|
1652
|
+
result = api_instance.get_submission(submission_id)
|
|
1727
1653
|
p result
|
|
1728
1654
|
rescue DocSpring::ApiError => e
|
|
1729
1655
|
puts "Error when calling Client->get_submission: #{e}"
|
|
@@ -1734,12 +1660,12 @@ end
|
|
|
1734
1660
|
|
|
1735
1661
|
This returns an Array which contains the response data, status code and headers.
|
|
1736
1662
|
|
|
1737
|
-
> <Array(<Submission>, Integer, Hash)> get_submission_with_http_info(submission_id
|
|
1663
|
+
> <Array(<Submission>, Integer, Hash)> get_submission_with_http_info(submission_id)
|
|
1738
1664
|
|
|
1739
1665
|
```ruby
|
|
1740
1666
|
begin
|
|
1741
|
-
#
|
|
1742
|
-
data, status_code, headers = api_instance.get_submission_with_http_info(submission_id
|
|
1667
|
+
# Get a submission
|
|
1668
|
+
data, status_code, headers = api_instance.get_submission_with_http_info(submission_id)
|
|
1743
1669
|
p status_code # => 2xx
|
|
1744
1670
|
p headers # => { ... }
|
|
1745
1671
|
p data # => <Submission>
|
|
@@ -1752,8 +1678,7 @@ end
|
|
|
1752
1678
|
|
|
1753
1679
|
| Name | Type | Description | Notes |
|
|
1754
1680
|
| ---- | ---- | ----------- | ----- |
|
|
1755
|
-
| **submission_id** | **String** |
|
|
1756
|
-
| **include_data** | **Boolean** | | [optional] |
|
|
1681
|
+
| **submission_id** | **String** | The submission's ID. | |
|
|
1757
1682
|
|
|
1758
1683
|
### Return type
|
|
1759
1684
|
|
|
@@ -1771,11 +1696,11 @@ end
|
|
|
1771
1696
|
|
|
1772
1697
|
## get_submission_batch
|
|
1773
1698
|
|
|
1774
|
-
> <
|
|
1699
|
+
> <SubmissionBatch> get_submission_batch(submission_batch_id, opts)
|
|
1775
1700
|
|
|
1776
|
-
|
|
1701
|
+
Get a batch
|
|
1777
1702
|
|
|
1778
|
-
|
|
1703
|
+
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.
|
|
1779
1704
|
|
|
1780
1705
|
### Examples
|
|
1781
1706
|
|
|
@@ -1790,13 +1715,13 @@ DocSpring.configure do |config|
|
|
|
1790
1715
|
end
|
|
1791
1716
|
|
|
1792
1717
|
api_instance = DocSpring::Client.new
|
|
1793
|
-
submission_batch_id = '
|
|
1718
|
+
submission_batch_id = 'sbb_1234567890abcdef05' # String | The batch's ID.
|
|
1794
1719
|
opts = {
|
|
1795
|
-
|
|
1720
|
+
include_data: true # Boolean | Include each submission's `data` (null without it).
|
|
1796
1721
|
}
|
|
1797
1722
|
|
|
1798
1723
|
begin
|
|
1799
|
-
#
|
|
1724
|
+
# Get a batch
|
|
1800
1725
|
result = api_instance.get_submission_batch(submission_batch_id, opts)
|
|
1801
1726
|
p result
|
|
1802
1727
|
rescue DocSpring::ApiError => e
|
|
@@ -1808,15 +1733,15 @@ end
|
|
|
1808
1733
|
|
|
1809
1734
|
This returns an Array which contains the response data, status code and headers.
|
|
1810
1735
|
|
|
1811
|
-
> <Array(<
|
|
1736
|
+
> <Array(<SubmissionBatch>, Integer, Hash)> get_submission_batch_with_http_info(submission_batch_id, opts)
|
|
1812
1737
|
|
|
1813
1738
|
```ruby
|
|
1814
1739
|
begin
|
|
1815
|
-
#
|
|
1740
|
+
# Get a batch
|
|
1816
1741
|
data, status_code, headers = api_instance.get_submission_batch_with_http_info(submission_batch_id, opts)
|
|
1817
1742
|
p status_code # => 2xx
|
|
1818
1743
|
p headers # => { ... }
|
|
1819
|
-
p data # => <
|
|
1744
|
+
p data # => <SubmissionBatch>
|
|
1820
1745
|
rescue DocSpring::ApiError => e
|
|
1821
1746
|
puts "Error when calling Client->get_submission_batch_with_http_info: #{e}"
|
|
1822
1747
|
end
|
|
@@ -1826,12 +1751,12 @@ end
|
|
|
1826
1751
|
|
|
1827
1752
|
| Name | Type | Description | Notes |
|
|
1828
1753
|
| ---- | ---- | ----------- | ----- |
|
|
1829
|
-
| **submission_batch_id** | **String** |
|
|
1830
|
-
| **
|
|
1754
|
+
| **submission_batch_id** | **String** | The batch's ID. | |
|
|
1755
|
+
| **include_data** | **Boolean** | Include each submission's `data` (null without it). | [optional] |
|
|
1831
1756
|
|
|
1832
1757
|
### Return type
|
|
1833
1758
|
|
|
1834
|
-
[**
|
|
1759
|
+
[**SubmissionBatch**](SubmissionBatch.md)
|
|
1835
1760
|
|
|
1836
1761
|
### Authorization
|
|
1837
1762
|
|
|
@@ -1845,11 +1770,11 @@ end
|
|
|
1845
1770
|
|
|
1846
1771
|
## get_template
|
|
1847
1772
|
|
|
1848
|
-
> <
|
|
1773
|
+
> <Template> get_template(template_id, opts)
|
|
1849
1774
|
|
|
1850
|
-
|
|
1775
|
+
Get a template
|
|
1851
1776
|
|
|
1852
|
-
|
|
1777
|
+
Returns a template: its draft, or one of its published versions.
|
|
1853
1778
|
|
|
1854
1779
|
### Examples
|
|
1855
1780
|
|
|
@@ -1864,11 +1789,14 @@ DocSpring.configure do |config|
|
|
|
1864
1789
|
end
|
|
1865
1790
|
|
|
1866
1791
|
api_instance = DocSpring::Client.new
|
|
1867
|
-
template_id = 'tpl_1234567890abcdef01' # String |
|
|
1792
|
+
template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
|
|
1793
|
+
opts = {
|
|
1794
|
+
version: 'latest' # String | A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1795
|
+
}
|
|
1868
1796
|
|
|
1869
1797
|
begin
|
|
1870
|
-
#
|
|
1871
|
-
result = api_instance.get_template(template_id)
|
|
1798
|
+
# Get a template
|
|
1799
|
+
result = api_instance.get_template(template_id, opts)
|
|
1872
1800
|
p result
|
|
1873
1801
|
rescue DocSpring::ApiError => e
|
|
1874
1802
|
puts "Error when calling Client->get_template: #{e}"
|
|
@@ -1879,15 +1807,15 @@ end
|
|
|
1879
1807
|
|
|
1880
1808
|
This returns an Array which contains the response data, status code and headers.
|
|
1881
1809
|
|
|
1882
|
-
> <Array(<
|
|
1810
|
+
> <Array(<Template>, Integer, Hash)> get_template_with_http_info(template_id, opts)
|
|
1883
1811
|
|
|
1884
1812
|
```ruby
|
|
1885
1813
|
begin
|
|
1886
|
-
#
|
|
1887
|
-
data, status_code, headers = api_instance.get_template_with_http_info(template_id)
|
|
1814
|
+
# Get a template
|
|
1815
|
+
data, status_code, headers = api_instance.get_template_with_http_info(template_id, opts)
|
|
1888
1816
|
p status_code # => 2xx
|
|
1889
1817
|
p headers # => { ... }
|
|
1890
|
-
p data # => <
|
|
1818
|
+
p data # => <Template>
|
|
1891
1819
|
rescue DocSpring::ApiError => e
|
|
1892
1820
|
puts "Error when calling Client->get_template_with_http_info: #{e}"
|
|
1893
1821
|
end
|
|
@@ -1897,11 +1825,12 @@ end
|
|
|
1897
1825
|
|
|
1898
1826
|
| Name | Type | Description | Notes |
|
|
1899
1827
|
| ---- | ---- | ----------- | ----- |
|
|
1900
|
-
| **template_id** | **String** |
|
|
1828
|
+
| **template_id** | **String** | The template's ID. | |
|
|
1829
|
+
| **version** | **String** | A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`. | [optional] |
|
|
1901
1830
|
|
|
1902
1831
|
### Return type
|
|
1903
1832
|
|
|
1904
|
-
[**
|
|
1833
|
+
[**Template**](Template.md)
|
|
1905
1834
|
|
|
1906
1835
|
### Authorization
|
|
1907
1836
|
|
|
@@ -1915,11 +1844,11 @@ end
|
|
|
1915
1844
|
|
|
1916
1845
|
## get_template_model_code
|
|
1917
1846
|
|
|
1918
|
-
> <
|
|
1847
|
+
> <TemplateModelCode> get_template_model_code(template_id, lang, opts)
|
|
1919
1848
|
|
|
1920
|
-
Generate typed
|
|
1849
|
+
Generate typed code for a template's submission data
|
|
1921
1850
|
|
|
1922
|
-
Generates
|
|
1851
|
+
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.
|
|
1923
1852
|
|
|
1924
1853
|
### Examples
|
|
1925
1854
|
|
|
@@ -1934,12 +1863,15 @@ DocSpring.configure do |config|
|
|
|
1934
1863
|
end
|
|
1935
1864
|
|
|
1936
1865
|
api_instance = DocSpring::Client.new
|
|
1937
|
-
template_id = 'tpl_1234567890abcdef01' # String |
|
|
1938
|
-
lang =
|
|
1866
|
+
template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
|
|
1867
|
+
lang = DocSpring::ModelCodeLanguage::TYPESCRIPT # ModelCodeLanguage | The language to generate the code in.
|
|
1868
|
+
opts = {
|
|
1869
|
+
version: 'draft' # String | 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.
|
|
1870
|
+
}
|
|
1939
1871
|
|
|
1940
1872
|
begin
|
|
1941
|
-
# Generate typed
|
|
1942
|
-
result = api_instance.get_template_model_code(template_id, lang)
|
|
1873
|
+
# Generate typed code for a template's submission data
|
|
1874
|
+
result = api_instance.get_template_model_code(template_id, lang, opts)
|
|
1943
1875
|
p result
|
|
1944
1876
|
rescue DocSpring::ApiError => e
|
|
1945
1877
|
puts "Error when calling Client->get_template_model_code: #{e}"
|
|
@@ -1950,15 +1882,15 @@ end
|
|
|
1950
1882
|
|
|
1951
1883
|
This returns an Array which contains the response data, status code and headers.
|
|
1952
1884
|
|
|
1953
|
-
> <Array(<
|
|
1885
|
+
> <Array(<TemplateModelCode>, Integer, Hash)> get_template_model_code_with_http_info(template_id, lang, opts)
|
|
1954
1886
|
|
|
1955
1887
|
```ruby
|
|
1956
1888
|
begin
|
|
1957
|
-
# Generate typed
|
|
1958
|
-
data, status_code, headers = api_instance.get_template_model_code_with_http_info(template_id, lang)
|
|
1889
|
+
# Generate typed code for a template's submission data
|
|
1890
|
+
data, status_code, headers = api_instance.get_template_model_code_with_http_info(template_id, lang, opts)
|
|
1959
1891
|
p status_code # => 2xx
|
|
1960
1892
|
p headers # => { ... }
|
|
1961
|
-
p data # => <
|
|
1893
|
+
p data # => <TemplateModelCode>
|
|
1962
1894
|
rescue DocSpring::ApiError => e
|
|
1963
1895
|
puts "Error when calling Client->get_template_model_code_with_http_info: #{e}"
|
|
1964
1896
|
end
|
|
@@ -1968,12 +1900,13 @@ end
|
|
|
1968
1900
|
|
|
1969
1901
|
| Name | Type | Description | Notes |
|
|
1970
1902
|
| ---- | ---- | ----------- | ----- |
|
|
1971
|
-
| **template_id** | **String** |
|
|
1972
|
-
| **lang** | **
|
|
1903
|
+
| **template_id** | **String** | The template's ID. | |
|
|
1904
|
+
| **lang** | [**ModelCodeLanguage**](.md) | The language to generate the code in. | |
|
|
1905
|
+
| **version** | **String** | 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. | [optional] |
|
|
1973
1906
|
|
|
1974
1907
|
### Return type
|
|
1975
1908
|
|
|
1976
|
-
[**
|
|
1909
|
+
[**TemplateModelCode**](TemplateModelCode.md)
|
|
1977
1910
|
|
|
1978
1911
|
### Authorization
|
|
1979
1912
|
|
|
@@ -1987,11 +1920,11 @@ end
|
|
|
1987
1920
|
|
|
1988
1921
|
## get_template_schema
|
|
1989
1922
|
|
|
1990
|
-
>
|
|
1923
|
+
> Hash<String, Object> get_template_schema(template_id, opts)
|
|
1991
1924
|
|
|
1992
|
-
|
|
1925
|
+
Get the JSON Schema of a template's submission data
|
|
1993
1926
|
|
|
1994
|
-
|
|
1927
|
+
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.
|
|
1995
1928
|
|
|
1996
1929
|
### Examples
|
|
1997
1930
|
|
|
@@ -2006,11 +1939,14 @@ DocSpring.configure do |config|
|
|
|
2006
1939
|
end
|
|
2007
1940
|
|
|
2008
1941
|
api_instance = DocSpring::Client.new
|
|
2009
|
-
template_id = 'tpl_1234567890abcdef01' # String |
|
|
1942
|
+
template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
|
|
1943
|
+
opts = {
|
|
1944
|
+
version: 'draft' # String | 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.
|
|
1945
|
+
}
|
|
2010
1946
|
|
|
2011
1947
|
begin
|
|
2012
|
-
#
|
|
2013
|
-
result = api_instance.get_template_schema(template_id)
|
|
1948
|
+
# Get the JSON Schema of a template's submission data
|
|
1949
|
+
result = api_instance.get_template_schema(template_id, opts)
|
|
2014
1950
|
p result
|
|
2015
1951
|
rescue DocSpring::ApiError => e
|
|
2016
1952
|
puts "Error when calling Client->get_template_schema: #{e}"
|
|
@@ -2021,15 +1957,15 @@ end
|
|
|
2021
1957
|
|
|
2022
1958
|
This returns an Array which contains the response data, status code and headers.
|
|
2023
1959
|
|
|
2024
|
-
> <Array(
|
|
1960
|
+
> <Array(Hash<String, Object>, Integer, Hash)> get_template_schema_with_http_info(template_id, opts)
|
|
2025
1961
|
|
|
2026
1962
|
```ruby
|
|
2027
1963
|
begin
|
|
2028
|
-
#
|
|
2029
|
-
data, status_code, headers = api_instance.get_template_schema_with_http_info(template_id)
|
|
1964
|
+
# Get the JSON Schema of a template's submission data
|
|
1965
|
+
data, status_code, headers = api_instance.get_template_schema_with_http_info(template_id, opts)
|
|
2030
1966
|
p status_code # => 2xx
|
|
2031
1967
|
p headers # => { ... }
|
|
2032
|
-
p data # =>
|
|
1968
|
+
p data # => Hash<String, Object>
|
|
2033
1969
|
rescue DocSpring::ApiError => e
|
|
2034
1970
|
puts "Error when calling Client->get_template_schema_with_http_info: #{e}"
|
|
2035
1971
|
end
|
|
@@ -2039,11 +1975,12 @@ end
|
|
|
2039
1975
|
|
|
2040
1976
|
| Name | Type | Description | Notes |
|
|
2041
1977
|
| ---- | ---- | ----------- | ----- |
|
|
2042
|
-
| **template_id** | **String** |
|
|
1978
|
+
| **template_id** | **String** | The template's ID. | |
|
|
1979
|
+
| **version** | **String** | 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. | [optional] |
|
|
2043
1980
|
|
|
2044
1981
|
### Return type
|
|
2045
1982
|
|
|
2046
|
-
|
|
1983
|
+
**Hash<String, Object>**
|
|
2047
1984
|
|
|
2048
1985
|
### Authorization
|
|
2049
1986
|
|
|
@@ -2061,7 +1998,7 @@ end
|
|
|
2061
1998
|
|
|
2062
1999
|
Get a webhook
|
|
2063
2000
|
|
|
2064
|
-
|
|
2001
|
+
Returns a webhook.
|
|
2065
2002
|
|
|
2066
2003
|
### Examples
|
|
2067
2004
|
|
|
@@ -2076,7 +2013,7 @@ DocSpring.configure do |config|
|
|
|
2076
2013
|
end
|
|
2077
2014
|
|
|
2078
2015
|
api_instance = DocSpring::Client.new
|
|
2079
|
-
webhook_id = '
|
|
2016
|
+
webhook_id = 'webhook_id_example' # String | The webhook's ID.
|
|
2080
2017
|
|
|
2081
2018
|
begin
|
|
2082
2019
|
# Get a webhook
|
|
@@ -2109,7 +2046,7 @@ end
|
|
|
2109
2046
|
|
|
2110
2047
|
| Name | Type | Description | Notes |
|
|
2111
2048
|
| ---- | ---- | ----------- | ----- |
|
|
2112
|
-
| **webhook_id** | **String** |
|
|
2049
|
+
| **webhook_id** | **String** | The webhook's ID. | |
|
|
2113
2050
|
|
|
2114
2051
|
### Return type
|
|
2115
2052
|
|
|
@@ -2125,13 +2062,13 @@ end
|
|
|
2125
2062
|
- **Accept**: application/json
|
|
2126
2063
|
|
|
2127
2064
|
|
|
2128
|
-
##
|
|
2065
|
+
## list_combined_pdfs
|
|
2129
2066
|
|
|
2130
|
-
> <
|
|
2067
|
+
> <CombinedPdfList> list_combined_pdfs(opts)
|
|
2131
2068
|
|
|
2132
|
-
|
|
2069
|
+
List combined PDFs
|
|
2133
2070
|
|
|
2134
|
-
Returns
|
|
2071
|
+
Returns the combined PDFs in your account, newest first, one page at a time.
|
|
2135
2072
|
|
|
2136
2073
|
### Examples
|
|
2137
2074
|
|
|
@@ -2147,34 +2084,34 @@ end
|
|
|
2147
2084
|
|
|
2148
2085
|
api_instance = DocSpring::Client.new
|
|
2149
2086
|
opts = {
|
|
2150
|
-
|
|
2151
|
-
|
|
2087
|
+
limit: 56, # Integer | How many items to return (1-100, default 50).
|
|
2088
|
+
cursor: 'cursor_example' # String | 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.
|
|
2152
2089
|
}
|
|
2153
2090
|
|
|
2154
2091
|
begin
|
|
2155
|
-
#
|
|
2156
|
-
result = api_instance.
|
|
2092
|
+
# List combined PDFs
|
|
2093
|
+
result = api_instance.list_combined_pdfs(opts)
|
|
2157
2094
|
p result
|
|
2158
2095
|
rescue DocSpring::ApiError => e
|
|
2159
|
-
puts "Error when calling Client->
|
|
2096
|
+
puts "Error when calling Client->list_combined_pdfs: #{e}"
|
|
2160
2097
|
end
|
|
2161
2098
|
```
|
|
2162
2099
|
|
|
2163
|
-
#### Using the
|
|
2100
|
+
#### Using the list_combined_pdfs_with_http_info variant
|
|
2164
2101
|
|
|
2165
2102
|
This returns an Array which contains the response data, status code and headers.
|
|
2166
2103
|
|
|
2167
|
-
> <Array(<
|
|
2104
|
+
> <Array(<CombinedPdfList>, Integer, Hash)> list_combined_pdfs_with_http_info(opts)
|
|
2168
2105
|
|
|
2169
2106
|
```ruby
|
|
2170
2107
|
begin
|
|
2171
|
-
#
|
|
2172
|
-
data, status_code, headers = api_instance.
|
|
2108
|
+
# List combined PDFs
|
|
2109
|
+
data, status_code, headers = api_instance.list_combined_pdfs_with_http_info(opts)
|
|
2173
2110
|
p status_code # => 2xx
|
|
2174
2111
|
p headers # => { ... }
|
|
2175
|
-
p data # => <
|
|
2112
|
+
p data # => <CombinedPdfList>
|
|
2176
2113
|
rescue DocSpring::ApiError => e
|
|
2177
|
-
puts "Error when calling Client->
|
|
2114
|
+
puts "Error when calling Client->list_combined_pdfs_with_http_info: #{e}"
|
|
2178
2115
|
end
|
|
2179
2116
|
```
|
|
2180
2117
|
|
|
@@ -2182,12 +2119,86 @@ end
|
|
|
2182
2119
|
|
|
2183
2120
|
| Name | Type | Description | Notes |
|
|
2184
2121
|
| ---- | ---- | ----------- | ----- |
|
|
2185
|
-
| **
|
|
2186
|
-
| **
|
|
2122
|
+
| **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
|
|
2123
|
+
| **cursor** | **String** | 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. | [optional] |
|
|
2187
2124
|
|
|
2188
2125
|
### Return type
|
|
2189
2126
|
|
|
2190
|
-
[**
|
|
2127
|
+
[**CombinedPdfList**](CombinedPdfList.md)
|
|
2128
|
+
|
|
2129
|
+
### Authorization
|
|
2130
|
+
|
|
2131
|
+
[api_token_basic](../README.md#api_token_basic)
|
|
2132
|
+
|
|
2133
|
+
### HTTP request headers
|
|
2134
|
+
|
|
2135
|
+
- **Content-Type**: Not defined
|
|
2136
|
+
- **Accept**: application/json
|
|
2137
|
+
|
|
2138
|
+
|
|
2139
|
+
## list_custom_files
|
|
2140
|
+
|
|
2141
|
+
> <CustomFileList> list_custom_files(opts)
|
|
2142
|
+
|
|
2143
|
+
List custom files
|
|
2144
|
+
|
|
2145
|
+
Returns the custom files in your account, newest first, one page at a time.
|
|
2146
|
+
|
|
2147
|
+
### Examples
|
|
2148
|
+
|
|
2149
|
+
```ruby
|
|
2150
|
+
require 'time'
|
|
2151
|
+
require 'docspring'
|
|
2152
|
+
# setup authorization
|
|
2153
|
+
DocSpring.configure do |config|
|
|
2154
|
+
# Configure HTTP basic authorization: api_token_basic
|
|
2155
|
+
config.username = 'YOUR USERNAME'
|
|
2156
|
+
config.password = 'YOUR PASSWORD'
|
|
2157
|
+
end
|
|
2158
|
+
|
|
2159
|
+
api_instance = DocSpring::Client.new
|
|
2160
|
+
opts = {
|
|
2161
|
+
limit: 56, # Integer | How many items to return (1-100, default 50).
|
|
2162
|
+
cursor: 'cursor_example' # String | 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.
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
begin
|
|
2166
|
+
# List custom files
|
|
2167
|
+
result = api_instance.list_custom_files(opts)
|
|
2168
|
+
p result
|
|
2169
|
+
rescue DocSpring::ApiError => e
|
|
2170
|
+
puts "Error when calling Client->list_custom_files: #{e}"
|
|
2171
|
+
end
|
|
2172
|
+
```
|
|
2173
|
+
|
|
2174
|
+
#### Using the list_custom_files_with_http_info variant
|
|
2175
|
+
|
|
2176
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2177
|
+
|
|
2178
|
+
> <Array(<CustomFileList>, Integer, Hash)> list_custom_files_with_http_info(opts)
|
|
2179
|
+
|
|
2180
|
+
```ruby
|
|
2181
|
+
begin
|
|
2182
|
+
# List custom files
|
|
2183
|
+
data, status_code, headers = api_instance.list_custom_files_with_http_info(opts)
|
|
2184
|
+
p status_code # => 2xx
|
|
2185
|
+
p headers # => { ... }
|
|
2186
|
+
p data # => <CustomFileList>
|
|
2187
|
+
rescue DocSpring::ApiError => e
|
|
2188
|
+
puts "Error when calling Client->list_custom_files_with_http_info: #{e}"
|
|
2189
|
+
end
|
|
2190
|
+
```
|
|
2191
|
+
|
|
2192
|
+
### Parameters
|
|
2193
|
+
|
|
2194
|
+
| Name | Type | Description | Notes |
|
|
2195
|
+
| ---- | ---- | ----------- | ----- |
|
|
2196
|
+
| **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
|
|
2197
|
+
| **cursor** | **String** | 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. | [optional] |
|
|
2198
|
+
|
|
2199
|
+
### Return type
|
|
2200
|
+
|
|
2201
|
+
[**CustomFileList**](CustomFileList.md)
|
|
2191
2202
|
|
|
2192
2203
|
### Authorization
|
|
2193
2204
|
|
|
@@ -2201,11 +2212,11 @@ end
|
|
|
2201
2212
|
|
|
2202
2213
|
## list_folders
|
|
2203
2214
|
|
|
2204
|
-
> <
|
|
2215
|
+
> <FolderList> list_folders(opts)
|
|
2205
2216
|
|
|
2206
|
-
|
|
2217
|
+
List folders
|
|
2207
2218
|
|
|
2208
|
-
Returns
|
|
2219
|
+
Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
2209
2220
|
|
|
2210
2221
|
### Examples
|
|
2211
2222
|
|
|
@@ -2221,11 +2232,13 @@ end
|
|
|
2221
2232
|
|
|
2222
2233
|
api_instance = DocSpring::Client.new
|
|
2223
2234
|
opts = {
|
|
2224
|
-
parent_folder_id: 'fld_1234567890abcdef02' # String |
|
|
2235
|
+
parent_folder_id: 'fld_1234567890abcdef02', # String | Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
2236
|
+
limit: 2, # Integer | How many items to return (1-100, default 50).
|
|
2237
|
+
cursor: 'fld_1234567890abcdef02' # String | 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.
|
|
2225
2238
|
}
|
|
2226
2239
|
|
|
2227
2240
|
begin
|
|
2228
|
-
#
|
|
2241
|
+
# List folders
|
|
2229
2242
|
result = api_instance.list_folders(opts)
|
|
2230
2243
|
p result
|
|
2231
2244
|
rescue DocSpring::ApiError => e
|
|
@@ -2237,15 +2250,15 @@ end
|
|
|
2237
2250
|
|
|
2238
2251
|
This returns an Array which contains the response data, status code and headers.
|
|
2239
2252
|
|
|
2240
|
-
> <Array(<
|
|
2253
|
+
> <Array(<FolderList>, Integer, Hash)> list_folders_with_http_info(opts)
|
|
2241
2254
|
|
|
2242
2255
|
```ruby
|
|
2243
2256
|
begin
|
|
2244
|
-
#
|
|
2257
|
+
# List folders
|
|
2245
2258
|
data, status_code, headers = api_instance.list_folders_with_http_info(opts)
|
|
2246
2259
|
p status_code # => 2xx
|
|
2247
2260
|
p headers # => { ... }
|
|
2248
|
-
p data # => <
|
|
2261
|
+
p data # => <FolderList>
|
|
2249
2262
|
rescue DocSpring::ApiError => e
|
|
2250
2263
|
puts "Error when calling Client->list_folders_with_http_info: #{e}"
|
|
2251
2264
|
end
|
|
@@ -2255,11 +2268,13 @@ end
|
|
|
2255
2268
|
|
|
2256
2269
|
| Name | Type | Description | Notes |
|
|
2257
2270
|
| ---- | ---- | ----------- | ----- |
|
|
2258
|
-
| **parent_folder_id** | **String** |
|
|
2271
|
+
| **parent_folder_id** | **String** | Only list the folders in this folder. Without it, the list has every folder, at any depth. | [optional] |
|
|
2272
|
+
| **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
|
|
2273
|
+
| **cursor** | **String** | 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. | [optional] |
|
|
2259
2274
|
|
|
2260
2275
|
### Return type
|
|
2261
2276
|
|
|
2262
|
-
[**
|
|
2277
|
+
[**FolderList**](FolderList.md)
|
|
2263
2278
|
|
|
2264
2279
|
### Authorization
|
|
2265
2280
|
|
|
@@ -2273,11 +2288,11 @@ end
|
|
|
2273
2288
|
|
|
2274
2289
|
## list_submissions
|
|
2275
2290
|
|
|
2276
|
-
> <
|
|
2291
|
+
> <SubmissionList> list_submissions(opts)
|
|
2277
2292
|
|
|
2278
|
-
List
|
|
2293
|
+
List submissions
|
|
2279
2294
|
|
|
2280
|
-
Returns
|
|
2295
|
+
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`.
|
|
2281
2296
|
|
|
2282
2297
|
### Examples
|
|
2283
2298
|
|
|
@@ -2293,16 +2308,17 @@ end
|
|
|
2293
2308
|
|
|
2294
2309
|
api_instance = DocSpring::Client.new
|
|
2295
2310
|
opts = {
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
created_after: '
|
|
2299
|
-
created_before: '
|
|
2300
|
-
|
|
2301
|
-
|
|
2311
|
+
template_id: 'tpl_1234567890abcdef01', # String | Only list this template's submissions.
|
|
2312
|
+
test: false, # Boolean | Only list test submissions (true) or live submissions (false).
|
|
2313
|
+
created_after: Time.parse('2018-10-20T08:40:00Z'), # Time | Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
2314
|
+
created_before: Time.parse('2018-10-20T09:00:00Z'), # Time | Only list submissions created before this time.
|
|
2315
|
+
include_data: true, # Boolean | Include each submission's `data` (null without it).
|
|
2316
|
+
limit: 56, # Integer | How many items to return (1-100, default 50).
|
|
2317
|
+
cursor: 'cursor_example' # String | 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.
|
|
2302
2318
|
}
|
|
2303
2319
|
|
|
2304
2320
|
begin
|
|
2305
|
-
# List
|
|
2321
|
+
# List submissions
|
|
2306
2322
|
result = api_instance.list_submissions(opts)
|
|
2307
2323
|
p result
|
|
2308
2324
|
rescue DocSpring::ApiError => e
|
|
@@ -2314,15 +2330,15 @@ end
|
|
|
2314
2330
|
|
|
2315
2331
|
This returns an Array which contains the response data, status code and headers.
|
|
2316
2332
|
|
|
2317
|
-
> <Array(<
|
|
2333
|
+
> <Array(<SubmissionList>, Integer, Hash)> list_submissions_with_http_info(opts)
|
|
2318
2334
|
|
|
2319
2335
|
```ruby
|
|
2320
2336
|
begin
|
|
2321
|
-
# List
|
|
2337
|
+
# List submissions
|
|
2322
2338
|
data, status_code, headers = api_instance.list_submissions_with_http_info(opts)
|
|
2323
2339
|
p status_code # => 2xx
|
|
2324
2340
|
p headers # => { ... }
|
|
2325
|
-
p data # => <
|
|
2341
|
+
p data # => <SubmissionList>
|
|
2326
2342
|
rescue DocSpring::ApiError => e
|
|
2327
2343
|
puts "Error when calling Client->list_submissions_with_http_info: #{e}"
|
|
2328
2344
|
end
|
|
@@ -2332,16 +2348,17 @@ end
|
|
|
2332
2348
|
|
|
2333
2349
|
| Name | Type | Description | Notes |
|
|
2334
2350
|
| ---- | ---- | ----------- | ----- |
|
|
2335
|
-
| **
|
|
2336
|
-
| **
|
|
2337
|
-
| **created_after** | **
|
|
2338
|
-
| **created_before** | **
|
|
2339
|
-
| **
|
|
2340
|
-
| **
|
|
2351
|
+
| **template_id** | **String** | Only list this template's submissions. | [optional] |
|
|
2352
|
+
| **test** | **Boolean** | Only list test submissions (true) or live submissions (false). | [optional] |
|
|
2353
|
+
| **created_after** | **Time** | Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`). | [optional] |
|
|
2354
|
+
| **created_before** | **Time** | Only list submissions created before this time. | [optional] |
|
|
2355
|
+
| **include_data** | **Boolean** | Include each submission's `data` (null without it). | [optional] |
|
|
2356
|
+
| **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
|
|
2357
|
+
| **cursor** | **String** | 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. | [optional] |
|
|
2341
2358
|
|
|
2342
2359
|
### Return type
|
|
2343
2360
|
|
|
2344
|
-
[**
|
|
2361
|
+
[**SubmissionList**](SubmissionList.md)
|
|
2345
2362
|
|
|
2346
2363
|
### Authorization
|
|
2347
2364
|
|
|
@@ -2355,11 +2372,11 @@ end
|
|
|
2355
2372
|
|
|
2356
2373
|
## list_template_submissions
|
|
2357
2374
|
|
|
2358
|
-
> <
|
|
2375
|
+
> <SubmissionList> list_template_submissions(template_id, opts)
|
|
2359
2376
|
|
|
2360
|
-
List
|
|
2377
|
+
List a template's submissions
|
|
2361
2378
|
|
|
2362
|
-
Returns a
|
|
2379
|
+
Returns a template's submissions (from every version of the template), newest first.
|
|
2363
2380
|
|
|
2364
2381
|
### Examples
|
|
2365
2382
|
|
|
@@ -2374,18 +2391,18 @@ DocSpring.configure do |config|
|
|
|
2374
2391
|
end
|
|
2375
2392
|
|
|
2376
2393
|
api_instance = DocSpring::Client.new
|
|
2377
|
-
template_id = '
|
|
2394
|
+
template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
|
|
2378
2395
|
opts = {
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2396
|
+
test: true, # Boolean | Only list test submissions (true) or live submissions (false).
|
|
2397
|
+
created_after: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
2398
|
+
created_before: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Only list submissions created before this time.
|
|
2399
|
+
include_data: true, # Boolean | Include each submission's `data` (null without it).
|
|
2400
|
+
limit: 56, # Integer | How many items to return (1-100, default 50).
|
|
2401
|
+
cursor: 'cursor_example' # String | 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.
|
|
2385
2402
|
}
|
|
2386
2403
|
|
|
2387
2404
|
begin
|
|
2388
|
-
# List
|
|
2405
|
+
# List a template's submissions
|
|
2389
2406
|
result = api_instance.list_template_submissions(template_id, opts)
|
|
2390
2407
|
p result
|
|
2391
2408
|
rescue DocSpring::ApiError => e
|
|
@@ -2397,15 +2414,15 @@ end
|
|
|
2397
2414
|
|
|
2398
2415
|
This returns an Array which contains the response data, status code and headers.
|
|
2399
2416
|
|
|
2400
|
-
> <Array(<
|
|
2417
|
+
> <Array(<SubmissionList>, Integer, Hash)> list_template_submissions_with_http_info(template_id, opts)
|
|
2401
2418
|
|
|
2402
2419
|
```ruby
|
|
2403
2420
|
begin
|
|
2404
|
-
# List
|
|
2421
|
+
# List a template's submissions
|
|
2405
2422
|
data, status_code, headers = api_instance.list_template_submissions_with_http_info(template_id, opts)
|
|
2406
2423
|
p status_code # => 2xx
|
|
2407
2424
|
p headers # => { ... }
|
|
2408
|
-
p data # => <
|
|
2425
|
+
p data # => <SubmissionList>
|
|
2409
2426
|
rescue DocSpring::ApiError => e
|
|
2410
2427
|
puts "Error when calling Client->list_template_submissions_with_http_info: #{e}"
|
|
2411
2428
|
end
|
|
@@ -2415,17 +2432,17 @@ end
|
|
|
2415
2432
|
|
|
2416
2433
|
| Name | Type | Description | Notes |
|
|
2417
2434
|
| ---- | ---- | ----------- | ----- |
|
|
2418
|
-
| **template_id** | **String** |
|
|
2419
|
-
| **
|
|
2420
|
-
| **
|
|
2421
|
-
| **
|
|
2422
|
-
| **
|
|
2423
|
-
| **
|
|
2424
|
-
| **
|
|
2435
|
+
| **template_id** | **String** | The template's ID. | |
|
|
2436
|
+
| **test** | **Boolean** | Only list test submissions (true) or live submissions (false). | [optional] |
|
|
2437
|
+
| **created_after** | **Time** | Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`). | [optional] |
|
|
2438
|
+
| **created_before** | **Time** | Only list submissions created before this time. | [optional] |
|
|
2439
|
+
| **include_data** | **Boolean** | Include each submission's `data` (null without it). | [optional] |
|
|
2440
|
+
| **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
|
|
2441
|
+
| **cursor** | **String** | 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. | [optional] |
|
|
2425
2442
|
|
|
2426
2443
|
### Return type
|
|
2427
2444
|
|
|
2428
|
-
[**
|
|
2445
|
+
[**SubmissionList**](SubmissionList.md)
|
|
2429
2446
|
|
|
2430
2447
|
### Authorization
|
|
2431
2448
|
|
|
@@ -2439,11 +2456,11 @@ end
|
|
|
2439
2456
|
|
|
2440
2457
|
## list_templates
|
|
2441
2458
|
|
|
2442
|
-
> <
|
|
2459
|
+
> <TemplateSummaryList> list_templates(opts)
|
|
2443
2460
|
|
|
2444
|
-
|
|
2461
|
+
List templates
|
|
2445
2462
|
|
|
2446
|
-
|
|
2463
|
+
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.
|
|
2447
2464
|
|
|
2448
2465
|
### Examples
|
|
2449
2466
|
|
|
@@ -2459,14 +2476,14 @@ end
|
|
|
2459
2476
|
|
|
2460
2477
|
api_instance = DocSpring::Client.new
|
|
2461
2478
|
opts = {
|
|
2462
|
-
query: '
|
|
2463
|
-
parent_folder_id: 'fld_1234567890abcdef01', # String |
|
|
2464
|
-
|
|
2465
|
-
|
|
2479
|
+
query: 'rental', # String | Only list templates whose name contains this text (ignoring case).
|
|
2480
|
+
parent_folder_id: 'fld_1234567890abcdef01', # String | Only list the templates in this folder (not in its subfolders).
|
|
2481
|
+
limit: 1, # Integer | How many items to return (1-100, default 50).
|
|
2482
|
+
cursor: 'cursor_example' # String | 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.
|
|
2466
2483
|
}
|
|
2467
2484
|
|
|
2468
2485
|
begin
|
|
2469
|
-
#
|
|
2486
|
+
# List templates
|
|
2470
2487
|
result = api_instance.list_templates(opts)
|
|
2471
2488
|
p result
|
|
2472
2489
|
rescue DocSpring::ApiError => e
|
|
@@ -2478,15 +2495,15 @@ end
|
|
|
2478
2495
|
|
|
2479
2496
|
This returns an Array which contains the response data, status code and headers.
|
|
2480
2497
|
|
|
2481
|
-
> <Array(<
|
|
2498
|
+
> <Array(<TemplateSummaryList>, Integer, Hash)> list_templates_with_http_info(opts)
|
|
2482
2499
|
|
|
2483
2500
|
```ruby
|
|
2484
2501
|
begin
|
|
2485
|
-
#
|
|
2502
|
+
# List templates
|
|
2486
2503
|
data, status_code, headers = api_instance.list_templates_with_http_info(opts)
|
|
2487
2504
|
p status_code # => 2xx
|
|
2488
2505
|
p headers # => { ... }
|
|
2489
|
-
p data # => <
|
|
2506
|
+
p data # => <TemplateSummaryList>
|
|
2490
2507
|
rescue DocSpring::ApiError => e
|
|
2491
2508
|
puts "Error when calling Client->list_templates_with_http_info: #{e}"
|
|
2492
2509
|
end
|
|
@@ -2496,14 +2513,14 @@ end
|
|
|
2496
2513
|
|
|
2497
2514
|
| Name | Type | Description | Notes |
|
|
2498
2515
|
| ---- | ---- | ----------- | ----- |
|
|
2499
|
-
| **query** | **String** |
|
|
2500
|
-
| **parent_folder_id** | **String** |
|
|
2501
|
-
| **
|
|
2502
|
-
| **
|
|
2516
|
+
| **query** | **String** | Only list templates whose name contains this text (ignoring case). | [optional] |
|
|
2517
|
+
| **parent_folder_id** | **String** | Only list the templates in this folder (not in its subfolders). | [optional] |
|
|
2518
|
+
| **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
|
|
2519
|
+
| **cursor** | **String** | 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. | [optional] |
|
|
2503
2520
|
|
|
2504
2521
|
### Return type
|
|
2505
2522
|
|
|
2506
|
-
[**
|
|
2523
|
+
[**TemplateSummaryList**](TemplateSummaryList.md)
|
|
2507
2524
|
|
|
2508
2525
|
### Authorization
|
|
2509
2526
|
|
|
@@ -2517,11 +2534,11 @@ end
|
|
|
2517
2534
|
|
|
2518
2535
|
## list_webhooks
|
|
2519
2536
|
|
|
2520
|
-
> <
|
|
2537
|
+
> <WebhookList> list_webhooks(opts)
|
|
2521
2538
|
|
|
2522
|
-
|
|
2539
|
+
List webhooks
|
|
2523
2540
|
|
|
2524
|
-
Returns
|
|
2541
|
+
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.
|
|
2525
2542
|
|
|
2526
2543
|
### Examples
|
|
2527
2544
|
|
|
@@ -2537,17 +2554,17 @@ end
|
|
|
2537
2554
|
|
|
2538
2555
|
api_instance = DocSpring::Client.new
|
|
2539
2556
|
opts = {
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2557
|
+
event_type: DocSpring::WebhookEventType::SUBMISSION_PROCESSED, # WebhookEventType | Only list webhooks that subscribe to this event.
|
|
2558
|
+
mode: DocSpring::WebhookMode::TEST, # WebhookMode | Only list webhooks set to this mode.
|
|
2559
|
+
template_id: 'tpl_1234567890abcdef01', # String | Only list webhooks scoped to this template.
|
|
2560
|
+
folder_id: 'folder_id_example', # String | Only list webhooks scoped to this folder.
|
|
2561
|
+
api_token_id: 'api_token_id_example', # String | Only list webhooks scoped to this API token.
|
|
2562
|
+
limit: 56, # Integer | How many items to return (1-100, default 50).
|
|
2563
|
+
cursor: 'cursor_example' # String | 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.
|
|
2547
2564
|
}
|
|
2548
2565
|
|
|
2549
2566
|
begin
|
|
2550
|
-
#
|
|
2567
|
+
# List webhooks
|
|
2551
2568
|
result = api_instance.list_webhooks(opts)
|
|
2552
2569
|
p result
|
|
2553
2570
|
rescue DocSpring::ApiError => e
|
|
@@ -2559,15 +2576,15 @@ end
|
|
|
2559
2576
|
|
|
2560
2577
|
This returns an Array which contains the response data, status code and headers.
|
|
2561
2578
|
|
|
2562
|
-
> <Array(<
|
|
2579
|
+
> <Array(<WebhookList>, Integer, Hash)> list_webhooks_with_http_info(opts)
|
|
2563
2580
|
|
|
2564
2581
|
```ruby
|
|
2565
2582
|
begin
|
|
2566
|
-
#
|
|
2583
|
+
# List webhooks
|
|
2567
2584
|
data, status_code, headers = api_instance.list_webhooks_with_http_info(opts)
|
|
2568
2585
|
p status_code # => 2xx
|
|
2569
2586
|
p headers # => { ... }
|
|
2570
|
-
p data # => <
|
|
2587
|
+
p data # => <WebhookList>
|
|
2571
2588
|
rescue DocSpring::ApiError => e
|
|
2572
2589
|
puts "Error when calling Client->list_webhooks_with_http_info: #{e}"
|
|
2573
2590
|
end
|
|
@@ -2577,17 +2594,17 @@ end
|
|
|
2577
2594
|
|
|
2578
2595
|
| Name | Type | Description | Notes |
|
|
2579
2596
|
| ---- | ---- | ----------- | ----- |
|
|
2580
|
-
| **
|
|
2581
|
-
| **
|
|
2582
|
-
| **
|
|
2583
|
-
| **
|
|
2584
|
-
| **
|
|
2585
|
-
| **
|
|
2586
|
-
| **
|
|
2597
|
+
| **event_type** | [**WebhookEventType**](.md) | Only list webhooks that subscribe to this event. | [optional] |
|
|
2598
|
+
| **mode** | [**WebhookMode**](.md) | Only list webhooks set to this mode. | [optional] |
|
|
2599
|
+
| **template_id** | **String** | Only list webhooks scoped to this template. | [optional] |
|
|
2600
|
+
| **folder_id** | **String** | Only list webhooks scoped to this folder. | [optional] |
|
|
2601
|
+
| **api_token_id** | **String** | Only list webhooks scoped to this API token. | [optional] |
|
|
2602
|
+
| **limit** | **Integer** | How many items to return (1-100, default 50). | [optional][default to 50] |
|
|
2603
|
+
| **cursor** | **String** | 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. | [optional] |
|
|
2587
2604
|
|
|
2588
2605
|
### Return type
|
|
2589
2606
|
|
|
2590
|
-
[**
|
|
2607
|
+
[**WebhookList**](WebhookList.md)
|
|
2591
2608
|
|
|
2592
2609
|
### Authorization
|
|
2593
2610
|
|
|
@@ -2599,13 +2616,13 @@ end
|
|
|
2599
2616
|
- **Accept**: application/json
|
|
2600
2617
|
|
|
2601
2618
|
|
|
2602
|
-
##
|
|
2619
|
+
## move_folder
|
|
2603
2620
|
|
|
2604
|
-
> <Folder>
|
|
2621
|
+
> <Folder> move_folder(folder_id, body)
|
|
2605
2622
|
|
|
2606
2623
|
Move a folder
|
|
2607
2624
|
|
|
2608
|
-
Moves a folder
|
|
2625
|
+
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.
|
|
2609
2626
|
|
|
2610
2627
|
### Examples
|
|
2611
2628
|
|
|
@@ -2620,33 +2637,33 @@ DocSpring.configure do |config|
|
|
|
2620
2637
|
end
|
|
2621
2638
|
|
|
2622
2639
|
api_instance = DocSpring::Client.new
|
|
2623
|
-
folder_id = '
|
|
2624
|
-
|
|
2640
|
+
folder_id = 'folder_id_example' # String | The folder's ID.
|
|
2641
|
+
body = DocSpring::MoveFolderRequest.new({parent_folder_id: 'parent_folder_id_example'}) # MoveFolderRequest | Where to move the folder.
|
|
2625
2642
|
|
|
2626
2643
|
begin
|
|
2627
2644
|
# Move a folder
|
|
2628
|
-
result = api_instance.
|
|
2645
|
+
result = api_instance.move_folder(folder_id, body)
|
|
2629
2646
|
p result
|
|
2630
2647
|
rescue DocSpring::ApiError => e
|
|
2631
|
-
puts "Error when calling Client->
|
|
2648
|
+
puts "Error when calling Client->move_folder: #{e}"
|
|
2632
2649
|
end
|
|
2633
2650
|
```
|
|
2634
2651
|
|
|
2635
|
-
#### Using the
|
|
2652
|
+
#### Using the move_folder_with_http_info variant
|
|
2636
2653
|
|
|
2637
2654
|
This returns an Array which contains the response data, status code and headers.
|
|
2638
2655
|
|
|
2639
|
-
> <Array(<Folder>, Integer, Hash)>
|
|
2656
|
+
> <Array(<Folder>, Integer, Hash)> move_folder_with_http_info(folder_id, body)
|
|
2640
2657
|
|
|
2641
2658
|
```ruby
|
|
2642
2659
|
begin
|
|
2643
2660
|
# Move a folder
|
|
2644
|
-
data, status_code, headers = api_instance.
|
|
2661
|
+
data, status_code, headers = api_instance.move_folder_with_http_info(folder_id, body)
|
|
2645
2662
|
p status_code # => 2xx
|
|
2646
2663
|
p headers # => { ... }
|
|
2647
2664
|
p data # => <Folder>
|
|
2648
2665
|
rescue DocSpring::ApiError => e
|
|
2649
|
-
puts "Error when calling Client->
|
|
2666
|
+
puts "Error when calling Client->move_folder_with_http_info: #{e}"
|
|
2650
2667
|
end
|
|
2651
2668
|
```
|
|
2652
2669
|
|
|
@@ -2654,8 +2671,8 @@ end
|
|
|
2654
2671
|
|
|
2655
2672
|
| Name | Type | Description | Notes |
|
|
2656
2673
|
| ---- | ---- | ----------- | ----- |
|
|
2657
|
-
| **folder_id** | **String** |
|
|
2658
|
-
| **
|
|
2674
|
+
| **folder_id** | **String** | The folder's ID. | |
|
|
2675
|
+
| **body** | [**MoveFolderRequest**](MoveFolderRequest.md) | Where to move the folder. | |
|
|
2659
2676
|
|
|
2660
2677
|
### Return type
|
|
2661
2678
|
|
|
@@ -2671,13 +2688,13 @@ end
|
|
|
2671
2688
|
- **Accept**: application/json
|
|
2672
2689
|
|
|
2673
2690
|
|
|
2674
|
-
##
|
|
2691
|
+
## move_template
|
|
2675
2692
|
|
|
2676
|
-
> <
|
|
2693
|
+
> <Template> move_template(template_id, body)
|
|
2677
2694
|
|
|
2678
|
-
Move
|
|
2695
|
+
Move a template to a folder
|
|
2679
2696
|
|
|
2680
|
-
Moves a template
|
|
2697
|
+
Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
2681
2698
|
|
|
2682
2699
|
### Examples
|
|
2683
2700
|
|
|
@@ -2692,33 +2709,33 @@ DocSpring.configure do |config|
|
|
|
2692
2709
|
end
|
|
2693
2710
|
|
|
2694
2711
|
api_instance = DocSpring::Client.new
|
|
2695
|
-
template_id = 'tpl_1234567890abcdef01' # String |
|
|
2696
|
-
|
|
2712
|
+
template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
|
|
2713
|
+
body = DocSpring::MoveTemplateRequest.new({parent_folder_id: 'parent_folder_id_example'}) # MoveTemplateRequest | Where to move the template.
|
|
2697
2714
|
|
|
2698
2715
|
begin
|
|
2699
|
-
# Move
|
|
2700
|
-
result = api_instance.
|
|
2716
|
+
# Move a template to a folder
|
|
2717
|
+
result = api_instance.move_template(template_id, body)
|
|
2701
2718
|
p result
|
|
2702
2719
|
rescue DocSpring::ApiError => e
|
|
2703
|
-
puts "Error when calling Client->
|
|
2720
|
+
puts "Error when calling Client->move_template: #{e}"
|
|
2704
2721
|
end
|
|
2705
2722
|
```
|
|
2706
2723
|
|
|
2707
|
-
#### Using the
|
|
2724
|
+
#### Using the move_template_with_http_info variant
|
|
2708
2725
|
|
|
2709
2726
|
This returns an Array which contains the response data, status code and headers.
|
|
2710
2727
|
|
|
2711
|
-
> <Array(<
|
|
2728
|
+
> <Array(<Template>, Integer, Hash)> move_template_with_http_info(template_id, body)
|
|
2712
2729
|
|
|
2713
2730
|
```ruby
|
|
2714
2731
|
begin
|
|
2715
|
-
# Move
|
|
2716
|
-
data, status_code, headers = api_instance.
|
|
2732
|
+
# Move a template to a folder
|
|
2733
|
+
data, status_code, headers = api_instance.move_template_with_http_info(template_id, body)
|
|
2717
2734
|
p status_code # => 2xx
|
|
2718
2735
|
p headers # => { ... }
|
|
2719
|
-
p data # => <
|
|
2736
|
+
p data # => <Template>
|
|
2720
2737
|
rescue DocSpring::ApiError => e
|
|
2721
|
-
puts "Error when calling Client->
|
|
2738
|
+
puts "Error when calling Client->move_template_with_http_info: #{e}"
|
|
2722
2739
|
end
|
|
2723
2740
|
```
|
|
2724
2741
|
|
|
@@ -2726,12 +2743,12 @@ end
|
|
|
2726
2743
|
|
|
2727
2744
|
| Name | Type | Description | Notes |
|
|
2728
2745
|
| ---- | ---- | ----------- | ----- |
|
|
2729
|
-
| **template_id** | **String** |
|
|
2730
|
-
| **
|
|
2746
|
+
| **template_id** | **String** | The template's ID. | |
|
|
2747
|
+
| **body** | [**MoveTemplateRequest**](MoveTemplateRequest.md) | Where to move the template. | |
|
|
2731
2748
|
|
|
2732
2749
|
### Return type
|
|
2733
2750
|
|
|
2734
|
-
[**
|
|
2751
|
+
[**Template**](Template.md)
|
|
2735
2752
|
|
|
2736
2753
|
### Authorization
|
|
2737
2754
|
|
|
@@ -2745,11 +2762,11 @@ end
|
|
|
2745
2762
|
|
|
2746
2763
|
## publish_template_version
|
|
2747
2764
|
|
|
2748
|
-
> <
|
|
2765
|
+
> <TemplateVersion> publish_template_version(template_id, body)
|
|
2749
2766
|
|
|
2750
2767
|
Publish a template version
|
|
2751
2768
|
|
|
2752
|
-
Publishes the
|
|
2769
|
+
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.
|
|
2753
2770
|
|
|
2754
2771
|
### Examples
|
|
2755
2772
|
|
|
@@ -2764,12 +2781,12 @@ DocSpring.configure do |config|
|
|
|
2764
2781
|
end
|
|
2765
2782
|
|
|
2766
2783
|
api_instance = DocSpring::Client.new
|
|
2767
|
-
template_id = 'tpl_1234567890abcdef01' # String |
|
|
2768
|
-
|
|
2784
|
+
template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
|
|
2785
|
+
body = DocSpring::PublishTemplateVersionRequest.new({version_type: DocSpring::TemplateVersionType::MAJOR}) # PublishTemplateVersionRequest | The version to publish.
|
|
2769
2786
|
|
|
2770
2787
|
begin
|
|
2771
2788
|
# Publish a template version
|
|
2772
|
-
result = api_instance.publish_template_version(template_id,
|
|
2789
|
+
result = api_instance.publish_template_version(template_id, body)
|
|
2773
2790
|
p result
|
|
2774
2791
|
rescue DocSpring::ApiError => e
|
|
2775
2792
|
puts "Error when calling Client->publish_template_version: #{e}"
|
|
@@ -2780,15 +2797,15 @@ end
|
|
|
2780
2797
|
|
|
2781
2798
|
This returns an Array which contains the response data, status code and headers.
|
|
2782
2799
|
|
|
2783
|
-
> <Array(<
|
|
2800
|
+
> <Array(<TemplateVersion>, Integer, Hash)> publish_template_version_with_http_info(template_id, body)
|
|
2784
2801
|
|
|
2785
2802
|
```ruby
|
|
2786
2803
|
begin
|
|
2787
2804
|
# Publish a template version
|
|
2788
|
-
data, status_code, headers = api_instance.publish_template_version_with_http_info(template_id,
|
|
2805
|
+
data, status_code, headers = api_instance.publish_template_version_with_http_info(template_id, body)
|
|
2789
2806
|
p status_code # => 2xx
|
|
2790
2807
|
p headers # => { ... }
|
|
2791
|
-
p data # => <
|
|
2808
|
+
p data # => <TemplateVersion>
|
|
2792
2809
|
rescue DocSpring::ApiError => e
|
|
2793
2810
|
puts "Error when calling Client->publish_template_version_with_http_info: #{e}"
|
|
2794
2811
|
end
|
|
@@ -2798,12 +2815,12 @@ end
|
|
|
2798
2815
|
|
|
2799
2816
|
| Name | Type | Description | Notes |
|
|
2800
2817
|
| ---- | ---- | ----------- | ----- |
|
|
2801
|
-
| **template_id** | **String** |
|
|
2802
|
-
| **
|
|
2818
|
+
| **template_id** | **String** | The template's ID. | |
|
|
2819
|
+
| **body** | [**PublishTemplateVersionRequest**](PublishTemplateVersionRequest.md) | The version to publish. | |
|
|
2803
2820
|
|
|
2804
2821
|
### Return type
|
|
2805
2822
|
|
|
2806
|
-
[**
|
|
2823
|
+
[**TemplateVersion**](TemplateVersion.md)
|
|
2807
2824
|
|
|
2808
2825
|
### Authorization
|
|
2809
2826
|
|
|
@@ -2817,11 +2834,11 @@ end
|
|
|
2817
2834
|
|
|
2818
2835
|
## rename_folder
|
|
2819
2836
|
|
|
2820
|
-
> <Folder> rename_folder(folder_id,
|
|
2837
|
+
> <Folder> rename_folder(folder_id, body)
|
|
2821
2838
|
|
|
2822
2839
|
Rename a folder
|
|
2823
2840
|
|
|
2824
|
-
Renames
|
|
2841
|
+
Renames a folder. The name must be unique within its parent folder.
|
|
2825
2842
|
|
|
2826
2843
|
### Examples
|
|
2827
2844
|
|
|
@@ -2836,12 +2853,12 @@ DocSpring.configure do |config|
|
|
|
2836
2853
|
end
|
|
2837
2854
|
|
|
2838
2855
|
api_instance = DocSpring::Client.new
|
|
2839
|
-
folder_id = '
|
|
2840
|
-
|
|
2856
|
+
folder_id = 'folder_id_example' # String | The folder's ID.
|
|
2857
|
+
body = DocSpring::RenameFolderRequest.new({name: 'name_example'}) # RenameFolderRequest | The folder's new name.
|
|
2841
2858
|
|
|
2842
2859
|
begin
|
|
2843
2860
|
# Rename a folder
|
|
2844
|
-
result = api_instance.rename_folder(folder_id,
|
|
2861
|
+
result = api_instance.rename_folder(folder_id, body)
|
|
2845
2862
|
p result
|
|
2846
2863
|
rescue DocSpring::ApiError => e
|
|
2847
2864
|
puts "Error when calling Client->rename_folder: #{e}"
|
|
@@ -2852,12 +2869,12 @@ end
|
|
|
2852
2869
|
|
|
2853
2870
|
This returns an Array which contains the response data, status code and headers.
|
|
2854
2871
|
|
|
2855
|
-
> <Array(<Folder>, Integer, Hash)> rename_folder_with_http_info(folder_id,
|
|
2872
|
+
> <Array(<Folder>, Integer, Hash)> rename_folder_with_http_info(folder_id, body)
|
|
2856
2873
|
|
|
2857
2874
|
```ruby
|
|
2858
2875
|
begin
|
|
2859
2876
|
# Rename a folder
|
|
2860
|
-
data, status_code, headers = api_instance.rename_folder_with_http_info(folder_id,
|
|
2877
|
+
data, status_code, headers = api_instance.rename_folder_with_http_info(folder_id, body)
|
|
2861
2878
|
p status_code # => 2xx
|
|
2862
2879
|
p headers # => { ... }
|
|
2863
2880
|
p data # => <Folder>
|
|
@@ -2870,8 +2887,8 @@ end
|
|
|
2870
2887
|
|
|
2871
2888
|
| Name | Type | Description | Notes |
|
|
2872
2889
|
| ---- | ---- | ----------- | ----- |
|
|
2873
|
-
| **folder_id** | **String** |
|
|
2874
|
-
| **
|
|
2890
|
+
| **folder_id** | **String** | The folder's ID. | |
|
|
2891
|
+
| **body** | [**RenameFolderRequest**](RenameFolderRequest.md) | The folder's new name. | |
|
|
2875
2892
|
|
|
2876
2893
|
### Return type
|
|
2877
2894
|
|
|
@@ -2889,11 +2906,11 @@ end
|
|
|
2889
2906
|
|
|
2890
2907
|
## restore_template_version
|
|
2891
2908
|
|
|
2892
|
-
> <
|
|
2909
|
+
> <Template> restore_template_version(template_id, body)
|
|
2893
2910
|
|
|
2894
2911
|
Restore a template version
|
|
2895
2912
|
|
|
2896
|
-
|
|
2913
|
+
Replaces the template's draft with a copy of one of its published versions.
|
|
2897
2914
|
|
|
2898
2915
|
### Examples
|
|
2899
2916
|
|
|
@@ -2908,12 +2925,12 @@ DocSpring.configure do |config|
|
|
|
2908
2925
|
end
|
|
2909
2926
|
|
|
2910
2927
|
api_instance = DocSpring::Client.new
|
|
2911
|
-
template_id = 'tpl_1234567890abcdef01' # String |
|
|
2912
|
-
|
|
2928
|
+
template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
|
|
2929
|
+
body = DocSpring::RestoreTemplateVersionRequest.new({version: 'version_example'}) # RestoreTemplateVersionRequest | The version to restore.
|
|
2913
2930
|
|
|
2914
2931
|
begin
|
|
2915
2932
|
# Restore a template version
|
|
2916
|
-
result = api_instance.restore_template_version(template_id,
|
|
2933
|
+
result = api_instance.restore_template_version(template_id, body)
|
|
2917
2934
|
p result
|
|
2918
2935
|
rescue DocSpring::ApiError => e
|
|
2919
2936
|
puts "Error when calling Client->restore_template_version: #{e}"
|
|
@@ -2924,15 +2941,15 @@ end
|
|
|
2924
2941
|
|
|
2925
2942
|
This returns an Array which contains the response data, status code and headers.
|
|
2926
2943
|
|
|
2927
|
-
> <Array(<
|
|
2944
|
+
> <Array(<Template>, Integer, Hash)> restore_template_version_with_http_info(template_id, body)
|
|
2928
2945
|
|
|
2929
2946
|
```ruby
|
|
2930
2947
|
begin
|
|
2931
2948
|
# Restore a template version
|
|
2932
|
-
data, status_code, headers = api_instance.restore_template_version_with_http_info(template_id,
|
|
2949
|
+
data, status_code, headers = api_instance.restore_template_version_with_http_info(template_id, body)
|
|
2933
2950
|
p status_code # => 2xx
|
|
2934
2951
|
p headers # => { ... }
|
|
2935
|
-
p data # => <
|
|
2952
|
+
p data # => <Template>
|
|
2936
2953
|
rescue DocSpring::ApiError => e
|
|
2937
2954
|
puts "Error when calling Client->restore_template_version_with_http_info: #{e}"
|
|
2938
2955
|
end
|
|
@@ -2942,12 +2959,12 @@ end
|
|
|
2942
2959
|
|
|
2943
2960
|
| Name | Type | Description | Notes |
|
|
2944
2961
|
| ---- | ---- | ----------- | ----- |
|
|
2945
|
-
| **template_id** | **String** |
|
|
2946
|
-
| **
|
|
2962
|
+
| **template_id** | **String** | The template's ID. | |
|
|
2963
|
+
| **body** | [**RestoreTemplateVersionRequest**](RestoreTemplateVersionRequest.md) | The version to restore. | |
|
|
2947
2964
|
|
|
2948
2965
|
### Return type
|
|
2949
2966
|
|
|
2950
|
-
[**
|
|
2967
|
+
[**Template**](Template.md)
|
|
2951
2968
|
|
|
2952
2969
|
### Authorization
|
|
2953
2970
|
|
|
@@ -2961,11 +2978,11 @@ end
|
|
|
2961
2978
|
|
|
2962
2979
|
## test_authentication
|
|
2963
2980
|
|
|
2964
|
-
> <
|
|
2981
|
+
> <AuthenticationCheck> test_authentication
|
|
2965
2982
|
|
|
2966
2983
|
Test authentication
|
|
2967
2984
|
|
|
2968
|
-
Checks whether your API token is valid by making an authenticated request.
|
|
2985
|
+
Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
|
|
2969
2986
|
|
|
2970
2987
|
### Examples
|
|
2971
2988
|
|
|
@@ -2994,7 +3011,7 @@ end
|
|
|
2994
3011
|
|
|
2995
3012
|
This returns an Array which contains the response data, status code and headers.
|
|
2996
3013
|
|
|
2997
|
-
> <Array(<
|
|
3014
|
+
> <Array(<AuthenticationCheck>, Integer, Hash)> test_authentication_with_http_info
|
|
2998
3015
|
|
|
2999
3016
|
```ruby
|
|
3000
3017
|
begin
|
|
@@ -3002,7 +3019,7 @@ begin
|
|
|
3002
3019
|
data, status_code, headers = api_instance.test_authentication_with_http_info
|
|
3003
3020
|
p status_code # => 2xx
|
|
3004
3021
|
p headers # => { ... }
|
|
3005
|
-
p data # => <
|
|
3022
|
+
p data # => <AuthenticationCheck>
|
|
3006
3023
|
rescue DocSpring::ApiError => e
|
|
3007
3024
|
puts "Error when calling Client->test_authentication_with_http_info: #{e}"
|
|
3008
3025
|
end
|
|
@@ -3014,7 +3031,7 @@ This endpoint does not need any parameter.
|
|
|
3014
3031
|
|
|
3015
3032
|
### Return type
|
|
3016
3033
|
|
|
3017
|
-
[**
|
|
3034
|
+
[**AuthenticationCheck**](AuthenticationCheck.md)
|
|
3018
3035
|
|
|
3019
3036
|
### Authorization
|
|
3020
3037
|
|
|
@@ -3026,13 +3043,13 @@ This endpoint does not need any parameter.
|
|
|
3026
3043
|
- **Accept**: application/json
|
|
3027
3044
|
|
|
3028
3045
|
|
|
3029
|
-
##
|
|
3046
|
+
## update_signature_request
|
|
3030
3047
|
|
|
3031
|
-
> <
|
|
3048
|
+
> <SignatureRequest> update_signature_request(signature_request_id, body)
|
|
3032
3049
|
|
|
3033
|
-
Update a
|
|
3050
|
+
Update a signature request
|
|
3034
3051
|
|
|
3035
|
-
|
|
3052
|
+
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.
|
|
3036
3053
|
|
|
3037
3054
|
### Examples
|
|
3038
3055
|
|
|
@@ -3047,33 +3064,33 @@ DocSpring.configure do |config|
|
|
|
3047
3064
|
end
|
|
3048
3065
|
|
|
3049
3066
|
api_instance = DocSpring::Client.new
|
|
3050
|
-
|
|
3051
|
-
|
|
3067
|
+
signature_request_id = 'srq_1234567890abcdef01' # String | The signature request's ID.
|
|
3068
|
+
body = DocSpring::UpdateSignatureRequestRequest.new # UpdateSignatureRequestRequest | The settings to change. Properties left out keep their values.
|
|
3052
3069
|
|
|
3053
3070
|
begin
|
|
3054
|
-
# Update a
|
|
3055
|
-
result = api_instance.
|
|
3071
|
+
# Update a signature request
|
|
3072
|
+
result = api_instance.update_signature_request(signature_request_id, body)
|
|
3056
3073
|
p result
|
|
3057
3074
|
rescue DocSpring::ApiError => e
|
|
3058
|
-
puts "Error when calling Client->
|
|
3075
|
+
puts "Error when calling Client->update_signature_request: #{e}"
|
|
3059
3076
|
end
|
|
3060
3077
|
```
|
|
3061
3078
|
|
|
3062
|
-
#### Using the
|
|
3079
|
+
#### Using the update_signature_request_with_http_info variant
|
|
3063
3080
|
|
|
3064
3081
|
This returns an Array which contains the response data, status code and headers.
|
|
3065
3082
|
|
|
3066
|
-
> <Array(<
|
|
3083
|
+
> <Array(<SignatureRequest>, Integer, Hash)> update_signature_request_with_http_info(signature_request_id, body)
|
|
3067
3084
|
|
|
3068
3085
|
```ruby
|
|
3069
3086
|
begin
|
|
3070
|
-
# Update a
|
|
3071
|
-
data, status_code, headers = api_instance.
|
|
3087
|
+
# Update a signature request
|
|
3088
|
+
data, status_code, headers = api_instance.update_signature_request_with_http_info(signature_request_id, body)
|
|
3072
3089
|
p status_code # => 2xx
|
|
3073
3090
|
p headers # => { ... }
|
|
3074
|
-
p data # => <
|
|
3091
|
+
p data # => <SignatureRequest>
|
|
3075
3092
|
rescue DocSpring::ApiError => e
|
|
3076
|
-
puts "Error when calling Client->
|
|
3093
|
+
puts "Error when calling Client->update_signature_request_with_http_info: #{e}"
|
|
3077
3094
|
end
|
|
3078
3095
|
```
|
|
3079
3096
|
|
|
@@ -3081,12 +3098,12 @@ end
|
|
|
3081
3098
|
|
|
3082
3099
|
| Name | Type | Description | Notes |
|
|
3083
3100
|
| ---- | ---- | ----------- | ----- |
|
|
3084
|
-
| **
|
|
3085
|
-
| **
|
|
3101
|
+
| **signature_request_id** | **String** | The signature request's ID. | |
|
|
3102
|
+
| **body** | [**UpdateSignatureRequestRequest**](UpdateSignatureRequestRequest.md) | The settings to change. Properties left out keep their values. | |
|
|
3086
3103
|
|
|
3087
3104
|
### Return type
|
|
3088
3105
|
|
|
3089
|
-
[**
|
|
3106
|
+
[**SignatureRequest**](SignatureRequest.md)
|
|
3090
3107
|
|
|
3091
3108
|
### Authorization
|
|
3092
3109
|
|
|
@@ -3100,11 +3117,11 @@ end
|
|
|
3100
3117
|
|
|
3101
3118
|
## update_template
|
|
3102
3119
|
|
|
3103
|
-
> <
|
|
3120
|
+
> <Template> update_template(template_id, body)
|
|
3104
3121
|
|
|
3105
|
-
Update a
|
|
3122
|
+
Update a template
|
|
3106
3123
|
|
|
3107
|
-
|
|
3124
|
+
Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object. Setting `parent_folder_id` moves the template and all of its published versions.
|
|
3108
3125
|
|
|
3109
3126
|
### Examples
|
|
3110
3127
|
|
|
@@ -3119,12 +3136,12 @@ DocSpring.configure do |config|
|
|
|
3119
3136
|
end
|
|
3120
3137
|
|
|
3121
3138
|
api_instance = DocSpring::Client.new
|
|
3122
|
-
template_id = '
|
|
3123
|
-
|
|
3139
|
+
template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
|
|
3140
|
+
body = DocSpring::UpdateTemplateRequest.new # UpdateTemplateRequest | The settings to change. Properties left out keep their values.
|
|
3124
3141
|
|
|
3125
3142
|
begin
|
|
3126
|
-
# Update a
|
|
3127
|
-
result = api_instance.update_template(template_id,
|
|
3143
|
+
# Update a template
|
|
3144
|
+
result = api_instance.update_template(template_id, body)
|
|
3128
3145
|
p result
|
|
3129
3146
|
rescue DocSpring::ApiError => e
|
|
3130
3147
|
puts "Error when calling Client->update_template: #{e}"
|
|
@@ -3135,15 +3152,15 @@ end
|
|
|
3135
3152
|
|
|
3136
3153
|
This returns an Array which contains the response data, status code and headers.
|
|
3137
3154
|
|
|
3138
|
-
> <Array(<
|
|
3155
|
+
> <Array(<Template>, Integer, Hash)> update_template_with_http_info(template_id, body)
|
|
3139
3156
|
|
|
3140
3157
|
```ruby
|
|
3141
3158
|
begin
|
|
3142
|
-
# Update a
|
|
3143
|
-
data, status_code, headers = api_instance.update_template_with_http_info(template_id,
|
|
3159
|
+
# Update a template
|
|
3160
|
+
data, status_code, headers = api_instance.update_template_with_http_info(template_id, body)
|
|
3144
3161
|
p status_code # => 2xx
|
|
3145
3162
|
p headers # => { ... }
|
|
3146
|
-
p data # => <
|
|
3163
|
+
p data # => <Template>
|
|
3147
3164
|
rescue DocSpring::ApiError => e
|
|
3148
3165
|
puts "Error when calling Client->update_template_with_http_info: #{e}"
|
|
3149
3166
|
end
|
|
@@ -3153,12 +3170,12 @@ end
|
|
|
3153
3170
|
|
|
3154
3171
|
| Name | Type | Description | Notes |
|
|
3155
3172
|
| ---- | ---- | ----------- | ----- |
|
|
3156
|
-
| **template_id** | **String** |
|
|
3157
|
-
| **
|
|
3173
|
+
| **template_id** | **String** | The template's ID. | |
|
|
3174
|
+
| **body** | [**UpdateTemplateRequest**](UpdateTemplateRequest.md) | The settings to change. Properties left out keep their values. | |
|
|
3158
3175
|
|
|
3159
3176
|
### Return type
|
|
3160
3177
|
|
|
3161
|
-
[**
|
|
3178
|
+
[**Template**](Template.md)
|
|
3162
3179
|
|
|
3163
3180
|
### Authorization
|
|
3164
3181
|
|
|
@@ -3172,11 +3189,11 @@ end
|
|
|
3172
3189
|
|
|
3173
3190
|
## update_template_document
|
|
3174
3191
|
|
|
3175
|
-
> <
|
|
3192
|
+
> <Template> update_template_document(template_id, body, opts)
|
|
3176
3193
|
|
|
3177
|
-
|
|
3194
|
+
Replace a template's PDF
|
|
3178
3195
|
|
|
3179
|
-
|
|
3196
|
+
Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF with the request instead, use PUT /templates/{template_id}/document/upload.
|
|
3180
3197
|
|
|
3181
3198
|
### Examples
|
|
3182
3199
|
|
|
@@ -3191,15 +3208,15 @@ DocSpring.configure do |config|
|
|
|
3191
3208
|
end
|
|
3192
3209
|
|
|
3193
3210
|
api_instance = DocSpring::Client.new
|
|
3194
|
-
template_id = 'tpl_1234567890abcdef01' # String |
|
|
3195
|
-
|
|
3211
|
+
template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
|
|
3212
|
+
body = DocSpring::UpdateTemplateDocumentRequest.new({cache_id: 'cache_id_example'}) # UpdateTemplateDocumentRequest | The new PDF.
|
|
3196
3213
|
opts = {
|
|
3197
|
-
|
|
3214
|
+
wait: true # Boolean | Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
3198
3215
|
}
|
|
3199
3216
|
|
|
3200
3217
|
begin
|
|
3201
|
-
#
|
|
3202
|
-
result = api_instance.update_template_document(template_id,
|
|
3218
|
+
# Replace a template's PDF
|
|
3219
|
+
result = api_instance.update_template_document(template_id, body, opts)
|
|
3203
3220
|
p result
|
|
3204
3221
|
rescue DocSpring::ApiError => e
|
|
3205
3222
|
puts "Error when calling Client->update_template_document: #{e}"
|
|
@@ -3210,15 +3227,15 @@ end
|
|
|
3210
3227
|
|
|
3211
3228
|
This returns an Array which contains the response data, status code and headers.
|
|
3212
3229
|
|
|
3213
|
-
> <Array(<
|
|
3230
|
+
> <Array(<Template>, Integer, Hash)> update_template_document_with_http_info(template_id, body, opts)
|
|
3214
3231
|
|
|
3215
3232
|
```ruby
|
|
3216
3233
|
begin
|
|
3217
|
-
#
|
|
3218
|
-
data, status_code, headers = api_instance.update_template_document_with_http_info(template_id,
|
|
3234
|
+
# Replace a template's PDF
|
|
3235
|
+
data, status_code, headers = api_instance.update_template_document_with_http_info(template_id, body, opts)
|
|
3219
3236
|
p status_code # => 2xx
|
|
3220
3237
|
p headers # => { ... }
|
|
3221
|
-
p data # => <
|
|
3238
|
+
p data # => <Template>
|
|
3222
3239
|
rescue DocSpring::ApiError => e
|
|
3223
3240
|
puts "Error when calling Client->update_template_document_with_http_info: #{e}"
|
|
3224
3241
|
end
|
|
@@ -3228,13 +3245,13 @@ end
|
|
|
3228
3245
|
|
|
3229
3246
|
| Name | Type | Description | Notes |
|
|
3230
3247
|
| ---- | ---- | ----------- | ----- |
|
|
3231
|
-
| **template_id** | **String** |
|
|
3232
|
-
| **
|
|
3233
|
-
| **
|
|
3248
|
+
| **template_id** | **String** | The template's ID. | |
|
|
3249
|
+
| **body** | [**UpdateTemplateDocumentRequest**](UpdateTemplateDocumentRequest.md) | The new PDF. | |
|
|
3250
|
+
| **wait** | **Boolean** | Wait until the PDF has been processed before responding. Default true on sync.api hosts. | [optional] |
|
|
3234
3251
|
|
|
3235
3252
|
### Return type
|
|
3236
3253
|
|
|
3237
|
-
[**
|
|
3254
|
+
[**Template**](Template.md)
|
|
3238
3255
|
|
|
3239
3256
|
### Authorization
|
|
3240
3257
|
|
|
@@ -3242,17 +3259,17 @@ end
|
|
|
3242
3259
|
|
|
3243
3260
|
### HTTP request headers
|
|
3244
3261
|
|
|
3245
|
-
- **Content-Type**:
|
|
3262
|
+
- **Content-Type**: application/json
|
|
3246
3263
|
- **Accept**: application/json
|
|
3247
3264
|
|
|
3248
3265
|
|
|
3249
|
-
##
|
|
3266
|
+
## update_webhook
|
|
3250
3267
|
|
|
3251
|
-
> <
|
|
3268
|
+
> <Webhook> update_webhook(webhook_id, body)
|
|
3252
3269
|
|
|
3253
|
-
Update a
|
|
3270
|
+
Update a webhook
|
|
3254
3271
|
|
|
3255
|
-
Updates a
|
|
3272
|
+
Updates a webhook. Only the properties you send change.
|
|
3256
3273
|
|
|
3257
3274
|
### Examples
|
|
3258
3275
|
|
|
@@ -3267,33 +3284,33 @@ DocSpring.configure do |config|
|
|
|
3267
3284
|
end
|
|
3268
3285
|
|
|
3269
3286
|
api_instance = DocSpring::Client.new
|
|
3270
|
-
|
|
3271
|
-
|
|
3287
|
+
webhook_id = 'webhook_id_example' # String | The webhook's ID.
|
|
3288
|
+
body = DocSpring::UpdateWebhookRequest.new # UpdateWebhookRequest | The settings to change. Properties left out keep their values.
|
|
3272
3289
|
|
|
3273
3290
|
begin
|
|
3274
|
-
# Update a
|
|
3275
|
-
result = api_instance.
|
|
3291
|
+
# Update a webhook
|
|
3292
|
+
result = api_instance.update_webhook(webhook_id, body)
|
|
3276
3293
|
p result
|
|
3277
3294
|
rescue DocSpring::ApiError => e
|
|
3278
|
-
puts "Error when calling Client->
|
|
3295
|
+
puts "Error when calling Client->update_webhook: #{e}"
|
|
3279
3296
|
end
|
|
3280
3297
|
```
|
|
3281
3298
|
|
|
3282
|
-
#### Using the
|
|
3299
|
+
#### Using the update_webhook_with_http_info variant
|
|
3283
3300
|
|
|
3284
3301
|
This returns an Array which contains the response data, status code and headers.
|
|
3285
3302
|
|
|
3286
|
-
> <Array(<
|
|
3303
|
+
> <Array(<Webhook>, Integer, Hash)> update_webhook_with_http_info(webhook_id, body)
|
|
3287
3304
|
|
|
3288
3305
|
```ruby
|
|
3289
3306
|
begin
|
|
3290
|
-
# Update a
|
|
3291
|
-
data, status_code, headers = api_instance.
|
|
3307
|
+
# Update a webhook
|
|
3308
|
+
data, status_code, headers = api_instance.update_webhook_with_http_info(webhook_id, body)
|
|
3292
3309
|
p status_code # => 2xx
|
|
3293
3310
|
p headers # => { ... }
|
|
3294
|
-
p data # => <
|
|
3311
|
+
p data # => <Webhook>
|
|
3295
3312
|
rescue DocSpring::ApiError => e
|
|
3296
|
-
puts "Error when calling Client->
|
|
3313
|
+
puts "Error when calling Client->update_webhook_with_http_info: #{e}"
|
|
3297
3314
|
end
|
|
3298
3315
|
```
|
|
3299
3316
|
|
|
@@ -3301,12 +3318,12 @@ end
|
|
|
3301
3318
|
|
|
3302
3319
|
| Name | Type | Description | Notes |
|
|
3303
3320
|
| ---- | ---- | ----------- | ----- |
|
|
3304
|
-
| **
|
|
3305
|
-
| **
|
|
3321
|
+
| **webhook_id** | **String** | The webhook's ID. | |
|
|
3322
|
+
| **body** | [**UpdateWebhookRequest**](UpdateWebhookRequest.md) | The settings to change. Properties left out keep their values. | |
|
|
3306
3323
|
|
|
3307
3324
|
### Return type
|
|
3308
3325
|
|
|
3309
|
-
[**
|
|
3326
|
+
[**Webhook**](Webhook.md)
|
|
3310
3327
|
|
|
3311
3328
|
### Authorization
|
|
3312
3329
|
|
|
@@ -3318,13 +3335,13 @@ end
|
|
|
3318
3335
|
- **Accept**: application/json
|
|
3319
3336
|
|
|
3320
3337
|
|
|
3321
|
-
##
|
|
3338
|
+
## upload_template
|
|
3322
3339
|
|
|
3323
|
-
> <
|
|
3340
|
+
> <Template> upload_template(document, opts)
|
|
3324
3341
|
|
|
3325
|
-
|
|
3342
|
+
Create a PDF template from an uploaded PDF
|
|
3326
3343
|
|
|
3327
|
-
|
|
3344
|
+
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.
|
|
3328
3345
|
|
|
3329
3346
|
### Examples
|
|
3330
3347
|
|
|
@@ -3339,33 +3356,43 @@ DocSpring.configure do |config|
|
|
|
3339
3356
|
end
|
|
3340
3357
|
|
|
3341
3358
|
api_instance = DocSpring::Client.new
|
|
3342
|
-
|
|
3343
|
-
|
|
3359
|
+
document = File.new('/path/to/some/file') # File | The PDF.
|
|
3360
|
+
opts = {
|
|
3361
|
+
wait: true, # Boolean | Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
3362
|
+
name: 'name_example', # String | The template's name.
|
|
3363
|
+
description: 'description_example', # String | The template's description.
|
|
3364
|
+
parent_folder_id: 'parent_folder_id_example', # String | The folder to put the template in. Left out, it's created at the root.
|
|
3365
|
+
ai_field_naming_language: DocSpring::AiFieldNamingLanguage::AUTO, # AiFieldNamingLanguage | 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.
|
|
3366
|
+
detect_fields: true, # Boolean | 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.
|
|
3367
|
+
field_source: DocSpring::FieldSetupSource::AUTO, # FieldSetupSource | 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.
|
|
3368
|
+
field_naming: DocSpring::FieldSetupNaming::AI, # FieldSetupNaming | 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`.
|
|
3369
|
+
field_logic: DocSpring::FieldSetupLogic::AI # FieldSetupLogic | 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.
|
|
3370
|
+
}
|
|
3344
3371
|
|
|
3345
3372
|
begin
|
|
3346
|
-
#
|
|
3347
|
-
result = api_instance.
|
|
3373
|
+
# Create a PDF template from an uploaded PDF
|
|
3374
|
+
result = api_instance.upload_template(document, opts)
|
|
3348
3375
|
p result
|
|
3349
3376
|
rescue DocSpring::ApiError => e
|
|
3350
|
-
puts "Error when calling Client->
|
|
3377
|
+
puts "Error when calling Client->upload_template: #{e}"
|
|
3351
3378
|
end
|
|
3352
3379
|
```
|
|
3353
3380
|
|
|
3354
|
-
#### Using the
|
|
3381
|
+
#### Using the upload_template_with_http_info variant
|
|
3355
3382
|
|
|
3356
3383
|
This returns an Array which contains the response data, status code and headers.
|
|
3357
3384
|
|
|
3358
|
-
> <Array(<
|
|
3385
|
+
> <Array(<Template>, Integer, Hash)> upload_template_with_http_info(document, opts)
|
|
3359
3386
|
|
|
3360
3387
|
```ruby
|
|
3361
3388
|
begin
|
|
3362
|
-
#
|
|
3363
|
-
data, status_code, headers = api_instance.
|
|
3389
|
+
# Create a PDF template from an uploaded PDF
|
|
3390
|
+
data, status_code, headers = api_instance.upload_template_with_http_info(document, opts)
|
|
3364
3391
|
p status_code # => 2xx
|
|
3365
3392
|
p headers # => { ... }
|
|
3366
|
-
p data # => <
|
|
3393
|
+
p data # => <Template>
|
|
3367
3394
|
rescue DocSpring::ApiError => e
|
|
3368
|
-
puts "Error when calling Client->
|
|
3395
|
+
puts "Error when calling Client->upload_template_with_http_info: #{e}"
|
|
3369
3396
|
end
|
|
3370
3397
|
```
|
|
3371
3398
|
|
|
@@ -3373,12 +3400,20 @@ end
|
|
|
3373
3400
|
|
|
3374
3401
|
| Name | Type | Description | Notes |
|
|
3375
3402
|
| ---- | ---- | ----------- | ----- |
|
|
3376
|
-
| **
|
|
3377
|
-
| **
|
|
3403
|
+
| **document** | **File** | The PDF. | |
|
|
3404
|
+
| **wait** | **Boolean** | Wait until the PDF has been processed before responding. Default true on sync.api hosts. | [optional] |
|
|
3405
|
+
| **name** | **String** | The template's name. | [optional] |
|
|
3406
|
+
| **description** | **String** | The template's description. | [optional] |
|
|
3407
|
+
| **parent_folder_id** | **String** | The folder to put the template in. Left out, it's created at the root. | [optional] |
|
|
3408
|
+
| **ai_field_naming_language** | [**AiFieldNamingLanguage**](AiFieldNamingLanguage.md) | 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. | [optional] |
|
|
3409
|
+
| **detect_fields** | **Boolean** | 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. | [optional] |
|
|
3410
|
+
| **field_source** | [**FieldSetupSource**](FieldSetupSource.md) | 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. | [optional] |
|
|
3411
|
+
| **field_naming** | [**FieldSetupNaming**](FieldSetupNaming.md) | 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`. | [optional] |
|
|
3412
|
+
| **field_logic** | [**FieldSetupLogic**](FieldSetupLogic.md) | 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. | [optional] |
|
|
3378
3413
|
|
|
3379
3414
|
### Return type
|
|
3380
3415
|
|
|
3381
|
-
[**
|
|
3416
|
+
[**Template**](Template.md)
|
|
3382
3417
|
|
|
3383
3418
|
### Authorization
|
|
3384
3419
|
|
|
@@ -3386,6 +3421,84 @@ end
|
|
|
3386
3421
|
|
|
3387
3422
|
### HTTP request headers
|
|
3388
3423
|
|
|
3389
|
-
- **Content-Type**:
|
|
3424
|
+
- **Content-Type**: multipart/form-data
|
|
3425
|
+
- **Accept**: application/json
|
|
3426
|
+
|
|
3427
|
+
|
|
3428
|
+
## upload_template_document
|
|
3429
|
+
|
|
3430
|
+
> <Template> upload_template_document(template_id, document, opts)
|
|
3431
|
+
|
|
3432
|
+
Replace a template's PDF with an uploaded PDF
|
|
3433
|
+
|
|
3434
|
+
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.
|
|
3435
|
+
|
|
3436
|
+
### Examples
|
|
3437
|
+
|
|
3438
|
+
```ruby
|
|
3439
|
+
require 'time'
|
|
3440
|
+
require 'docspring'
|
|
3441
|
+
# setup authorization
|
|
3442
|
+
DocSpring.configure do |config|
|
|
3443
|
+
# Configure HTTP basic authorization: api_token_basic
|
|
3444
|
+
config.username = 'YOUR USERNAME'
|
|
3445
|
+
config.password = 'YOUR PASSWORD'
|
|
3446
|
+
end
|
|
3447
|
+
|
|
3448
|
+
api_instance = DocSpring::Client.new
|
|
3449
|
+
template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
|
|
3450
|
+
document = File.new('/path/to/some/file') # File | The new PDF.
|
|
3451
|
+
opts = {
|
|
3452
|
+
wait: true, # Boolean | Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
3453
|
+
reimport_fields: true # Boolean | 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.
|
|
3454
|
+
}
|
|
3455
|
+
|
|
3456
|
+
begin
|
|
3457
|
+
# Replace a template's PDF with an uploaded PDF
|
|
3458
|
+
result = api_instance.upload_template_document(template_id, document, opts)
|
|
3459
|
+
p result
|
|
3460
|
+
rescue DocSpring::ApiError => e
|
|
3461
|
+
puts "Error when calling Client->upload_template_document: #{e}"
|
|
3462
|
+
end
|
|
3463
|
+
```
|
|
3464
|
+
|
|
3465
|
+
#### Using the upload_template_document_with_http_info variant
|
|
3466
|
+
|
|
3467
|
+
This returns an Array which contains the response data, status code and headers.
|
|
3468
|
+
|
|
3469
|
+
> <Array(<Template>, Integer, Hash)> upload_template_document_with_http_info(template_id, document, opts)
|
|
3470
|
+
|
|
3471
|
+
```ruby
|
|
3472
|
+
begin
|
|
3473
|
+
# Replace a template's PDF with an uploaded PDF
|
|
3474
|
+
data, status_code, headers = api_instance.upload_template_document_with_http_info(template_id, document, opts)
|
|
3475
|
+
p status_code # => 2xx
|
|
3476
|
+
p headers # => { ... }
|
|
3477
|
+
p data # => <Template>
|
|
3478
|
+
rescue DocSpring::ApiError => e
|
|
3479
|
+
puts "Error when calling Client->upload_template_document_with_http_info: #{e}"
|
|
3480
|
+
end
|
|
3481
|
+
```
|
|
3482
|
+
|
|
3483
|
+
### Parameters
|
|
3484
|
+
|
|
3485
|
+
| Name | Type | Description | Notes |
|
|
3486
|
+
| ---- | ---- | ----------- | ----- |
|
|
3487
|
+
| **template_id** | **String** | The template's ID. | |
|
|
3488
|
+
| **document** | **File** | The new PDF. | |
|
|
3489
|
+
| **wait** | **Boolean** | Wait until the PDF has been processed before responding. Default true on sync.api hosts. | [optional] |
|
|
3490
|
+
| **reimport_fields** | **Boolean** | 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. | [optional] |
|
|
3491
|
+
|
|
3492
|
+
### Return type
|
|
3493
|
+
|
|
3494
|
+
[**Template**](Template.md)
|
|
3495
|
+
|
|
3496
|
+
### Authorization
|
|
3497
|
+
|
|
3498
|
+
[api_token_basic](../README.md#api_token_basic)
|
|
3499
|
+
|
|
3500
|
+
### HTTP request headers
|
|
3501
|
+
|
|
3502
|
+
- **Content-Type**: multipart/form-data
|
|
3390
3503
|
- **Accept**: application/json
|
|
3391
3504
|
|