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/lib/docspring/api/client.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.26.0-DOCSPRING
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -20,16 +20,21 @@ module DocSpring
|
|
|
20
20
|
if api_client
|
|
21
21
|
@api_client = api_client
|
|
22
22
|
else
|
|
23
|
-
|
|
23
|
+
# A client given credentials, a host or a region gets its own ApiClient (with a copy of the default
|
|
24
|
+
# configuration), so two clients don't change each other's. Without them it uses the shared ApiClient.default.
|
|
25
|
+
@api_client = if [api_token_id, api_token_secret, host, region].all?(&:nil?)
|
|
26
|
+
ApiClient.default
|
|
27
|
+
else
|
|
28
|
+
ApiClient.new(Configuration.default.dup)
|
|
29
|
+
end
|
|
24
30
|
|
|
25
|
-
# Use
|
|
26
|
-
token_id = api_token_id
|
|
27
|
-
token_secret = api_token_secret
|
|
31
|
+
# Use the credentials passed in, or the environment variables. An empty string counts as not set.
|
|
32
|
+
token_id = [api_token_id, ENV.fetch('DOCSPRING_TOKEN_ID', nil)].find { |value| !value.to_s.empty? }
|
|
33
|
+
token_secret = [api_token_secret, ENV.fetch('DOCSPRING_TOKEN_SECRET', nil)].find { |value| !value.to_s.empty? }
|
|
28
34
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
end
|
|
35
|
+
# Without credentials the client is still created, and the API's 401 response says what's missing
|
|
36
|
+
@api_client.config.username = token_id if token_id
|
|
37
|
+
@api_client.config.password = token_secret if token_secret
|
|
33
38
|
|
|
34
39
|
# Resolve host from argument, DOCSPRING_HOST, or DOCSPRING_REGION (US/EU)
|
|
35
40
|
resolved_host = (host || ENV.fetch('DOCSPRING_HOST', nil)).to_s.strip
|
|
@@ -54,43 +59,40 @@ module DocSpring
|
|
|
54
59
|
h = match.post_match
|
|
55
60
|
end
|
|
56
61
|
@api_client.config.scheme = scheme
|
|
57
|
-
# base_path
|
|
58
|
-
|
|
62
|
+
# The generated base_path adds /api/v2. Any API version's path on the host (such as /api/v1 from a 3.x setup) is
|
|
63
|
+
# dropped.
|
|
64
|
+
@api_client.config.host = h.sub(%r{/+\z}, '').sub(%r{/api/v\d+\z}i, '')
|
|
59
65
|
end
|
|
60
66
|
end
|
|
61
67
|
end
|
|
62
68
|
|
|
63
|
-
#
|
|
64
|
-
#
|
|
65
|
-
# @param template_id [String]
|
|
66
|
-
# @param data [AddFieldsData]
|
|
69
|
+
# Copy a template
|
|
70
|
+
# Copies a template (its draft, or a published version) into a new template.
|
|
71
|
+
# @param template_id [String] The template's ID.
|
|
67
72
|
# @param [Hash] opts the optional parameters
|
|
68
|
-
# @
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
# @option opts [CopyTemplateRequest] :body Settings for the copy.
|
|
74
|
+
# @return [Template]
|
|
75
|
+
def copy_template(template_id, opts = {})
|
|
76
|
+
data, _status_code, _headers = copy_template_with_http_info(template_id, opts)
|
|
71
77
|
data
|
|
72
78
|
end
|
|
73
79
|
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
-
# @param template_id [String]
|
|
77
|
-
# @param data [AddFieldsData]
|
|
80
|
+
# Copy a template
|
|
81
|
+
# Copies a template (its draft, or a published version) into a new template.
|
|
82
|
+
# @param template_id [String] The template's ID.
|
|
78
83
|
# @param [Hash] opts the optional parameters
|
|
79
|
-
# @
|
|
80
|
-
|
|
84
|
+
# @option opts [CopyTemplateRequest] :body Settings for the copy.
|
|
85
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
86
|
+
def copy_template_with_http_info(template_id, opts = {})
|
|
81
87
|
if @api_client.config.debugging
|
|
82
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
88
|
+
@api_client.config.logger.debug 'Calling API: Client.copy_template ...'
|
|
83
89
|
end
|
|
84
90
|
# verify the required parameter 'template_id' is set
|
|
85
91
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
86
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.
|
|
87
|
-
end
|
|
88
|
-
# verify the required parameter 'data' is set
|
|
89
|
-
if @api_client.config.client_side_validation && data.nil?
|
|
90
|
-
fail ArgumentError, "Missing the required parameter 'data' when calling Client.add_fields_to_template"
|
|
92
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.copy_template"
|
|
91
93
|
end
|
|
92
94
|
# resource path
|
|
93
|
-
local_var_path = '/templates/{template_id}/
|
|
95
|
+
local_var_path = '/templates/{template_id}/copy'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
94
96
|
|
|
95
97
|
# query parameters
|
|
96
98
|
query_params = opts[:query_params] || {}
|
|
@@ -109,16 +111,16 @@ end
|
|
|
109
111
|
form_params = opts[:form_params] || {}
|
|
110
112
|
|
|
111
113
|
# http body (model)
|
|
112
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
114
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
|
113
115
|
|
|
114
116
|
# return_type
|
|
115
|
-
return_type = opts[:debug_return_type] || '
|
|
117
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
116
118
|
|
|
117
119
|
# auth_names
|
|
118
120
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
119
121
|
|
|
120
122
|
new_options = opts.merge(
|
|
121
|
-
:operation => :"Client.
|
|
123
|
+
:operation => :"Client.copy_template",
|
|
122
124
|
:header_params => header_params,
|
|
123
125
|
:query_params => query_params,
|
|
124
126
|
:form_params => form_params,
|
|
@@ -127,40 +129,40 @@ end
|
|
|
127
129
|
:return_type => return_type
|
|
128
130
|
)
|
|
129
131
|
|
|
130
|
-
data, status_code, headers = @api_client.call_api(:
|
|
132
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
131
133
|
if @api_client.config.debugging
|
|
132
|
-
@api_client.config.logger.debug "API called: Client#
|
|
134
|
+
@api_client.config.logger.debug "API called: Client#copy_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
133
135
|
end
|
|
134
136
|
return data, status_code, headers
|
|
135
137
|
end
|
|
136
138
|
|
|
137
|
-
#
|
|
138
|
-
#
|
|
139
|
-
# @param
|
|
139
|
+
# Combine PDFs
|
|
140
|
+
# 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.
|
|
141
|
+
# @param body [CreateCombinedPdfRequest] The PDFs to merge, and the combined PDF's settings.
|
|
140
142
|
# @param [Hash] opts the optional parameters
|
|
141
|
-
# @option opts [Boolean] :wait Wait
|
|
142
|
-
# @return [
|
|
143
|
-
def
|
|
144
|
-
data, _status_code, _headers =
|
|
143
|
+
# @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
144
|
+
# @return [CombinedPdf]
|
|
145
|
+
def create_combined_pdf(body, opts = {})
|
|
146
|
+
data, _status_code, _headers = create_combined_pdf_with_http_info(body, opts)
|
|
145
147
|
data
|
|
146
148
|
end
|
|
147
149
|
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
# @param
|
|
150
|
+
# Combine PDFs
|
|
151
|
+
# 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.
|
|
152
|
+
# @param body [CreateCombinedPdfRequest] The PDFs to merge, and the combined PDF's settings.
|
|
151
153
|
# @param [Hash] opts the optional parameters
|
|
152
|
-
# @option opts [Boolean] :wait Wait
|
|
153
|
-
# @return [Array<(
|
|
154
|
-
def
|
|
154
|
+
# @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
155
|
+
# @return [Array<(CombinedPdf, Integer, Hash)>] CombinedPdf data, response status code and response headers
|
|
156
|
+
def create_combined_pdf_with_http_info(body, opts = {})
|
|
155
157
|
if @api_client.config.debugging
|
|
156
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
158
|
+
@api_client.config.logger.debug 'Calling API: Client.create_combined_pdf ...'
|
|
157
159
|
end
|
|
158
|
-
# verify the required parameter '
|
|
159
|
-
if @api_client.config.client_side_validation &&
|
|
160
|
-
fail ArgumentError, "Missing the required parameter '
|
|
160
|
+
# verify the required parameter 'body' is set
|
|
161
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
162
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_combined_pdf"
|
|
161
163
|
end
|
|
162
164
|
# resource path
|
|
163
|
-
local_var_path = '/
|
|
165
|
+
local_var_path = '/combined_pdfs'
|
|
164
166
|
|
|
165
167
|
# query parameters
|
|
166
168
|
query_params = opts[:query_params] || {}
|
|
@@ -180,16 +182,16 @@ end
|
|
|
180
182
|
form_params = opts[:form_params] || {}
|
|
181
183
|
|
|
182
184
|
# http body (model)
|
|
183
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
185
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
184
186
|
|
|
185
187
|
# return_type
|
|
186
|
-
return_type = opts[:debug_return_type] || '
|
|
188
|
+
return_type = opts[:debug_return_type] || 'CombinedPdf'
|
|
187
189
|
|
|
188
190
|
# auth_names
|
|
189
191
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
190
192
|
|
|
191
193
|
new_options = opts.merge(
|
|
192
|
-
:operation => :"Client.
|
|
194
|
+
:operation => :"Client.create_combined_pdf",
|
|
193
195
|
:header_params => header_params,
|
|
194
196
|
:query_params => query_params,
|
|
195
197
|
:form_params => form_params,
|
|
@@ -200,36 +202,36 @@ end
|
|
|
200
202
|
|
|
201
203
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
202
204
|
if @api_client.config.debugging
|
|
203
|
-
@api_client.config.logger.debug "API called: Client#
|
|
205
|
+
@api_client.config.logger.debug "API called: Client#create_combined_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
204
206
|
end
|
|
205
207
|
return data, status_code, headers
|
|
206
208
|
end
|
|
207
209
|
|
|
208
|
-
#
|
|
209
|
-
#
|
|
210
|
-
# @param
|
|
210
|
+
# Create a custom file from an upload
|
|
211
|
+
# 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`.
|
|
212
|
+
# @param body [CreateCustomFileFromUploadRequest] The uploaded file to create the custom file from.
|
|
211
213
|
# @param [Hash] opts the optional parameters
|
|
212
|
-
# @return [
|
|
213
|
-
def
|
|
214
|
-
data, _status_code, _headers =
|
|
214
|
+
# @return [CustomFile]
|
|
215
|
+
def create_custom_file_from_upload(body, opts = {})
|
|
216
|
+
data, _status_code, _headers = create_custom_file_from_upload_with_http_info(body, opts)
|
|
215
217
|
data
|
|
216
218
|
end
|
|
217
219
|
|
|
218
|
-
#
|
|
219
|
-
#
|
|
220
|
-
# @param
|
|
220
|
+
# Create a custom file from an upload
|
|
221
|
+
# 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`.
|
|
222
|
+
# @param body [CreateCustomFileFromUploadRequest] The uploaded file to create the custom file from.
|
|
221
223
|
# @param [Hash] opts the optional parameters
|
|
222
|
-
# @return [Array<(
|
|
223
|
-
def
|
|
224
|
+
# @return [Array<(CustomFile, Integer, Hash)>] CustomFile data, response status code and response headers
|
|
225
|
+
def create_custom_file_from_upload_with_http_info(body, opts = {})
|
|
224
226
|
if @api_client.config.debugging
|
|
225
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
227
|
+
@api_client.config.logger.debug 'Calling API: Client.create_custom_file_from_upload ...'
|
|
226
228
|
end
|
|
227
|
-
# verify the required parameter '
|
|
228
|
-
if @api_client.config.client_side_validation &&
|
|
229
|
-
fail ArgumentError, "Missing the required parameter '
|
|
229
|
+
# verify the required parameter 'body' is set
|
|
230
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
231
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_custom_file_from_upload"
|
|
230
232
|
end
|
|
231
233
|
# resource path
|
|
232
|
-
local_var_path = '/
|
|
234
|
+
local_var_path = '/custom_files'
|
|
233
235
|
|
|
234
236
|
# query parameters
|
|
235
237
|
query_params = opts[:query_params] || {}
|
|
@@ -248,16 +250,16 @@ end
|
|
|
248
250
|
form_params = opts[:form_params] || {}
|
|
249
251
|
|
|
250
252
|
# http body (model)
|
|
251
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
253
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
252
254
|
|
|
253
255
|
# return_type
|
|
254
|
-
return_type = opts[:debug_return_type] || '
|
|
256
|
+
return_type = opts[:debug_return_type] || 'CustomFile'
|
|
255
257
|
|
|
256
258
|
# auth_names
|
|
257
259
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
258
260
|
|
|
259
261
|
new_options = opts.merge(
|
|
260
|
-
:operation => :"Client.
|
|
262
|
+
:operation => :"Client.create_custom_file_from_upload",
|
|
261
263
|
:header_params => header_params,
|
|
262
264
|
:query_params => query_params,
|
|
263
265
|
:form_params => form_params,
|
|
@@ -268,38 +270,36 @@ end
|
|
|
268
270
|
|
|
269
271
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
270
272
|
if @api_client.config.debugging
|
|
271
|
-
@api_client.config.logger.debug "API called: Client#
|
|
273
|
+
@api_client.config.logger.debug "API called: Client#create_custom_file_from_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
272
274
|
end
|
|
273
275
|
return data, status_code, headers
|
|
274
276
|
end
|
|
275
277
|
|
|
276
|
-
#
|
|
277
|
-
# Creates a
|
|
278
|
-
# @param
|
|
278
|
+
# Create a folder
|
|
279
|
+
# Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
280
|
+
# @param body [CreateFolderRequest] The folder to create.
|
|
279
281
|
# @param [Hash] opts the optional parameters
|
|
280
|
-
# @
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
data, _status_code, _headers = copy_template_with_http_info(template_id, opts)
|
|
282
|
+
# @return [Folder]
|
|
283
|
+
def create_folder(body, opts = {})
|
|
284
|
+
data, _status_code, _headers = create_folder_with_http_info(body, opts)
|
|
284
285
|
data
|
|
285
286
|
end
|
|
286
287
|
|
|
287
|
-
#
|
|
288
|
-
# Creates a
|
|
289
|
-
# @param
|
|
288
|
+
# Create a folder
|
|
289
|
+
# Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
290
|
+
# @param body [CreateFolderRequest] The folder to create.
|
|
290
291
|
# @param [Hash] opts the optional parameters
|
|
291
|
-
# @
|
|
292
|
-
|
|
293
|
-
def copy_template_with_http_info(template_id, opts = {})
|
|
292
|
+
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
293
|
+
def create_folder_with_http_info(body, opts = {})
|
|
294
294
|
if @api_client.config.debugging
|
|
295
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
295
|
+
@api_client.config.logger.debug 'Calling API: Client.create_folder ...'
|
|
296
296
|
end
|
|
297
|
-
# verify the required parameter '
|
|
298
|
-
if @api_client.config.client_side_validation &&
|
|
299
|
-
fail ArgumentError, "Missing the required parameter '
|
|
297
|
+
# verify the required parameter 'body' is set
|
|
298
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
299
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_folder"
|
|
300
300
|
end
|
|
301
301
|
# resource path
|
|
302
|
-
local_var_path = '/
|
|
302
|
+
local_var_path = '/folders'
|
|
303
303
|
|
|
304
304
|
# query parameters
|
|
305
305
|
query_params = opts[:query_params] || {}
|
|
@@ -318,16 +318,16 @@ end
|
|
|
318
318
|
form_params = opts[:form_params] || {}
|
|
319
319
|
|
|
320
320
|
# http body (model)
|
|
321
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
321
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
322
322
|
|
|
323
323
|
# return_type
|
|
324
|
-
return_type = opts[:debug_return_type] || '
|
|
324
|
+
return_type = opts[:debug_return_type] || 'Folder'
|
|
325
325
|
|
|
326
326
|
# auth_names
|
|
327
327
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
328
328
|
|
|
329
329
|
new_options = opts.merge(
|
|
330
|
-
:operation => :"Client.
|
|
330
|
+
:operation => :"Client.create_folder",
|
|
331
331
|
:header_params => header_params,
|
|
332
332
|
:query_params => query_params,
|
|
333
333
|
:form_params => form_params,
|
|
@@ -338,36 +338,42 @@ end
|
|
|
338
338
|
|
|
339
339
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
340
340
|
if @api_client.config.debugging
|
|
341
|
-
@api_client.config.logger.debug "API called: Client#
|
|
341
|
+
@api_client.config.logger.debug "API called: Client#create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
342
342
|
end
|
|
343
343
|
return data, status_code, headers
|
|
344
344
|
end
|
|
345
345
|
|
|
346
|
-
#
|
|
347
|
-
#
|
|
348
|
-
# @param
|
|
346
|
+
# Record a signature request event
|
|
347
|
+
# 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.
|
|
348
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
349
|
+
# @param body [CreateSignatureRequestEventRequest] The event to record.
|
|
349
350
|
# @param [Hash] opts the optional parameters
|
|
350
|
-
# @return [
|
|
351
|
-
def
|
|
352
|
-
data, _status_code, _headers =
|
|
351
|
+
# @return [SignatureRequestEvent]
|
|
352
|
+
def create_signature_request_event(signature_request_id, body, opts = {})
|
|
353
|
+
data, _status_code, _headers = create_signature_request_event_with_http_info(signature_request_id, body, opts)
|
|
353
354
|
data
|
|
354
355
|
end
|
|
355
356
|
|
|
356
|
-
#
|
|
357
|
-
#
|
|
358
|
-
# @param
|
|
357
|
+
# Record a signature request event
|
|
358
|
+
# 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.
|
|
359
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
360
|
+
# @param body [CreateSignatureRequestEventRequest] The event to record.
|
|
359
361
|
# @param [Hash] opts the optional parameters
|
|
360
|
-
# @return [Array<(
|
|
361
|
-
def
|
|
362
|
+
# @return [Array<(SignatureRequestEvent, Integer, Hash)>] SignatureRequestEvent data, response status code and response headers
|
|
363
|
+
def create_signature_request_event_with_http_info(signature_request_id, body, opts = {})
|
|
362
364
|
if @api_client.config.debugging
|
|
363
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
365
|
+
@api_client.config.logger.debug 'Calling API: Client.create_signature_request_event ...'
|
|
364
366
|
end
|
|
365
|
-
# verify the required parameter '
|
|
366
|
-
if @api_client.config.client_side_validation &&
|
|
367
|
-
fail ArgumentError, "Missing the required parameter '
|
|
367
|
+
# verify the required parameter 'signature_request_id' is set
|
|
368
|
+
if @api_client.config.client_side_validation && signature_request_id.nil?
|
|
369
|
+
fail ArgumentError, "Missing the required parameter 'signature_request_id' when calling Client.create_signature_request_event"
|
|
370
|
+
end
|
|
371
|
+
# verify the required parameter 'body' is set
|
|
372
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
373
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_signature_request_event"
|
|
368
374
|
end
|
|
369
375
|
# resource path
|
|
370
|
-
local_var_path = '/
|
|
376
|
+
local_var_path = '/signature_requests/{signature_request_id}/events'.sub('{signature_request_id}', CGI.escape(signature_request_id.to_s))
|
|
371
377
|
|
|
372
378
|
# query parameters
|
|
373
379
|
query_params = opts[:query_params] || {}
|
|
@@ -386,16 +392,16 @@ end
|
|
|
386
392
|
form_params = opts[:form_params] || {}
|
|
387
393
|
|
|
388
394
|
# http body (model)
|
|
389
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
395
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
390
396
|
|
|
391
397
|
# return_type
|
|
392
|
-
return_type = opts[:debug_return_type] || '
|
|
398
|
+
return_type = opts[:debug_return_type] || 'SignatureRequestEvent'
|
|
393
399
|
|
|
394
400
|
# auth_names
|
|
395
401
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
396
402
|
|
|
397
403
|
new_options = opts.merge(
|
|
398
|
-
:operation => :"Client.
|
|
404
|
+
:operation => :"Client.create_signature_request_event",
|
|
399
405
|
:header_params => header_params,
|
|
400
406
|
:query_params => query_params,
|
|
401
407
|
:form_params => form_params,
|
|
@@ -406,42 +412,38 @@ end
|
|
|
406
412
|
|
|
407
413
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
408
414
|
if @api_client.config.debugging
|
|
409
|
-
@api_client.config.logger.debug "API called: Client#
|
|
415
|
+
@api_client.config.logger.debug "API called: Client#create_signature_request_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
410
416
|
end
|
|
411
417
|
return data, status_code, headers
|
|
412
418
|
end
|
|
413
419
|
|
|
414
|
-
# Create a
|
|
415
|
-
#
|
|
416
|
-
# @param
|
|
417
|
-
# @param event [CreateSubmissionDataRequestEventRequest]
|
|
420
|
+
# Create a signature request token
|
|
421
|
+
# 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
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
418
423
|
# @param [Hash] opts the optional parameters
|
|
419
|
-
# @
|
|
420
|
-
|
|
421
|
-
|
|
424
|
+
# @option opts [CreateSignatureRequestTokenRequest] :body The kind of link to make. Send no body for an `api` token.
|
|
425
|
+
# @return [SignatureRequestToken]
|
|
426
|
+
def create_signature_request_token(signature_request_id, opts = {})
|
|
427
|
+
data, _status_code, _headers = create_signature_request_token_with_http_info(signature_request_id, opts)
|
|
422
428
|
data
|
|
423
429
|
end
|
|
424
430
|
|
|
425
|
-
# Create a
|
|
426
|
-
#
|
|
427
|
-
# @param
|
|
428
|
-
# @param event [CreateSubmissionDataRequestEventRequest]
|
|
431
|
+
# Create a signature request token
|
|
432
|
+
# 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.
|
|
433
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
429
434
|
# @param [Hash] opts the optional parameters
|
|
430
|
-
# @
|
|
431
|
-
|
|
435
|
+
# @option opts [CreateSignatureRequestTokenRequest] :body The kind of link to make. Send no body for an `api` token.
|
|
436
|
+
# @return [Array<(SignatureRequestToken, Integer, Hash)>] SignatureRequestToken data, response status code and response headers
|
|
437
|
+
def create_signature_request_token_with_http_info(signature_request_id, opts = {})
|
|
432
438
|
if @api_client.config.debugging
|
|
433
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
434
|
-
end
|
|
435
|
-
# verify the required parameter 'data_request_id' is set
|
|
436
|
-
if @api_client.config.client_side_validation && data_request_id.nil?
|
|
437
|
-
fail ArgumentError, "Missing the required parameter 'data_request_id' when calling Client.create_data_request_event"
|
|
439
|
+
@api_client.config.logger.debug 'Calling API: Client.create_signature_request_token ...'
|
|
438
440
|
end
|
|
439
|
-
# verify the required parameter '
|
|
440
|
-
if @api_client.config.client_side_validation &&
|
|
441
|
-
fail ArgumentError, "Missing the required parameter '
|
|
441
|
+
# verify the required parameter 'signature_request_id' is set
|
|
442
|
+
if @api_client.config.client_side_validation && signature_request_id.nil?
|
|
443
|
+
fail ArgumentError, "Missing the required parameter 'signature_request_id' when calling Client.create_signature_request_token"
|
|
442
444
|
end
|
|
443
445
|
# resource path
|
|
444
|
-
local_var_path = '/
|
|
446
|
+
local_var_path = '/signature_requests/{signature_request_id}/tokens'.sub('{signature_request_id}', CGI.escape(signature_request_id.to_s))
|
|
445
447
|
|
|
446
448
|
# query parameters
|
|
447
449
|
query_params = opts[:query_params] || {}
|
|
@@ -460,16 +462,16 @@ end
|
|
|
460
462
|
form_params = opts[:form_params] || {}
|
|
461
463
|
|
|
462
464
|
# http body (model)
|
|
463
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
465
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
|
464
466
|
|
|
465
467
|
# return_type
|
|
466
|
-
return_type = opts[:debug_return_type] || '
|
|
468
|
+
return_type = opts[:debug_return_type] || 'SignatureRequestToken'
|
|
467
469
|
|
|
468
470
|
# auth_names
|
|
469
471
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
470
472
|
|
|
471
473
|
new_options = opts.merge(
|
|
472
|
-
:operation => :"Client.
|
|
474
|
+
:operation => :"Client.create_signature_request_token",
|
|
473
475
|
:header_params => header_params,
|
|
474
476
|
:query_params => query_params,
|
|
475
477
|
:form_params => form_params,
|
|
@@ -480,109 +482,51 @@ end
|
|
|
480
482
|
|
|
481
483
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
482
484
|
if @api_client.config.debugging
|
|
483
|
-
@api_client.config.logger.debug "API called: Client#
|
|
485
|
+
@api_client.config.logger.debug "API called: Client#create_signature_request_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
484
486
|
end
|
|
485
487
|
return data, status_code, headers
|
|
486
488
|
end
|
|
487
489
|
|
|
488
|
-
#
|
|
489
|
-
# Creates
|
|
490
|
-
# @param
|
|
490
|
+
# Generate a PDF
|
|
491
|
+
# 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.
|
|
492
|
+
# @param template_id [String] The template's ID.
|
|
493
|
+
# @param body [CreateSubmissionRequest] The submission's data and settings.
|
|
491
494
|
# @param [Hash] opts the optional parameters
|
|
492
|
-
# @option opts [String] :
|
|
493
|
-
# @
|
|
494
|
-
|
|
495
|
-
|
|
495
|
+
# @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
|
|
496
|
+
# @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
497
|
+
# @return [Submission]
|
|
498
|
+
def create_submission(template_id, body, opts = {})
|
|
499
|
+
data, _status_code, _headers = create_submission_with_http_info(template_id, body, opts)
|
|
496
500
|
data
|
|
497
501
|
end
|
|
498
502
|
|
|
499
|
-
#
|
|
500
|
-
# Creates
|
|
501
|
-
# @param
|
|
503
|
+
# Generate a PDF
|
|
504
|
+
# 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.
|
|
505
|
+
# @param template_id [String] The template's ID.
|
|
506
|
+
# @param body [CreateSubmissionRequest] The submission's data and settings.
|
|
502
507
|
# @param [Hash] opts the optional parameters
|
|
503
|
-
# @option opts [String] :
|
|
504
|
-
# @
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
@api_client.config.logger.debug 'Calling API: Client.create_data_request_token ...'
|
|
508
|
-
end
|
|
509
|
-
# verify the required parameter 'data_request_id' is set
|
|
510
|
-
if @api_client.config.client_side_validation && data_request_id.nil?
|
|
511
|
-
fail ArgumentError, "Missing the required parameter 'data_request_id' when calling Client.create_data_request_token"
|
|
512
|
-
end
|
|
513
|
-
allowable_values = ["api", "email"]
|
|
514
|
-
if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
|
|
515
|
-
fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
|
|
516
|
-
end
|
|
517
|
-
# resource path
|
|
518
|
-
local_var_path = '/data_requests/{data_request_id}/tokens'.sub('{' + 'data_request_id' + '}', CGI.escape(data_request_id.to_s))
|
|
519
|
-
|
|
520
|
-
# query parameters
|
|
521
|
-
query_params = opts[:query_params] || {}
|
|
522
|
-
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
523
|
-
|
|
524
|
-
# header parameters
|
|
525
|
-
header_params = opts[:header_params] || {}
|
|
526
|
-
# HTTP header 'Accept' (if needed)
|
|
527
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
528
|
-
|
|
529
|
-
# form parameters
|
|
530
|
-
form_params = opts[:form_params] || {}
|
|
531
|
-
|
|
532
|
-
# http body (model)
|
|
533
|
-
post_body = opts[:debug_body]
|
|
534
|
-
|
|
535
|
-
# return_type
|
|
536
|
-
return_type = opts[:debug_return_type] || 'CreateSubmissionDataRequestTokenResponse'
|
|
537
|
-
|
|
538
|
-
# auth_names
|
|
539
|
-
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
540
|
-
|
|
541
|
-
new_options = opts.merge(
|
|
542
|
-
:operation => :"Client.create_data_request_token",
|
|
543
|
-
:header_params => header_params,
|
|
544
|
-
:query_params => query_params,
|
|
545
|
-
:form_params => form_params,
|
|
546
|
-
:body => post_body,
|
|
547
|
-
:auth_names => auth_names,
|
|
548
|
-
:return_type => return_type
|
|
549
|
-
)
|
|
550
|
-
|
|
551
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
508
|
+
# @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
|
|
509
|
+
# @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
510
|
+
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
511
|
+
def create_submission_with_http_info(template_id, body, opts = {})
|
|
552
512
|
if @api_client.config.debugging
|
|
553
|
-
@api_client.config.logger.debug
|
|
513
|
+
@api_client.config.logger.debug 'Calling API: Client.create_submission ...'
|
|
554
514
|
end
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
# Create a folder
|
|
559
|
-
# 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.
|
|
560
|
-
# @param data [CreateFolderData]
|
|
561
|
-
# @param [Hash] opts the optional parameters
|
|
562
|
-
# @return [Folder]
|
|
563
|
-
def create_folder(data, opts = {})
|
|
564
|
-
data, _status_code, _headers = create_folder_with_http_info(data, opts)
|
|
565
|
-
data
|
|
566
|
-
end
|
|
567
|
-
|
|
568
|
-
# Create a folder
|
|
569
|
-
# 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.
|
|
570
|
-
# @param data [CreateFolderData]
|
|
571
|
-
# @param [Hash] opts the optional parameters
|
|
572
|
-
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
573
|
-
def create_folder_with_http_info(data, opts = {})
|
|
574
|
-
if @api_client.config.debugging
|
|
575
|
-
@api_client.config.logger.debug 'Calling API: Client.create_folder ...'
|
|
515
|
+
# verify the required parameter 'template_id' is set
|
|
516
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
517
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.create_submission"
|
|
576
518
|
end
|
|
577
|
-
# verify the required parameter '
|
|
578
|
-
if @api_client.config.client_side_validation &&
|
|
579
|
-
fail ArgumentError, "Missing the required parameter '
|
|
519
|
+
# verify the required parameter 'body' is set
|
|
520
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
521
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_submission"
|
|
580
522
|
end
|
|
581
523
|
# resource path
|
|
582
|
-
local_var_path = '/
|
|
524
|
+
local_var_path = '/templates/{template_id}/submissions'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
583
525
|
|
|
584
526
|
# query parameters
|
|
585
527
|
query_params = opts[:query_params] || {}
|
|
528
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
529
|
+
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
586
530
|
|
|
587
531
|
# header parameters
|
|
588
532
|
header_params = opts[:header_params] || {}
|
|
@@ -598,16 +542,16 @@ end
|
|
|
598
542
|
form_params = opts[:form_params] || {}
|
|
599
543
|
|
|
600
544
|
# http body (model)
|
|
601
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
545
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
602
546
|
|
|
603
547
|
# return_type
|
|
604
|
-
return_type = opts[:debug_return_type] || '
|
|
548
|
+
return_type = opts[:debug_return_type] || 'Submission'
|
|
605
549
|
|
|
606
550
|
# auth_names
|
|
607
551
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
608
552
|
|
|
609
553
|
new_options = opts.merge(
|
|
610
|
-
:operation => :"Client.
|
|
554
|
+
:operation => :"Client.create_submission",
|
|
611
555
|
:header_params => header_params,
|
|
612
556
|
:query_params => query_params,
|
|
613
557
|
:form_params => form_params,
|
|
@@ -618,39 +562,42 @@ end
|
|
|
618
562
|
|
|
619
563
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
620
564
|
if @api_client.config.debugging
|
|
621
|
-
@api_client.config.logger.debug "API called: Client#
|
|
565
|
+
@api_client.config.logger.debug "API called: Client#create_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
622
566
|
end
|
|
623
567
|
return data, status_code, headers
|
|
624
568
|
end
|
|
625
569
|
|
|
626
|
-
#
|
|
627
|
-
# Creates
|
|
628
|
-
# @param
|
|
570
|
+
# Generate PDFs in a batch
|
|
571
|
+
# 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.
|
|
572
|
+
# @param body [CreateSubmissionBatchRequest] The submissions to create, and the settings they share.
|
|
629
573
|
# @param [Hash] opts the optional parameters
|
|
630
|
-
# @
|
|
631
|
-
|
|
632
|
-
|
|
574
|
+
# @option opts [Boolean] :wait Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
|
|
575
|
+
# @return [SubmissionBatch]
|
|
576
|
+
def create_submission_batch(body, opts = {})
|
|
577
|
+
data, _status_code, _headers = create_submission_batch_with_http_info(body, opts)
|
|
633
578
|
data
|
|
634
579
|
end
|
|
635
580
|
|
|
636
|
-
#
|
|
637
|
-
# Creates
|
|
638
|
-
# @param
|
|
581
|
+
# Generate PDFs in a batch
|
|
582
|
+
# 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.
|
|
583
|
+
# @param body [CreateSubmissionBatchRequest] The submissions to create, and the settings they share.
|
|
639
584
|
# @param [Hash] opts the optional parameters
|
|
640
|
-
# @
|
|
641
|
-
|
|
585
|
+
# @option opts [Boolean] :wait Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
|
|
586
|
+
# @return [Array<(SubmissionBatch, Integer, Hash)>] SubmissionBatch data, response status code and response headers
|
|
587
|
+
def create_submission_batch_with_http_info(body, opts = {})
|
|
642
588
|
if @api_client.config.debugging
|
|
643
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
589
|
+
@api_client.config.logger.debug 'Calling API: Client.create_submission_batch ...'
|
|
644
590
|
end
|
|
645
|
-
# verify the required parameter '
|
|
646
|
-
if @api_client.config.client_side_validation &&
|
|
647
|
-
fail ArgumentError, "Missing the required parameter '
|
|
591
|
+
# verify the required parameter 'body' is set
|
|
592
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
593
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_submission_batch"
|
|
648
594
|
end
|
|
649
595
|
# resource path
|
|
650
|
-
local_var_path = '/
|
|
596
|
+
local_var_path = '/submissions/batches'
|
|
651
597
|
|
|
652
598
|
# query parameters
|
|
653
599
|
query_params = opts[:query_params] || {}
|
|
600
|
+
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
654
601
|
|
|
655
602
|
# header parameters
|
|
656
603
|
header_params = opts[:header_params] || {}
|
|
@@ -666,16 +613,16 @@ end
|
|
|
666
613
|
form_params = opts[:form_params] || {}
|
|
667
614
|
|
|
668
615
|
# http body (model)
|
|
669
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
616
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
670
617
|
|
|
671
618
|
# return_type
|
|
672
|
-
return_type = opts[:debug_return_type] || '
|
|
619
|
+
return_type = opts[:debug_return_type] || 'SubmissionBatch'
|
|
673
620
|
|
|
674
621
|
# auth_names
|
|
675
622
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
676
623
|
|
|
677
624
|
new_options = opts.merge(
|
|
678
|
-
:operation => :"Client.
|
|
625
|
+
:operation => :"Client.create_submission_batch",
|
|
679
626
|
:header_params => header_params,
|
|
680
627
|
:query_params => query_params,
|
|
681
628
|
:form_params => form_params,
|
|
@@ -686,45 +633,35 @@ end
|
|
|
686
633
|
|
|
687
634
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
688
635
|
if @api_client.config.debugging
|
|
689
|
-
@api_client.config.logger.debug "API called: Client#
|
|
636
|
+
@api_client.config.logger.debug "API called: Client#create_submission_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
690
637
|
end
|
|
691
638
|
return data, status_code, headers
|
|
692
639
|
end
|
|
693
640
|
|
|
694
|
-
# Create a
|
|
695
|
-
# Creates a
|
|
696
|
-
# @param
|
|
697
|
-
# @param template_name [String]
|
|
641
|
+
# Create a template
|
|
642
|
+
# 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`.
|
|
643
|
+
# @param body [CreateTemplateRequest] The template to create.
|
|
698
644
|
# @param [Hash] opts the optional parameters
|
|
699
|
-
# @option opts [Boolean] :wait Wait
|
|
700
|
-
# @
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
def create_pdf_template(template_document, template_name, opts = {})
|
|
704
|
-
data, _status_code, _headers = create_pdf_template_with_http_info(template_document, template_name, opts)
|
|
645
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
646
|
+
# @return [Template]
|
|
647
|
+
def create_template(body, opts = {})
|
|
648
|
+
data, _status_code, _headers = create_template_with_http_info(body, opts)
|
|
705
649
|
data
|
|
706
650
|
end
|
|
707
651
|
|
|
708
|
-
# Create a
|
|
709
|
-
# Creates a
|
|
710
|
-
# @param
|
|
711
|
-
# @param template_name [String]
|
|
652
|
+
# Create a template
|
|
653
|
+
# 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`.
|
|
654
|
+
# @param body [CreateTemplateRequest] The template to create.
|
|
712
655
|
# @param [Hash] opts the optional parameters
|
|
713
|
-
# @option opts [Boolean] :wait Wait
|
|
714
|
-
# @
|
|
715
|
-
|
|
716
|
-
# @return [Array<(TemplatePreview, Integer, Hash)>] TemplatePreview data, response status code and response headers
|
|
717
|
-
def create_pdf_template_with_http_info(template_document, template_name, opts = {})
|
|
656
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
657
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
658
|
+
def create_template_with_http_info(body, opts = {})
|
|
718
659
|
if @api_client.config.debugging
|
|
719
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
720
|
-
end
|
|
721
|
-
# verify the required parameter 'template_document' is set
|
|
722
|
-
if @api_client.config.client_side_validation && template_document.nil?
|
|
723
|
-
fail ArgumentError, "Missing the required parameter 'template_document' when calling Client.create_pdf_template"
|
|
660
|
+
@api_client.config.logger.debug 'Calling API: Client.create_template ...'
|
|
724
661
|
end
|
|
725
|
-
# verify the required parameter '
|
|
726
|
-
if @api_client.config.client_side_validation &&
|
|
727
|
-
fail ArgumentError, "Missing the required parameter '
|
|
662
|
+
# verify the required parameter 'body' is set
|
|
663
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
664
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_template"
|
|
728
665
|
end
|
|
729
666
|
# resource path
|
|
730
667
|
local_var_path = '/templates'
|
|
@@ -738,29 +675,25 @@ end
|
|
|
738
675
|
# HTTP header 'Accept' (if needed)
|
|
739
676
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
740
677
|
# HTTP header 'Content-Type'
|
|
741
|
-
content_type = @api_client.select_header_content_type(['
|
|
678
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
742
679
|
if !content_type.nil?
|
|
743
680
|
header_params['Content-Type'] = content_type
|
|
744
681
|
end
|
|
745
682
|
|
|
746
683
|
# form parameters
|
|
747
684
|
form_params = opts[:form_params] || {}
|
|
748
|
-
form_params['template[document]'] = template_document
|
|
749
|
-
form_params['template[name]'] = template_name
|
|
750
|
-
form_params['template[description]'] = opts[:'template_description'] if !opts[:'template_description'].nil?
|
|
751
|
-
form_params['template[parent_folder_id]'] = opts[:'template_parent_folder_id'] if !opts[:'template_parent_folder_id'].nil?
|
|
752
685
|
|
|
753
686
|
# http body (model)
|
|
754
|
-
post_body = opts[:debug_body]
|
|
687
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
755
688
|
|
|
756
689
|
# return_type
|
|
757
|
-
return_type = opts[:debug_return_type] || '
|
|
690
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
758
691
|
|
|
759
692
|
# auth_names
|
|
760
693
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
761
694
|
|
|
762
695
|
new_options = opts.merge(
|
|
763
|
-
:operation => :"Client.
|
|
696
|
+
:operation => :"Client.create_template",
|
|
764
697
|
:header_params => header_params,
|
|
765
698
|
:query_params => query_params,
|
|
766
699
|
:form_params => form_params,
|
|
@@ -771,36 +704,36 @@ end
|
|
|
771
704
|
|
|
772
705
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
773
706
|
if @api_client.config.debugging
|
|
774
|
-
@api_client.config.logger.debug "API called: Client#
|
|
707
|
+
@api_client.config.logger.debug "API called: Client#create_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
775
708
|
end
|
|
776
709
|
return data, status_code, headers
|
|
777
710
|
end
|
|
778
711
|
|
|
779
|
-
# Create a
|
|
780
|
-
# Creates a
|
|
781
|
-
# @param
|
|
712
|
+
# Create a webhook
|
|
713
|
+
# 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.
|
|
714
|
+
# @param body [CreateWebhookRequest] The webhook to create.
|
|
782
715
|
# @param [Hash] opts the optional parameters
|
|
783
|
-
# @return [
|
|
784
|
-
def
|
|
785
|
-
data, _status_code, _headers =
|
|
716
|
+
# @return [Webhook]
|
|
717
|
+
def create_webhook(body, opts = {})
|
|
718
|
+
data, _status_code, _headers = create_webhook_with_http_info(body, opts)
|
|
786
719
|
data
|
|
787
720
|
end
|
|
788
721
|
|
|
789
|
-
# Create a
|
|
790
|
-
# Creates a
|
|
791
|
-
# @param
|
|
722
|
+
# Create a webhook
|
|
723
|
+
# 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.
|
|
724
|
+
# @param body [CreateWebhookRequest] The webhook to create.
|
|
792
725
|
# @param [Hash] opts the optional parameters
|
|
793
|
-
# @return [Array<(
|
|
794
|
-
def
|
|
726
|
+
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
727
|
+
def create_webhook_with_http_info(body, opts = {})
|
|
795
728
|
if @api_client.config.debugging
|
|
796
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
729
|
+
@api_client.config.logger.debug 'Calling API: Client.create_webhook ...'
|
|
797
730
|
end
|
|
798
|
-
# verify the required parameter '
|
|
799
|
-
if @api_client.config.client_side_validation &&
|
|
800
|
-
fail ArgumentError, "Missing the required parameter '
|
|
731
|
+
# verify the required parameter 'body' is set
|
|
732
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
733
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_webhook"
|
|
801
734
|
end
|
|
802
735
|
# resource path
|
|
803
|
-
local_var_path = '/
|
|
736
|
+
local_var_path = '/webhooks'
|
|
804
737
|
|
|
805
738
|
# query parameters
|
|
806
739
|
query_params = opts[:query_params] || {}
|
|
@@ -819,16 +752,16 @@ end
|
|
|
819
752
|
form_params = opts[:form_params] || {}
|
|
820
753
|
|
|
821
754
|
# http body (model)
|
|
822
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
755
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
823
756
|
|
|
824
757
|
# return_type
|
|
825
|
-
return_type = opts[:debug_return_type] || '
|
|
758
|
+
return_type = opts[:debug_return_type] || 'Webhook'
|
|
826
759
|
|
|
827
760
|
# auth_names
|
|
828
761
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
829
762
|
|
|
830
763
|
new_options = opts.merge(
|
|
831
|
-
:operation => :"Client.
|
|
764
|
+
:operation => :"Client.create_webhook",
|
|
832
765
|
:header_params => header_params,
|
|
833
766
|
:query_params => query_params,
|
|
834
767
|
:form_params => form_params,
|
|
@@ -839,36 +772,36 @@ end
|
|
|
839
772
|
|
|
840
773
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
841
774
|
if @api_client.config.debugging
|
|
842
|
-
@api_client.config.logger.debug "API called: Client#
|
|
775
|
+
@api_client.config.logger.debug "API called: Client#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
843
776
|
end
|
|
844
777
|
return data, status_code, headers
|
|
845
778
|
end
|
|
846
779
|
|
|
847
|
-
#
|
|
848
|
-
#
|
|
849
|
-
# @param
|
|
780
|
+
# Delete a custom file
|
|
781
|
+
# Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
782
|
+
# @param custom_file_id [String] The custom file's ID.
|
|
850
783
|
# @param [Hash] opts the optional parameters
|
|
851
|
-
# @return [
|
|
852
|
-
def
|
|
853
|
-
data, _status_code, _headers =
|
|
784
|
+
# @return [CustomFile]
|
|
785
|
+
def delete_custom_file(custom_file_id, opts = {})
|
|
786
|
+
data, _status_code, _headers = delete_custom_file_with_http_info(custom_file_id, opts)
|
|
854
787
|
data
|
|
855
788
|
end
|
|
856
789
|
|
|
857
|
-
#
|
|
858
|
-
#
|
|
859
|
-
# @param
|
|
790
|
+
# Delete a custom file
|
|
791
|
+
# Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
792
|
+
# @param custom_file_id [String] The custom file's ID.
|
|
860
793
|
# @param [Hash] opts the optional parameters
|
|
861
|
-
# @return [Array<(
|
|
862
|
-
def
|
|
794
|
+
# @return [Array<(CustomFile, Integer, Hash)>] CustomFile data, response status code and response headers
|
|
795
|
+
def delete_custom_file_with_http_info(custom_file_id, opts = {})
|
|
863
796
|
if @api_client.config.debugging
|
|
864
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
797
|
+
@api_client.config.logger.debug 'Calling API: Client.delete_custom_file ...'
|
|
865
798
|
end
|
|
866
|
-
# verify the required parameter '
|
|
867
|
-
if @api_client.config.client_side_validation &&
|
|
868
|
-
fail ArgumentError, "Missing the required parameter '
|
|
799
|
+
# verify the required parameter 'custom_file_id' is set
|
|
800
|
+
if @api_client.config.client_side_validation && custom_file_id.nil?
|
|
801
|
+
fail ArgumentError, "Missing the required parameter 'custom_file_id' when calling Client.delete_custom_file"
|
|
869
802
|
end
|
|
870
803
|
# resource path
|
|
871
|
-
local_var_path = '/
|
|
804
|
+
local_var_path = '/custom_files/{custom_file_id}'.sub('{custom_file_id}', CGI.escape(custom_file_id.to_s))
|
|
872
805
|
|
|
873
806
|
# query parameters
|
|
874
807
|
query_params = opts[:query_params] || {}
|
|
@@ -877,26 +810,21 @@ end
|
|
|
877
810
|
header_params = opts[:header_params] || {}
|
|
878
811
|
# HTTP header 'Accept' (if needed)
|
|
879
812
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
880
|
-
# HTTP header 'Content-Type'
|
|
881
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
882
|
-
if !content_type.nil?
|
|
883
|
-
header_params['Content-Type'] = content_type
|
|
884
|
-
end
|
|
885
813
|
|
|
886
814
|
# form parameters
|
|
887
815
|
form_params = opts[:form_params] || {}
|
|
888
816
|
|
|
889
817
|
# http body (model)
|
|
890
|
-
post_body = opts[:debug_body]
|
|
818
|
+
post_body = opts[:debug_body]
|
|
891
819
|
|
|
892
820
|
# return_type
|
|
893
|
-
return_type = opts[:debug_return_type] || '
|
|
821
|
+
return_type = opts[:debug_return_type] || 'CustomFile'
|
|
894
822
|
|
|
895
823
|
# auth_names
|
|
896
824
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
897
825
|
|
|
898
826
|
new_options = opts.merge(
|
|
899
|
-
:operation => :"Client.
|
|
827
|
+
:operation => :"Client.delete_custom_file",
|
|
900
828
|
:header_params => header_params,
|
|
901
829
|
:query_params => query_params,
|
|
902
830
|
:form_params => form_params,
|
|
@@ -905,16 +833,16 @@ end
|
|
|
905
833
|
:return_type => return_type
|
|
906
834
|
)
|
|
907
835
|
|
|
908
|
-
data, status_code, headers = @api_client.call_api(:
|
|
836
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
909
837
|
if @api_client.config.debugging
|
|
910
|
-
@api_client.config.logger.debug "API called: Client#
|
|
838
|
+
@api_client.config.logger.debug "API called: Client#delete_custom_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
911
839
|
end
|
|
912
840
|
return data, status_code, headers
|
|
913
841
|
end
|
|
914
842
|
|
|
915
843
|
# Delete a folder
|
|
916
|
-
# Deletes an empty folder.
|
|
917
|
-
# @param folder_id [String]
|
|
844
|
+
# Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
845
|
+
# @param folder_id [String] The folder's ID.
|
|
918
846
|
# @param [Hash] opts the optional parameters
|
|
919
847
|
# @return [Folder]
|
|
920
848
|
def delete_folder(folder_id, opts = {})
|
|
@@ -923,8 +851,8 @@ end
|
|
|
923
851
|
end
|
|
924
852
|
|
|
925
853
|
# Delete a folder
|
|
926
|
-
# Deletes an empty folder.
|
|
927
|
-
# @param folder_id [String]
|
|
854
|
+
# Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
855
|
+
# @param folder_id [String] The folder's ID.
|
|
928
856
|
# @param [Hash] opts the optional parameters
|
|
929
857
|
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
930
858
|
def delete_folder_with_http_info(folder_id, opts = {})
|
|
@@ -936,7 +864,7 @@ end
|
|
|
936
864
|
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.delete_folder"
|
|
937
865
|
end
|
|
938
866
|
# resource path
|
|
939
|
-
local_var_path = '/folders/{folder_id}'.sub('{
|
|
867
|
+
local_var_path = '/folders/{folder_id}'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
940
868
|
|
|
941
869
|
# query parameters
|
|
942
870
|
query_params = opts[:query_params] || {}
|
|
@@ -976,22 +904,22 @@ end
|
|
|
976
904
|
end
|
|
977
905
|
|
|
978
906
|
# Delete a template
|
|
979
|
-
# Deletes a template
|
|
980
|
-
# @param template_id [String]
|
|
907
|
+
# 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.
|
|
908
|
+
# @param template_id [String] The template's ID.
|
|
981
909
|
# @param [Hash] opts the optional parameters
|
|
982
|
-
# @option opts [String] :version
|
|
983
|
-
# @return [
|
|
910
|
+
# @option opts [String] :version Delete only this published version (`1.2.0`) or the draft (`draft`, when no version has been published). Without it, the draft and every published version are deleted.
|
|
911
|
+
# @return [Template]
|
|
984
912
|
def delete_template(template_id, opts = {})
|
|
985
913
|
data, _status_code, _headers = delete_template_with_http_info(template_id, opts)
|
|
986
914
|
data
|
|
987
915
|
end
|
|
988
916
|
|
|
989
917
|
# Delete a template
|
|
990
|
-
# Deletes a template
|
|
991
|
-
# @param template_id [String]
|
|
918
|
+
# 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.
|
|
919
|
+
# @param template_id [String] The template's ID.
|
|
992
920
|
# @param [Hash] opts the optional parameters
|
|
993
|
-
# @option opts [String] :version
|
|
994
|
-
# @return [Array<(
|
|
921
|
+
# @option opts [String] :version Delete only this published version (`1.2.0`) or the draft (`draft`, when no version has been published). Without it, the draft and every published version are deleted.
|
|
922
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
995
923
|
def delete_template_with_http_info(template_id, opts = {})
|
|
996
924
|
if @api_client.config.debugging
|
|
997
925
|
@api_client.config.logger.debug 'Calling API: Client.delete_template ...'
|
|
@@ -1001,7 +929,7 @@ end
|
|
|
1001
929
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.delete_template"
|
|
1002
930
|
end
|
|
1003
931
|
# resource path
|
|
1004
|
-
local_var_path = '/templates/{template_id}'.sub('{
|
|
932
|
+
local_var_path = '/templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
1005
933
|
|
|
1006
934
|
# query parameters
|
|
1007
935
|
query_params = opts[:query_params] || {}
|
|
@@ -1019,7 +947,7 @@ end
|
|
|
1019
947
|
post_body = opts[:debug_body]
|
|
1020
948
|
|
|
1021
949
|
# return_type
|
|
1022
|
-
return_type = opts[:debug_return_type] || '
|
|
950
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
1023
951
|
|
|
1024
952
|
# auth_names
|
|
1025
953
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -1042,8 +970,8 @@ end
|
|
|
1042
970
|
end
|
|
1043
971
|
|
|
1044
972
|
# Delete a webhook
|
|
1045
|
-
#
|
|
1046
|
-
# @param webhook_id [String]
|
|
973
|
+
# Deletes a webhook so it stops receiving events, and returns it.
|
|
974
|
+
# @param webhook_id [String] The webhook's ID.
|
|
1047
975
|
# @param [Hash] opts the optional parameters
|
|
1048
976
|
# @return [Webhook]
|
|
1049
977
|
def delete_webhook(webhook_id, opts = {})
|
|
@@ -1052,8 +980,8 @@ end
|
|
|
1052
980
|
end
|
|
1053
981
|
|
|
1054
982
|
# Delete a webhook
|
|
1055
|
-
#
|
|
1056
|
-
# @param webhook_id [String]
|
|
983
|
+
# Deletes a webhook so it stops receiving events, and returns it.
|
|
984
|
+
# @param webhook_id [String] The webhook's ID.
|
|
1057
985
|
# @param [Hash] opts the optional parameters
|
|
1058
986
|
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
1059
987
|
def delete_webhook_with_http_info(webhook_id, opts = {})
|
|
@@ -1065,7 +993,7 @@ end
|
|
|
1065
993
|
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling Client.delete_webhook"
|
|
1066
994
|
end
|
|
1067
995
|
# resource path
|
|
1068
|
-
local_var_path = '/webhooks/{webhook_id}'.sub('{
|
|
996
|
+
local_var_path = '/webhooks/{webhook_id}'.sub('{webhook_id}', CGI.escape(webhook_id.to_s))
|
|
1069
997
|
|
|
1070
998
|
# query parameters
|
|
1071
999
|
query_params = opts[:query_params] || {}
|
|
@@ -1104,31 +1032,31 @@ end
|
|
|
1104
1032
|
return data, status_code, headers
|
|
1105
1033
|
end
|
|
1106
1034
|
|
|
1107
|
-
# Expire a combined
|
|
1108
|
-
#
|
|
1109
|
-
# @param
|
|
1035
|
+
# Expire a combined PDF
|
|
1036
|
+
# Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
1037
|
+
# @param combined_pdf_id [String] The combined PDF's ID.
|
|
1110
1038
|
# @param [Hash] opts the optional parameters
|
|
1111
|
-
# @return [
|
|
1112
|
-
def
|
|
1113
|
-
data, _status_code, _headers =
|
|
1039
|
+
# @return [CombinedPdf]
|
|
1040
|
+
def expire_combined_pdf(combined_pdf_id, opts = {})
|
|
1041
|
+
data, _status_code, _headers = expire_combined_pdf_with_http_info(combined_pdf_id, opts)
|
|
1114
1042
|
data
|
|
1115
1043
|
end
|
|
1116
1044
|
|
|
1117
|
-
# Expire a combined
|
|
1118
|
-
#
|
|
1119
|
-
# @param
|
|
1045
|
+
# Expire a combined PDF
|
|
1046
|
+
# Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
1047
|
+
# @param combined_pdf_id [String] The combined PDF's ID.
|
|
1120
1048
|
# @param [Hash] opts the optional parameters
|
|
1121
|
-
# @return [Array<(
|
|
1122
|
-
def
|
|
1049
|
+
# @return [Array<(CombinedPdf, Integer, Hash)>] CombinedPdf data, response status code and response headers
|
|
1050
|
+
def expire_combined_pdf_with_http_info(combined_pdf_id, opts = {})
|
|
1123
1051
|
if @api_client.config.debugging
|
|
1124
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1052
|
+
@api_client.config.logger.debug 'Calling API: Client.expire_combined_pdf ...'
|
|
1125
1053
|
end
|
|
1126
|
-
# verify the required parameter '
|
|
1127
|
-
if @api_client.config.client_side_validation &&
|
|
1128
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1054
|
+
# verify the required parameter 'combined_pdf_id' is set
|
|
1055
|
+
if @api_client.config.client_side_validation && combined_pdf_id.nil?
|
|
1056
|
+
fail ArgumentError, "Missing the required parameter 'combined_pdf_id' when calling Client.expire_combined_pdf"
|
|
1129
1057
|
end
|
|
1130
1058
|
# resource path
|
|
1131
|
-
local_var_path = '/
|
|
1059
|
+
local_var_path = '/combined_pdfs/{combined_pdf_id}'.sub('{combined_pdf_id}', CGI.escape(combined_pdf_id.to_s))
|
|
1132
1060
|
|
|
1133
1061
|
# query parameters
|
|
1134
1062
|
query_params = opts[:query_params] || {}
|
|
@@ -1145,13 +1073,13 @@ end
|
|
|
1145
1073
|
post_body = opts[:debug_body]
|
|
1146
1074
|
|
|
1147
1075
|
# return_type
|
|
1148
|
-
return_type = opts[:debug_return_type] || '
|
|
1076
|
+
return_type = opts[:debug_return_type] || 'CombinedPdf'
|
|
1149
1077
|
|
|
1150
1078
|
# auth_names
|
|
1151
1079
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1152
1080
|
|
|
1153
1081
|
new_options = opts.merge(
|
|
1154
|
-
:operation => :"Client.
|
|
1082
|
+
:operation => :"Client.expire_combined_pdf",
|
|
1155
1083
|
:header_params => header_params,
|
|
1156
1084
|
:query_params => query_params,
|
|
1157
1085
|
:form_params => form_params,
|
|
@@ -1162,26 +1090,26 @@ end
|
|
|
1162
1090
|
|
|
1163
1091
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1164
1092
|
if @api_client.config.debugging
|
|
1165
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1093
|
+
@api_client.config.logger.debug "API called: Client#expire_combined_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1166
1094
|
end
|
|
1167
1095
|
return data, status_code, headers
|
|
1168
1096
|
end
|
|
1169
1097
|
|
|
1170
|
-
# Expire a
|
|
1171
|
-
#
|
|
1172
|
-
# @param submission_id [String]
|
|
1098
|
+
# Expire a submission
|
|
1099
|
+
# Deletes a submission's data and PDF now, and returns the expired submission.
|
|
1100
|
+
# @param submission_id [String] The submission's ID.
|
|
1173
1101
|
# @param [Hash] opts the optional parameters
|
|
1174
|
-
# @return [
|
|
1102
|
+
# @return [Submission]
|
|
1175
1103
|
def expire_submission(submission_id, opts = {})
|
|
1176
1104
|
data, _status_code, _headers = expire_submission_with_http_info(submission_id, opts)
|
|
1177
1105
|
data
|
|
1178
1106
|
end
|
|
1179
1107
|
|
|
1180
|
-
# Expire a
|
|
1181
|
-
#
|
|
1182
|
-
# @param submission_id [String]
|
|
1108
|
+
# Expire a submission
|
|
1109
|
+
# Deletes a submission's data and PDF now, and returns the expired submission.
|
|
1110
|
+
# @param submission_id [String] The submission's ID.
|
|
1183
1111
|
# @param [Hash] opts the optional parameters
|
|
1184
|
-
# @return [Array<(
|
|
1112
|
+
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
1185
1113
|
def expire_submission_with_http_info(submission_id, opts = {})
|
|
1186
1114
|
if @api_client.config.debugging
|
|
1187
1115
|
@api_client.config.logger.debug 'Calling API: Client.expire_submission ...'
|
|
@@ -1191,7 +1119,7 @@ end
|
|
|
1191
1119
|
fail ArgumentError, "Missing the required parameter 'submission_id' when calling Client.expire_submission"
|
|
1192
1120
|
end
|
|
1193
1121
|
# resource path
|
|
1194
|
-
local_var_path = '/submissions/{submission_id}'.sub('{
|
|
1122
|
+
local_var_path = '/submissions/{submission_id}'.sub('{submission_id}', CGI.escape(submission_id.to_s))
|
|
1195
1123
|
|
|
1196
1124
|
# query parameters
|
|
1197
1125
|
query_params = opts[:query_params] || {}
|
|
@@ -1208,7 +1136,7 @@ end
|
|
|
1208
1136
|
post_body = opts[:debug_body]
|
|
1209
1137
|
|
|
1210
1138
|
# return_type
|
|
1211
|
-
return_type = opts[:debug_return_type] || '
|
|
1139
|
+
return_type = opts[:debug_return_type] || 'Submission'
|
|
1212
1140
|
|
|
1213
1141
|
# auth_names
|
|
1214
1142
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -1230,68 +1158,54 @@ end
|
|
|
1230
1158
|
return data, status_code, headers
|
|
1231
1159
|
end
|
|
1232
1160
|
|
|
1233
|
-
# Generate a PDF
|
|
1234
|
-
#
|
|
1235
|
-
# @param
|
|
1236
|
-
# @param
|
|
1237
|
-
# @
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
def generate_pdf(template_id, submission, opts = {})
|
|
1241
|
-
data, _status_code, _headers = generate_pdf_with_http_info(template_id, submission, opts)
|
|
1161
|
+
# Generate a preview PDF
|
|
1162
|
+
# 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.
|
|
1163
|
+
# @param submission_id [String] The submission's ID.
|
|
1164
|
+
# @param [Hash] opts the optional parameters
|
|
1165
|
+
# @return [Submission]
|
|
1166
|
+
def generate_submission_preview(submission_id, opts = {})
|
|
1167
|
+
data, _status_code, _headers = generate_submission_preview_with_http_info(submission_id, opts)
|
|
1242
1168
|
data
|
|
1243
1169
|
end
|
|
1244
1170
|
|
|
1245
|
-
# Generate a PDF
|
|
1246
|
-
#
|
|
1247
|
-
# @param
|
|
1248
|
-
# @param submission [CreatePdfSubmissionData]
|
|
1171
|
+
# Generate a preview PDF
|
|
1172
|
+
# 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.
|
|
1173
|
+
# @param submission_id [String] The submission's ID.
|
|
1249
1174
|
# @param [Hash] opts the optional parameters
|
|
1250
|
-
# @
|
|
1251
|
-
|
|
1252
|
-
def generate_pdf_with_http_info(template_id, submission, opts = {})
|
|
1175
|
+
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
1176
|
+
def generate_submission_preview_with_http_info(submission_id, opts = {})
|
|
1253
1177
|
if @api_client.config.debugging
|
|
1254
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1255
|
-
end
|
|
1256
|
-
# verify the required parameter 'template_id' is set
|
|
1257
|
-
if @api_client.config.client_side_validation && template_id.nil?
|
|
1258
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.generate_pdf"
|
|
1178
|
+
@api_client.config.logger.debug 'Calling API: Client.generate_submission_preview ...'
|
|
1259
1179
|
end
|
|
1260
|
-
# verify the required parameter '
|
|
1261
|
-
if @api_client.config.client_side_validation &&
|
|
1262
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1180
|
+
# verify the required parameter 'submission_id' is set
|
|
1181
|
+
if @api_client.config.client_side_validation && submission_id.nil?
|
|
1182
|
+
fail ArgumentError, "Missing the required parameter 'submission_id' when calling Client.generate_submission_preview"
|
|
1263
1183
|
end
|
|
1264
1184
|
# resource path
|
|
1265
|
-
local_var_path = '/
|
|
1185
|
+
local_var_path = '/submissions/{submission_id}/generate_preview'.sub('{submission_id}', CGI.escape(submission_id.to_s))
|
|
1266
1186
|
|
|
1267
1187
|
# query parameters
|
|
1268
1188
|
query_params = opts[:query_params] || {}
|
|
1269
|
-
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
1270
1189
|
|
|
1271
1190
|
# header parameters
|
|
1272
1191
|
header_params = opts[:header_params] || {}
|
|
1273
1192
|
# HTTP header 'Accept' (if needed)
|
|
1274
1193
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1275
|
-
# HTTP header 'Content-Type'
|
|
1276
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1277
|
-
if !content_type.nil?
|
|
1278
|
-
header_params['Content-Type'] = content_type
|
|
1279
|
-
end
|
|
1280
1194
|
|
|
1281
1195
|
# form parameters
|
|
1282
1196
|
form_params = opts[:form_params] || {}
|
|
1283
1197
|
|
|
1284
1198
|
# http body (model)
|
|
1285
|
-
post_body = opts[:debug_body]
|
|
1199
|
+
post_body = opts[:debug_body]
|
|
1286
1200
|
|
|
1287
1201
|
# return_type
|
|
1288
|
-
return_type = opts[:debug_return_type] || '
|
|
1202
|
+
return_type = opts[:debug_return_type] || 'Submission'
|
|
1289
1203
|
|
|
1290
1204
|
# auth_names
|
|
1291
1205
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1292
1206
|
|
|
1293
1207
|
new_options = opts.merge(
|
|
1294
|
-
:operation => :"Client.
|
|
1208
|
+
:operation => :"Client.generate_submission_preview",
|
|
1295
1209
|
:header_params => header_params,
|
|
1296
1210
|
:query_params => query_params,
|
|
1297
1211
|
:form_params => form_params,
|
|
@@ -1302,36 +1216,36 @@ end
|
|
|
1302
1216
|
|
|
1303
1217
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1304
1218
|
if @api_client.config.debugging
|
|
1305
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1219
|
+
@api_client.config.logger.debug "API called: Client#generate_submission_preview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1306
1220
|
end
|
|
1307
1221
|
return data, status_code, headers
|
|
1308
1222
|
end
|
|
1309
1223
|
|
|
1310
|
-
#
|
|
1311
|
-
#
|
|
1312
|
-
# @param
|
|
1224
|
+
# Get a combined PDF
|
|
1225
|
+
# Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
1226
|
+
# @param combined_pdf_id [String] The combined PDF's ID.
|
|
1313
1227
|
# @param [Hash] opts the optional parameters
|
|
1314
|
-
# @return [
|
|
1315
|
-
def
|
|
1316
|
-
data, _status_code, _headers =
|
|
1228
|
+
# @return [CombinedPdf]
|
|
1229
|
+
def get_combined_pdf(combined_pdf_id, opts = {})
|
|
1230
|
+
data, _status_code, _headers = get_combined_pdf_with_http_info(combined_pdf_id, opts)
|
|
1317
1231
|
data
|
|
1318
1232
|
end
|
|
1319
1233
|
|
|
1320
|
-
#
|
|
1321
|
-
#
|
|
1322
|
-
# @param
|
|
1234
|
+
# Get a combined PDF
|
|
1235
|
+
# Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
1236
|
+
# @param combined_pdf_id [String] The combined PDF's ID.
|
|
1323
1237
|
# @param [Hash] opts the optional parameters
|
|
1324
|
-
# @return [Array<(
|
|
1325
|
-
def
|
|
1238
|
+
# @return [Array<(CombinedPdf, Integer, Hash)>] CombinedPdf data, response status code and response headers
|
|
1239
|
+
def get_combined_pdf_with_http_info(combined_pdf_id, opts = {})
|
|
1326
1240
|
if @api_client.config.debugging
|
|
1327
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1241
|
+
@api_client.config.logger.debug 'Calling API: Client.get_combined_pdf ...'
|
|
1328
1242
|
end
|
|
1329
|
-
# verify the required parameter '
|
|
1330
|
-
if @api_client.config.client_side_validation &&
|
|
1331
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1243
|
+
# verify the required parameter 'combined_pdf_id' is set
|
|
1244
|
+
if @api_client.config.client_side_validation && combined_pdf_id.nil?
|
|
1245
|
+
fail ArgumentError, "Missing the required parameter 'combined_pdf_id' when calling Client.get_combined_pdf"
|
|
1332
1246
|
end
|
|
1333
1247
|
# resource path
|
|
1334
|
-
local_var_path = '/
|
|
1248
|
+
local_var_path = '/combined_pdfs/{combined_pdf_id}'.sub('{combined_pdf_id}', CGI.escape(combined_pdf_id.to_s))
|
|
1335
1249
|
|
|
1336
1250
|
# query parameters
|
|
1337
1251
|
query_params = opts[:query_params] || {}
|
|
@@ -1348,13 +1262,13 @@ end
|
|
|
1348
1262
|
post_body = opts[:debug_body]
|
|
1349
1263
|
|
|
1350
1264
|
# return_type
|
|
1351
|
-
return_type = opts[:debug_return_type] || '
|
|
1265
|
+
return_type = opts[:debug_return_type] || 'CombinedPdf'
|
|
1352
1266
|
|
|
1353
1267
|
# auth_names
|
|
1354
1268
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1355
1269
|
|
|
1356
1270
|
new_options = opts.merge(
|
|
1357
|
-
:operation => :"Client.
|
|
1271
|
+
:operation => :"Client.get_combined_pdf",
|
|
1358
1272
|
:header_params => header_params,
|
|
1359
1273
|
:query_params => query_params,
|
|
1360
1274
|
:form_params => form_params,
|
|
@@ -1363,38 +1277,38 @@ end
|
|
|
1363
1277
|
:return_type => return_type
|
|
1364
1278
|
)
|
|
1365
1279
|
|
|
1366
|
-
data, status_code, headers = @api_client.call_api(:
|
|
1280
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1367
1281
|
if @api_client.config.debugging
|
|
1368
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1282
|
+
@api_client.config.logger.debug "API called: Client#get_combined_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1369
1283
|
end
|
|
1370
1284
|
return data, status_code, headers
|
|
1371
1285
|
end
|
|
1372
1286
|
|
|
1373
|
-
#
|
|
1374
|
-
#
|
|
1375
|
-
# @param
|
|
1287
|
+
# Get a custom file
|
|
1288
|
+
# Returns a custom file, with a temporary URL to download it.
|
|
1289
|
+
# @param custom_file_id [String] The custom file's ID.
|
|
1376
1290
|
# @param [Hash] opts the optional parameters
|
|
1377
|
-
# @return [
|
|
1378
|
-
def
|
|
1379
|
-
data, _status_code, _headers =
|
|
1291
|
+
# @return [CustomFile]
|
|
1292
|
+
def get_custom_file(custom_file_id, opts = {})
|
|
1293
|
+
data, _status_code, _headers = get_custom_file_with_http_info(custom_file_id, opts)
|
|
1380
1294
|
data
|
|
1381
1295
|
end
|
|
1382
1296
|
|
|
1383
|
-
#
|
|
1384
|
-
#
|
|
1385
|
-
# @param
|
|
1297
|
+
# Get a custom file
|
|
1298
|
+
# Returns a custom file, with a temporary URL to download it.
|
|
1299
|
+
# @param custom_file_id [String] The custom file's ID.
|
|
1386
1300
|
# @param [Hash] opts the optional parameters
|
|
1387
|
-
# @return [Array<(
|
|
1388
|
-
def
|
|
1301
|
+
# @return [Array<(CustomFile, Integer, Hash)>] CustomFile data, response status code and response headers
|
|
1302
|
+
def get_custom_file_with_http_info(custom_file_id, opts = {})
|
|
1389
1303
|
if @api_client.config.debugging
|
|
1390
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1304
|
+
@api_client.config.logger.debug 'Calling API: Client.get_custom_file ...'
|
|
1391
1305
|
end
|
|
1392
|
-
# verify the required parameter '
|
|
1393
|
-
if @api_client.config.client_side_validation &&
|
|
1394
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1306
|
+
# verify the required parameter 'custom_file_id' is set
|
|
1307
|
+
if @api_client.config.client_side_validation && custom_file_id.nil?
|
|
1308
|
+
fail ArgumentError, "Missing the required parameter 'custom_file_id' when calling Client.get_custom_file"
|
|
1395
1309
|
end
|
|
1396
1310
|
# resource path
|
|
1397
|
-
local_var_path = '/
|
|
1311
|
+
local_var_path = '/custom_files/{custom_file_id}'.sub('{custom_file_id}', CGI.escape(custom_file_id.to_s))
|
|
1398
1312
|
|
|
1399
1313
|
# query parameters
|
|
1400
1314
|
query_params = opts[:query_params] || {}
|
|
@@ -1411,13 +1325,13 @@ end
|
|
|
1411
1325
|
post_body = opts[:debug_body]
|
|
1412
1326
|
|
|
1413
1327
|
# return_type
|
|
1414
|
-
return_type = opts[:debug_return_type] || '
|
|
1328
|
+
return_type = opts[:debug_return_type] || 'CustomFile'
|
|
1415
1329
|
|
|
1416
1330
|
# auth_names
|
|
1417
1331
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1418
1332
|
|
|
1419
1333
|
new_options = opts.merge(
|
|
1420
|
-
:operation => :"Client.
|
|
1334
|
+
:operation => :"Client.get_custom_file",
|
|
1421
1335
|
:header_params => header_params,
|
|
1422
1336
|
:query_params => query_params,
|
|
1423
1337
|
:form_params => form_params,
|
|
@@ -1428,36 +1342,36 @@ end
|
|
|
1428
1342
|
|
|
1429
1343
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1430
1344
|
if @api_client.config.debugging
|
|
1431
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1345
|
+
@api_client.config.logger.debug "API called: Client#get_custom_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1432
1346
|
end
|
|
1433
1347
|
return data, status_code, headers
|
|
1434
1348
|
end
|
|
1435
1349
|
|
|
1436
|
-
#
|
|
1437
|
-
#
|
|
1438
|
-
# @param
|
|
1350
|
+
# Get a folder
|
|
1351
|
+
# Returns a folder.
|
|
1352
|
+
# @param folder_id [String] The folder's ID.
|
|
1439
1353
|
# @param [Hash] opts the optional parameters
|
|
1440
|
-
# @return [
|
|
1441
|
-
def
|
|
1442
|
-
data, _status_code, _headers =
|
|
1354
|
+
# @return [Folder]
|
|
1355
|
+
def get_folder(folder_id, opts = {})
|
|
1356
|
+
data, _status_code, _headers = get_folder_with_http_info(folder_id, opts)
|
|
1443
1357
|
data
|
|
1444
1358
|
end
|
|
1445
1359
|
|
|
1446
|
-
#
|
|
1447
|
-
#
|
|
1448
|
-
# @param
|
|
1360
|
+
# Get a folder
|
|
1361
|
+
# Returns a folder.
|
|
1362
|
+
# @param folder_id [String] The folder's ID.
|
|
1449
1363
|
# @param [Hash] opts the optional parameters
|
|
1450
|
-
# @return [Array<(
|
|
1451
|
-
def
|
|
1364
|
+
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
1365
|
+
def get_folder_with_http_info(folder_id, opts = {})
|
|
1452
1366
|
if @api_client.config.debugging
|
|
1453
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1367
|
+
@api_client.config.logger.debug 'Calling API: Client.get_folder ...'
|
|
1454
1368
|
end
|
|
1455
|
-
# verify the required parameter '
|
|
1456
|
-
if @api_client.config.client_side_validation &&
|
|
1457
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1369
|
+
# verify the required parameter 'folder_id' is set
|
|
1370
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
1371
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.get_folder"
|
|
1458
1372
|
end
|
|
1459
1373
|
# resource path
|
|
1460
|
-
local_var_path = '/
|
|
1374
|
+
local_var_path = '/folders/{folder_id}'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
1461
1375
|
|
|
1462
1376
|
# query parameters
|
|
1463
1377
|
query_params = opts[:query_params] || {}
|
|
@@ -1474,13 +1388,13 @@ end
|
|
|
1474
1388
|
post_body = opts[:debug_body]
|
|
1475
1389
|
|
|
1476
1390
|
# return_type
|
|
1477
|
-
return_type = opts[:debug_return_type] || '
|
|
1391
|
+
return_type = opts[:debug_return_type] || 'Folder'
|
|
1478
1392
|
|
|
1479
1393
|
# auth_names
|
|
1480
1394
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1481
1395
|
|
|
1482
1396
|
new_options = opts.merge(
|
|
1483
|
-
:operation => :"Client.
|
|
1397
|
+
:operation => :"Client.get_folder",
|
|
1484
1398
|
:header_params => header_params,
|
|
1485
1399
|
:query_params => query_params,
|
|
1486
1400
|
:form_params => form_params,
|
|
@@ -1491,36 +1405,30 @@ end
|
|
|
1491
1405
|
|
|
1492
1406
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1493
1407
|
if @api_client.config.debugging
|
|
1494
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1408
|
+
@api_client.config.logger.debug "API called: Client#get_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1495
1409
|
end
|
|
1496
1410
|
return data, status_code, headers
|
|
1497
1411
|
end
|
|
1498
1412
|
|
|
1499
|
-
#
|
|
1500
|
-
#
|
|
1501
|
-
# @param template_id [String]
|
|
1413
|
+
# Get a presigned URL to upload a file
|
|
1414
|
+
# 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.
|
|
1502
1415
|
# @param [Hash] opts the optional parameters
|
|
1503
|
-
# @return [
|
|
1504
|
-
def
|
|
1505
|
-
data, _status_code, _headers =
|
|
1416
|
+
# @return [UploadPresign]
|
|
1417
|
+
def get_presign_url(opts = {})
|
|
1418
|
+
data, _status_code, _headers = get_presign_url_with_http_info(opts)
|
|
1506
1419
|
data
|
|
1507
1420
|
end
|
|
1508
1421
|
|
|
1509
|
-
#
|
|
1510
|
-
#
|
|
1511
|
-
# @param template_id [String]
|
|
1422
|
+
# Get a presigned URL to upload a file
|
|
1423
|
+
# 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.
|
|
1512
1424
|
# @param [Hash] opts the optional parameters
|
|
1513
|
-
# @return [Array<(
|
|
1514
|
-
def
|
|
1425
|
+
# @return [Array<(UploadPresign, Integer, Hash)>] UploadPresign data, response status code and response headers
|
|
1426
|
+
def get_presign_url_with_http_info(opts = {})
|
|
1515
1427
|
if @api_client.config.debugging
|
|
1516
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1517
|
-
end
|
|
1518
|
-
# verify the required parameter 'template_id' is set
|
|
1519
|
-
if @api_client.config.client_side_validation && template_id.nil?
|
|
1520
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.get_full_template"
|
|
1428
|
+
@api_client.config.logger.debug 'Calling API: Client.get_presign_url ...'
|
|
1521
1429
|
end
|
|
1522
1430
|
# resource path
|
|
1523
|
-
local_var_path = '/
|
|
1431
|
+
local_var_path = '/uploads/presign'
|
|
1524
1432
|
|
|
1525
1433
|
# query parameters
|
|
1526
1434
|
query_params = opts[:query_params] || {}
|
|
@@ -1537,13 +1445,13 @@ end
|
|
|
1537
1445
|
post_body = opts[:debug_body]
|
|
1538
1446
|
|
|
1539
1447
|
# return_type
|
|
1540
|
-
return_type = opts[:debug_return_type] || '
|
|
1448
|
+
return_type = opts[:debug_return_type] || 'UploadPresign'
|
|
1541
1449
|
|
|
1542
1450
|
# auth_names
|
|
1543
1451
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1544
1452
|
|
|
1545
1453
|
new_options = opts.merge(
|
|
1546
|
-
:operation => :"Client.
|
|
1454
|
+
:operation => :"Client.get_presign_url",
|
|
1547
1455
|
:header_params => header_params,
|
|
1548
1456
|
:query_params => query_params,
|
|
1549
1457
|
:form_params => form_params,
|
|
@@ -1554,30 +1462,36 @@ end
|
|
|
1554
1462
|
|
|
1555
1463
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1556
1464
|
if @api_client.config.debugging
|
|
1557
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1465
|
+
@api_client.config.logger.debug "API called: Client#get_presign_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1558
1466
|
end
|
|
1559
1467
|
return data, status_code, headers
|
|
1560
1468
|
end
|
|
1561
1469
|
|
|
1562
|
-
# Get a
|
|
1563
|
-
# Returns a
|
|
1470
|
+
# Get a signature request
|
|
1471
|
+
# Returns a signature request, with the values the person has entered so far.
|
|
1472
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
1564
1473
|
# @param [Hash] opts the optional parameters
|
|
1565
|
-
# @return [
|
|
1566
|
-
def
|
|
1567
|
-
data, _status_code, _headers =
|
|
1474
|
+
# @return [SignatureRequest]
|
|
1475
|
+
def get_signature_request(signature_request_id, opts = {})
|
|
1476
|
+
data, _status_code, _headers = get_signature_request_with_http_info(signature_request_id, opts)
|
|
1568
1477
|
data
|
|
1569
1478
|
end
|
|
1570
1479
|
|
|
1571
|
-
# Get a
|
|
1572
|
-
# Returns a
|
|
1480
|
+
# Get a signature request
|
|
1481
|
+
# Returns a signature request, with the values the person has entered so far.
|
|
1482
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
1573
1483
|
# @param [Hash] opts the optional parameters
|
|
1574
|
-
# @return [Array<(
|
|
1575
|
-
def
|
|
1484
|
+
# @return [Array<(SignatureRequest, Integer, Hash)>] SignatureRequest data, response status code and response headers
|
|
1485
|
+
def get_signature_request_with_http_info(signature_request_id, opts = {})
|
|
1576
1486
|
if @api_client.config.debugging
|
|
1577
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1487
|
+
@api_client.config.logger.debug 'Calling API: Client.get_signature_request ...'
|
|
1488
|
+
end
|
|
1489
|
+
# verify the required parameter 'signature_request_id' is set
|
|
1490
|
+
if @api_client.config.client_side_validation && signature_request_id.nil?
|
|
1491
|
+
fail ArgumentError, "Missing the required parameter 'signature_request_id' when calling Client.get_signature_request"
|
|
1578
1492
|
end
|
|
1579
1493
|
# resource path
|
|
1580
|
-
local_var_path = '/
|
|
1494
|
+
local_var_path = '/signature_requests/{signature_request_id}'.sub('{signature_request_id}', CGI.escape(signature_request_id.to_s))
|
|
1581
1495
|
|
|
1582
1496
|
# query parameters
|
|
1583
1497
|
query_params = opts[:query_params] || {}
|
|
@@ -1594,13 +1508,13 @@ end
|
|
|
1594
1508
|
post_body = opts[:debug_body]
|
|
1595
1509
|
|
|
1596
1510
|
# return_type
|
|
1597
|
-
return_type = opts[:debug_return_type] || '
|
|
1511
|
+
return_type = opts[:debug_return_type] || 'SignatureRequest'
|
|
1598
1512
|
|
|
1599
1513
|
# auth_names
|
|
1600
1514
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1601
1515
|
|
|
1602
1516
|
new_options = opts.merge(
|
|
1603
|
-
:operation => :"Client.
|
|
1517
|
+
:operation => :"Client.get_signature_request",
|
|
1604
1518
|
:header_params => header_params,
|
|
1605
1519
|
:query_params => query_params,
|
|
1606
1520
|
:form_params => form_params,
|
|
@@ -1611,27 +1525,25 @@ end
|
|
|
1611
1525
|
|
|
1612
1526
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1613
1527
|
if @api_client.config.debugging
|
|
1614
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1528
|
+
@api_client.config.logger.debug "API called: Client#get_signature_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1615
1529
|
end
|
|
1616
1530
|
return data, status_code, headers
|
|
1617
1531
|
end
|
|
1618
1532
|
|
|
1619
|
-
#
|
|
1620
|
-
#
|
|
1621
|
-
# @param submission_id [String]
|
|
1533
|
+
# Get a submission
|
|
1534
|
+
# Returns a submission, with its data and links to download its PDF.
|
|
1535
|
+
# @param submission_id [String] The submission's ID.
|
|
1622
1536
|
# @param [Hash] opts the optional parameters
|
|
1623
|
-
# @option opts [Boolean] :include_data
|
|
1624
1537
|
# @return [Submission]
|
|
1625
1538
|
def get_submission(submission_id, opts = {})
|
|
1626
1539
|
data, _status_code, _headers = get_submission_with_http_info(submission_id, opts)
|
|
1627
1540
|
data
|
|
1628
1541
|
end
|
|
1629
1542
|
|
|
1630
|
-
#
|
|
1631
|
-
#
|
|
1632
|
-
# @param submission_id [String]
|
|
1543
|
+
# Get a submission
|
|
1544
|
+
# Returns a submission, with its data and links to download its PDF.
|
|
1545
|
+
# @param submission_id [String] The submission's ID.
|
|
1633
1546
|
# @param [Hash] opts the optional parameters
|
|
1634
|
-
# @option opts [Boolean] :include_data
|
|
1635
1547
|
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
1636
1548
|
def get_submission_with_http_info(submission_id, opts = {})
|
|
1637
1549
|
if @api_client.config.debugging
|
|
@@ -1642,11 +1554,10 @@ end
|
|
|
1642
1554
|
fail ArgumentError, "Missing the required parameter 'submission_id' when calling Client.get_submission"
|
|
1643
1555
|
end
|
|
1644
1556
|
# resource path
|
|
1645
|
-
local_var_path = '/submissions/{submission_id}'.sub('{
|
|
1557
|
+
local_var_path = '/submissions/{submission_id}'.sub('{submission_id}', CGI.escape(submission_id.to_s))
|
|
1646
1558
|
|
|
1647
1559
|
# query parameters
|
|
1648
1560
|
query_params = opts[:query_params] || {}
|
|
1649
|
-
query_params[:'include_data'] = opts[:'include_data'] if !opts[:'include_data'].nil?
|
|
1650
1561
|
|
|
1651
1562
|
# header parameters
|
|
1652
1563
|
header_params = opts[:header_params] || {}
|
|
@@ -1682,23 +1593,23 @@ end
|
|
|
1682
1593
|
return data, status_code, headers
|
|
1683
1594
|
end
|
|
1684
1595
|
|
|
1685
|
-
#
|
|
1686
|
-
#
|
|
1687
|
-
# @param submission_batch_id [String]
|
|
1596
|
+
# Get a batch
|
|
1597
|
+
# 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.
|
|
1598
|
+
# @param submission_batch_id [String] The batch's ID.
|
|
1688
1599
|
# @param [Hash] opts the optional parameters
|
|
1689
|
-
# @option opts [Boolean] :
|
|
1690
|
-
# @return [
|
|
1600
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
1601
|
+
# @return [SubmissionBatch]
|
|
1691
1602
|
def get_submission_batch(submission_batch_id, opts = {})
|
|
1692
1603
|
data, _status_code, _headers = get_submission_batch_with_http_info(submission_batch_id, opts)
|
|
1693
1604
|
data
|
|
1694
1605
|
end
|
|
1695
1606
|
|
|
1696
|
-
#
|
|
1697
|
-
#
|
|
1698
|
-
# @param submission_batch_id [String]
|
|
1607
|
+
# Get a batch
|
|
1608
|
+
# 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.
|
|
1609
|
+
# @param submission_batch_id [String] The batch's ID.
|
|
1699
1610
|
# @param [Hash] opts the optional parameters
|
|
1700
|
-
# @option opts [Boolean] :
|
|
1701
|
-
# @return [Array<(
|
|
1611
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
1612
|
+
# @return [Array<(SubmissionBatch, Integer, Hash)>] SubmissionBatch data, response status code and response headers
|
|
1702
1613
|
def get_submission_batch_with_http_info(submission_batch_id, opts = {})
|
|
1703
1614
|
if @api_client.config.debugging
|
|
1704
1615
|
@api_client.config.logger.debug 'Calling API: Client.get_submission_batch ...'
|
|
@@ -1708,11 +1619,11 @@ end
|
|
|
1708
1619
|
fail ArgumentError, "Missing the required parameter 'submission_batch_id' when calling Client.get_submission_batch"
|
|
1709
1620
|
end
|
|
1710
1621
|
# resource path
|
|
1711
|
-
local_var_path = '/submissions/batches/{submission_batch_id}'.sub('{
|
|
1622
|
+
local_var_path = '/submissions/batches/{submission_batch_id}'.sub('{submission_batch_id}', CGI.escape(submission_batch_id.to_s))
|
|
1712
1623
|
|
|
1713
1624
|
# query parameters
|
|
1714
1625
|
query_params = opts[:query_params] || {}
|
|
1715
|
-
query_params[:'
|
|
1626
|
+
query_params[:'include_data'] = opts[:'include_data'] if !opts[:'include_data'].nil?
|
|
1716
1627
|
|
|
1717
1628
|
# header parameters
|
|
1718
1629
|
header_params = opts[:header_params] || {}
|
|
@@ -1726,7 +1637,7 @@ end
|
|
|
1726
1637
|
post_body = opts[:debug_body]
|
|
1727
1638
|
|
|
1728
1639
|
# return_type
|
|
1729
|
-
return_type = opts[:debug_return_type] || '
|
|
1640
|
+
return_type = opts[:debug_return_type] || 'SubmissionBatch'
|
|
1730
1641
|
|
|
1731
1642
|
# auth_names
|
|
1732
1643
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -1748,21 +1659,23 @@ end
|
|
|
1748
1659
|
return data, status_code, headers
|
|
1749
1660
|
end
|
|
1750
1661
|
|
|
1751
|
-
#
|
|
1752
|
-
#
|
|
1753
|
-
# @param template_id [String]
|
|
1662
|
+
# Get a template
|
|
1663
|
+
# Returns a template: its draft, or one of its published versions.
|
|
1664
|
+
# @param template_id [String] The template's ID.
|
|
1754
1665
|
# @param [Hash] opts the optional parameters
|
|
1755
|
-
# @
|
|
1666
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1667
|
+
# @return [Template]
|
|
1756
1668
|
def get_template(template_id, opts = {})
|
|
1757
1669
|
data, _status_code, _headers = get_template_with_http_info(template_id, opts)
|
|
1758
1670
|
data
|
|
1759
1671
|
end
|
|
1760
1672
|
|
|
1761
|
-
#
|
|
1762
|
-
#
|
|
1763
|
-
# @param template_id [String]
|
|
1673
|
+
# Get a template
|
|
1674
|
+
# Returns a template: its draft, or one of its published versions.
|
|
1675
|
+
# @param template_id [String] The template's ID.
|
|
1764
1676
|
# @param [Hash] opts the optional parameters
|
|
1765
|
-
# @
|
|
1677
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1678
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
1766
1679
|
def get_template_with_http_info(template_id, opts = {})
|
|
1767
1680
|
if @api_client.config.debugging
|
|
1768
1681
|
@api_client.config.logger.debug 'Calling API: Client.get_template ...'
|
|
@@ -1772,10 +1685,11 @@ end
|
|
|
1772
1685
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.get_template"
|
|
1773
1686
|
end
|
|
1774
1687
|
# resource path
|
|
1775
|
-
local_var_path = '/templates/{template_id}'.sub('{
|
|
1688
|
+
local_var_path = '/templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
1776
1689
|
|
|
1777
1690
|
# query parameters
|
|
1778
1691
|
query_params = opts[:query_params] || {}
|
|
1692
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1779
1693
|
|
|
1780
1694
|
# header parameters
|
|
1781
1695
|
header_params = opts[:header_params] || {}
|
|
@@ -1789,7 +1703,7 @@ end
|
|
|
1789
1703
|
post_body = opts[:debug_body]
|
|
1790
1704
|
|
|
1791
1705
|
# return_type
|
|
1792
|
-
return_type = opts[:debug_return_type] || '
|
|
1706
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
1793
1707
|
|
|
1794
1708
|
# auth_names
|
|
1795
1709
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -1811,23 +1725,25 @@ end
|
|
|
1811
1725
|
return data, status_code, headers
|
|
1812
1726
|
end
|
|
1813
1727
|
|
|
1814
|
-
# Generate typed
|
|
1815
|
-
# Generates
|
|
1816
|
-
# @param template_id [String]
|
|
1817
|
-
# @param lang [
|
|
1728
|
+
# Generate typed code for a template's submission data
|
|
1729
|
+
# 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.
|
|
1730
|
+
# @param template_id [String] The template's ID.
|
|
1731
|
+
# @param lang [ModelCodeLanguage] The language to generate the code in.
|
|
1818
1732
|
# @param [Hash] opts the optional parameters
|
|
1819
|
-
# @
|
|
1733
|
+
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
|
|
1734
|
+
# @return [TemplateModelCode]
|
|
1820
1735
|
def get_template_model_code(template_id, lang, opts = {})
|
|
1821
1736
|
data, _status_code, _headers = get_template_model_code_with_http_info(template_id, lang, opts)
|
|
1822
1737
|
data
|
|
1823
1738
|
end
|
|
1824
1739
|
|
|
1825
|
-
# Generate typed
|
|
1826
|
-
# Generates
|
|
1827
|
-
# @param template_id [String]
|
|
1828
|
-
# @param lang [
|
|
1740
|
+
# Generate typed code for a template's submission data
|
|
1741
|
+
# 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.
|
|
1742
|
+
# @param template_id [String] The template's ID.
|
|
1743
|
+
# @param lang [ModelCodeLanguage] The language to generate the code in.
|
|
1829
1744
|
# @param [Hash] opts the optional parameters
|
|
1830
|
-
# @
|
|
1745
|
+
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
|
|
1746
|
+
# @return [Array<(TemplateModelCode, Integer, Hash)>] TemplateModelCode data, response status code and response headers
|
|
1831
1747
|
def get_template_model_code_with_http_info(template_id, lang, opts = {})
|
|
1832
1748
|
if @api_client.config.debugging
|
|
1833
1749
|
@api_client.config.logger.debug 'Calling API: Client.get_template_model_code ...'
|
|
@@ -1840,17 +1756,13 @@ end
|
|
|
1840
1756
|
if @api_client.config.client_side_validation && lang.nil?
|
|
1841
1757
|
fail ArgumentError, "Missing the required parameter 'lang' when calling Client.get_template_model_code"
|
|
1842
1758
|
end
|
|
1843
|
-
# verify enum value
|
|
1844
|
-
allowable_values = ["typescript", "javascript", "ruby", "python", "php", "java", "csharp", "elixir", "go"]
|
|
1845
|
-
if @api_client.config.client_side_validation && !allowable_values.include?(lang)
|
|
1846
|
-
fail ArgumentError, "invalid value for \"lang\", must be one of #{allowable_values}"
|
|
1847
|
-
end
|
|
1848
1759
|
# resource path
|
|
1849
|
-
local_var_path = '/templates/{template_id}/model_code'.sub('{
|
|
1760
|
+
local_var_path = '/templates/{template_id}/model_code'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
1850
1761
|
|
|
1851
1762
|
# query parameters
|
|
1852
1763
|
query_params = opts[:query_params] || {}
|
|
1853
1764
|
query_params[:'lang'] = lang
|
|
1765
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1854
1766
|
|
|
1855
1767
|
# header parameters
|
|
1856
1768
|
header_params = opts[:header_params] || {}
|
|
@@ -1864,7 +1776,7 @@ end
|
|
|
1864
1776
|
post_body = opts[:debug_body]
|
|
1865
1777
|
|
|
1866
1778
|
# return_type
|
|
1867
|
-
return_type = opts[:debug_return_type] || '
|
|
1779
|
+
return_type = opts[:debug_return_type] || 'TemplateModelCode'
|
|
1868
1780
|
|
|
1869
1781
|
# auth_names
|
|
1870
1782
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -1886,21 +1798,23 @@ end
|
|
|
1886
1798
|
return data, status_code, headers
|
|
1887
1799
|
end
|
|
1888
1800
|
|
|
1889
|
-
#
|
|
1890
|
-
#
|
|
1891
|
-
# @param template_id [String]
|
|
1801
|
+
# Get the JSON Schema of a template's submission data
|
|
1802
|
+
# 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.
|
|
1803
|
+
# @param template_id [String] The template's ID.
|
|
1892
1804
|
# @param [Hash] opts the optional parameters
|
|
1893
|
-
# @
|
|
1805
|
+
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
|
|
1806
|
+
# @return [Hash<String, Object>]
|
|
1894
1807
|
def get_template_schema(template_id, opts = {})
|
|
1895
1808
|
data, _status_code, _headers = get_template_schema_with_http_info(template_id, opts)
|
|
1896
1809
|
data
|
|
1897
1810
|
end
|
|
1898
1811
|
|
|
1899
|
-
#
|
|
1900
|
-
#
|
|
1901
|
-
# @param template_id [String]
|
|
1812
|
+
# Get the JSON Schema of a template's submission data
|
|
1813
|
+
# 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.
|
|
1814
|
+
# @param template_id [String] The template's ID.
|
|
1902
1815
|
# @param [Hash] opts the optional parameters
|
|
1903
|
-
# @
|
|
1816
|
+
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
|
|
1817
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
1904
1818
|
def get_template_schema_with_http_info(template_id, opts = {})
|
|
1905
1819
|
if @api_client.config.debugging
|
|
1906
1820
|
@api_client.config.logger.debug 'Calling API: Client.get_template_schema ...'
|
|
@@ -1910,10 +1824,11 @@ end
|
|
|
1910
1824
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.get_template_schema"
|
|
1911
1825
|
end
|
|
1912
1826
|
# resource path
|
|
1913
|
-
local_var_path = '/templates/{template_id}/schema'.sub('{
|
|
1827
|
+
local_var_path = '/templates/{template_id}/schema'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
1914
1828
|
|
|
1915
1829
|
# query parameters
|
|
1916
1830
|
query_params = opts[:query_params] || {}
|
|
1831
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1917
1832
|
|
|
1918
1833
|
# header parameters
|
|
1919
1834
|
header_params = opts[:header_params] || {}
|
|
@@ -1927,7 +1842,7 @@ end
|
|
|
1927
1842
|
post_body = opts[:debug_body]
|
|
1928
1843
|
|
|
1929
1844
|
# return_type
|
|
1930
|
-
return_type = opts[:debug_return_type] || '
|
|
1845
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
1931
1846
|
|
|
1932
1847
|
# auth_names
|
|
1933
1848
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -1950,8 +1865,8 @@ end
|
|
|
1950
1865
|
end
|
|
1951
1866
|
|
|
1952
1867
|
# Get a webhook
|
|
1953
|
-
#
|
|
1954
|
-
# @param webhook_id [String]
|
|
1868
|
+
# Returns a webhook.
|
|
1869
|
+
# @param webhook_id [String] The webhook's ID.
|
|
1955
1870
|
# @param [Hash] opts the optional parameters
|
|
1956
1871
|
# @return [Webhook]
|
|
1957
1872
|
def get_webhook(webhook_id, opts = {})
|
|
@@ -1960,8 +1875,8 @@ end
|
|
|
1960
1875
|
end
|
|
1961
1876
|
|
|
1962
1877
|
# Get a webhook
|
|
1963
|
-
#
|
|
1964
|
-
# @param webhook_id [String]
|
|
1878
|
+
# Returns a webhook.
|
|
1879
|
+
# @param webhook_id [String] The webhook's ID.
|
|
1965
1880
|
# @param [Hash] opts the optional parameters
|
|
1966
1881
|
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
1967
1882
|
def get_webhook_with_http_info(webhook_id, opts = {})
|
|
@@ -1973,7 +1888,7 @@ end
|
|
|
1973
1888
|
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling Client.get_webhook"
|
|
1974
1889
|
end
|
|
1975
1890
|
# resource path
|
|
1976
|
-
local_var_path = '/webhooks/{webhook_id}'.sub('{
|
|
1891
|
+
local_var_path = '/webhooks/{webhook_id}'.sub('{webhook_id}', CGI.escape(webhook_id.to_s))
|
|
1977
1892
|
|
|
1978
1893
|
# query parameters
|
|
1979
1894
|
query_params = opts[:query_params] || {}
|
|
@@ -2012,46 +1927,97 @@ end
|
|
|
2012
1927
|
return data, status_code, headers
|
|
2013
1928
|
end
|
|
2014
1929
|
|
|
2015
|
-
#
|
|
2016
|
-
# Returns
|
|
1930
|
+
# List combined PDFs
|
|
1931
|
+
# Returns the combined PDFs in your account, newest first, one page at a time.
|
|
2017
1932
|
# @param [Hash] opts the optional parameters
|
|
2018
|
-
# @option opts [Integer] :
|
|
2019
|
-
# @option opts [
|
|
2020
|
-
# @return [
|
|
2021
|
-
def
|
|
2022
|
-
data, _status_code, _headers =
|
|
1933
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
1934
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1935
|
+
# @return [CombinedPdfList]
|
|
1936
|
+
def list_combined_pdfs(opts = {})
|
|
1937
|
+
data, _status_code, _headers = list_combined_pdfs_with_http_info(opts)
|
|
2023
1938
|
data
|
|
2024
1939
|
end
|
|
2025
1940
|
|
|
2026
|
-
#
|
|
2027
|
-
# Returns
|
|
1941
|
+
# List combined PDFs
|
|
1942
|
+
# Returns the combined PDFs in your account, newest first, one page at a time.
|
|
2028
1943
|
# @param [Hash] opts the optional parameters
|
|
2029
|
-
# @option opts [Integer] :
|
|
2030
|
-
# @option opts [
|
|
2031
|
-
# @return [Array<(
|
|
2032
|
-
def
|
|
1944
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
1945
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1946
|
+
# @return [Array<(CombinedPdfList, Integer, Hash)>] CombinedPdfList data, response status code and response headers
|
|
1947
|
+
def list_combined_pdfs_with_http_info(opts = {})
|
|
2033
1948
|
if @api_client.config.debugging
|
|
2034
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
2035
|
-
end
|
|
2036
|
-
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
2037
|
-
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling Client.list_combined_submissions, must be greater than or equal to 1.'
|
|
1949
|
+
@api_client.config.logger.debug 'Calling API: Client.list_combined_pdfs ...'
|
|
2038
1950
|
end
|
|
1951
|
+
# resource path
|
|
1952
|
+
local_var_path = '/combined_pdfs'
|
|
2039
1953
|
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
1954
|
+
# query parameters
|
|
1955
|
+
query_params = opts[:query_params] || {}
|
|
1956
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1957
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1958
|
+
|
|
1959
|
+
# header parameters
|
|
1960
|
+
header_params = opts[:header_params] || {}
|
|
1961
|
+
# HTTP header 'Accept' (if needed)
|
|
1962
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1963
|
+
|
|
1964
|
+
# form parameters
|
|
1965
|
+
form_params = opts[:form_params] || {}
|
|
1966
|
+
|
|
1967
|
+
# http body (model)
|
|
1968
|
+
post_body = opts[:debug_body]
|
|
1969
|
+
|
|
1970
|
+
# return_type
|
|
1971
|
+
return_type = opts[:debug_return_type] || 'CombinedPdfList'
|
|
1972
|
+
|
|
1973
|
+
# auth_names
|
|
1974
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1975
|
+
|
|
1976
|
+
new_options = opts.merge(
|
|
1977
|
+
:operation => :"Client.list_combined_pdfs",
|
|
1978
|
+
:header_params => header_params,
|
|
1979
|
+
:query_params => query_params,
|
|
1980
|
+
:form_params => form_params,
|
|
1981
|
+
:body => post_body,
|
|
1982
|
+
:auth_names => auth_names,
|
|
1983
|
+
:return_type => return_type
|
|
1984
|
+
)
|
|
2043
1985
|
|
|
2044
|
-
|
|
2045
|
-
|
|
1986
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1987
|
+
if @api_client.config.debugging
|
|
1988
|
+
@api_client.config.logger.debug "API called: Client#list_combined_pdfs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2046
1989
|
end
|
|
1990
|
+
return data, status_code, headers
|
|
1991
|
+
end
|
|
1992
|
+
|
|
1993
|
+
# List custom files
|
|
1994
|
+
# Returns the custom files in your account, newest first, one page at a time.
|
|
1995
|
+
# @param [Hash] opts the optional parameters
|
|
1996
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
1997
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
1998
|
+
# @return [CustomFileList]
|
|
1999
|
+
def list_custom_files(opts = {})
|
|
2000
|
+
data, _status_code, _headers = list_custom_files_with_http_info(opts)
|
|
2001
|
+
data
|
|
2002
|
+
end
|
|
2047
2003
|
|
|
2004
|
+
# List custom files
|
|
2005
|
+
# Returns the custom files in your account, newest first, one page at a time.
|
|
2006
|
+
# @param [Hash] opts the optional parameters
|
|
2007
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2008
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
2009
|
+
# @return [Array<(CustomFileList, Integer, Hash)>] CustomFileList data, response status code and response headers
|
|
2010
|
+
def list_custom_files_with_http_info(opts = {})
|
|
2011
|
+
if @api_client.config.debugging
|
|
2012
|
+
@api_client.config.logger.debug 'Calling API: Client.list_custom_files ...'
|
|
2013
|
+
end
|
|
2048
2014
|
# resource path
|
|
2049
|
-
local_var_path = '/
|
|
2015
|
+
local_var_path = '/custom_files'
|
|
2050
2016
|
|
|
2051
2017
|
# query parameters
|
|
2052
2018
|
query_params = opts[:query_params] || {}
|
|
2053
|
-
query_params[:'
|
|
2054
|
-
query_params[:'
|
|
2019
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2020
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2055
2021
|
|
|
2056
2022
|
# header parameters
|
|
2057
2023
|
header_params = opts[:header_params] || {}
|
|
@@ -2065,13 +2031,13 @@ end
|
|
|
2065
2031
|
post_body = opts[:debug_body]
|
|
2066
2032
|
|
|
2067
2033
|
# return_type
|
|
2068
|
-
return_type = opts[:debug_return_type] || '
|
|
2034
|
+
return_type = opts[:debug_return_type] || 'CustomFileList'
|
|
2069
2035
|
|
|
2070
2036
|
# auth_names
|
|
2071
2037
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2072
2038
|
|
|
2073
2039
|
new_options = opts.merge(
|
|
2074
|
-
:operation => :"Client.
|
|
2040
|
+
:operation => :"Client.list_custom_files",
|
|
2075
2041
|
:header_params => header_params,
|
|
2076
2042
|
:query_params => query_params,
|
|
2077
2043
|
:form_params => form_params,
|
|
@@ -2082,36 +2048,42 @@ end
|
|
|
2082
2048
|
|
|
2083
2049
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2084
2050
|
if @api_client.config.debugging
|
|
2085
|
-
@api_client.config.logger.debug "API called: Client#
|
|
2051
|
+
@api_client.config.logger.debug "API called: Client#list_custom_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2086
2052
|
end
|
|
2087
2053
|
return data, status_code, headers
|
|
2088
2054
|
end
|
|
2089
2055
|
|
|
2090
|
-
#
|
|
2091
|
-
# Returns
|
|
2056
|
+
# List folders
|
|
2057
|
+
# Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
2092
2058
|
# @param [Hash] opts the optional parameters
|
|
2093
|
-
# @option opts [String] :parent_folder_id
|
|
2094
|
-
# @
|
|
2059
|
+
# @option opts [String] :parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
2060
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2061
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
2062
|
+
# @return [FolderList]
|
|
2095
2063
|
def list_folders(opts = {})
|
|
2096
2064
|
data, _status_code, _headers = list_folders_with_http_info(opts)
|
|
2097
2065
|
data
|
|
2098
2066
|
end
|
|
2099
2067
|
|
|
2100
|
-
#
|
|
2101
|
-
# Returns
|
|
2068
|
+
# List folders
|
|
2069
|
+
# Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
2102
2070
|
# @param [Hash] opts the optional parameters
|
|
2103
|
-
# @option opts [String] :parent_folder_id
|
|
2104
|
-
# @
|
|
2071
|
+
# @option opts [String] :parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
2072
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2073
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
2074
|
+
# @return [Array<(FolderList, Integer, Hash)>] FolderList data, response status code and response headers
|
|
2105
2075
|
def list_folders_with_http_info(opts = {})
|
|
2106
2076
|
if @api_client.config.debugging
|
|
2107
2077
|
@api_client.config.logger.debug 'Calling API: Client.list_folders ...'
|
|
2108
2078
|
end
|
|
2109
2079
|
# resource path
|
|
2110
|
-
local_var_path = '/folders
|
|
2080
|
+
local_var_path = '/folders'
|
|
2111
2081
|
|
|
2112
2082
|
# query parameters
|
|
2113
2083
|
query_params = opts[:query_params] || {}
|
|
2114
2084
|
query_params[:'parent_folder_id'] = opts[:'parent_folder_id'] if !opts[:'parent_folder_id'].nil?
|
|
2085
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2086
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2115
2087
|
|
|
2116
2088
|
# header parameters
|
|
2117
2089
|
header_params = opts[:header_params] || {}
|
|
@@ -2125,7 +2097,7 @@ end
|
|
|
2125
2097
|
post_body = opts[:debug_body]
|
|
2126
2098
|
|
|
2127
2099
|
# return_type
|
|
2128
|
-
return_type = opts[:debug_return_type] || '
|
|
2100
|
+
return_type = opts[:debug_return_type] || 'FolderList'
|
|
2129
2101
|
|
|
2130
2102
|
# auth_names
|
|
2131
2103
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2147,31 +2119,33 @@ end
|
|
|
2147
2119
|
return data, status_code, headers
|
|
2148
2120
|
end
|
|
2149
2121
|
|
|
2150
|
-
# List
|
|
2151
|
-
# Returns
|
|
2122
|
+
# List submissions
|
|
2123
|
+
# 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`.
|
|
2152
2124
|
# @param [Hash] opts the optional parameters
|
|
2153
|
-
# @option opts [String] :
|
|
2154
|
-
# @option opts [
|
|
2155
|
-
# @option opts [
|
|
2156
|
-
# @option opts [
|
|
2157
|
-
# @option opts [
|
|
2158
|
-
# @option opts [
|
|
2159
|
-
# @
|
|
2125
|
+
# @option opts [String] :template_id Only list this template's submissions.
|
|
2126
|
+
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
2127
|
+
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
2128
|
+
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
2129
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
2130
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2131
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
2132
|
+
# @return [SubmissionList]
|
|
2160
2133
|
def list_submissions(opts = {})
|
|
2161
2134
|
data, _status_code, _headers = list_submissions_with_http_info(opts)
|
|
2162
2135
|
data
|
|
2163
2136
|
end
|
|
2164
2137
|
|
|
2165
|
-
# List
|
|
2166
|
-
# Returns
|
|
2138
|
+
# List submissions
|
|
2139
|
+
# 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`.
|
|
2167
2140
|
# @param [Hash] opts the optional parameters
|
|
2168
|
-
# @option opts [String] :
|
|
2169
|
-
# @option opts [
|
|
2170
|
-
# @option opts [
|
|
2171
|
-
# @option opts [
|
|
2172
|
-
# @option opts [
|
|
2173
|
-
# @option opts [
|
|
2174
|
-
# @
|
|
2141
|
+
# @option opts [String] :template_id Only list this template's submissions.
|
|
2142
|
+
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
2143
|
+
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
2144
|
+
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
2145
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
2146
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2147
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
2148
|
+
# @return [Array<(SubmissionList, Integer, Hash)>] SubmissionList data, response status code and response headers
|
|
2175
2149
|
def list_submissions_with_http_info(opts = {})
|
|
2176
2150
|
if @api_client.config.debugging
|
|
2177
2151
|
@api_client.config.logger.debug 'Calling API: Client.list_submissions ...'
|
|
@@ -2181,12 +2155,13 @@ end
|
|
|
2181
2155
|
|
|
2182
2156
|
# query parameters
|
|
2183
2157
|
query_params = opts[:query_params] || {}
|
|
2184
|
-
query_params[:'
|
|
2185
|
-
query_params[:'
|
|
2158
|
+
query_params[:'template_id'] = opts[:'template_id'] if !opts[:'template_id'].nil?
|
|
2159
|
+
query_params[:'test'] = opts[:'test'] if !opts[:'test'].nil?
|
|
2186
2160
|
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
|
2187
2161
|
query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
|
2188
|
-
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
2189
2162
|
query_params[:'include_data'] = opts[:'include_data'] if !opts[:'include_data'].nil?
|
|
2163
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2164
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2190
2165
|
|
|
2191
2166
|
# header parameters
|
|
2192
2167
|
header_params = opts[:header_params] || {}
|
|
@@ -2200,7 +2175,7 @@ end
|
|
|
2200
2175
|
post_body = opts[:debug_body]
|
|
2201
2176
|
|
|
2202
2177
|
# return_type
|
|
2203
|
-
return_type = opts[:debug_return_type] || '
|
|
2178
|
+
return_type = opts[:debug_return_type] || 'SubmissionList'
|
|
2204
2179
|
|
|
2205
2180
|
# auth_names
|
|
2206
2181
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2222,33 +2197,33 @@ end
|
|
|
2222
2197
|
return data, status_code, headers
|
|
2223
2198
|
end
|
|
2224
2199
|
|
|
2225
|
-
# List
|
|
2226
|
-
# Returns a
|
|
2227
|
-
# @param template_id [String]
|
|
2200
|
+
# List a template's submissions
|
|
2201
|
+
# Returns a template's submissions (from every version of the template), newest first.
|
|
2202
|
+
# @param template_id [String] The template's ID.
|
|
2228
2203
|
# @param [Hash] opts the optional parameters
|
|
2229
|
-
# @option opts [
|
|
2230
|
-
# @option opts [
|
|
2231
|
-
# @option opts [
|
|
2232
|
-
# @option opts [
|
|
2233
|
-
# @option opts [
|
|
2234
|
-
# @option opts [
|
|
2235
|
-
# @return [
|
|
2204
|
+
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
2205
|
+
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
2206
|
+
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
2207
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
2208
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2209
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
2210
|
+
# @return [SubmissionList]
|
|
2236
2211
|
def list_template_submissions(template_id, opts = {})
|
|
2237
2212
|
data, _status_code, _headers = list_template_submissions_with_http_info(template_id, opts)
|
|
2238
2213
|
data
|
|
2239
2214
|
end
|
|
2240
2215
|
|
|
2241
|
-
# List
|
|
2242
|
-
# Returns a
|
|
2243
|
-
# @param template_id [String]
|
|
2216
|
+
# List a template's submissions
|
|
2217
|
+
# Returns a template's submissions (from every version of the template), newest first.
|
|
2218
|
+
# @param template_id [String] The template's ID.
|
|
2244
2219
|
# @param [Hash] opts the optional parameters
|
|
2245
|
-
# @option opts [
|
|
2246
|
-
# @option opts [
|
|
2247
|
-
# @option opts [
|
|
2248
|
-
# @option opts [
|
|
2249
|
-
# @option opts [
|
|
2250
|
-
# @option opts [
|
|
2251
|
-
# @return [Array<(
|
|
2220
|
+
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
2221
|
+
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
2222
|
+
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
2223
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
2224
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2225
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
2226
|
+
# @return [Array<(SubmissionList, Integer, Hash)>] SubmissionList data, response status code and response headers
|
|
2252
2227
|
def list_template_submissions_with_http_info(template_id, opts = {})
|
|
2253
2228
|
if @api_client.config.debugging
|
|
2254
2229
|
@api_client.config.logger.debug 'Calling API: Client.list_template_submissions ...'
|
|
@@ -2258,16 +2233,16 @@ end
|
|
|
2258
2233
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.list_template_submissions"
|
|
2259
2234
|
end
|
|
2260
2235
|
# resource path
|
|
2261
|
-
local_var_path = '/templates/{template_id}/submissions'.sub('{
|
|
2236
|
+
local_var_path = '/templates/{template_id}/submissions'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
2262
2237
|
|
|
2263
2238
|
# query parameters
|
|
2264
2239
|
query_params = opts[:query_params] || {}
|
|
2265
|
-
query_params[:'
|
|
2266
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2240
|
+
query_params[:'test'] = opts[:'test'] if !opts[:'test'].nil?
|
|
2267
2241
|
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
|
2268
2242
|
query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
|
2269
|
-
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
2270
2243
|
query_params[:'include_data'] = opts[:'include_data'] if !opts[:'include_data'].nil?
|
|
2244
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2245
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2271
2246
|
|
|
2272
2247
|
# header parameters
|
|
2273
2248
|
header_params = opts[:header_params] || {}
|
|
@@ -2281,7 +2256,7 @@ end
|
|
|
2281
2256
|
post_body = opts[:debug_body]
|
|
2282
2257
|
|
|
2283
2258
|
# return_type
|
|
2284
|
-
return_type = opts[:debug_return_type] || '
|
|
2259
|
+
return_type = opts[:debug_return_type] || 'SubmissionList'
|
|
2285
2260
|
|
|
2286
2261
|
# auth_names
|
|
2287
2262
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2303,43 +2278,31 @@ end
|
|
|
2303
2278
|
return data, status_code, headers
|
|
2304
2279
|
end
|
|
2305
2280
|
|
|
2306
|
-
#
|
|
2307
|
-
#
|
|
2281
|
+
# List templates
|
|
2282
|
+
# 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.
|
|
2308
2283
|
# @param [Hash] opts the optional parameters
|
|
2309
|
-
# @option opts [String] :query
|
|
2310
|
-
# @option opts [String] :parent_folder_id
|
|
2311
|
-
# @option opts [Integer] :
|
|
2312
|
-
# @option opts [
|
|
2313
|
-
# @return [
|
|
2284
|
+
# @option opts [String] :query Only list templates whose name contains this text (ignoring case).
|
|
2285
|
+
# @option opts [String] :parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
2286
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2287
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
2288
|
+
# @return [TemplateSummaryList]
|
|
2314
2289
|
def list_templates(opts = {})
|
|
2315
2290
|
data, _status_code, _headers = list_templates_with_http_info(opts)
|
|
2316
2291
|
data
|
|
2317
2292
|
end
|
|
2318
2293
|
|
|
2319
|
-
#
|
|
2320
|
-
#
|
|
2294
|
+
# List templates
|
|
2295
|
+
# 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.
|
|
2321
2296
|
# @param [Hash] opts the optional parameters
|
|
2322
|
-
# @option opts [String] :query
|
|
2323
|
-
# @option opts [String] :parent_folder_id
|
|
2324
|
-
# @option opts [Integer] :
|
|
2325
|
-
# @option opts [
|
|
2326
|
-
# @return [Array<(
|
|
2297
|
+
# @option opts [String] :query Only list templates whose name contains this text (ignoring case).
|
|
2298
|
+
# @option opts [String] :parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
2299
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2300
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
2301
|
+
# @return [Array<(TemplateSummaryList, Integer, Hash)>] TemplateSummaryList data, response status code and response headers
|
|
2327
2302
|
def list_templates_with_http_info(opts = {})
|
|
2328
2303
|
if @api_client.config.debugging
|
|
2329
2304
|
@api_client.config.logger.debug 'Calling API: Client.list_templates ...'
|
|
2330
2305
|
end
|
|
2331
|
-
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
2332
|
-
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling Client.list_templates, must be greater than or equal to 1.'
|
|
2333
|
-
end
|
|
2334
|
-
|
|
2335
|
-
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 50
|
|
2336
|
-
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling Client.list_templates, must be smaller than or equal to 50.'
|
|
2337
|
-
end
|
|
2338
|
-
|
|
2339
|
-
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
|
|
2340
|
-
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling Client.list_templates, must be greater than or equal to 1.'
|
|
2341
|
-
end
|
|
2342
|
-
|
|
2343
2306
|
# resource path
|
|
2344
2307
|
local_var_path = '/templates'
|
|
2345
2308
|
|
|
@@ -2347,8 +2310,8 @@ end
|
|
|
2347
2310
|
query_params = opts[:query_params] || {}
|
|
2348
2311
|
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
|
2349
2312
|
query_params[:'parent_folder_id'] = opts[:'parent_folder_id'] if !opts[:'parent_folder_id'].nil?
|
|
2350
|
-
query_params[:'
|
|
2351
|
-
query_params[:'
|
|
2313
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2314
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2352
2315
|
|
|
2353
2316
|
# header parameters
|
|
2354
2317
|
header_params = opts[:header_params] || {}
|
|
@@ -2362,7 +2325,7 @@ end
|
|
|
2362
2325
|
post_body = opts[:debug_body]
|
|
2363
2326
|
|
|
2364
2327
|
# return_type
|
|
2365
|
-
return_type = opts[:debug_return_type] || '
|
|
2328
|
+
return_type = opts[:debug_return_type] || 'TemplateSummaryList'
|
|
2366
2329
|
|
|
2367
2330
|
# auth_names
|
|
2368
2331
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2384,61 +2347,49 @@ end
|
|
|
2384
2347
|
return data, status_code, headers
|
|
2385
2348
|
end
|
|
2386
2349
|
|
|
2387
|
-
#
|
|
2388
|
-
# Returns
|
|
2350
|
+
# List webhooks
|
|
2351
|
+
# 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.
|
|
2389
2352
|
# @param [Hash] opts the optional parameters
|
|
2390
|
-
# @option opts [
|
|
2391
|
-
# @option opts [
|
|
2392
|
-
# @option opts [String] :
|
|
2393
|
-
# @option opts [String] :
|
|
2394
|
-
# @option opts [String] :
|
|
2395
|
-
# @option opts [
|
|
2396
|
-
# @option opts [String] :
|
|
2397
|
-
# @return [
|
|
2353
|
+
# @option opts [WebhookEventType] :event_type Only list webhooks that subscribe to this event.
|
|
2354
|
+
# @option opts [WebhookMode] :mode Only list webhooks set to this mode.
|
|
2355
|
+
# @option opts [String] :template_id Only list webhooks scoped to this template.
|
|
2356
|
+
# @option opts [String] :folder_id Only list webhooks scoped to this folder.
|
|
2357
|
+
# @option opts [String] :api_token_id Only list webhooks scoped to this API token.
|
|
2358
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2359
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
2360
|
+
# @return [WebhookList]
|
|
2398
2361
|
def list_webhooks(opts = {})
|
|
2399
2362
|
data, _status_code, _headers = list_webhooks_with_http_info(opts)
|
|
2400
2363
|
data
|
|
2401
2364
|
end
|
|
2402
2365
|
|
|
2403
|
-
#
|
|
2404
|
-
# Returns
|
|
2366
|
+
# List webhooks
|
|
2367
|
+
# 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.
|
|
2405
2368
|
# @param [Hash] opts the optional parameters
|
|
2406
|
-
# @option opts [
|
|
2407
|
-
# @option opts [
|
|
2408
|
-
# @option opts [String] :
|
|
2409
|
-
# @option opts [String] :
|
|
2410
|
-
# @option opts [String] :
|
|
2411
|
-
# @option opts [
|
|
2412
|
-
# @option opts [String] :
|
|
2413
|
-
# @return [Array<(
|
|
2369
|
+
# @option opts [WebhookEventType] :event_type Only list webhooks that subscribe to this event.
|
|
2370
|
+
# @option opts [WebhookMode] :mode Only list webhooks set to this mode.
|
|
2371
|
+
# @option opts [String] :template_id Only list webhooks scoped to this template.
|
|
2372
|
+
# @option opts [String] :folder_id Only list webhooks scoped to this folder.
|
|
2373
|
+
# @option opts [String] :api_token_id Only list webhooks scoped to this API token.
|
|
2374
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2375
|
+
# @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
|
|
2376
|
+
# @return [Array<(WebhookList, Integer, Hash)>] WebhookList data, response status code and response headers
|
|
2414
2377
|
def list_webhooks_with_http_info(opts = {})
|
|
2415
2378
|
if @api_client.config.debugging
|
|
2416
2379
|
@api_client.config.logger.debug 'Calling API: Client.list_webhooks ...'
|
|
2417
2380
|
end
|
|
2418
|
-
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
2419
|
-
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling Client.list_webhooks, must be greater than or equal to 1.'
|
|
2420
|
-
end
|
|
2421
|
-
|
|
2422
|
-
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
|
|
2423
|
-
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling Client.list_webhooks, must be smaller than or equal to 100.'
|
|
2424
|
-
end
|
|
2425
|
-
|
|
2426
|
-
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
|
|
2427
|
-
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling Client.list_webhooks, must be greater than or equal to 1.'
|
|
2428
|
-
end
|
|
2429
|
-
|
|
2430
2381
|
# resource path
|
|
2431
2382
|
local_var_path = '/webhooks'
|
|
2432
2383
|
|
|
2433
2384
|
# query parameters
|
|
2434
2385
|
query_params = opts[:query_params] || {}
|
|
2435
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
2436
|
-
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
2437
2386
|
query_params[:'event_type'] = opts[:'event_type'] if !opts[:'event_type'].nil?
|
|
2438
2387
|
query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?
|
|
2439
2388
|
query_params[:'template_id'] = opts[:'template_id'] if !opts[:'template_id'].nil?
|
|
2440
2389
|
query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil?
|
|
2441
2390
|
query_params[:'api_token_id'] = opts[:'api_token_id'] if !opts[:'api_token_id'].nil?
|
|
2391
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2392
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2442
2393
|
|
|
2443
2394
|
# header parameters
|
|
2444
2395
|
header_params = opts[:header_params] || {}
|
|
@@ -2452,7 +2403,7 @@ end
|
|
|
2452
2403
|
post_body = opts[:debug_body]
|
|
2453
2404
|
|
|
2454
2405
|
# return_type
|
|
2455
|
-
return_type = opts[:debug_return_type] || '
|
|
2406
|
+
return_type = opts[:debug_return_type] || 'WebhookList'
|
|
2456
2407
|
|
|
2457
2408
|
# auth_names
|
|
2458
2409
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2475,36 +2426,36 @@ end
|
|
|
2475
2426
|
end
|
|
2476
2427
|
|
|
2477
2428
|
# Move a folder
|
|
2478
|
-
# Moves a folder
|
|
2479
|
-
# @param folder_id [String]
|
|
2480
|
-
# @param
|
|
2429
|
+
# 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.
|
|
2430
|
+
# @param folder_id [String] The folder's ID.
|
|
2431
|
+
# @param body [MoveFolderRequest] Where to move the folder.
|
|
2481
2432
|
# @param [Hash] opts the optional parameters
|
|
2482
2433
|
# @return [Folder]
|
|
2483
|
-
def
|
|
2484
|
-
data, _status_code, _headers =
|
|
2434
|
+
def move_folder(folder_id, body, opts = {})
|
|
2435
|
+
data, _status_code, _headers = move_folder_with_http_info(folder_id, body, opts)
|
|
2485
2436
|
data
|
|
2486
2437
|
end
|
|
2487
2438
|
|
|
2488
2439
|
# Move a folder
|
|
2489
|
-
# Moves a folder
|
|
2490
|
-
# @param folder_id [String]
|
|
2491
|
-
# @param
|
|
2440
|
+
# 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.
|
|
2441
|
+
# @param folder_id [String] The folder's ID.
|
|
2442
|
+
# @param body [MoveFolderRequest] Where to move the folder.
|
|
2492
2443
|
# @param [Hash] opts the optional parameters
|
|
2493
2444
|
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
2494
|
-
def
|
|
2445
|
+
def move_folder_with_http_info(folder_id, body, opts = {})
|
|
2495
2446
|
if @api_client.config.debugging
|
|
2496
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
2447
|
+
@api_client.config.logger.debug 'Calling API: Client.move_folder ...'
|
|
2497
2448
|
end
|
|
2498
2449
|
# verify the required parameter 'folder_id' is set
|
|
2499
2450
|
if @api_client.config.client_side_validation && folder_id.nil?
|
|
2500
|
-
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.
|
|
2451
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.move_folder"
|
|
2501
2452
|
end
|
|
2502
|
-
# verify the required parameter '
|
|
2503
|
-
if @api_client.config.client_side_validation &&
|
|
2504
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2453
|
+
# verify the required parameter 'body' is set
|
|
2454
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2455
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.move_folder"
|
|
2505
2456
|
end
|
|
2506
2457
|
# resource path
|
|
2507
|
-
local_var_path = '/folders/{folder_id}/move'.sub('{
|
|
2458
|
+
local_var_path = '/folders/{folder_id}/move'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
2508
2459
|
|
|
2509
2460
|
# query parameters
|
|
2510
2461
|
query_params = opts[:query_params] || {}
|
|
@@ -2523,7 +2474,7 @@ end
|
|
|
2523
2474
|
form_params = opts[:form_params] || {}
|
|
2524
2475
|
|
|
2525
2476
|
# http body (model)
|
|
2526
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
2477
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2527
2478
|
|
|
2528
2479
|
# return_type
|
|
2529
2480
|
return_type = opts[:debug_return_type] || 'Folder'
|
|
@@ -2532,7 +2483,7 @@ end
|
|
|
2532
2483
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2533
2484
|
|
|
2534
2485
|
new_options = opts.merge(
|
|
2535
|
-
:operation => :"Client.
|
|
2486
|
+
:operation => :"Client.move_folder",
|
|
2536
2487
|
:header_params => header_params,
|
|
2537
2488
|
:query_params => query_params,
|
|
2538
2489
|
:form_params => form_params,
|
|
@@ -2543,42 +2494,42 @@ end
|
|
|
2543
2494
|
|
|
2544
2495
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2545
2496
|
if @api_client.config.debugging
|
|
2546
|
-
@api_client.config.logger.debug "API called: Client#
|
|
2497
|
+
@api_client.config.logger.debug "API called: Client#move_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2547
2498
|
end
|
|
2548
2499
|
return data, status_code, headers
|
|
2549
2500
|
end
|
|
2550
2501
|
|
|
2551
|
-
# Move
|
|
2552
|
-
# Moves a template
|
|
2553
|
-
# @param template_id [String]
|
|
2554
|
-
# @param
|
|
2502
|
+
# Move a template to a folder
|
|
2503
|
+
# Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
2504
|
+
# @param template_id [String] The template's ID.
|
|
2505
|
+
# @param body [MoveTemplateRequest] Where to move the template.
|
|
2555
2506
|
# @param [Hash] opts the optional parameters
|
|
2556
|
-
# @return [
|
|
2557
|
-
def
|
|
2558
|
-
data, _status_code, _headers =
|
|
2507
|
+
# @return [Template]
|
|
2508
|
+
def move_template(template_id, body, opts = {})
|
|
2509
|
+
data, _status_code, _headers = move_template_with_http_info(template_id, body, opts)
|
|
2559
2510
|
data
|
|
2560
2511
|
end
|
|
2561
2512
|
|
|
2562
|
-
# Move
|
|
2563
|
-
# Moves a template
|
|
2564
|
-
# @param template_id [String]
|
|
2565
|
-
# @param
|
|
2513
|
+
# Move a template to a folder
|
|
2514
|
+
# Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
2515
|
+
# @param template_id [String] The template's ID.
|
|
2516
|
+
# @param body [MoveTemplateRequest] Where to move the template.
|
|
2566
2517
|
# @param [Hash] opts the optional parameters
|
|
2567
|
-
# @return [Array<(
|
|
2568
|
-
def
|
|
2518
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
2519
|
+
def move_template_with_http_info(template_id, body, opts = {})
|
|
2569
2520
|
if @api_client.config.debugging
|
|
2570
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
2521
|
+
@api_client.config.logger.debug 'Calling API: Client.move_template ...'
|
|
2571
2522
|
end
|
|
2572
2523
|
# verify the required parameter 'template_id' is set
|
|
2573
2524
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
2574
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.
|
|
2525
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.move_template"
|
|
2575
2526
|
end
|
|
2576
|
-
# verify the required parameter '
|
|
2577
|
-
if @api_client.config.client_side_validation &&
|
|
2578
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2527
|
+
# verify the required parameter 'body' is set
|
|
2528
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2529
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.move_template"
|
|
2579
2530
|
end
|
|
2580
2531
|
# resource path
|
|
2581
|
-
local_var_path = '/templates/{template_id}/move'.sub('{
|
|
2532
|
+
local_var_path = '/templates/{template_id}/move'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
2582
2533
|
|
|
2583
2534
|
# query parameters
|
|
2584
2535
|
query_params = opts[:query_params] || {}
|
|
@@ -2597,16 +2548,16 @@ end
|
|
|
2597
2548
|
form_params = opts[:form_params] || {}
|
|
2598
2549
|
|
|
2599
2550
|
# http body (model)
|
|
2600
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
2551
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2601
2552
|
|
|
2602
2553
|
# return_type
|
|
2603
|
-
return_type = opts[:debug_return_type] || '
|
|
2554
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
2604
2555
|
|
|
2605
2556
|
# auth_names
|
|
2606
2557
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2607
2558
|
|
|
2608
2559
|
new_options = opts.merge(
|
|
2609
|
-
:operation => :"Client.
|
|
2560
|
+
:operation => :"Client.move_template",
|
|
2610
2561
|
:header_params => header_params,
|
|
2611
2562
|
:query_params => query_params,
|
|
2612
2563
|
:form_params => form_params,
|
|
@@ -2617,29 +2568,29 @@ end
|
|
|
2617
2568
|
|
|
2618
2569
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2619
2570
|
if @api_client.config.debugging
|
|
2620
|
-
@api_client.config.logger.debug "API called: Client#
|
|
2571
|
+
@api_client.config.logger.debug "API called: Client#move_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2621
2572
|
end
|
|
2622
2573
|
return data, status_code, headers
|
|
2623
2574
|
end
|
|
2624
2575
|
|
|
2625
2576
|
# Publish a template version
|
|
2626
|
-
# Publishes the
|
|
2627
|
-
# @param template_id [String]
|
|
2628
|
-
# @param
|
|
2577
|
+
# 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.
|
|
2578
|
+
# @param template_id [String] The template's ID.
|
|
2579
|
+
# @param body [PublishTemplateVersionRequest] The version to publish.
|
|
2629
2580
|
# @param [Hash] opts the optional parameters
|
|
2630
|
-
# @return [
|
|
2631
|
-
def publish_template_version(template_id,
|
|
2632
|
-
data, _status_code, _headers = publish_template_version_with_http_info(template_id,
|
|
2581
|
+
# @return [TemplateVersion]
|
|
2582
|
+
def publish_template_version(template_id, body, opts = {})
|
|
2583
|
+
data, _status_code, _headers = publish_template_version_with_http_info(template_id, body, opts)
|
|
2633
2584
|
data
|
|
2634
2585
|
end
|
|
2635
2586
|
|
|
2636
2587
|
# Publish a template version
|
|
2637
|
-
# Publishes the
|
|
2638
|
-
# @param template_id [String]
|
|
2639
|
-
# @param
|
|
2588
|
+
# 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.
|
|
2589
|
+
# @param template_id [String] The template's ID.
|
|
2590
|
+
# @param body [PublishTemplateVersionRequest] The version to publish.
|
|
2640
2591
|
# @param [Hash] opts the optional parameters
|
|
2641
|
-
# @return [Array<(
|
|
2642
|
-
def publish_template_version_with_http_info(template_id,
|
|
2592
|
+
# @return [Array<(TemplateVersion, Integer, Hash)>] TemplateVersion data, response status code and response headers
|
|
2593
|
+
def publish_template_version_with_http_info(template_id, body, opts = {})
|
|
2643
2594
|
if @api_client.config.debugging
|
|
2644
2595
|
@api_client.config.logger.debug 'Calling API: Client.publish_template_version ...'
|
|
2645
2596
|
end
|
|
@@ -2647,12 +2598,12 @@ end
|
|
|
2647
2598
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
2648
2599
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.publish_template_version"
|
|
2649
2600
|
end
|
|
2650
|
-
# verify the required parameter '
|
|
2651
|
-
if @api_client.config.client_side_validation &&
|
|
2652
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2601
|
+
# verify the required parameter 'body' is set
|
|
2602
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2603
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.publish_template_version"
|
|
2653
2604
|
end
|
|
2654
2605
|
# resource path
|
|
2655
|
-
local_var_path = '/templates/{template_id}/publish_version'.sub('{
|
|
2606
|
+
local_var_path = '/templates/{template_id}/publish_version'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
2656
2607
|
|
|
2657
2608
|
# query parameters
|
|
2658
2609
|
query_params = opts[:query_params] || {}
|
|
@@ -2671,10 +2622,10 @@ end
|
|
|
2671
2622
|
form_params = opts[:form_params] || {}
|
|
2672
2623
|
|
|
2673
2624
|
# http body (model)
|
|
2674
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
2625
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2675
2626
|
|
|
2676
2627
|
# return_type
|
|
2677
|
-
return_type = opts[:debug_return_type] || '
|
|
2628
|
+
return_type = opts[:debug_return_type] || 'TemplateVersion'
|
|
2678
2629
|
|
|
2679
2630
|
# auth_names
|
|
2680
2631
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2697,23 +2648,23 @@ end
|
|
|
2697
2648
|
end
|
|
2698
2649
|
|
|
2699
2650
|
# Rename a folder
|
|
2700
|
-
# Renames
|
|
2701
|
-
# @param folder_id [String]
|
|
2702
|
-
# @param
|
|
2651
|
+
# Renames a folder. The name must be unique within its parent folder.
|
|
2652
|
+
# @param folder_id [String] The folder's ID.
|
|
2653
|
+
# @param body [RenameFolderRequest] The folder's new name.
|
|
2703
2654
|
# @param [Hash] opts the optional parameters
|
|
2704
2655
|
# @return [Folder]
|
|
2705
|
-
def rename_folder(folder_id,
|
|
2706
|
-
data, _status_code, _headers = rename_folder_with_http_info(folder_id,
|
|
2656
|
+
def rename_folder(folder_id, body, opts = {})
|
|
2657
|
+
data, _status_code, _headers = rename_folder_with_http_info(folder_id, body, opts)
|
|
2707
2658
|
data
|
|
2708
2659
|
end
|
|
2709
2660
|
|
|
2710
2661
|
# Rename a folder
|
|
2711
|
-
# Renames
|
|
2712
|
-
# @param folder_id [String]
|
|
2713
|
-
# @param
|
|
2662
|
+
# Renames a folder. The name must be unique within its parent folder.
|
|
2663
|
+
# @param folder_id [String] The folder's ID.
|
|
2664
|
+
# @param body [RenameFolderRequest] The folder's new name.
|
|
2714
2665
|
# @param [Hash] opts the optional parameters
|
|
2715
2666
|
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
2716
|
-
def rename_folder_with_http_info(folder_id,
|
|
2667
|
+
def rename_folder_with_http_info(folder_id, body, opts = {})
|
|
2717
2668
|
if @api_client.config.debugging
|
|
2718
2669
|
@api_client.config.logger.debug 'Calling API: Client.rename_folder ...'
|
|
2719
2670
|
end
|
|
@@ -2721,12 +2672,12 @@ end
|
|
|
2721
2672
|
if @api_client.config.client_side_validation && folder_id.nil?
|
|
2722
2673
|
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.rename_folder"
|
|
2723
2674
|
end
|
|
2724
|
-
# verify the required parameter '
|
|
2725
|
-
if @api_client.config.client_side_validation &&
|
|
2726
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2675
|
+
# verify the required parameter 'body' is set
|
|
2676
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2677
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.rename_folder"
|
|
2727
2678
|
end
|
|
2728
2679
|
# resource path
|
|
2729
|
-
local_var_path = '/folders/{folder_id}/rename'.sub('{
|
|
2680
|
+
local_var_path = '/folders/{folder_id}/rename'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
2730
2681
|
|
|
2731
2682
|
# query parameters
|
|
2732
2683
|
query_params = opts[:query_params] || {}
|
|
@@ -2745,7 +2696,7 @@ end
|
|
|
2745
2696
|
form_params = opts[:form_params] || {}
|
|
2746
2697
|
|
|
2747
2698
|
# http body (model)
|
|
2748
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
2699
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2749
2700
|
|
|
2750
2701
|
# return_type
|
|
2751
2702
|
return_type = opts[:debug_return_type] || 'Folder'
|
|
@@ -2771,23 +2722,23 @@ end
|
|
|
2771
2722
|
end
|
|
2772
2723
|
|
|
2773
2724
|
# Restore a template version
|
|
2774
|
-
#
|
|
2775
|
-
# @param template_id [String]
|
|
2776
|
-
# @param
|
|
2725
|
+
# Replaces the template's draft with a copy of one of its published versions.
|
|
2726
|
+
# @param template_id [String] The template's ID.
|
|
2727
|
+
# @param body [RestoreTemplateVersionRequest] The version to restore.
|
|
2777
2728
|
# @param [Hash] opts the optional parameters
|
|
2778
|
-
# @return [
|
|
2779
|
-
def restore_template_version(template_id,
|
|
2780
|
-
data, _status_code, _headers = restore_template_version_with_http_info(template_id,
|
|
2729
|
+
# @return [Template]
|
|
2730
|
+
def restore_template_version(template_id, body, opts = {})
|
|
2731
|
+
data, _status_code, _headers = restore_template_version_with_http_info(template_id, body, opts)
|
|
2781
2732
|
data
|
|
2782
2733
|
end
|
|
2783
2734
|
|
|
2784
2735
|
# Restore a template version
|
|
2785
|
-
#
|
|
2786
|
-
# @param template_id [String]
|
|
2787
|
-
# @param
|
|
2736
|
+
# Replaces the template's draft with a copy of one of its published versions.
|
|
2737
|
+
# @param template_id [String] The template's ID.
|
|
2738
|
+
# @param body [RestoreTemplateVersionRequest] The version to restore.
|
|
2788
2739
|
# @param [Hash] opts the optional parameters
|
|
2789
|
-
# @return [Array<(
|
|
2790
|
-
def restore_template_version_with_http_info(template_id,
|
|
2740
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
2741
|
+
def restore_template_version_with_http_info(template_id, body, opts = {})
|
|
2791
2742
|
if @api_client.config.debugging
|
|
2792
2743
|
@api_client.config.logger.debug 'Calling API: Client.restore_template_version ...'
|
|
2793
2744
|
end
|
|
@@ -2795,12 +2746,12 @@ end
|
|
|
2795
2746
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
2796
2747
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.restore_template_version"
|
|
2797
2748
|
end
|
|
2798
|
-
# verify the required parameter '
|
|
2799
|
-
if @api_client.config.client_side_validation &&
|
|
2800
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2749
|
+
# verify the required parameter 'body' is set
|
|
2750
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2751
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.restore_template_version"
|
|
2801
2752
|
end
|
|
2802
2753
|
# resource path
|
|
2803
|
-
local_var_path = '/templates/{template_id}/restore_version'.sub('{
|
|
2754
|
+
local_var_path = '/templates/{template_id}/restore_version'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
2804
2755
|
|
|
2805
2756
|
# query parameters
|
|
2806
2757
|
query_params = opts[:query_params] || {}
|
|
@@ -2819,10 +2770,10 @@ end
|
|
|
2819
2770
|
form_params = opts[:form_params] || {}
|
|
2820
2771
|
|
|
2821
2772
|
# http body (model)
|
|
2822
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
2773
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2823
2774
|
|
|
2824
2775
|
# return_type
|
|
2825
|
-
return_type = opts[:debug_return_type] || '
|
|
2776
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
2826
2777
|
|
|
2827
2778
|
# auth_names
|
|
2828
2779
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2845,18 +2796,18 @@ end
|
|
|
2845
2796
|
end
|
|
2846
2797
|
|
|
2847
2798
|
# Test authentication
|
|
2848
|
-
# Checks whether your API token is valid by making an authenticated request.
|
|
2799
|
+
# Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
|
|
2849
2800
|
# @param [Hash] opts the optional parameters
|
|
2850
|
-
# @return [
|
|
2801
|
+
# @return [AuthenticationCheck]
|
|
2851
2802
|
def test_authentication(opts = {})
|
|
2852
2803
|
data, _status_code, _headers = test_authentication_with_http_info(opts)
|
|
2853
2804
|
data
|
|
2854
2805
|
end
|
|
2855
2806
|
|
|
2856
2807
|
# Test authentication
|
|
2857
|
-
# Checks whether your API token is valid by making an authenticated request.
|
|
2808
|
+
# Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
|
|
2858
2809
|
# @param [Hash] opts the optional parameters
|
|
2859
|
-
# @return [Array<(
|
|
2810
|
+
# @return [Array<(AuthenticationCheck, Integer, Hash)>] AuthenticationCheck data, response status code and response headers
|
|
2860
2811
|
def test_authentication_with_http_info(opts = {})
|
|
2861
2812
|
if @api_client.config.debugging
|
|
2862
2813
|
@api_client.config.logger.debug 'Calling API: Client.test_authentication ...'
|
|
@@ -2879,7 +2830,7 @@ end
|
|
|
2879
2830
|
post_body = opts[:debug_body]
|
|
2880
2831
|
|
|
2881
2832
|
# return_type
|
|
2882
|
-
return_type = opts[:debug_return_type] || '
|
|
2833
|
+
return_type = opts[:debug_return_type] || 'AuthenticationCheck'
|
|
2883
2834
|
|
|
2884
2835
|
# auth_names
|
|
2885
2836
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2901,37 +2852,37 @@ end
|
|
|
2901
2852
|
return data, status_code, headers
|
|
2902
2853
|
end
|
|
2903
2854
|
|
|
2904
|
-
# Update a
|
|
2905
|
-
#
|
|
2906
|
-
# @param
|
|
2907
|
-
# @param
|
|
2855
|
+
# Update a signature request
|
|
2856
|
+
# 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.
|
|
2857
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
2858
|
+
# @param body [UpdateSignatureRequestRequest] The settings to change. Properties left out keep their values.
|
|
2908
2859
|
# @param [Hash] opts the optional parameters
|
|
2909
|
-
# @return [
|
|
2910
|
-
def
|
|
2911
|
-
data, _status_code, _headers =
|
|
2860
|
+
# @return [SignatureRequest]
|
|
2861
|
+
def update_signature_request(signature_request_id, body, opts = {})
|
|
2862
|
+
data, _status_code, _headers = update_signature_request_with_http_info(signature_request_id, body, opts)
|
|
2912
2863
|
data
|
|
2913
2864
|
end
|
|
2914
2865
|
|
|
2915
|
-
# Update a
|
|
2916
|
-
#
|
|
2917
|
-
# @param
|
|
2918
|
-
# @param
|
|
2866
|
+
# Update a signature request
|
|
2867
|
+
# 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.
|
|
2868
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
2869
|
+
# @param body [UpdateSignatureRequestRequest] The settings to change. Properties left out keep their values.
|
|
2919
2870
|
# @param [Hash] opts the optional parameters
|
|
2920
|
-
# @return [Array<(
|
|
2921
|
-
def
|
|
2871
|
+
# @return [Array<(SignatureRequest, Integer, Hash)>] SignatureRequest data, response status code and response headers
|
|
2872
|
+
def update_signature_request_with_http_info(signature_request_id, body, opts = {})
|
|
2922
2873
|
if @api_client.config.debugging
|
|
2923
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
2874
|
+
@api_client.config.logger.debug 'Calling API: Client.update_signature_request ...'
|
|
2924
2875
|
end
|
|
2925
|
-
# verify the required parameter '
|
|
2926
|
-
if @api_client.config.client_side_validation &&
|
|
2927
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2876
|
+
# verify the required parameter 'signature_request_id' is set
|
|
2877
|
+
if @api_client.config.client_side_validation && signature_request_id.nil?
|
|
2878
|
+
fail ArgumentError, "Missing the required parameter 'signature_request_id' when calling Client.update_signature_request"
|
|
2928
2879
|
end
|
|
2929
|
-
# verify the required parameter '
|
|
2930
|
-
if @api_client.config.client_side_validation &&
|
|
2931
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2880
|
+
# verify the required parameter 'body' is set
|
|
2881
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2882
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.update_signature_request"
|
|
2932
2883
|
end
|
|
2933
2884
|
# resource path
|
|
2934
|
-
local_var_path = '/
|
|
2885
|
+
local_var_path = '/signature_requests/{signature_request_id}'.sub('{signature_request_id}', CGI.escape(signature_request_id.to_s))
|
|
2935
2886
|
|
|
2936
2887
|
# query parameters
|
|
2937
2888
|
query_params = opts[:query_params] || {}
|
|
@@ -2950,16 +2901,16 @@ end
|
|
|
2950
2901
|
form_params = opts[:form_params] || {}
|
|
2951
2902
|
|
|
2952
2903
|
# http body (model)
|
|
2953
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
2904
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2954
2905
|
|
|
2955
2906
|
# return_type
|
|
2956
|
-
return_type = opts[:debug_return_type] || '
|
|
2907
|
+
return_type = opts[:debug_return_type] || 'SignatureRequest'
|
|
2957
2908
|
|
|
2958
2909
|
# auth_names
|
|
2959
2910
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2960
2911
|
|
|
2961
2912
|
new_options = opts.merge(
|
|
2962
|
-
:operation => :"Client.
|
|
2913
|
+
:operation => :"Client.update_signature_request",
|
|
2963
2914
|
:header_params => header_params,
|
|
2964
2915
|
:query_params => query_params,
|
|
2965
2916
|
:form_params => form_params,
|
|
@@ -2970,29 +2921,29 @@ end
|
|
|
2970
2921
|
|
|
2971
2922
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2972
2923
|
if @api_client.config.debugging
|
|
2973
|
-
@api_client.config.logger.debug "API called: Client#
|
|
2924
|
+
@api_client.config.logger.debug "API called: Client#update_signature_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2974
2925
|
end
|
|
2975
2926
|
return data, status_code, headers
|
|
2976
2927
|
end
|
|
2977
2928
|
|
|
2978
|
-
# Update a
|
|
2979
|
-
#
|
|
2980
|
-
# @param template_id [String]
|
|
2981
|
-
# @param
|
|
2929
|
+
# Update a template
|
|
2930
|
+
# 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.
|
|
2931
|
+
# @param template_id [String] The template's ID.
|
|
2932
|
+
# @param body [UpdateTemplateRequest] The settings to change. Properties left out keep their values.
|
|
2982
2933
|
# @param [Hash] opts the optional parameters
|
|
2983
|
-
# @return [
|
|
2984
|
-
def update_template(template_id,
|
|
2985
|
-
data, _status_code, _headers = update_template_with_http_info(template_id,
|
|
2934
|
+
# @return [Template]
|
|
2935
|
+
def update_template(template_id, body, opts = {})
|
|
2936
|
+
data, _status_code, _headers = update_template_with_http_info(template_id, body, opts)
|
|
2986
2937
|
data
|
|
2987
2938
|
end
|
|
2988
2939
|
|
|
2989
|
-
# Update a
|
|
2990
|
-
#
|
|
2991
|
-
# @param template_id [String]
|
|
2992
|
-
# @param
|
|
2940
|
+
# Update a template
|
|
2941
|
+
# 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.
|
|
2942
|
+
# @param template_id [String] The template's ID.
|
|
2943
|
+
# @param body [UpdateTemplateRequest] The settings to change. Properties left out keep their values.
|
|
2993
2944
|
# @param [Hash] opts the optional parameters
|
|
2994
|
-
# @return [Array<(
|
|
2995
|
-
def update_template_with_http_info(template_id,
|
|
2945
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
2946
|
+
def update_template_with_http_info(template_id, body, opts = {})
|
|
2996
2947
|
if @api_client.config.debugging
|
|
2997
2948
|
@api_client.config.logger.debug 'Calling API: Client.update_template ...'
|
|
2998
2949
|
end
|
|
@@ -3000,12 +2951,12 @@ end
|
|
|
3000
2951
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
3001
2952
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.update_template"
|
|
3002
2953
|
end
|
|
3003
|
-
# verify the required parameter '
|
|
3004
|
-
if @api_client.config.client_side_validation &&
|
|
3005
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2954
|
+
# verify the required parameter 'body' is set
|
|
2955
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2956
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.update_template"
|
|
3006
2957
|
end
|
|
3007
2958
|
# resource path
|
|
3008
|
-
local_var_path = '/templates/{template_id}'.sub('{
|
|
2959
|
+
local_var_path = '/templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
3009
2960
|
|
|
3010
2961
|
# query parameters
|
|
3011
2962
|
query_params = opts[:query_params] || {}
|
|
@@ -3024,10 +2975,10 @@ end
|
|
|
3024
2975
|
form_params = opts[:form_params] || {}
|
|
3025
2976
|
|
|
3026
2977
|
# http body (model)
|
|
3027
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
2978
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3028
2979
|
|
|
3029
2980
|
# return_type
|
|
3030
|
-
return_type = opts[:debug_return_type] || '
|
|
2981
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
3031
2982
|
|
|
3032
2983
|
# auth_names
|
|
3033
2984
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -3049,26 +3000,26 @@ end
|
|
|
3049
3000
|
return data, status_code, headers
|
|
3050
3001
|
end
|
|
3051
3002
|
|
|
3052
|
-
#
|
|
3053
|
-
#
|
|
3054
|
-
# @param template_id [String]
|
|
3055
|
-
# @param
|
|
3003
|
+
# Replace a template's PDF
|
|
3004
|
+
# 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.
|
|
3005
|
+
# @param template_id [String] The template's ID.
|
|
3006
|
+
# @param body [UpdateTemplateDocumentRequest] The new PDF.
|
|
3056
3007
|
# @param [Hash] opts the optional parameters
|
|
3057
|
-
# @option opts [
|
|
3058
|
-
# @return [
|
|
3059
|
-
def update_template_document(template_id,
|
|
3060
|
-
data, _status_code, _headers = update_template_document_with_http_info(template_id,
|
|
3008
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
3009
|
+
# @return [Template]
|
|
3010
|
+
def update_template_document(template_id, body, opts = {})
|
|
3011
|
+
data, _status_code, _headers = update_template_document_with_http_info(template_id, body, opts)
|
|
3061
3012
|
data
|
|
3062
3013
|
end
|
|
3063
3014
|
|
|
3064
|
-
#
|
|
3065
|
-
#
|
|
3066
|
-
# @param template_id [String]
|
|
3067
|
-
# @param
|
|
3015
|
+
# Replace a template's PDF
|
|
3016
|
+
# 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.
|
|
3017
|
+
# @param template_id [String] The template's ID.
|
|
3018
|
+
# @param body [UpdateTemplateDocumentRequest] The new PDF.
|
|
3068
3019
|
# @param [Hash] opts the optional parameters
|
|
3069
|
-
# @option opts [
|
|
3070
|
-
# @return [Array<(
|
|
3071
|
-
def update_template_document_with_http_info(template_id,
|
|
3020
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
3021
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3022
|
+
def update_template_document_with_http_info(template_id, body, opts = {})
|
|
3072
3023
|
if @api_client.config.debugging
|
|
3073
3024
|
@api_client.config.logger.debug 'Calling API: Client.update_template_document ...'
|
|
3074
3025
|
end
|
|
@@ -3076,36 +3027,35 @@ end
|
|
|
3076
3027
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
3077
3028
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.update_template_document"
|
|
3078
3029
|
end
|
|
3079
|
-
# verify the required parameter '
|
|
3080
|
-
if @api_client.config.client_side_validation &&
|
|
3081
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3030
|
+
# verify the required parameter 'body' is set
|
|
3031
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3032
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.update_template_document"
|
|
3082
3033
|
end
|
|
3083
3034
|
# resource path
|
|
3084
|
-
local_var_path = '/templates/{template_id}
|
|
3035
|
+
local_var_path = '/templates/{template_id}/document'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
3085
3036
|
|
|
3086
3037
|
# query parameters
|
|
3087
3038
|
query_params = opts[:query_params] || {}
|
|
3039
|
+
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
3088
3040
|
|
|
3089
3041
|
# header parameters
|
|
3090
3042
|
header_params = opts[:header_params] || {}
|
|
3091
3043
|
# HTTP header 'Accept' (if needed)
|
|
3092
3044
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3093
3045
|
# HTTP header 'Content-Type'
|
|
3094
|
-
content_type = @api_client.select_header_content_type(['
|
|
3046
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3095
3047
|
if !content_type.nil?
|
|
3096
3048
|
header_params['Content-Type'] = content_type
|
|
3097
3049
|
end
|
|
3098
3050
|
|
|
3099
3051
|
# form parameters
|
|
3100
3052
|
form_params = opts[:form_params] || {}
|
|
3101
|
-
form_params['template[document]'] = template_document
|
|
3102
|
-
form_params['template[name]'] = opts[:'template_name'] if !opts[:'template_name'].nil?
|
|
3103
3053
|
|
|
3104
3054
|
# http body (model)
|
|
3105
|
-
post_body = opts[:debug_body]
|
|
3055
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3106
3056
|
|
|
3107
3057
|
# return_type
|
|
3108
|
-
return_type = opts[:debug_return_type] || '
|
|
3058
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
3109
3059
|
|
|
3110
3060
|
# auth_names
|
|
3111
3061
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -3127,37 +3077,37 @@ end
|
|
|
3127
3077
|
return data, status_code, headers
|
|
3128
3078
|
end
|
|
3129
3079
|
|
|
3130
|
-
# Update a
|
|
3131
|
-
# Updates a
|
|
3132
|
-
# @param
|
|
3133
|
-
# @param
|
|
3080
|
+
# Update a webhook
|
|
3081
|
+
# Updates a webhook. Only the properties you send change.
|
|
3082
|
+
# @param webhook_id [String] The webhook's ID.
|
|
3083
|
+
# @param body [UpdateWebhookRequest] The settings to change. Properties left out keep their values.
|
|
3134
3084
|
# @param [Hash] opts the optional parameters
|
|
3135
|
-
# @return [
|
|
3136
|
-
def
|
|
3137
|
-
data, _status_code, _headers =
|
|
3085
|
+
# @return [Webhook]
|
|
3086
|
+
def update_webhook(webhook_id, body, opts = {})
|
|
3087
|
+
data, _status_code, _headers = update_webhook_with_http_info(webhook_id, body, opts)
|
|
3138
3088
|
data
|
|
3139
3089
|
end
|
|
3140
3090
|
|
|
3141
|
-
# Update a
|
|
3142
|
-
# Updates a
|
|
3143
|
-
# @param
|
|
3144
|
-
# @param
|
|
3091
|
+
# Update a webhook
|
|
3092
|
+
# Updates a webhook. Only the properties you send change.
|
|
3093
|
+
# @param webhook_id [String] The webhook's ID.
|
|
3094
|
+
# @param body [UpdateWebhookRequest] The settings to change. Properties left out keep their values.
|
|
3145
3095
|
# @param [Hash] opts the optional parameters
|
|
3146
|
-
# @return [Array<(
|
|
3147
|
-
def
|
|
3096
|
+
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
3097
|
+
def update_webhook_with_http_info(webhook_id, body, opts = {})
|
|
3148
3098
|
if @api_client.config.debugging
|
|
3149
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
3099
|
+
@api_client.config.logger.debug 'Calling API: Client.update_webhook ...'
|
|
3150
3100
|
end
|
|
3151
|
-
# verify the required parameter '
|
|
3152
|
-
if @api_client.config.client_side_validation &&
|
|
3153
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3101
|
+
# verify the required parameter 'webhook_id' is set
|
|
3102
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
|
3103
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling Client.update_webhook"
|
|
3154
3104
|
end
|
|
3155
|
-
# verify the required parameter '
|
|
3156
|
-
if @api_client.config.client_side_validation &&
|
|
3157
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3105
|
+
# verify the required parameter 'body' is set
|
|
3106
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3107
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.update_webhook"
|
|
3158
3108
|
end
|
|
3159
3109
|
# resource path
|
|
3160
|
-
local_var_path = '/
|
|
3110
|
+
local_var_path = '/webhooks/{webhook_id}'.sub('{webhook_id}', CGI.escape(webhook_id.to_s))
|
|
3161
3111
|
|
|
3162
3112
|
# query parameters
|
|
3163
3113
|
query_params = opts[:query_params] || {}
|
|
@@ -3176,16 +3126,16 @@ end
|
|
|
3176
3126
|
form_params = opts[:form_params] || {}
|
|
3177
3127
|
|
|
3178
3128
|
# http body (model)
|
|
3179
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
3129
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3180
3130
|
|
|
3181
3131
|
# return_type
|
|
3182
|
-
return_type = opts[:debug_return_type] || '
|
|
3132
|
+
return_type = opts[:debug_return_type] || 'Webhook'
|
|
3183
3133
|
|
|
3184
3134
|
# auth_names
|
|
3185
3135
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3186
3136
|
|
|
3187
3137
|
new_options = opts.merge(
|
|
3188
|
-
:operation => :"Client.
|
|
3138
|
+
:operation => :"Client.update_webhook",
|
|
3189
3139
|
:header_params => header_params,
|
|
3190
3140
|
:query_params => query_params,
|
|
3191
3141
|
:form_params => form_params,
|
|
@@ -3196,70 +3146,173 @@ end
|
|
|
3196
3146
|
|
|
3197
3147
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3198
3148
|
if @api_client.config.debugging
|
|
3199
|
-
@api_client.config.logger.debug "API called: Client#
|
|
3149
|
+
@api_client.config.logger.debug "API called: Client#update_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3200
3150
|
end
|
|
3201
3151
|
return data, status_code, headers
|
|
3202
3152
|
end
|
|
3203
3153
|
|
|
3204
|
-
#
|
|
3205
|
-
#
|
|
3206
|
-
# @param
|
|
3207
|
-
# @param data [UpdateWebhookData]
|
|
3154
|
+
# Create a PDF template from an uploaded PDF
|
|
3155
|
+
# 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.
|
|
3156
|
+
# @param document [File] The PDF.
|
|
3208
3157
|
# @param [Hash] opts the optional parameters
|
|
3209
|
-
# @
|
|
3210
|
-
|
|
3211
|
-
|
|
3158
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
3159
|
+
# @option opts [String] :name The template's name.
|
|
3160
|
+
# @option opts [String] :description The template's description.
|
|
3161
|
+
# @option opts [String] :parent_folder_id The folder to put the template in. Left out, it's created at the root.
|
|
3162
|
+
# @option opts [AiFieldNamingLanguage] :ai_field_naming_language The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. Default: your account's template settings.
|
|
3163
|
+
# @option opts [Boolean] :detect_fields Set up the PDF's fields as DocSpring's "Automatically detect fields" upload option does: import or detect the fields, name them with AI, and set up conditional logic. `field_source`, `field_naming` and `field_logic` choose how. Default false. `document.page_processing_statuses` and `document.field_logic_status` show how it's going, and `document.state` becomes `processed` once every page's fields are set up.
|
|
3164
|
+
# @option opts [FieldSetupSource] :field_source With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields.
|
|
3165
|
+
# @option opts [FieldSetupNaming] :field_naming With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`.
|
|
3166
|
+
# @option opts [FieldSetupLogic] :field_logic With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings.
|
|
3167
|
+
# @return [Template]
|
|
3168
|
+
def upload_template(document, opts = {})
|
|
3169
|
+
data, _status_code, _headers = upload_template_with_http_info(document, opts)
|
|
3212
3170
|
data
|
|
3213
3171
|
end
|
|
3214
3172
|
|
|
3215
|
-
#
|
|
3216
|
-
#
|
|
3217
|
-
# @param
|
|
3218
|
-
# @param data [UpdateWebhookData]
|
|
3173
|
+
# Create a PDF template from an uploaded PDF
|
|
3174
|
+
# 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.
|
|
3175
|
+
# @param document [File] The PDF.
|
|
3219
3176
|
# @param [Hash] opts the optional parameters
|
|
3220
|
-
# @
|
|
3221
|
-
|
|
3177
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
3178
|
+
# @option opts [String] :name The template's name.
|
|
3179
|
+
# @option opts [String] :description The template's description.
|
|
3180
|
+
# @option opts [String] :parent_folder_id The folder to put the template in. Left out, it's created at the root.
|
|
3181
|
+
# @option opts [AiFieldNamingLanguage] :ai_field_naming_language The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. Default: your account's template settings.
|
|
3182
|
+
# @option opts [Boolean] :detect_fields Set up the PDF's fields as DocSpring's "Automatically detect fields" upload option does: import or detect the fields, name them with AI, and set up conditional logic. `field_source`, `field_naming` and `field_logic` choose how. Default false. `document.page_processing_statuses` and `document.field_logic_status` show how it's going, and `document.state` becomes `processed` once every page's fields are set up.
|
|
3183
|
+
# @option opts [FieldSetupSource] :field_source With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields.
|
|
3184
|
+
# @option opts [FieldSetupNaming] :field_naming With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`.
|
|
3185
|
+
# @option opts [FieldSetupLogic] :field_logic With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings.
|
|
3186
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3187
|
+
def upload_template_with_http_info(document, opts = {})
|
|
3222
3188
|
if @api_client.config.debugging
|
|
3223
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
3189
|
+
@api_client.config.logger.debug 'Calling API: Client.upload_template ...'
|
|
3224
3190
|
end
|
|
3225
|
-
# verify the required parameter '
|
|
3226
|
-
if @api_client.config.client_side_validation &&
|
|
3227
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3191
|
+
# verify the required parameter 'document' is set
|
|
3192
|
+
if @api_client.config.client_side_validation && document.nil?
|
|
3193
|
+
fail ArgumentError, "Missing the required parameter 'document' when calling Client.upload_template"
|
|
3228
3194
|
end
|
|
3229
|
-
#
|
|
3230
|
-
|
|
3231
|
-
|
|
3195
|
+
# resource path
|
|
3196
|
+
local_var_path = '/templates/upload'
|
|
3197
|
+
|
|
3198
|
+
# query parameters
|
|
3199
|
+
query_params = opts[:query_params] || {}
|
|
3200
|
+
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
3201
|
+
|
|
3202
|
+
# header parameters
|
|
3203
|
+
header_params = opts[:header_params] || {}
|
|
3204
|
+
# HTTP header 'Accept' (if needed)
|
|
3205
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3206
|
+
# HTTP header 'Content-Type'
|
|
3207
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
|
3208
|
+
if !content_type.nil?
|
|
3209
|
+
header_params['Content-Type'] = content_type
|
|
3210
|
+
end
|
|
3211
|
+
|
|
3212
|
+
# form parameters
|
|
3213
|
+
form_params = opts[:form_params] || {}
|
|
3214
|
+
form_params['document'] = document
|
|
3215
|
+
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
3216
|
+
form_params['description'] = opts[:'description'] if !opts[:'description'].nil?
|
|
3217
|
+
form_params['parent_folder_id'] = opts[:'parent_folder_id'] if !opts[:'parent_folder_id'].nil?
|
|
3218
|
+
form_params['ai_field_naming_language'] = opts[:'ai_field_naming_language'] if !opts[:'ai_field_naming_language'].nil?
|
|
3219
|
+
form_params['detect_fields'] = opts[:'detect_fields'] if !opts[:'detect_fields'].nil?
|
|
3220
|
+
form_params['field_source'] = opts[:'field_source'] if !opts[:'field_source'].nil?
|
|
3221
|
+
form_params['field_naming'] = opts[:'field_naming'] if !opts[:'field_naming'].nil?
|
|
3222
|
+
form_params['field_logic'] = opts[:'field_logic'] if !opts[:'field_logic'].nil?
|
|
3223
|
+
|
|
3224
|
+
# http body (model)
|
|
3225
|
+
post_body = opts[:debug_body]
|
|
3226
|
+
|
|
3227
|
+
# return_type
|
|
3228
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
3229
|
+
|
|
3230
|
+
# auth_names
|
|
3231
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3232
|
+
|
|
3233
|
+
new_options = opts.merge(
|
|
3234
|
+
:operation => :"Client.upload_template",
|
|
3235
|
+
:header_params => header_params,
|
|
3236
|
+
:query_params => query_params,
|
|
3237
|
+
:form_params => form_params,
|
|
3238
|
+
:body => post_body,
|
|
3239
|
+
:auth_names => auth_names,
|
|
3240
|
+
:return_type => return_type
|
|
3241
|
+
)
|
|
3242
|
+
|
|
3243
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3244
|
+
if @api_client.config.debugging
|
|
3245
|
+
@api_client.config.logger.debug "API called: Client#upload_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3246
|
+
end
|
|
3247
|
+
return data, status_code, headers
|
|
3248
|
+
end
|
|
3249
|
+
|
|
3250
|
+
# Replace a template's PDF with an uploaded PDF
|
|
3251
|
+
# 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.
|
|
3252
|
+
# @param template_id [String] The template's ID.
|
|
3253
|
+
# @param document [File] The new PDF.
|
|
3254
|
+
# @param [Hash] opts the optional parameters
|
|
3255
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
3256
|
+
# @option opts [Boolean] :reimport_fields Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields.
|
|
3257
|
+
# @return [Template]
|
|
3258
|
+
def upload_template_document(template_id, document, opts = {})
|
|
3259
|
+
data, _status_code, _headers = upload_template_document_with_http_info(template_id, document, opts)
|
|
3260
|
+
data
|
|
3261
|
+
end
|
|
3262
|
+
|
|
3263
|
+
# Replace a template's PDF with an uploaded PDF
|
|
3264
|
+
# 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.
|
|
3265
|
+
# @param template_id [String] The template's ID.
|
|
3266
|
+
# @param document [File] The new PDF.
|
|
3267
|
+
# @param [Hash] opts the optional parameters
|
|
3268
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
|
|
3269
|
+
# @option opts [Boolean] :reimport_fields Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields.
|
|
3270
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3271
|
+
def upload_template_document_with_http_info(template_id, document, opts = {})
|
|
3272
|
+
if @api_client.config.debugging
|
|
3273
|
+
@api_client.config.logger.debug 'Calling API: Client.upload_template_document ...'
|
|
3274
|
+
end
|
|
3275
|
+
# verify the required parameter 'template_id' is set
|
|
3276
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
3277
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.upload_template_document"
|
|
3278
|
+
end
|
|
3279
|
+
# verify the required parameter 'document' is set
|
|
3280
|
+
if @api_client.config.client_side_validation && document.nil?
|
|
3281
|
+
fail ArgumentError, "Missing the required parameter 'document' when calling Client.upload_template_document"
|
|
3232
3282
|
end
|
|
3233
3283
|
# resource path
|
|
3234
|
-
local_var_path = '/
|
|
3284
|
+
local_var_path = '/templates/{template_id}/document/upload'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
3235
3285
|
|
|
3236
3286
|
# query parameters
|
|
3237
3287
|
query_params = opts[:query_params] || {}
|
|
3288
|
+
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
3238
3289
|
|
|
3239
3290
|
# header parameters
|
|
3240
3291
|
header_params = opts[:header_params] || {}
|
|
3241
3292
|
# HTTP header 'Accept' (if needed)
|
|
3242
3293
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3243
3294
|
# HTTP header 'Content-Type'
|
|
3244
|
-
content_type = @api_client.select_header_content_type(['
|
|
3295
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
|
3245
3296
|
if !content_type.nil?
|
|
3246
3297
|
header_params['Content-Type'] = content_type
|
|
3247
3298
|
end
|
|
3248
3299
|
|
|
3249
3300
|
# form parameters
|
|
3250
3301
|
form_params = opts[:form_params] || {}
|
|
3302
|
+
form_params['document'] = document
|
|
3303
|
+
form_params['reimport_fields'] = opts[:'reimport_fields'] if !opts[:'reimport_fields'].nil?
|
|
3251
3304
|
|
|
3252
3305
|
# http body (model)
|
|
3253
|
-
post_body = opts[:debug_body]
|
|
3306
|
+
post_body = opts[:debug_body]
|
|
3254
3307
|
|
|
3255
3308
|
# return_type
|
|
3256
|
-
return_type = opts[:debug_return_type] || '
|
|
3309
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
3257
3310
|
|
|
3258
3311
|
# auth_names
|
|
3259
3312
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3260
3313
|
|
|
3261
3314
|
new_options = opts.merge(
|
|
3262
|
-
:operation => :"Client.
|
|
3315
|
+
:operation => :"Client.upload_template_document",
|
|
3263
3316
|
:header_params => header_params,
|
|
3264
3317
|
:query_params => query_params,
|
|
3265
3318
|
:form_params => form_params,
|
|
@@ -3270,7 +3323,7 @@ end
|
|
|
3270
3323
|
|
|
3271
3324
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3272
3325
|
if @api_client.config.debugging
|
|
3273
|
-
@api_client.config.logger.debug "API called: Client#
|
|
3326
|
+
@api_client.config.logger.debug "API called: Client#upload_template_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3274
3327
|
end
|
|
3275
3328
|
return data, status_code, headers
|
|
3276
3329
|
end
|