docspring 3.5.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +445 -150
- data/.openapi-generator/VERSION +1 -1
- data/.rubocop.yml +1 -1
- data/.travis.yml +1 -1
- data/AGENTS.md +79 -19
- data/CHANGELOG.md +147 -0
- data/Gemfile.lock +7 -7
- data/README.md +69 -53
- data/docs/AddTemplateFieldsRequest.md +18 -0
- data/docs/{RenameFolderData.md → AiFieldNamingLanguage.md} +2 -5
- data/docs/AuthenticationCheck.md +18 -0
- data/docs/{CreateFolderData.md → BarcodeSymbology.md} +2 -5
- data/docs/{CreateWebhookData.md → CheckCharacter.md} +2 -5
- data/docs/Client.md +1570 -786
- data/docs/{UpdateWebhookData.md → CombinedFieldType.md} +2 -5
- data/docs/CombinedPdf.md +44 -0
- data/docs/CombinedPdfFiles.md +18 -0
- data/docs/CombinedPdfList.md +20 -0
- data/docs/CombinedPdfSource.md +26 -0
- data/docs/CombinedPdfSourceInput.md +88 -0
- data/docs/CombinedPdfSourcePdf.md +20 -0
- data/docs/CombinedPdfSourceType.md +15 -0
- data/docs/CombinedPdfState.md +15 -0
- data/docs/CopyTemplateRequest.md +22 -0
- data/docs/CreateCombinedPdfRequest.md +26 -0
- data/docs/CreateCustomFileFromUploadRequest.md +18 -0
- data/docs/CreateFolderRequest.md +20 -0
- data/docs/CreateSignatureRequestEventRequest.md +24 -0
- data/docs/CreateSignatureRequestTokenRequest.md +18 -0
- data/docs/CreateSubmissionBatchRequest.md +28 -0
- data/docs/CreateSubmissionRequest.md +38 -0
- data/docs/CreateTemplateRequest.md +102 -0
- data/docs/CreateWebhookRequest.md +38 -0
- data/docs/CustomFile.md +11 -3
- data/docs/CustomFileList.md +20 -0
- data/docs/CustomFileSourcePdf.md +20 -0
- data/docs/ErrorCode.md +15 -0
- data/docs/ErrorDetail.md +26 -0
- data/docs/ErrorInfo.md +32 -0
- data/docs/ErrorResponse.md +1 -3
- data/docs/ExpirationInterval.md +15 -0
- data/docs/Field.md +198 -0
- data/docs/FieldComparisonCondition.md +22 -0
- data/docs/FieldComparisonOperator.md +15 -0
- data/docs/FieldDependency.md +22 -0
- data/docs/FieldDependencyInput.md +22 -0
- data/docs/FieldDisplayType.md +15 -0
- data/docs/FieldEqualsCondition.md +22 -0
- data/docs/FieldEqualsOperator.md +15 -0
- data/docs/FieldGroup.md +32 -0
- data/docs/FieldGroupInput.md +30 -0
- data/docs/FieldGroupType.md +15 -0
- data/docs/FieldInCondition.md +22 -0
- data/docs/FieldInput.md +196 -0
- data/docs/FieldOverride.md +142 -0
- data/docs/FieldPresenceCondition.md +20 -0
- data/docs/FieldPresenceOperator.md +15 -0
- data/docs/FieldRangeCondition.md +24 -0
- data/docs/FieldReimportState.md +15 -0
- data/docs/FieldSetupLogic.md +15 -0
- data/docs/FieldSetupNaming.md +15 -0
- data/docs/FieldSetupSource.md +15 -0
- data/docs/FieldType.md +15 -0
- data/docs/Folder.md +9 -5
- data/docs/FolderList.md +20 -0
- data/docs/GenerateFilesFormat.md +15 -0
- data/docs/GenerateSubmissionFilesRequest.md +18 -0
- data/docs/GeneratedFile.md +32 -0
- data/docs/GeneratedFileState.md +15 -0
- data/docs/HtmlEngineOptions.md +36 -0
- data/docs/HtmlEngineOptionsInput.md +36 -0
- data/docs/ImageGravity.md +15 -0
- data/docs/ImageScaleType.md +15 -0
- data/docs/ModelCodeLanguage.md +15 -0
- data/docs/MoveFolderRequest.md +18 -0
- data/docs/MoveTemplateRequest.md +18 -0
- data/docs/NumberConditionType.md +15 -0
- data/docs/OutputFormat.md +15 -0
- data/docs/PageFormat.md +15 -0
- data/docs/PageImage.md +34 -0
- data/docs/PageImages.md +24 -0
- data/docs/PredefinedField.md +30 -0
- data/docs/PredefinedFieldInput.md +30 -0
- data/docs/PublishTemplateVersionRequest.md +20 -0
- data/docs/RemoveTemplateFieldsRequest.md +18 -0
- data/docs/RenameFolderRequest.md +18 -0
- data/docs/ReorderTemplateFieldsRequest.md +18 -0
- data/docs/RestoreTemplateVersionRequest.md +18 -0
- data/docs/ShapeType.md +15 -0
- data/docs/SignatureRequest.md +66 -0
- data/docs/SignatureRequestAuthSecondFactorType.md +15 -0
- data/docs/SignatureRequestAuthType.md +15 -0
- data/docs/SignatureRequestEvent.md +32 -0
- data/docs/SignatureRequestEventType.md +15 -0
- data/docs/SignatureRequestInput.md +46 -0
- data/docs/SignatureRequestMessageType.md +15 -0
- data/docs/SignatureRequestState.md +15 -0
- data/docs/SignatureRequestToken.md +30 -0
- data/docs/SignatureRequestTokenType.md +15 -0
- data/docs/StringConditionType.md +15 -0
- data/docs/Submission.md +43 -47
- data/docs/SubmissionAction.md +6 -8
- data/docs/SubmissionActionState.md +15 -0
- data/docs/SubmissionActionType.md +15 -0
- data/docs/SubmissionBatch.md +16 -10
- data/docs/SubmissionBatchState.md +15 -0
- data/docs/SubmissionFiles.md +24 -0
- data/docs/SubmissionInput.md +40 -0
- data/docs/SubmissionList.md +20 -0
- data/docs/SubmissionSource.md +15 -0
- data/docs/SubmissionSourcePdf.md +20 -0
- data/docs/SubmissionState.md +15 -0
- data/docs/SubmissionValidation.md +24 -0
- data/docs/Template.md +79 -107
- data/docs/TemplateActor.md +26 -0
- data/docs/TemplateActorType.md +15 -0
- data/docs/TemplateDefaults.md +56 -0
- data/docs/TemplateDefaultsInput.md +56 -0
- data/docs/TemplateDiff.md +30 -0
- data/docs/TemplateDiffSummary.md +28 -0
- data/docs/TemplateDocument.md +40 -0
- data/docs/TemplateDocumentState.md +15 -0
- data/docs/TemplateFieldChange.md +24 -0
- data/docs/TemplateFieldChanges.md +24 -0
- data/docs/TemplateFieldDependency.md +26 -0
- data/docs/TemplateFieldDependencyAction.md +15 -0
- data/docs/TemplateFieldDependencyCondition.md +24 -0
- data/docs/TemplateFieldDependencyConditionInput.md +93 -0
- data/docs/TemplateFieldDependencyInput.md +26 -0
- data/docs/TemplateFieldDependencyMatch.md +15 -0
- data/docs/TemplateFieldDependencyOperator.md +15 -0
- data/docs/TemplateFieldLogicStatus.md +15 -0
- data/docs/TemplateFieldMove.md +22 -0
- data/docs/TemplateFields.md +22 -0
- data/docs/TemplateFormMode.md +15 -0
- data/docs/TemplateModelCode.md +22 -0
- data/docs/TemplatePageAiError.md +15 -0
- data/docs/TemplatePageAiNamingStatus.md +15 -0
- data/docs/TemplatePageFieldsStatus.md +15 -0
- data/docs/TemplatePageImageStatus.md +15 -0
- data/docs/TemplatePageImages.md +24 -0
- data/docs/TemplatePageProcessingStatus.md +26 -0
- data/docs/TemplateSourcePdf.md +24 -0
- data/docs/TemplateSummary.md +90 -0
- data/docs/TemplateSummaryList.md +20 -0
- data/docs/TemplateType.md +15 -0
- data/docs/TemplateVersion.md +24 -0
- data/docs/TemplateVersionType.md +15 -0
- data/docs/TextAlignment.md +15 -0
- data/docs/TextOverflow.md +15 -0
- data/docs/TextVerticalAlignment.md +15 -0
- data/docs/Typeface.md +15 -0
- data/docs/UpdateSignatureRequestRequest.md +34 -0
- data/docs/UpdateTemplateDocumentRequest.md +26 -0
- data/docs/UpdateTemplateFieldsRequest.md +18 -0
- data/docs/UpdateTemplateRequest.md +86 -0
- data/docs/UpdateWebhookRequest.md +38 -0
- data/docs/UploadMethod.md +15 -0
- data/docs/UploadPresign.md +24 -0
- data/docs/UrlSourcePdf.md +20 -0
- data/docs/ValidateSubmissionRequest.md +38 -0
- data/docs/Webhook.md +20 -20
- data/docs/WebhookEventType.md +15 -0
- data/docs/WebhookList.md +20 -0
- data/docs/WebhookMode.md +15 -0
- data/docspring.gemspec +3 -3
- data/lib/docspring/api/client.rb +1606 -905
- data/lib/docspring/api_client.rb +14 -6
- data/lib/docspring/api_error.rb +3 -3
- data/lib/docspring/api_model_base.rb +88 -0
- data/lib/docspring/configuration.rb +12 -7
- data/lib/docspring/models/add_template_fields_request.rb +187 -0
- data/lib/docspring/models/ai_field_naming_language.rb +42 -0
- data/lib/docspring/models/authentication_check.rb +185 -0
- data/lib/docspring/models/barcode_symbology.rb +47 -0
- data/lib/docspring/models/check_character.rb +44 -0
- data/lib/docspring/models/combined_field_type.rb +41 -0
- data/lib/docspring/models/{combined_submission.rb → combined_pdf.rb} +228 -206
- data/lib/docspring/models/combined_pdf_files.rb +167 -0
- data/lib/docspring/models/combined_pdf_list.rb +200 -0
- data/lib/docspring/models/{create_webhook_data.rb → combined_pdf_source.rb} +107 -103
- data/lib/docspring/models/combined_pdf_source_input.rb +62 -0
- data/lib/docspring/models/combined_pdf_source_pdf.rb +212 -0
- data/lib/docspring/models/combined_pdf_source_type.rb +44 -0
- data/lib/docspring/models/combined_pdf_state.rb +44 -0
- data/lib/docspring/models/{copy_template_options.rb → copy_template_request.rb} +32 -87
- data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +60 -123
- data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +29 -96
- data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +60 -102
- data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +50 -122
- data/lib/docspring/models/create_signature_request_token_request.rb +190 -0
- data/lib/docspring/models/{submission_batch_data.rb → create_submission_batch_request.rb} +75 -108
- data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +114 -144
- data/lib/docspring/models/create_template_request.rb +646 -0
- data/lib/docspring/models/create_webhook_request.rb +368 -0
- data/lib/docspring/models/custom_file.rb +132 -95
- data/lib/docspring/models/custom_file_list.rb +200 -0
- data/lib/docspring/models/custom_file_source_pdf.rb +212 -0
- data/lib/docspring/models/error_code.rb +60 -0
- data/lib/docspring/models/error_detail.rb +242 -0
- data/lib/docspring/models/error_info.rb +316 -0
- data/lib/docspring/models/error_response.rb +28 -138
- data/lib/docspring/models/expiration_interval.rb +42 -0
- data/lib/docspring/models/field.rb +2217 -0
- data/lib/docspring/models/field_comparison_condition.rb +247 -0
- data/lib/docspring/models/field_comparison_operator.rb +43 -0
- data/lib/docspring/models/field_dependency.rb +246 -0
- data/lib/docspring/models/field_dependency_input.rb +246 -0
- data/lib/docspring/models/field_display_type.rb +45 -0
- data/lib/docspring/models/field_equals_condition.rb +247 -0
- data/lib/docspring/models/field_equals_operator.rb +41 -0
- data/lib/docspring/models/field_group.rb +368 -0
- data/lib/docspring/models/field_group_input.rb +247 -0
- data/lib/docspring/models/field_group_type.rb +41 -0
- data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +101 -103
- data/lib/docspring/models/field_input.rb +1109 -0
- data/lib/docspring/models/field_override.rb +829 -0
- data/lib/docspring/models/field_presence_condition.rb +234 -0
- data/lib/docspring/models/field_presence_operator.rb +41 -0
- data/lib/docspring/models/field_range_condition.rb +234 -0
- data/lib/docspring/models/field_reimport_state.rb +43 -0
- data/lib/docspring/models/field_setup_logic.rb +41 -0
- data/lib/docspring/models/field_setup_naming.rb +41 -0
- data/lib/docspring/models/field_setup_source.rb +42 -0
- data/lib/docspring/models/field_type.rb +54 -0
- data/lib/docspring/models/folder.rb +134 -93
- data/lib/docspring/models/folder_list.rb +200 -0
- data/lib/docspring/models/generate_files_format.rb +40 -0
- data/lib/docspring/models/generate_submission_files_request.rb +187 -0
- data/lib/docspring/models/generated_file.rb +326 -0
- data/lib/docspring/models/generated_file_state.rb +42 -0
- data/lib/docspring/models/html_engine_options.rb +416 -0
- data/lib/docspring/models/html_engine_options_input.rb +280 -0
- data/lib/docspring/models/image_gravity.rb +48 -0
- data/lib/docspring/models/image_scale_type.rb +42 -0
- data/lib/docspring/models/model_code_language.rb +48 -0
- data/lib/docspring/models/{move_folder_data.rb → move_folder_request.rb} +31 -87
- data/lib/docspring/models/move_template_request.rb +171 -0
- data/lib/docspring/models/number_condition_type.rb +45 -0
- data/lib/docspring/models/output_format.rb +41 -0
- data/lib/docspring/models/page_format.rb +52 -0
- data/lib/docspring/models/page_image.rb +359 -0
- data/lib/docspring/models/page_images.rb +248 -0
- data/lib/docspring/models/predefined_field.rb +287 -0
- data/lib/docspring/models/predefined_field_input.rb +287 -0
- data/lib/docspring/models/{publish_version_data.rb → publish_template_version_request.rb} +64 -99
- data/lib/docspring/models/remove_template_fields_request.rb +187 -0
- data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +29 -87
- data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
- data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +29 -87
- data/lib/docspring/models/shape_type.rb +45 -0
- data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +240 -171
- data/lib/docspring/models/signature_request_auth_second_factor_type.rb +45 -0
- data/lib/docspring/models/signature_request_auth_type.rb +46 -0
- data/lib/docspring/models/{submission_data_request_event.rb → signature_request_event.rb} +137 -122
- data/lib/docspring/models/signature_request_event_type.rb +45 -0
- data/lib/docspring/models/{update_submission_data_request_data.rb → signature_request_input.rb} +156 -173
- data/lib/docspring/models/signature_request_message_type.rb +48 -0
- data/lib/docspring/models/signature_request_state.rb +42 -0
- data/lib/docspring/models/signature_request_token.rb +369 -0
- data/lib/docspring/models/signature_request_token_type.rb +41 -0
- data/lib/docspring/models/string_condition_type.rb +44 -0
- data/lib/docspring/models/submission.rb +399 -335
- data/lib/docspring/models/submission_action.rb +64 -136
- data/lib/docspring/models/submission_action_state.rb +43 -0
- data/lib/docspring/models/submission_action_type.rb +46 -0
- data/lib/docspring/models/submission_batch.rb +157 -112
- data/lib/docspring/models/submission_batch_state.rb +42 -0
- data/lib/docspring/models/submission_files.rb +197 -0
- data/lib/docspring/models/submission_input.rb +296 -0
- data/lib/docspring/models/submission_list.rb +200 -0
- data/lib/docspring/models/submission_source.rb +43 -0
- data/lib/docspring/models/submission_source_pdf.rb +212 -0
- data/lib/docspring/models/submission_state.rb +52 -0
- data/lib/docspring/models/submission_validation.rb +234 -0
- data/lib/docspring/models/template.rb +528 -736
- data/lib/docspring/models/template_actor.rb +259 -0
- data/lib/docspring/models/template_actor_type.rb +42 -0
- data/lib/docspring/models/template_defaults.rb +395 -0
- data/lib/docspring/models/template_defaults_input.rb +395 -0
- data/lib/docspring/models/template_diff.rb +321 -0
- data/lib/docspring/models/template_diff_summary.rb +320 -0
- data/lib/docspring/models/template_document.rb +396 -0
- data/lib/docspring/models/template_document_state.rb +46 -0
- data/lib/docspring/models/template_field_change.rb +266 -0
- data/lib/docspring/models/template_field_changes.rb +274 -0
- data/lib/docspring/models/{success_error_response.rb → template_field_dependency.rb} +122 -114
- data/lib/docspring/models/template_field_dependency_action.rb +42 -0
- data/lib/docspring/models/{create_pdf_template.rb → template_field_dependency_condition.rb} +116 -103
- data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
- data/lib/docspring/models/template_field_dependency_input.rb +285 -0
- data/lib/docspring/models/template_field_dependency_match.rb +41 -0
- data/lib/docspring/models/template_field_dependency_operator.rb +49 -0
- data/lib/docspring/models/template_field_logic_status.rb +44 -0
- data/lib/docspring/models/{update_webhook_data.rb → template_field_move.rb} +99 -103
- data/lib/docspring/models/{add_fields_data.rb → template_fields.rb} +71 -89
- data/lib/docspring/models/template_form_mode.rb +42 -0
- data/lib/docspring/models/{template_model_code_response.rb → template_model_code.rb} +37 -96
- data/lib/docspring/models/template_page_ai_error.rb +43 -0
- data/lib/docspring/models/template_page_ai_naming_status.rb +41 -0
- data/lib/docspring/models/template_page_fields_status.rb +44 -0
- data/lib/docspring/models/template_page_image_status.rb +41 -0
- data/lib/docspring/models/template_page_images.rb +254 -0
- data/lib/docspring/models/template_page_processing_status.rb +275 -0
- data/lib/docspring/models/{update_pdf_template.rb → template_source_pdf.rb} +92 -103
- data/lib/docspring/models/{template_preview.rb → template_summary.rb} +436 -589
- data/lib/docspring/models/template_summary_list.rb +200 -0
- data/lib/docspring/models/template_type.rb +41 -0
- data/lib/docspring/models/template_version.rb +238 -0
- data/lib/docspring/models/template_version_type.rb +42 -0
- data/lib/docspring/models/text_alignment.rb +43 -0
- data/lib/docspring/models/text_overflow.rb +41 -0
- data/lib/docspring/models/text_vertical_alignment.rb +42 -0
- data/lib/docspring/models/typeface.rb +56 -0
- data/lib/docspring/models/{create_submission_data_request_data.rb → update_signature_request_request.rb} +72 -196
- data/lib/docspring/models/update_template_document_request.rb +208 -0
- data/lib/docspring/models/update_template_fields_request.rb +187 -0
- data/lib/docspring/models/update_template_request.rb +551 -0
- data/lib/docspring/models/update_webhook_request.rb +344 -0
- data/lib/docspring/models/upload_method.rb +40 -0
- data/lib/docspring/models/{upload_presign_response.rb → upload_presign.rb} +93 -140
- data/lib/docspring/models/url_source_pdf.rb +212 -0
- data/lib/docspring/models/validate_submission_request.rb +288 -0
- data/lib/docspring/models/webhook.rb +97 -107
- data/lib/docspring/models/webhook_event_type.rb +64 -0
- data/lib/docspring/models/webhook_list.rb +200 -0
- data/lib/docspring/models/webhook_mode.rb +41 -0
- data/lib/docspring/request_schemas.json +4967 -0
- data/lib/docspring/request_validator.rb +396 -0
- data/lib/docspring/version.rb +4 -4
- data/lib/docspring.rb +153 -53
- data/spec/api/client_spec.rb +411 -265
- data/spec/models/add_template_fields_request_spec.rb +36 -0
- data/spec/models/ai_field_naming_language_spec.rb +30 -0
- data/spec/models/authentication_check_spec.rb +36 -0
- data/spec/models/barcode_symbology_spec.rb +30 -0
- data/spec/models/check_character_spec.rb +30 -0
- data/spec/models/combined_field_type_spec.rb +30 -0
- data/spec/models/combined_pdf_files_spec.rb +36 -0
- data/spec/models/combined_pdf_list_spec.rb +42 -0
- data/spec/models/combined_pdf_source_input_spec.rb +44 -0
- data/spec/models/combined_pdf_source_pdf_spec.rb +42 -0
- data/spec/models/{submission_data_request_token_spec.rb → combined_pdf_source_spec.rb} +18 -12
- data/spec/models/combined_pdf_source_type_spec.rb +30 -0
- data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +20 -24
- data/spec/models/combined_pdf_state_spec.rb +30 -0
- data/spec/models/{copy_template_options_spec.rb → copy_template_request_spec.rb} +9 -9
- data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +12 -18
- data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +9 -9
- data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +11 -11
- data/spec/models/{list_submissions_response_spec.rb → create_signature_request_event_request_spec.rb} +18 -12
- data/spec/models/create_signature_request_token_request_spec.rb +36 -0
- data/spec/models/{submission_batch_data_spec.rb → create_submission_batch_request_spec.rb} +19 -13
- data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +29 -17
- data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +49 -103
- data/spec/models/create_webhook_request_spec.rb +96 -0
- data/spec/models/custom_file_list_spec.rb +42 -0
- data/spec/models/custom_file_source_pdf_spec.rb +42 -0
- data/spec/models/custom_file_spec.rb +29 -5
- data/spec/models/error_code_spec.rb +30 -0
- data/spec/models/{create_submission_response_spec.rb → error_detail_spec.rb} +14 -18
- data/spec/models/{batch_generate_pdfs201_response_spec.rb → error_info_spec.rb} +27 -19
- data/spec/models/error_response_spec.rb +4 -14
- data/spec/models/expiration_interval_spec.rb +30 -0
- data/spec/models/field_comparison_condition_spec.rb +48 -0
- data/spec/models/field_comparison_operator_spec.rb +30 -0
- data/spec/models/field_dependency_input_spec.rb +48 -0
- data/spec/models/field_dependency_spec.rb +48 -0
- data/spec/models/field_display_type_spec.rb +30 -0
- data/spec/models/field_equals_condition_spec.rb +48 -0
- data/spec/models/field_equals_operator_spec.rb +30 -0
- data/spec/models/field_group_input_spec.rb +72 -0
- data/spec/models/field_group_spec.rb +78 -0
- data/spec/models/field_group_type_spec.rb +30 -0
- data/spec/models/field_in_condition_spec.rb +48 -0
- data/spec/models/field_input_spec.rb +570 -0
- data/spec/models/field_override_spec.rb +408 -0
- data/spec/models/field_presence_condition_spec.rb +42 -0
- data/spec/models/field_presence_operator_spec.rb +30 -0
- data/spec/models/field_range_condition_spec.rb +54 -0
- data/spec/models/field_reimport_state_spec.rb +30 -0
- data/spec/models/field_setup_logic_spec.rb +30 -0
- data/spec/models/field_setup_naming_spec.rb +30 -0
- data/spec/models/field_setup_source_spec.rb +30 -0
- data/spec/models/field_spec.rb +576 -0
- data/spec/models/field_type_spec.rb +30 -0
- data/spec/models/folder_list_spec.rb +42 -0
- data/spec/models/folder_spec.rb +16 -4
- data/spec/models/generate_files_format_spec.rb +30 -0
- data/spec/models/generate_submission_files_request_spec.rb +36 -0
- data/spec/models/generated_file_spec.rb +78 -0
- data/spec/models/generated_file_state_spec.rb +30 -0
- data/spec/models/html_engine_options_input_spec.rb +90 -0
- data/spec/models/html_engine_options_spec.rb +90 -0
- data/spec/models/image_gravity_spec.rb +30 -0
- data/spec/models/image_scale_type_spec.rb +30 -0
- data/spec/models/model_code_language_spec.rb +30 -0
- data/spec/models/move_folder_request_spec.rb +36 -0
- data/spec/models/move_template_request_spec.rb +36 -0
- data/spec/models/number_condition_type_spec.rb +30 -0
- data/spec/models/output_format_spec.rb +30 -0
- data/spec/models/page_format_spec.rb +30 -0
- data/spec/models/page_image_spec.rb +84 -0
- data/spec/models/page_images_spec.rb +54 -0
- data/spec/models/predefined_field_input_spec.rb +72 -0
- data/spec/models/predefined_field_spec.rb +72 -0
- data/spec/models/{publish_version_data_spec.rb → publish_template_version_request_spec.rb} +11 -11
- data/spec/models/remove_template_fields_request_spec.rb +36 -0
- data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +9 -9
- data/spec/models/reorder_template_fields_request_spec.rb +36 -0
- data/spec/models/restore_template_version_request_spec.rb +36 -0
- data/spec/models/shape_type_spec.rb +30 -0
- data/spec/models/signature_request_auth_second_factor_type_spec.rb +30 -0
- data/spec/models/signature_request_auth_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_event_spec.rb → signature_request_event_spec.rb} +16 -18
- data/spec/models/signature_request_event_type_spec.rb +30 -0
- data/spec/models/{create_submission_data_request_data_spec.rb → signature_request_input_spec.rb} +28 -30
- data/spec/models/signature_request_message_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_show_spec.rb → signature_request_spec.rb} +31 -31
- data/spec/models/signature_request_state_spec.rb +30 -0
- data/spec/models/signature_request_token_spec.rb +72 -0
- data/spec/models/signature_request_token_type_spec.rb +30 -0
- data/spec/models/string_condition_type_spec.rb +30 -0
- data/spec/models/submission_action_spec.rb +4 -22
- data/spec/models/submission_action_state_spec.rb +30 -0
- data/spec/models/submission_action_type_spec.rb +30 -0
- data/spec/models/submission_batch_spec.rb +27 -13
- data/spec/models/submission_batch_state_spec.rb +30 -0
- data/spec/models/submission_files_spec.rb +54 -0
- data/spec/models/{json_schema_spec.rb → submission_input_spec.rb} +21 -21
- data/spec/models/submission_list_spec.rb +42 -0
- data/spec/models/submission_source_pdf_spec.rb +42 -0
- data/spec/models/submission_source_spec.rb +30 -0
- data/spec/models/submission_spec.rb +27 -51
- data/spec/models/submission_state_spec.rb +30 -0
- data/spec/models/submission_validation_spec.rb +54 -0
- data/spec/models/template_actor_spec.rb +60 -0
- data/spec/models/template_actor_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_spec.rb → template_defaults_input_spec.rb} +29 -53
- data/spec/models/{submission_preview_spec.rb → template_defaults_spec.rb} +29 -61
- data/spec/models/template_diff_spec.rb +72 -0
- data/spec/models/template_diff_summary_spec.rb +66 -0
- data/spec/models/template_document_spec.rb +102 -0
- data/spec/models/template_document_state_spec.rb +30 -0
- data/spec/models/template_field_change_spec.rb +54 -0
- data/spec/models/template_field_changes_spec.rb +54 -0
- data/spec/models/template_field_dependency_action_spec.rb +30 -0
- data/spec/models/template_field_dependency_condition_input_spec.rb +44 -0
- data/spec/models/template_field_dependency_condition_spec.rb +54 -0
- data/spec/models/template_field_dependency_input_spec.rb +60 -0
- data/spec/models/template_field_dependency_match_spec.rb +30 -0
- data/spec/models/template_field_dependency_operator_spec.rb +30 -0
- data/spec/models/template_field_dependency_spec.rb +60 -0
- data/spec/models/template_field_logic_status_spec.rb +30 -0
- data/spec/models/template_field_move_spec.rb +48 -0
- data/spec/models/template_fields_spec.rb +48 -0
- data/spec/models/template_form_mode_spec.rb +30 -0
- data/spec/models/{template_model_code_response_spec.rb → template_model_code_spec.rb} +9 -13
- data/spec/models/template_page_ai_error_spec.rb +30 -0
- data/spec/models/template_page_ai_naming_status_spec.rb +30 -0
- data/spec/models/template_page_fields_status_spec.rb +30 -0
- data/spec/models/template_page_image_status_spec.rb +30 -0
- data/spec/models/template_page_images_spec.rb +54 -0
- data/spec/models/template_page_processing_status_spec.rb +60 -0
- data/spec/models/template_source_pdf_spec.rb +54 -0
- data/spec/models/template_spec.rb +44 -140
- data/spec/models/template_summary_list_spec.rb +42 -0
- data/spec/models/template_summary_spec.rb +252 -0
- data/spec/models/template_type_spec.rb +30 -0
- data/spec/models/template_version_spec.rb +54 -0
- data/spec/models/template_version_type_spec.rb +30 -0
- data/spec/models/text_alignment_spec.rb +30 -0
- data/spec/models/text_overflow_spec.rb +30 -0
- data/spec/models/text_vertical_alignment_spec.rb +30 -0
- data/spec/models/typeface_spec.rb +30 -0
- data/spec/models/{submission_batch_with_submissions_spec.rb → update_signature_request_request_spec.rb} +18 -22
- data/spec/models/update_template_document_request_spec.rb +60 -0
- data/spec/models/update_template_fields_request_spec.rb +36 -0
- data/spec/models/update_template_request_spec.rb +240 -0
- data/spec/models/update_webhook_request_spec.rb +96 -0
- data/spec/models/upload_method_spec.rb +30 -0
- data/spec/models/{upload_presign_response_spec.rb → upload_presign_spec.rb} +13 -17
- data/spec/models/url_source_pdf_spec.rb +42 -0
- data/spec/models/validate_submission_request_spec.rb +96 -0
- data/spec/models/webhook_event_type_spec.rb +30 -0
- data/spec/models/webhook_list_spec.rb +42 -0
- data/spec/models/webhook_mode_spec.rb +30 -0
- data/spec/models/webhook_spec.rb +4 -8
- data/spec/spec_helper.rb +3 -3
- metadata +597 -202
- data/docs/AddFieldsData.md +0 -18
- data/docs/BatchGeneratePdfs201Response.md +0 -28
- data/docs/CombinePdfsData.md +0 -28
- data/docs/CombinedSubmission.md +0 -44
- data/docs/CombinedSubmissionAction.md +0 -30
- data/docs/CopyTemplateOptions.md +0 -22
- data/docs/CreateCombinedSubmissionResponse.md +0 -26
- data/docs/CreateCustomFileData.md +0 -18
- data/docs/CreateCustomFileResponse.md +0 -24
- data/docs/CreateHtmlTemplate.md +0 -18
- data/docs/CreatePdfSubmissionData.md +0 -34
- data/docs/CreatePdfTemplate.md +0 -18
- data/docs/CreateSubmissionDataRequestData.md +0 -44
- data/docs/CreateSubmissionDataRequestEventRequest.md +0 -24
- data/docs/CreateSubmissionDataRequestEventResponse.md +0 -24
- data/docs/CreateSubmissionDataRequestResponse.md +0 -24
- data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -24
- data/docs/CreateSubmissionResponse.md +0 -26
- data/docs/ErrorOrMultipleErrorsResponse.md +0 -22
- data/docs/ForbiddenErrorResponse.md +0 -22
- data/docs/JsonSchema.md +0 -40
- data/docs/ListSubmissionsResponse.md +0 -22
- data/docs/MoveFolderData.md +0 -18
- data/docs/MoveTemplateData.md +0 -20
- data/docs/MultipleErrorsResponse.md +0 -20
- data/docs/PublishVersionData.md +0 -20
- data/docs/RestoreVersionData.md +0 -18
- data/docs/Submission422Response.md +0 -24
- data/docs/SubmissionBatchData.md +0 -26
- data/docs/SubmissionBatchWithSubmissions.md +0 -34
- data/docs/SubmissionDataRequest.md +0 -60
- data/docs/SubmissionDataRequestEvent.md +0 -30
- data/docs/SubmissionDataRequestShow.md +0 -62
- data/docs/SubmissionDataRequestToken.md +0 -24
- data/docs/SubmissionPreview.md +0 -64
- data/docs/SuccessErrorResponse.md +0 -20
- data/docs/SuccessMultipleErrorsResponse.md +0 -20
- data/docs/TemplateAddFieldsResponse.md +0 -22
- data/docs/TemplateDeleteResponse.md +0 -24
- data/docs/TemplateModelCodeResponse.md +0 -22
- data/docs/TemplatePreview.md +0 -116
- data/docs/TemplatePublishVersionResponse.md +0 -22
- data/docs/UpdateHtmlTemplate.md +0 -18
- data/docs/UpdatePdfTemplate.md +0 -18
- data/docs/UpdateSubmissionDataRequestData.md +0 -42
- data/docs/UploadPresignResponse.md +0 -24
- data/lib/docspring/models/batch_generate_pdfs201_response.rb +0 -352
- data/lib/docspring/models/combined_submission_action.rb +0 -384
- data/lib/docspring/models/create_combined_submission_response.rb +0 -324
- data/lib/docspring/models/create_custom_file_response.rb +0 -314
- data/lib/docspring/models/create_html_template.rb +0 -243
- data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -314
- data/lib/docspring/models/create_submission_data_request_response.rb +0 -314
- data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -314
- data/lib/docspring/models/create_submission_response.rb +0 -324
- data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
- data/lib/docspring/models/forbidden_error_response.rb +0 -323
- data/lib/docspring/models/json_schema.rb +0 -329
- data/lib/docspring/models/list_submissions_response.rb +0 -283
- data/lib/docspring/models/multiple_errors_response.rb +0 -296
- data/lib/docspring/models/submission422_response.rb +0 -299
- data/lib/docspring/models/submission_batch_with_submissions.rb +0 -433
- data/lib/docspring/models/submission_data_request.rb +0 -570
- data/lib/docspring/models/submission_data_request_token.rb +0 -279
- data/lib/docspring/models/submission_preview.rb +0 -637
- data/lib/docspring/models/success_multiple_errors_response.rb +0 -279
- data/lib/docspring/models/template_add_fields_response.rb +0 -290
- data/lib/docspring/models/template_delete_response.rb +0 -300
- data/lib/docspring/models/template_publish_version_response.rb +0 -305
- data/lib/docspring/models/update_html_template.rb +0 -243
- data/spec/models/add_fields_data_spec.rb +0 -36
- data/spec/models/combined_submission_action_spec.rb +0 -84
- data/spec/models/create_combined_submission_response_spec.rb +0 -64
- data/spec/models/create_custom_file_response_spec.rb +0 -58
- data/spec/models/create_folder_data_spec.rb +0 -36
- data/spec/models/create_html_template_spec.rb +0 -36
- data/spec/models/create_pdf_template_spec.rb +0 -36
- data/spec/models/create_submission_data_request_event_request_spec.rb +0 -62
- data/spec/models/create_submission_data_request_event_response_spec.rb +0 -58
- data/spec/models/create_submission_data_request_response_spec.rb +0 -58
- data/spec/models/create_submission_data_request_token_response_spec.rb +0 -58
- data/spec/models/create_webhook_data_spec.rb +0 -36
- data/spec/models/error_or_multiple_errors_response_spec.rb +0 -52
- data/spec/models/forbidden_error_response_spec.rb +0 -56
- data/spec/models/move_folder_data_spec.rb +0 -36
- data/spec/models/multiple_errors_response_spec.rb +0 -46
- data/spec/models/restore_version_data_spec.rb +0 -36
- data/spec/models/submission422_response_spec.rb +0 -58
- data/spec/models/success_error_response_spec.rb +0 -46
- data/spec/models/success_multiple_errors_response_spec.rb +0 -46
- data/spec/models/template_add_fields_response_spec.rb +0 -52
- data/spec/models/template_delete_response_spec.rb +0 -58
- data/spec/models/template_publish_version_response_spec.rb +0 -52
- data/spec/models/update_html_template_spec.rb +0 -36
- data/spec/models/update_pdf_template_spec.rb +0 -36
- data/spec/models/update_submission_data_request_data_spec.rb +0 -116
- data/spec/models/update_webhook_data_spec.rb +0 -36
data/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,44 @@ 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
|
-
# Add
|
|
64
|
-
# Adds fields to a
|
|
65
|
-
# @param template_id [String]
|
|
66
|
-
# @param
|
|
69
|
+
# Add fields to a template
|
|
70
|
+
# Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
|
|
71
|
+
# @param template_id [String] The template's ID.
|
|
72
|
+
# @param body [AddTemplateFieldsRequest] The fields to add to the template's draft.
|
|
67
73
|
# @param [Hash] opts the optional parameters
|
|
68
|
-
# @return [
|
|
69
|
-
def
|
|
70
|
-
data, _status_code, _headers =
|
|
74
|
+
# @return [TemplateFields]
|
|
75
|
+
def add_template_fields(template_id, body, opts = {})
|
|
76
|
+
data, _status_code, _headers = add_template_fields_with_http_info(template_id, body, opts)
|
|
71
77
|
data
|
|
72
78
|
end
|
|
73
79
|
|
|
74
|
-
# Add
|
|
75
|
-
# Adds fields to a
|
|
76
|
-
# @param template_id [String]
|
|
77
|
-
# @param
|
|
80
|
+
# Add fields to a template
|
|
81
|
+
# Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
|
|
82
|
+
# @param template_id [String] The template's ID.
|
|
83
|
+
# @param body [AddTemplateFieldsRequest] The fields to add to the template's draft.
|
|
78
84
|
# @param [Hash] opts the optional parameters
|
|
79
|
-
# @return [Array<(
|
|
80
|
-
def
|
|
85
|
+
# @return [Array<(TemplateFields, Integer, Hash)>] TemplateFields data, response status code and response headers
|
|
86
|
+
def add_template_fields_with_http_info(template_id, body, 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.add_template_fields ...'
|
|
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.
|
|
92
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.add_template_fields"
|
|
87
93
|
end
|
|
88
|
-
# verify the required parameter '
|
|
89
|
-
if @api_client.config.client_side_validation &&
|
|
90
|
-
fail ArgumentError, "Missing the required parameter '
|
|
94
|
+
# verify the required parameter 'body' is set
|
|
95
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
96
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.add_template_fields"
|
|
91
97
|
end
|
|
92
98
|
# resource path
|
|
93
|
-
local_var_path = '/templates/{template_id}/
|
|
99
|
+
local_var_path = '/templates/{template_id}/fields'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
94
100
|
|
|
95
101
|
# query parameters
|
|
96
102
|
query_params = opts[:query_params] || {}
|
|
@@ -109,16 +115,16 @@ end
|
|
|
109
115
|
form_params = opts[:form_params] || {}
|
|
110
116
|
|
|
111
117
|
# http body (model)
|
|
112
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
118
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
113
119
|
|
|
114
120
|
# return_type
|
|
115
|
-
return_type = opts[:debug_return_type] || '
|
|
121
|
+
return_type = opts[:debug_return_type] || 'TemplateFields'
|
|
116
122
|
|
|
117
123
|
# auth_names
|
|
118
124
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
119
125
|
|
|
120
126
|
new_options = opts.merge(
|
|
121
|
-
:operation => :"Client.
|
|
127
|
+
:operation => :"Client.add_template_fields",
|
|
122
128
|
:header_params => header_params,
|
|
123
129
|
:query_params => query_params,
|
|
124
130
|
:form_params => form_params,
|
|
@@ -127,44 +133,43 @@ end
|
|
|
127
133
|
:return_type => return_type
|
|
128
134
|
)
|
|
129
135
|
|
|
130
|
-
data, status_code, headers = @api_client.call_api(:
|
|
136
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
131
137
|
if @api_client.config.debugging
|
|
132
|
-
@api_client.config.logger.debug "API called: Client#
|
|
138
|
+
@api_client.config.logger.debug "API called: Client#add_template_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
133
139
|
end
|
|
134
140
|
return data, status_code, headers
|
|
135
141
|
end
|
|
136
142
|
|
|
137
|
-
#
|
|
138
|
-
#
|
|
139
|
-
# @param
|
|
143
|
+
# Copy a template
|
|
144
|
+
# Copies a template (its draft, or a published version) into a new template.
|
|
145
|
+
# @param template_id [String] The template's ID.
|
|
140
146
|
# @param [Hash] opts the optional parameters
|
|
141
|
-
# @option opts [
|
|
142
|
-
# @return [
|
|
143
|
-
def
|
|
144
|
-
data, _status_code, _headers =
|
|
147
|
+
# @option opts [CopyTemplateRequest] :body Settings for the copy.
|
|
148
|
+
# @return [Template]
|
|
149
|
+
def copy_template(template_id, opts = {})
|
|
150
|
+
data, _status_code, _headers = copy_template_with_http_info(template_id, opts)
|
|
145
151
|
data
|
|
146
152
|
end
|
|
147
153
|
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
# @param
|
|
154
|
+
# Copy a template
|
|
155
|
+
# Copies a template (its draft, or a published version) into a new template.
|
|
156
|
+
# @param template_id [String] The template's ID.
|
|
151
157
|
# @param [Hash] opts the optional parameters
|
|
152
|
-
# @option opts [
|
|
153
|
-
# @return [Array<(
|
|
154
|
-
def
|
|
158
|
+
# @option opts [CopyTemplateRequest] :body Settings for the copy.
|
|
159
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
160
|
+
def copy_template_with_http_info(template_id, opts = {})
|
|
155
161
|
if @api_client.config.debugging
|
|
156
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
162
|
+
@api_client.config.logger.debug 'Calling API: Client.copy_template ...'
|
|
157
163
|
end
|
|
158
|
-
# verify the required parameter '
|
|
159
|
-
if @api_client.config.client_side_validation &&
|
|
160
|
-
fail ArgumentError, "Missing the required parameter '
|
|
164
|
+
# verify the required parameter 'template_id' is set
|
|
165
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
166
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.copy_template"
|
|
161
167
|
end
|
|
162
168
|
# resource path
|
|
163
|
-
local_var_path = '/
|
|
169
|
+
local_var_path = '/templates/{template_id}/copy'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
164
170
|
|
|
165
171
|
# query parameters
|
|
166
172
|
query_params = opts[:query_params] || {}
|
|
167
|
-
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
168
173
|
|
|
169
174
|
# header parameters
|
|
170
175
|
header_params = opts[:header_params] || {}
|
|
@@ -180,16 +185,16 @@ end
|
|
|
180
185
|
form_params = opts[:form_params] || {}
|
|
181
186
|
|
|
182
187
|
# http body (model)
|
|
183
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
188
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
|
184
189
|
|
|
185
190
|
# return_type
|
|
186
|
-
return_type = opts[:debug_return_type] || '
|
|
191
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
187
192
|
|
|
188
193
|
# auth_names
|
|
189
194
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
190
195
|
|
|
191
196
|
new_options = opts.merge(
|
|
192
|
-
:operation => :"Client.
|
|
197
|
+
:operation => :"Client.copy_template",
|
|
193
198
|
:header_params => header_params,
|
|
194
199
|
:query_params => query_params,
|
|
195
200
|
:form_params => form_params,
|
|
@@ -200,39 +205,42 @@ end
|
|
|
200
205
|
|
|
201
206
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
202
207
|
if @api_client.config.debugging
|
|
203
|
-
@api_client.config.logger.debug "API called: Client#
|
|
208
|
+
@api_client.config.logger.debug "API called: Client#copy_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
204
209
|
end
|
|
205
210
|
return data, status_code, headers
|
|
206
211
|
end
|
|
207
212
|
|
|
208
|
-
#
|
|
209
|
-
#
|
|
210
|
-
# @param
|
|
213
|
+
# Combine PDFs
|
|
214
|
+
# 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.
|
|
215
|
+
# @param body [CreateCombinedPdfRequest] The PDFs to merge, and the combined PDF's settings.
|
|
211
216
|
# @param [Hash] opts the optional parameters
|
|
212
|
-
# @
|
|
213
|
-
|
|
214
|
-
|
|
217
|
+
# @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
218
|
+
# @return [CombinedPdf]
|
|
219
|
+
def create_combined_pdf(body, opts = {})
|
|
220
|
+
data, _status_code, _headers = create_combined_pdf_with_http_info(body, opts)
|
|
215
221
|
data
|
|
216
222
|
end
|
|
217
223
|
|
|
218
|
-
#
|
|
219
|
-
#
|
|
220
|
-
# @param
|
|
224
|
+
# Combine PDFs
|
|
225
|
+
# 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.
|
|
226
|
+
# @param body [CreateCombinedPdfRequest] The PDFs to merge, and the combined PDF's settings.
|
|
221
227
|
# @param [Hash] opts the optional parameters
|
|
222
|
-
# @
|
|
223
|
-
|
|
228
|
+
# @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
|
|
229
|
+
# @return [Array<(CombinedPdf, Integer, Hash)>] CombinedPdf data, response status code and response headers
|
|
230
|
+
def create_combined_pdf_with_http_info(body, opts = {})
|
|
224
231
|
if @api_client.config.debugging
|
|
225
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
232
|
+
@api_client.config.logger.debug 'Calling API: Client.create_combined_pdf ...'
|
|
226
233
|
end
|
|
227
|
-
# verify the required parameter '
|
|
228
|
-
if @api_client.config.client_side_validation &&
|
|
229
|
-
fail ArgumentError, "Missing the required parameter '
|
|
234
|
+
# verify the required parameter 'body' is set
|
|
235
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
236
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_combined_pdf"
|
|
230
237
|
end
|
|
231
238
|
# resource path
|
|
232
|
-
local_var_path = '/
|
|
239
|
+
local_var_path = '/combined_pdfs'
|
|
233
240
|
|
|
234
241
|
# query parameters
|
|
235
242
|
query_params = opts[:query_params] || {}
|
|
243
|
+
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
236
244
|
|
|
237
245
|
# header parameters
|
|
238
246
|
header_params = opts[:header_params] || {}
|
|
@@ -248,16 +256,16 @@ end
|
|
|
248
256
|
form_params = opts[:form_params] || {}
|
|
249
257
|
|
|
250
258
|
# http body (model)
|
|
251
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
259
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
252
260
|
|
|
253
261
|
# return_type
|
|
254
|
-
return_type = opts[:debug_return_type] || '
|
|
262
|
+
return_type = opts[:debug_return_type] || 'CombinedPdf'
|
|
255
263
|
|
|
256
264
|
# auth_names
|
|
257
265
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
258
266
|
|
|
259
267
|
new_options = opts.merge(
|
|
260
|
-
:operation => :"Client.
|
|
268
|
+
:operation => :"Client.create_combined_pdf",
|
|
261
269
|
:header_params => header_params,
|
|
262
270
|
:query_params => query_params,
|
|
263
271
|
:form_params => form_params,
|
|
@@ -268,38 +276,36 @@ end
|
|
|
268
276
|
|
|
269
277
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
270
278
|
if @api_client.config.debugging
|
|
271
|
-
@api_client.config.logger.debug "API called: Client#
|
|
279
|
+
@api_client.config.logger.debug "API called: Client#create_combined_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
272
280
|
end
|
|
273
281
|
return data, status_code, headers
|
|
274
282
|
end
|
|
275
283
|
|
|
276
|
-
#
|
|
277
|
-
# Creates a
|
|
278
|
-
# @param
|
|
284
|
+
# Create a custom file from an upload
|
|
285
|
+
# 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`.
|
|
286
|
+
# @param body [CreateCustomFileFromUploadRequest] The uploaded file to create the custom file from.
|
|
279
287
|
# @param [Hash] opts the optional parameters
|
|
280
|
-
# @
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
data, _status_code, _headers = copy_template_with_http_info(template_id, opts)
|
|
288
|
+
# @return [CustomFile]
|
|
289
|
+
def create_custom_file_from_upload(body, opts = {})
|
|
290
|
+
data, _status_code, _headers = create_custom_file_from_upload_with_http_info(body, opts)
|
|
284
291
|
data
|
|
285
292
|
end
|
|
286
293
|
|
|
287
|
-
#
|
|
288
|
-
# Creates a
|
|
289
|
-
# @param
|
|
294
|
+
# Create a custom file from an upload
|
|
295
|
+
# 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`.
|
|
296
|
+
# @param body [CreateCustomFileFromUploadRequest] The uploaded file to create the custom file from.
|
|
290
297
|
# @param [Hash] opts the optional parameters
|
|
291
|
-
# @
|
|
292
|
-
|
|
293
|
-
def copy_template_with_http_info(template_id, opts = {})
|
|
298
|
+
# @return [Array<(CustomFile, Integer, Hash)>] CustomFile data, response status code and response headers
|
|
299
|
+
def create_custom_file_from_upload_with_http_info(body, opts = {})
|
|
294
300
|
if @api_client.config.debugging
|
|
295
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
301
|
+
@api_client.config.logger.debug 'Calling API: Client.create_custom_file_from_upload ...'
|
|
296
302
|
end
|
|
297
|
-
# verify the required parameter '
|
|
298
|
-
if @api_client.config.client_side_validation &&
|
|
299
|
-
fail ArgumentError, "Missing the required parameter '
|
|
303
|
+
# verify the required parameter 'body' is set
|
|
304
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
305
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_custom_file_from_upload"
|
|
300
306
|
end
|
|
301
307
|
# resource path
|
|
302
|
-
local_var_path = '/
|
|
308
|
+
local_var_path = '/custom_files'
|
|
303
309
|
|
|
304
310
|
# query parameters
|
|
305
311
|
query_params = opts[:query_params] || {}
|
|
@@ -318,16 +324,16 @@ end
|
|
|
318
324
|
form_params = opts[:form_params] || {}
|
|
319
325
|
|
|
320
326
|
# http body (model)
|
|
321
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
327
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
322
328
|
|
|
323
329
|
# return_type
|
|
324
|
-
return_type = opts[:debug_return_type] || '
|
|
330
|
+
return_type = opts[:debug_return_type] || 'CustomFile'
|
|
325
331
|
|
|
326
332
|
# auth_names
|
|
327
333
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
328
334
|
|
|
329
335
|
new_options = opts.merge(
|
|
330
|
-
:operation => :"Client.
|
|
336
|
+
:operation => :"Client.create_custom_file_from_upload",
|
|
331
337
|
:header_params => header_params,
|
|
332
338
|
:query_params => query_params,
|
|
333
339
|
:form_params => form_params,
|
|
@@ -338,36 +344,36 @@ end
|
|
|
338
344
|
|
|
339
345
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
340
346
|
if @api_client.config.debugging
|
|
341
|
-
@api_client.config.logger.debug "API called: Client#
|
|
347
|
+
@api_client.config.logger.debug "API called: Client#create_custom_file_from_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
342
348
|
end
|
|
343
349
|
return data, status_code, headers
|
|
344
350
|
end
|
|
345
351
|
|
|
346
|
-
# Create a
|
|
347
|
-
#
|
|
348
|
-
# @param
|
|
352
|
+
# Create a folder
|
|
353
|
+
# Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
354
|
+
# @param body [CreateFolderRequest] The folder to create.
|
|
349
355
|
# @param [Hash] opts the optional parameters
|
|
350
|
-
# @return [
|
|
351
|
-
def
|
|
352
|
-
data, _status_code, _headers =
|
|
356
|
+
# @return [Folder]
|
|
357
|
+
def create_folder(body, opts = {})
|
|
358
|
+
data, _status_code, _headers = create_folder_with_http_info(body, opts)
|
|
353
359
|
data
|
|
354
360
|
end
|
|
355
361
|
|
|
356
|
-
# Create a
|
|
357
|
-
#
|
|
358
|
-
# @param
|
|
362
|
+
# Create a folder
|
|
363
|
+
# Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
|
|
364
|
+
# @param body [CreateFolderRequest] The folder to create.
|
|
359
365
|
# @param [Hash] opts the optional parameters
|
|
360
|
-
# @return [Array<(
|
|
361
|
-
def
|
|
366
|
+
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
367
|
+
def create_folder_with_http_info(body, opts = {})
|
|
362
368
|
if @api_client.config.debugging
|
|
363
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
369
|
+
@api_client.config.logger.debug 'Calling API: Client.create_folder ...'
|
|
364
370
|
end
|
|
365
|
-
# verify the required parameter '
|
|
366
|
-
if @api_client.config.client_side_validation &&
|
|
367
|
-
fail ArgumentError, "Missing the required parameter '
|
|
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_folder"
|
|
368
374
|
end
|
|
369
375
|
# resource path
|
|
370
|
-
local_var_path = '/
|
|
376
|
+
local_var_path = '/folders'
|
|
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] || 'Folder'
|
|
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_folder",
|
|
399
405
|
:header_params => header_params,
|
|
400
406
|
:query_params => query_params,
|
|
401
407
|
:form_params => form_params,
|
|
@@ -406,42 +412,42 @@ 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_folder\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
|
-
#
|
|
415
|
-
# Records
|
|
416
|
-
# @param
|
|
417
|
-
# @param
|
|
420
|
+
# Record a signature request event
|
|
421
|
+
# 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.
|
|
422
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
423
|
+
# @param body [CreateSignatureRequestEventRequest] The event to record.
|
|
418
424
|
# @param [Hash] opts the optional parameters
|
|
419
|
-
# @return [
|
|
420
|
-
def
|
|
421
|
-
data, _status_code, _headers =
|
|
425
|
+
# @return [SignatureRequestEvent]
|
|
426
|
+
def create_signature_request_event(signature_request_id, body, opts = {})
|
|
427
|
+
data, _status_code, _headers = create_signature_request_event_with_http_info(signature_request_id, body, opts)
|
|
422
428
|
data
|
|
423
429
|
end
|
|
424
430
|
|
|
425
|
-
#
|
|
426
|
-
# Records
|
|
427
|
-
# @param
|
|
428
|
-
# @param
|
|
431
|
+
# Record a signature request event
|
|
432
|
+
# 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.
|
|
433
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
434
|
+
# @param body [CreateSignatureRequestEventRequest] The event to record.
|
|
429
435
|
# @param [Hash] opts the optional parameters
|
|
430
|
-
# @return [Array<(
|
|
431
|
-
def
|
|
436
|
+
# @return [Array<(SignatureRequestEvent, Integer, Hash)>] SignatureRequestEvent data, response status code and response headers
|
|
437
|
+
def create_signature_request_event_with_http_info(signature_request_id, body, opts = {})
|
|
432
438
|
if @api_client.config.debugging
|
|
433
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
439
|
+
@api_client.config.logger.debug 'Calling API: Client.create_signature_request_event ...'
|
|
434
440
|
end
|
|
435
|
-
# verify the required parameter '
|
|
436
|
-
if @api_client.config.client_side_validation &&
|
|
437
|
-
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_event"
|
|
438
444
|
end
|
|
439
|
-
# verify the required parameter '
|
|
440
|
-
if @api_client.config.client_side_validation &&
|
|
441
|
-
fail ArgumentError, "Missing the required parameter '
|
|
445
|
+
# verify the required parameter 'body' is set
|
|
446
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
447
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_signature_request_event"
|
|
442
448
|
end
|
|
443
449
|
# resource path
|
|
444
|
-
local_var_path = '/
|
|
450
|
+
local_var_path = '/signature_requests/{signature_request_id}/events'.sub('{signature_request_id}', CGI.escape(signature_request_id.to_s))
|
|
445
451
|
|
|
446
452
|
# query parameters
|
|
447
453
|
query_params = opts[:query_params] || {}
|
|
@@ -460,16 +466,16 @@ end
|
|
|
460
466
|
form_params = opts[:form_params] || {}
|
|
461
467
|
|
|
462
468
|
# http body (model)
|
|
463
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
469
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
464
470
|
|
|
465
471
|
# return_type
|
|
466
|
-
return_type = opts[:debug_return_type] || '
|
|
472
|
+
return_type = opts[:debug_return_type] || 'SignatureRequestEvent'
|
|
467
473
|
|
|
468
474
|
# auth_names
|
|
469
475
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
470
476
|
|
|
471
477
|
new_options = opts.merge(
|
|
472
|
-
:operation => :"Client.
|
|
478
|
+
:operation => :"Client.create_signature_request_event",
|
|
473
479
|
:header_params => header_params,
|
|
474
480
|
:query_params => query_params,
|
|
475
481
|
:form_params => form_params,
|
|
@@ -480,66 +486,66 @@ end
|
|
|
480
486
|
|
|
481
487
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
482
488
|
if @api_client.config.debugging
|
|
483
|
-
@api_client.config.logger.debug "API called: Client#
|
|
489
|
+
@api_client.config.logger.debug "API called: Client#create_signature_request_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
484
490
|
end
|
|
485
491
|
return data, status_code, headers
|
|
486
492
|
end
|
|
487
493
|
|
|
488
|
-
# Create a
|
|
489
|
-
# Creates
|
|
490
|
-
# @param
|
|
494
|
+
# Create a signature request token
|
|
495
|
+
# 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.
|
|
496
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
491
497
|
# @param [Hash] opts the optional parameters
|
|
492
|
-
# @option opts [
|
|
493
|
-
# @return [
|
|
494
|
-
def
|
|
495
|
-
data, _status_code, _headers =
|
|
498
|
+
# @option opts [CreateSignatureRequestTokenRequest] :body The kind of link to make. Send no body for an `api` token.
|
|
499
|
+
# @return [SignatureRequestToken]
|
|
500
|
+
def create_signature_request_token(signature_request_id, opts = {})
|
|
501
|
+
data, _status_code, _headers = create_signature_request_token_with_http_info(signature_request_id, opts)
|
|
496
502
|
data
|
|
497
503
|
end
|
|
498
504
|
|
|
499
|
-
# Create a
|
|
500
|
-
# Creates
|
|
501
|
-
# @param
|
|
505
|
+
# Create a signature request token
|
|
506
|
+
# 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.
|
|
507
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
502
508
|
# @param [Hash] opts the optional parameters
|
|
503
|
-
# @option opts [
|
|
504
|
-
# @return [Array<(
|
|
505
|
-
def
|
|
509
|
+
# @option opts [CreateSignatureRequestTokenRequest] :body The kind of link to make. Send no body for an `api` token.
|
|
510
|
+
# @return [Array<(SignatureRequestToken, Integer, Hash)>] SignatureRequestToken data, response status code and response headers
|
|
511
|
+
def create_signature_request_token_with_http_info(signature_request_id, opts = {})
|
|
506
512
|
if @api_client.config.debugging
|
|
507
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
513
|
+
@api_client.config.logger.debug 'Calling API: Client.create_signature_request_token ...'
|
|
508
514
|
end
|
|
509
|
-
# verify the required parameter '
|
|
510
|
-
if @api_client.config.client_side_validation &&
|
|
511
|
-
fail ArgumentError, "Missing the required parameter '
|
|
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}"
|
|
515
|
+
# verify the required parameter 'signature_request_id' is set
|
|
516
|
+
if @api_client.config.client_side_validation && signature_request_id.nil?
|
|
517
|
+
fail ArgumentError, "Missing the required parameter 'signature_request_id' when calling Client.create_signature_request_token"
|
|
516
518
|
end
|
|
517
519
|
# resource path
|
|
518
|
-
local_var_path = '/
|
|
520
|
+
local_var_path = '/signature_requests/{signature_request_id}/tokens'.sub('{signature_request_id}', CGI.escape(signature_request_id.to_s))
|
|
519
521
|
|
|
520
522
|
# query parameters
|
|
521
523
|
query_params = opts[:query_params] || {}
|
|
522
|
-
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
523
524
|
|
|
524
525
|
# header parameters
|
|
525
526
|
header_params = opts[:header_params] || {}
|
|
526
527
|
# HTTP header 'Accept' (if needed)
|
|
527
528
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
529
|
+
# HTTP header 'Content-Type'
|
|
530
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
531
|
+
if !content_type.nil?
|
|
532
|
+
header_params['Content-Type'] = content_type
|
|
533
|
+
end
|
|
528
534
|
|
|
529
535
|
# form parameters
|
|
530
536
|
form_params = opts[:form_params] || {}
|
|
531
537
|
|
|
532
538
|
# http body (model)
|
|
533
|
-
post_body = opts[:debug_body]
|
|
539
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
|
534
540
|
|
|
535
541
|
# return_type
|
|
536
|
-
return_type = opts[:debug_return_type] || '
|
|
542
|
+
return_type = opts[:debug_return_type] || 'SignatureRequestToken'
|
|
537
543
|
|
|
538
544
|
# auth_names
|
|
539
545
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
540
546
|
|
|
541
547
|
new_options = opts.merge(
|
|
542
|
-
:operation => :"Client.
|
|
548
|
+
:operation => :"Client.create_signature_request_token",
|
|
543
549
|
:header_params => header_params,
|
|
544
550
|
:query_params => query_params,
|
|
545
551
|
:form_params => form_params,
|
|
@@ -550,39 +556,51 @@ end
|
|
|
550
556
|
|
|
551
557
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
552
558
|
if @api_client.config.debugging
|
|
553
|
-
@api_client.config.logger.debug "API called: Client#
|
|
559
|
+
@api_client.config.logger.debug "API called: Client#create_signature_request_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
554
560
|
end
|
|
555
561
|
return data, status_code, headers
|
|
556
562
|
end
|
|
557
563
|
|
|
558
|
-
#
|
|
559
|
-
# Creates a
|
|
560
|
-
# @param
|
|
564
|
+
# Generate a PDF
|
|
565
|
+
# 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.
|
|
566
|
+
# @param template_id [String] The template's ID.
|
|
567
|
+
# @param body [CreateSubmissionRequest] The submission's data and settings.
|
|
561
568
|
# @param [Hash] opts the optional parameters
|
|
562
|
-
# @
|
|
563
|
-
|
|
564
|
-
|
|
569
|
+
# @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).
|
|
570
|
+
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
571
|
+
# @return [Submission]
|
|
572
|
+
def create_submission(template_id, body, opts = {})
|
|
573
|
+
data, _status_code, _headers = create_submission_with_http_info(template_id, body, opts)
|
|
565
574
|
data
|
|
566
575
|
end
|
|
567
576
|
|
|
568
|
-
#
|
|
569
|
-
# Creates a
|
|
570
|
-
# @param
|
|
577
|
+
# Generate a PDF
|
|
578
|
+
# 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.
|
|
579
|
+
# @param template_id [String] The template's ID.
|
|
580
|
+
# @param body [CreateSubmissionRequest] The submission's data and settings.
|
|
571
581
|
# @param [Hash] opts the optional parameters
|
|
572
|
-
# @
|
|
573
|
-
|
|
582
|
+
# @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).
|
|
583
|
+
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
584
|
+
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
585
|
+
def create_submission_with_http_info(template_id, body, opts = {})
|
|
574
586
|
if @api_client.config.debugging
|
|
575
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
587
|
+
@api_client.config.logger.debug 'Calling API: Client.create_submission ...'
|
|
576
588
|
end
|
|
577
|
-
# verify the required parameter '
|
|
578
|
-
if @api_client.config.client_side_validation &&
|
|
579
|
-
fail ArgumentError, "Missing the required parameter '
|
|
589
|
+
# verify the required parameter 'template_id' is set
|
|
590
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
591
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.create_submission"
|
|
592
|
+
end
|
|
593
|
+
# verify the required parameter 'body' is set
|
|
594
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
595
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_submission"
|
|
580
596
|
end
|
|
581
597
|
# resource path
|
|
582
|
-
local_var_path = '/
|
|
598
|
+
local_var_path = '/templates/{template_id}/submissions'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
583
599
|
|
|
584
600
|
# query parameters
|
|
585
601
|
query_params = opts[:query_params] || {}
|
|
602
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
603
|
+
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
586
604
|
|
|
587
605
|
# header parameters
|
|
588
606
|
header_params = opts[:header_params] || {}
|
|
@@ -598,16 +616,16 @@ end
|
|
|
598
616
|
form_params = opts[:form_params] || {}
|
|
599
617
|
|
|
600
618
|
# http body (model)
|
|
601
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
619
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
602
620
|
|
|
603
621
|
# return_type
|
|
604
|
-
return_type = opts[:debug_return_type] || '
|
|
622
|
+
return_type = opts[:debug_return_type] || 'Submission'
|
|
605
623
|
|
|
606
624
|
# auth_names
|
|
607
625
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
608
626
|
|
|
609
627
|
new_options = opts.merge(
|
|
610
|
-
:operation => :"Client.
|
|
628
|
+
:operation => :"Client.create_submission",
|
|
611
629
|
:header_params => header_params,
|
|
612
630
|
:query_params => query_params,
|
|
613
631
|
:form_params => form_params,
|
|
@@ -618,39 +636,42 @@ end
|
|
|
618
636
|
|
|
619
637
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
620
638
|
if @api_client.config.debugging
|
|
621
|
-
@api_client.config.logger.debug "API called: Client#
|
|
639
|
+
@api_client.config.logger.debug "API called: Client#create_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
622
640
|
end
|
|
623
641
|
return data, status_code, headers
|
|
624
642
|
end
|
|
625
643
|
|
|
626
|
-
#
|
|
627
|
-
# Creates
|
|
628
|
-
# @param
|
|
644
|
+
# Generate PDFs in a batch
|
|
645
|
+
# 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.
|
|
646
|
+
# @param body [CreateSubmissionBatchRequest] The submissions to create, and the settings they share.
|
|
629
647
|
# @param [Hash] opts the optional parameters
|
|
630
|
-
# @
|
|
631
|
-
|
|
632
|
-
|
|
648
|
+
# @option opts [Boolean] :wait Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
|
|
649
|
+
# @return [SubmissionBatch]
|
|
650
|
+
def create_submission_batch(body, opts = {})
|
|
651
|
+
data, _status_code, _headers = create_submission_batch_with_http_info(body, opts)
|
|
633
652
|
data
|
|
634
653
|
end
|
|
635
654
|
|
|
636
|
-
#
|
|
637
|
-
# Creates
|
|
638
|
-
# @param
|
|
655
|
+
# Generate PDFs in a batch
|
|
656
|
+
# 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.
|
|
657
|
+
# @param body [CreateSubmissionBatchRequest] The submissions to create, and the settings they share.
|
|
639
658
|
# @param [Hash] opts the optional parameters
|
|
640
|
-
# @
|
|
641
|
-
|
|
659
|
+
# @option opts [Boolean] :wait Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
|
|
660
|
+
# @return [Array<(SubmissionBatch, Integer, Hash)>] SubmissionBatch data, response status code and response headers
|
|
661
|
+
def create_submission_batch_with_http_info(body, opts = {})
|
|
642
662
|
if @api_client.config.debugging
|
|
643
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
663
|
+
@api_client.config.logger.debug 'Calling API: Client.create_submission_batch ...'
|
|
644
664
|
end
|
|
645
|
-
# verify the required parameter '
|
|
646
|
-
if @api_client.config.client_side_validation &&
|
|
647
|
-
fail ArgumentError, "Missing the required parameter '
|
|
665
|
+
# verify the required parameter 'body' is set
|
|
666
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
667
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_submission_batch"
|
|
648
668
|
end
|
|
649
669
|
# resource path
|
|
650
|
-
local_var_path = '/
|
|
670
|
+
local_var_path = '/submissions/batches'
|
|
651
671
|
|
|
652
672
|
# query parameters
|
|
653
673
|
query_params = opts[:query_params] || {}
|
|
674
|
+
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
654
675
|
|
|
655
676
|
# header parameters
|
|
656
677
|
header_params = opts[:header_params] || {}
|
|
@@ -666,16 +687,16 @@ end
|
|
|
666
687
|
form_params = opts[:form_params] || {}
|
|
667
688
|
|
|
668
689
|
# http body (model)
|
|
669
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
690
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
670
691
|
|
|
671
692
|
# return_type
|
|
672
|
-
return_type = opts[:debug_return_type] || '
|
|
693
|
+
return_type = opts[:debug_return_type] || 'SubmissionBatch'
|
|
673
694
|
|
|
674
695
|
# auth_names
|
|
675
696
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
676
697
|
|
|
677
698
|
new_options = opts.merge(
|
|
678
|
-
:operation => :"Client.
|
|
699
|
+
:operation => :"Client.create_submission_batch",
|
|
679
700
|
:header_params => header_params,
|
|
680
701
|
:query_params => query_params,
|
|
681
702
|
:form_params => form_params,
|
|
@@ -686,45 +707,35 @@ end
|
|
|
686
707
|
|
|
687
708
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
688
709
|
if @api_client.config.debugging
|
|
689
|
-
@api_client.config.logger.debug "API called: Client#
|
|
710
|
+
@api_client.config.logger.debug "API called: Client#create_submission_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
690
711
|
end
|
|
691
712
|
return data, status_code, headers
|
|
692
713
|
end
|
|
693
714
|
|
|
694
|
-
# Create a
|
|
695
|
-
# Creates a
|
|
696
|
-
# @param
|
|
697
|
-
# @param template_name [String]
|
|
715
|
+
# Create a template
|
|
716
|
+
# 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`.
|
|
717
|
+
# @param body [CreateTemplateRequest] The template to create.
|
|
698
718
|
# @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)
|
|
719
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
720
|
+
# @return [Template]
|
|
721
|
+
def create_template(body, opts = {})
|
|
722
|
+
data, _status_code, _headers = create_template_with_http_info(body, opts)
|
|
705
723
|
data
|
|
706
724
|
end
|
|
707
725
|
|
|
708
|
-
# Create a
|
|
709
|
-
# Creates a
|
|
710
|
-
# @param
|
|
711
|
-
# @param template_name [String]
|
|
726
|
+
# Create a template
|
|
727
|
+
# 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`.
|
|
728
|
+
# @param body [CreateTemplateRequest] The template to create.
|
|
712
729
|
# @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 = {})
|
|
730
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
731
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
732
|
+
def create_template_with_http_info(body, opts = {})
|
|
718
733
|
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"
|
|
734
|
+
@api_client.config.logger.debug 'Calling API: Client.create_template ...'
|
|
724
735
|
end
|
|
725
|
-
# verify the required parameter '
|
|
726
|
-
if @api_client.config.client_side_validation &&
|
|
727
|
-
fail ArgumentError, "Missing the required parameter '
|
|
736
|
+
# verify the required parameter 'body' is set
|
|
737
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
738
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_template"
|
|
728
739
|
end
|
|
729
740
|
# resource path
|
|
730
741
|
local_var_path = '/templates'
|
|
@@ -738,29 +749,25 @@ end
|
|
|
738
749
|
# HTTP header 'Accept' (if needed)
|
|
739
750
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
740
751
|
# HTTP header 'Content-Type'
|
|
741
|
-
content_type = @api_client.select_header_content_type(['
|
|
752
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
742
753
|
if !content_type.nil?
|
|
743
754
|
header_params['Content-Type'] = content_type
|
|
744
755
|
end
|
|
745
756
|
|
|
746
757
|
# form parameters
|
|
747
758
|
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
759
|
|
|
753
760
|
# http body (model)
|
|
754
|
-
post_body = opts[:debug_body]
|
|
761
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
755
762
|
|
|
756
763
|
# return_type
|
|
757
|
-
return_type = opts[:debug_return_type] || '
|
|
764
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
758
765
|
|
|
759
766
|
# auth_names
|
|
760
767
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
761
768
|
|
|
762
769
|
new_options = opts.merge(
|
|
763
|
-
:operation => :"Client.
|
|
770
|
+
:operation => :"Client.create_template",
|
|
764
771
|
:header_params => header_params,
|
|
765
772
|
:query_params => query_params,
|
|
766
773
|
:form_params => form_params,
|
|
@@ -771,36 +778,36 @@ end
|
|
|
771
778
|
|
|
772
779
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
773
780
|
if @api_client.config.debugging
|
|
774
|
-
@api_client.config.logger.debug "API called: Client#
|
|
781
|
+
@api_client.config.logger.debug "API called: Client#create_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
775
782
|
end
|
|
776
783
|
return data, status_code, headers
|
|
777
784
|
end
|
|
778
785
|
|
|
779
|
-
# Create a
|
|
780
|
-
# Creates a
|
|
781
|
-
# @param
|
|
786
|
+
# Create a webhook
|
|
787
|
+
# Creates a webhook that sends a POST request to your endpoint whenever a subscribed event happens. Scope it to API tokens, templates or folders to receive only their events.
|
|
788
|
+
# @param body [CreateWebhookRequest] The webhook to create.
|
|
782
789
|
# @param [Hash] opts the optional parameters
|
|
783
|
-
# @return [
|
|
784
|
-
def
|
|
785
|
-
data, _status_code, _headers =
|
|
790
|
+
# @return [Webhook]
|
|
791
|
+
def create_webhook(body, opts = {})
|
|
792
|
+
data, _status_code, _headers = create_webhook_with_http_info(body, opts)
|
|
786
793
|
data
|
|
787
794
|
end
|
|
788
795
|
|
|
789
|
-
# Create a
|
|
790
|
-
# Creates a
|
|
791
|
-
# @param
|
|
796
|
+
# Create a webhook
|
|
797
|
+
# 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.
|
|
798
|
+
# @param body [CreateWebhookRequest] The webhook to create.
|
|
792
799
|
# @param [Hash] opts the optional parameters
|
|
793
|
-
# @return [Array<(
|
|
794
|
-
def
|
|
800
|
+
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
801
|
+
def create_webhook_with_http_info(body, opts = {})
|
|
795
802
|
if @api_client.config.debugging
|
|
796
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
803
|
+
@api_client.config.logger.debug 'Calling API: Client.create_webhook ...'
|
|
797
804
|
end
|
|
798
|
-
# verify the required parameter '
|
|
799
|
-
if @api_client.config.client_side_validation &&
|
|
800
|
-
fail ArgumentError, "Missing the required parameter '
|
|
805
|
+
# verify the required parameter 'body' is set
|
|
806
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
807
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.create_webhook"
|
|
801
808
|
end
|
|
802
809
|
# resource path
|
|
803
|
-
local_var_path = '/
|
|
810
|
+
local_var_path = '/webhooks'
|
|
804
811
|
|
|
805
812
|
# query parameters
|
|
806
813
|
query_params = opts[:query_params] || {}
|
|
@@ -819,16 +826,16 @@ end
|
|
|
819
826
|
form_params = opts[:form_params] || {}
|
|
820
827
|
|
|
821
828
|
# http body (model)
|
|
822
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
829
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
823
830
|
|
|
824
831
|
# return_type
|
|
825
|
-
return_type = opts[:debug_return_type] || '
|
|
832
|
+
return_type = opts[:debug_return_type] || 'Webhook'
|
|
826
833
|
|
|
827
834
|
# auth_names
|
|
828
835
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
829
836
|
|
|
830
837
|
new_options = opts.merge(
|
|
831
|
-
:operation => :"Client.
|
|
838
|
+
:operation => :"Client.create_webhook",
|
|
832
839
|
:header_params => header_params,
|
|
833
840
|
:query_params => query_params,
|
|
834
841
|
:form_params => form_params,
|
|
@@ -839,36 +846,36 @@ end
|
|
|
839
846
|
|
|
840
847
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
841
848
|
if @api_client.config.debugging
|
|
842
|
-
@api_client.config.logger.debug "API called: Client#
|
|
849
|
+
@api_client.config.logger.debug "API called: Client#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
843
850
|
end
|
|
844
851
|
return data, status_code, headers
|
|
845
852
|
end
|
|
846
853
|
|
|
847
|
-
#
|
|
848
|
-
#
|
|
849
|
-
# @param
|
|
854
|
+
# Delete a custom file
|
|
855
|
+
# Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
856
|
+
# @param custom_file_id [String] The custom file's ID.
|
|
850
857
|
# @param [Hash] opts the optional parameters
|
|
851
|
-
# @return [
|
|
852
|
-
def
|
|
853
|
-
data, _status_code, _headers =
|
|
858
|
+
# @return [CustomFile]
|
|
859
|
+
def delete_custom_file(custom_file_id, opts = {})
|
|
860
|
+
data, _status_code, _headers = delete_custom_file_with_http_info(custom_file_id, opts)
|
|
854
861
|
data
|
|
855
862
|
end
|
|
856
863
|
|
|
857
|
-
#
|
|
858
|
-
#
|
|
859
|
-
# @param
|
|
864
|
+
# Delete a custom file
|
|
865
|
+
# Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
|
|
866
|
+
# @param custom_file_id [String] The custom file's ID.
|
|
860
867
|
# @param [Hash] opts the optional parameters
|
|
861
|
-
# @return [Array<(
|
|
862
|
-
def
|
|
868
|
+
# @return [Array<(CustomFile, Integer, Hash)>] CustomFile data, response status code and response headers
|
|
869
|
+
def delete_custom_file_with_http_info(custom_file_id, opts = {})
|
|
863
870
|
if @api_client.config.debugging
|
|
864
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
871
|
+
@api_client.config.logger.debug 'Calling API: Client.delete_custom_file ...'
|
|
865
872
|
end
|
|
866
|
-
# verify the required parameter '
|
|
867
|
-
if @api_client.config.client_side_validation &&
|
|
868
|
-
fail ArgumentError, "Missing the required parameter '
|
|
873
|
+
# verify the required parameter 'custom_file_id' is set
|
|
874
|
+
if @api_client.config.client_side_validation && custom_file_id.nil?
|
|
875
|
+
fail ArgumentError, "Missing the required parameter 'custom_file_id' when calling Client.delete_custom_file"
|
|
869
876
|
end
|
|
870
877
|
# resource path
|
|
871
|
-
local_var_path = '/
|
|
878
|
+
local_var_path = '/custom_files/{custom_file_id}'.sub('{custom_file_id}', CGI.escape(custom_file_id.to_s))
|
|
872
879
|
|
|
873
880
|
# query parameters
|
|
874
881
|
query_params = opts[:query_params] || {}
|
|
@@ -877,26 +884,21 @@ end
|
|
|
877
884
|
header_params = opts[:header_params] || {}
|
|
878
885
|
# HTTP header 'Accept' (if needed)
|
|
879
886
|
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
887
|
|
|
886
888
|
# form parameters
|
|
887
889
|
form_params = opts[:form_params] || {}
|
|
888
890
|
|
|
889
891
|
# http body (model)
|
|
890
|
-
post_body = opts[:debug_body]
|
|
892
|
+
post_body = opts[:debug_body]
|
|
891
893
|
|
|
892
894
|
# return_type
|
|
893
|
-
return_type = opts[:debug_return_type] || '
|
|
895
|
+
return_type = opts[:debug_return_type] || 'CustomFile'
|
|
894
896
|
|
|
895
897
|
# auth_names
|
|
896
898
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
897
899
|
|
|
898
900
|
new_options = opts.merge(
|
|
899
|
-
:operation => :"Client.
|
|
901
|
+
:operation => :"Client.delete_custom_file",
|
|
900
902
|
:header_params => header_params,
|
|
901
903
|
:query_params => query_params,
|
|
902
904
|
:form_params => form_params,
|
|
@@ -905,16 +907,16 @@ end
|
|
|
905
907
|
:return_type => return_type
|
|
906
908
|
)
|
|
907
909
|
|
|
908
|
-
data, status_code, headers = @api_client.call_api(:
|
|
910
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
909
911
|
if @api_client.config.debugging
|
|
910
|
-
@api_client.config.logger.debug "API called: Client#
|
|
912
|
+
@api_client.config.logger.debug "API called: Client#delete_custom_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
911
913
|
end
|
|
912
914
|
return data, status_code, headers
|
|
913
915
|
end
|
|
914
916
|
|
|
915
917
|
# Delete a folder
|
|
916
|
-
# Deletes an empty folder.
|
|
917
|
-
# @param folder_id [String]
|
|
918
|
+
# Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
919
|
+
# @param folder_id [String] The folder's ID.
|
|
918
920
|
# @param [Hash] opts the optional parameters
|
|
919
921
|
# @return [Folder]
|
|
920
922
|
def delete_folder(folder_id, opts = {})
|
|
@@ -923,8 +925,8 @@ end
|
|
|
923
925
|
end
|
|
924
926
|
|
|
925
927
|
# Delete a folder
|
|
926
|
-
# Deletes an empty folder.
|
|
927
|
-
# @param folder_id [String]
|
|
928
|
+
# Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
|
|
929
|
+
# @param folder_id [String] The folder's ID.
|
|
928
930
|
# @param [Hash] opts the optional parameters
|
|
929
931
|
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
930
932
|
def delete_folder_with_http_info(folder_id, opts = {})
|
|
@@ -936,7 +938,7 @@ end
|
|
|
936
938
|
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.delete_folder"
|
|
937
939
|
end
|
|
938
940
|
# resource path
|
|
939
|
-
local_var_path = '/folders/{folder_id}'.sub('{
|
|
941
|
+
local_var_path = '/folders/{folder_id}'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
940
942
|
|
|
941
943
|
# query parameters
|
|
942
944
|
query_params = opts[:query_params] || {}
|
|
@@ -976,22 +978,22 @@ end
|
|
|
976
978
|
end
|
|
977
979
|
|
|
978
980
|
# Delete a template
|
|
979
|
-
# Deletes a template
|
|
980
|
-
# @param template_id [String]
|
|
981
|
+
# 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.
|
|
982
|
+
# @param template_id [String] The template's ID.
|
|
981
983
|
# @param [Hash] opts the optional parameters
|
|
982
|
-
# @option opts [String] :version
|
|
983
|
-
# @return [
|
|
984
|
+
# @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.
|
|
985
|
+
# @return [Template]
|
|
984
986
|
def delete_template(template_id, opts = {})
|
|
985
987
|
data, _status_code, _headers = delete_template_with_http_info(template_id, opts)
|
|
986
988
|
data
|
|
987
989
|
end
|
|
988
990
|
|
|
989
991
|
# Delete a template
|
|
990
|
-
# Deletes a template
|
|
991
|
-
# @param template_id [String]
|
|
992
|
+
# 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.
|
|
993
|
+
# @param template_id [String] The template's ID.
|
|
992
994
|
# @param [Hash] opts the optional parameters
|
|
993
|
-
# @option opts [String] :version
|
|
994
|
-
# @return [Array<(
|
|
995
|
+
# @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.
|
|
996
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
995
997
|
def delete_template_with_http_info(template_id, opts = {})
|
|
996
998
|
if @api_client.config.debugging
|
|
997
999
|
@api_client.config.logger.debug 'Calling API: Client.delete_template ...'
|
|
@@ -1001,7 +1003,7 @@ end
|
|
|
1001
1003
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.delete_template"
|
|
1002
1004
|
end
|
|
1003
1005
|
# resource path
|
|
1004
|
-
local_var_path = '/templates/{template_id}'.sub('{
|
|
1006
|
+
local_var_path = '/templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
1005
1007
|
|
|
1006
1008
|
# query parameters
|
|
1007
1009
|
query_params = opts[:query_params] || {}
|
|
@@ -1019,7 +1021,7 @@ end
|
|
|
1019
1021
|
post_body = opts[:debug_body]
|
|
1020
1022
|
|
|
1021
1023
|
# return_type
|
|
1022
|
-
return_type = opts[:debug_return_type] || '
|
|
1024
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
1023
1025
|
|
|
1024
1026
|
# auth_names
|
|
1025
1027
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -1042,8 +1044,8 @@ end
|
|
|
1042
1044
|
end
|
|
1043
1045
|
|
|
1044
1046
|
# Delete a webhook
|
|
1045
|
-
#
|
|
1046
|
-
# @param webhook_id [String]
|
|
1047
|
+
# Deletes a webhook so it stops receiving events, and returns it.
|
|
1048
|
+
# @param webhook_id [String] The webhook's ID.
|
|
1047
1049
|
# @param [Hash] opts the optional parameters
|
|
1048
1050
|
# @return [Webhook]
|
|
1049
1051
|
def delete_webhook(webhook_id, opts = {})
|
|
@@ -1052,8 +1054,8 @@ end
|
|
|
1052
1054
|
end
|
|
1053
1055
|
|
|
1054
1056
|
# Delete a webhook
|
|
1055
|
-
#
|
|
1056
|
-
# @param webhook_id [String]
|
|
1057
|
+
# Deletes a webhook so it stops receiving events, and returns it.
|
|
1058
|
+
# @param webhook_id [String] The webhook's ID.
|
|
1057
1059
|
# @param [Hash] opts the optional parameters
|
|
1058
1060
|
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
1059
1061
|
def delete_webhook_with_http_info(webhook_id, opts = {})
|
|
@@ -1065,7 +1067,7 @@ end
|
|
|
1065
1067
|
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling Client.delete_webhook"
|
|
1066
1068
|
end
|
|
1067
1069
|
# resource path
|
|
1068
|
-
local_var_path = '/webhooks/{webhook_id}'.sub('{
|
|
1070
|
+
local_var_path = '/webhooks/{webhook_id}'.sub('{webhook_id}', CGI.escape(webhook_id.to_s))
|
|
1069
1071
|
|
|
1070
1072
|
# query parameters
|
|
1071
1073
|
query_params = opts[:query_params] || {}
|
|
@@ -1104,31 +1106,31 @@ end
|
|
|
1104
1106
|
return data, status_code, headers
|
|
1105
1107
|
end
|
|
1106
1108
|
|
|
1107
|
-
# Expire a combined
|
|
1108
|
-
#
|
|
1109
|
-
# @param
|
|
1109
|
+
# Expire a combined PDF
|
|
1110
|
+
# Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
1111
|
+
# @param combined_pdf_id [String] The combined PDF's ID.
|
|
1110
1112
|
# @param [Hash] opts the optional parameters
|
|
1111
|
-
# @return [
|
|
1112
|
-
def
|
|
1113
|
-
data, _status_code, _headers =
|
|
1113
|
+
# @return [CombinedPdf]
|
|
1114
|
+
def expire_combined_pdf(combined_pdf_id, opts = {})
|
|
1115
|
+
data, _status_code, _headers = expire_combined_pdf_with_http_info(combined_pdf_id, opts)
|
|
1114
1116
|
data
|
|
1115
1117
|
end
|
|
1116
1118
|
|
|
1117
|
-
# Expire a combined
|
|
1118
|
-
#
|
|
1119
|
-
# @param
|
|
1119
|
+
# Expire a combined PDF
|
|
1120
|
+
# Deletes a combined PDF's PDF and returns the expired combined PDF.
|
|
1121
|
+
# @param combined_pdf_id [String] The combined PDF's ID.
|
|
1120
1122
|
# @param [Hash] opts the optional parameters
|
|
1121
|
-
# @return [Array<(
|
|
1122
|
-
def
|
|
1123
|
+
# @return [Array<(CombinedPdf, Integer, Hash)>] CombinedPdf data, response status code and response headers
|
|
1124
|
+
def expire_combined_pdf_with_http_info(combined_pdf_id, opts = {})
|
|
1123
1125
|
if @api_client.config.debugging
|
|
1124
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1126
|
+
@api_client.config.logger.debug 'Calling API: Client.expire_combined_pdf ...'
|
|
1125
1127
|
end
|
|
1126
|
-
# verify the required parameter '
|
|
1127
|
-
if @api_client.config.client_side_validation &&
|
|
1128
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1128
|
+
# verify the required parameter 'combined_pdf_id' is set
|
|
1129
|
+
if @api_client.config.client_side_validation && combined_pdf_id.nil?
|
|
1130
|
+
fail ArgumentError, "Missing the required parameter 'combined_pdf_id' when calling Client.expire_combined_pdf"
|
|
1129
1131
|
end
|
|
1130
1132
|
# resource path
|
|
1131
|
-
local_var_path = '/
|
|
1133
|
+
local_var_path = '/combined_pdfs/{combined_pdf_id}'.sub('{combined_pdf_id}', CGI.escape(combined_pdf_id.to_s))
|
|
1132
1134
|
|
|
1133
1135
|
# query parameters
|
|
1134
1136
|
query_params = opts[:query_params] || {}
|
|
@@ -1145,13 +1147,13 @@ end
|
|
|
1145
1147
|
post_body = opts[:debug_body]
|
|
1146
1148
|
|
|
1147
1149
|
# return_type
|
|
1148
|
-
return_type = opts[:debug_return_type] || '
|
|
1150
|
+
return_type = opts[:debug_return_type] || 'CombinedPdf'
|
|
1149
1151
|
|
|
1150
1152
|
# auth_names
|
|
1151
1153
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1152
1154
|
|
|
1153
1155
|
new_options = opts.merge(
|
|
1154
|
-
:operation => :"Client.
|
|
1156
|
+
:operation => :"Client.expire_combined_pdf",
|
|
1155
1157
|
:header_params => header_params,
|
|
1156
1158
|
:query_params => query_params,
|
|
1157
1159
|
:form_params => form_params,
|
|
@@ -1162,26 +1164,26 @@ end
|
|
|
1162
1164
|
|
|
1163
1165
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1164
1166
|
if @api_client.config.debugging
|
|
1165
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1167
|
+
@api_client.config.logger.debug "API called: Client#expire_combined_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1166
1168
|
end
|
|
1167
1169
|
return data, status_code, headers
|
|
1168
1170
|
end
|
|
1169
1171
|
|
|
1170
|
-
# Expire a
|
|
1171
|
-
#
|
|
1172
|
-
# @param submission_id [String]
|
|
1172
|
+
# Expire a submission
|
|
1173
|
+
# Deletes a submission's data and PDF now, and returns the expired submission.
|
|
1174
|
+
# @param submission_id [String] The submission's ID.
|
|
1173
1175
|
# @param [Hash] opts the optional parameters
|
|
1174
|
-
# @return [
|
|
1176
|
+
# @return [Submission]
|
|
1175
1177
|
def expire_submission(submission_id, opts = {})
|
|
1176
1178
|
data, _status_code, _headers = expire_submission_with_http_info(submission_id, opts)
|
|
1177
1179
|
data
|
|
1178
1180
|
end
|
|
1179
1181
|
|
|
1180
|
-
# Expire a
|
|
1181
|
-
#
|
|
1182
|
-
# @param submission_id [String]
|
|
1182
|
+
# Expire a submission
|
|
1183
|
+
# Deletes a submission's data and PDF now, and returns the expired submission.
|
|
1184
|
+
# @param submission_id [String] The submission's ID.
|
|
1183
1185
|
# @param [Hash] opts the optional parameters
|
|
1184
|
-
# @return [Array<(
|
|
1186
|
+
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
1185
1187
|
def expire_submission_with_http_info(submission_id, opts = {})
|
|
1186
1188
|
if @api_client.config.debugging
|
|
1187
1189
|
@api_client.config.logger.debug 'Calling API: Client.expire_submission ...'
|
|
@@ -1191,7 +1193,7 @@ end
|
|
|
1191
1193
|
fail ArgumentError, "Missing the required parameter 'submission_id' when calling Client.expire_submission"
|
|
1192
1194
|
end
|
|
1193
1195
|
# resource path
|
|
1194
|
-
local_var_path = '/submissions/{submission_id}'.sub('{
|
|
1196
|
+
local_var_path = '/submissions/{submission_id}'.sub('{submission_id}', CGI.escape(submission_id.to_s))
|
|
1195
1197
|
|
|
1196
1198
|
# query parameters
|
|
1197
1199
|
query_params = opts[:query_params] || {}
|
|
@@ -1208,7 +1210,7 @@ end
|
|
|
1208
1210
|
post_body = opts[:debug_body]
|
|
1209
1211
|
|
|
1210
1212
|
# return_type
|
|
1211
|
-
return_type = opts[:debug_return_type] || '
|
|
1213
|
+
return_type = opts[:debug_return_type] || 'Submission'
|
|
1212
1214
|
|
|
1213
1215
|
# auth_names
|
|
1214
1216
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -1230,39 +1232,39 @@ end
|
|
|
1230
1232
|
return data, status_code, headers
|
|
1231
1233
|
end
|
|
1232
1234
|
|
|
1233
|
-
# Generate
|
|
1234
|
-
#
|
|
1235
|
-
# @param
|
|
1236
|
-
# @param
|
|
1237
|
-
# @param [Hash] opts the optional parameters
|
|
1238
|
-
# @option opts [Boolean] :wait Wait
|
|
1239
|
-
# @return [
|
|
1240
|
-
def
|
|
1241
|
-
data, _status_code, _headers =
|
|
1235
|
+
# Generate more files
|
|
1236
|
+
# Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
1237
|
+
# @param submission_id [String] The submission's ID.
|
|
1238
|
+
# @param body [GenerateSubmissionFilesRequest] The formats to make.
|
|
1239
|
+
# @param [Hash] opts the optional parameters
|
|
1240
|
+
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
1241
|
+
# @return [Submission]
|
|
1242
|
+
def generate_submission_files(submission_id, body, opts = {})
|
|
1243
|
+
data, _status_code, _headers = generate_submission_files_with_http_info(submission_id, body, opts)
|
|
1242
1244
|
data
|
|
1243
1245
|
end
|
|
1244
1246
|
|
|
1245
|
-
# Generate
|
|
1246
|
-
#
|
|
1247
|
-
# @param
|
|
1248
|
-
# @param
|
|
1247
|
+
# Generate more files
|
|
1248
|
+
# Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
1249
|
+
# @param submission_id [String] The submission's ID.
|
|
1250
|
+
# @param body [GenerateSubmissionFilesRequest] The formats to make.
|
|
1249
1251
|
# @param [Hash] opts the optional parameters
|
|
1250
|
-
# @option opts [Boolean] :wait Wait
|
|
1251
|
-
# @return [Array<(
|
|
1252
|
-
def
|
|
1252
|
+
# @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
|
|
1253
|
+
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
1254
|
+
def generate_submission_files_with_http_info(submission_id, body, opts = {})
|
|
1253
1255
|
if @api_client.config.debugging
|
|
1254
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1256
|
+
@api_client.config.logger.debug 'Calling API: Client.generate_submission_files ...'
|
|
1255
1257
|
end
|
|
1256
|
-
# verify the required parameter '
|
|
1257
|
-
if @api_client.config.client_side_validation &&
|
|
1258
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1258
|
+
# verify the required parameter 'submission_id' is set
|
|
1259
|
+
if @api_client.config.client_side_validation && submission_id.nil?
|
|
1260
|
+
fail ArgumentError, "Missing the required parameter 'submission_id' when calling Client.generate_submission_files"
|
|
1259
1261
|
end
|
|
1260
|
-
# verify the required parameter '
|
|
1261
|
-
if @api_client.config.client_side_validation &&
|
|
1262
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1262
|
+
# verify the required parameter 'body' is set
|
|
1263
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
1264
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.generate_submission_files"
|
|
1263
1265
|
end
|
|
1264
1266
|
# resource path
|
|
1265
|
-
local_var_path = '/
|
|
1267
|
+
local_var_path = '/submissions/{submission_id}/generate_files'.sub('{submission_id}', CGI.escape(submission_id.to_s))
|
|
1266
1268
|
|
|
1267
1269
|
# query parameters
|
|
1268
1270
|
query_params = opts[:query_params] || {}
|
|
@@ -1282,16 +1284,16 @@ end
|
|
|
1282
1284
|
form_params = opts[:form_params] || {}
|
|
1283
1285
|
|
|
1284
1286
|
# http body (model)
|
|
1285
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
1287
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
1286
1288
|
|
|
1287
1289
|
# return_type
|
|
1288
|
-
return_type = opts[:debug_return_type] || '
|
|
1290
|
+
return_type = opts[:debug_return_type] || 'Submission'
|
|
1289
1291
|
|
|
1290
1292
|
# auth_names
|
|
1291
1293
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1292
1294
|
|
|
1293
1295
|
new_options = opts.merge(
|
|
1294
|
-
:operation => :"Client.
|
|
1296
|
+
:operation => :"Client.generate_submission_files",
|
|
1295
1297
|
:header_params => header_params,
|
|
1296
1298
|
:query_params => query_params,
|
|
1297
1299
|
:form_params => form_params,
|
|
@@ -1302,36 +1304,36 @@ end
|
|
|
1302
1304
|
|
|
1303
1305
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1304
1306
|
if @api_client.config.debugging
|
|
1305
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1307
|
+
@api_client.config.logger.debug "API called: Client#generate_submission_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1306
1308
|
end
|
|
1307
1309
|
return data, status_code, headers
|
|
1308
1310
|
end
|
|
1309
1311
|
|
|
1310
|
-
# Generate a preview PDF
|
|
1311
|
-
# Generates a preview
|
|
1312
|
-
# @param submission_id [String]
|
|
1312
|
+
# Generate a preview PDF
|
|
1313
|
+
# 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.
|
|
1314
|
+
# @param submission_id [String] The submission's ID.
|
|
1313
1315
|
# @param [Hash] opts the optional parameters
|
|
1314
|
-
# @return [
|
|
1315
|
-
def
|
|
1316
|
-
data, _status_code, _headers =
|
|
1316
|
+
# @return [Submission]
|
|
1317
|
+
def generate_submission_preview(submission_id, opts = {})
|
|
1318
|
+
data, _status_code, _headers = generate_submission_preview_with_http_info(submission_id, opts)
|
|
1317
1319
|
data
|
|
1318
1320
|
end
|
|
1319
1321
|
|
|
1320
|
-
# Generate a preview PDF
|
|
1321
|
-
# Generates a preview
|
|
1322
|
-
# @param submission_id [String]
|
|
1322
|
+
# Generate a preview PDF
|
|
1323
|
+
# 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.
|
|
1324
|
+
# @param submission_id [String] The submission's ID.
|
|
1323
1325
|
# @param [Hash] opts the optional parameters
|
|
1324
|
-
# @return [Array<(
|
|
1325
|
-
def
|
|
1326
|
+
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
1327
|
+
def generate_submission_preview_with_http_info(submission_id, opts = {})
|
|
1326
1328
|
if @api_client.config.debugging
|
|
1327
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1329
|
+
@api_client.config.logger.debug 'Calling API: Client.generate_submission_preview ...'
|
|
1328
1330
|
end
|
|
1329
1331
|
# verify the required parameter 'submission_id' is set
|
|
1330
1332
|
if @api_client.config.client_side_validation && submission_id.nil?
|
|
1331
|
-
fail ArgumentError, "Missing the required parameter 'submission_id' when calling Client.
|
|
1333
|
+
fail ArgumentError, "Missing the required parameter 'submission_id' when calling Client.generate_submission_preview"
|
|
1332
1334
|
end
|
|
1333
1335
|
# resource path
|
|
1334
|
-
local_var_path = '/submissions/{submission_id}/generate_preview'.sub('{
|
|
1336
|
+
local_var_path = '/submissions/{submission_id}/generate_preview'.sub('{submission_id}', CGI.escape(submission_id.to_s))
|
|
1335
1337
|
|
|
1336
1338
|
# query parameters
|
|
1337
1339
|
query_params = opts[:query_params] || {}
|
|
@@ -1348,13 +1350,13 @@ end
|
|
|
1348
1350
|
post_body = opts[:debug_body]
|
|
1349
1351
|
|
|
1350
1352
|
# return_type
|
|
1351
|
-
return_type = opts[:debug_return_type] || '
|
|
1353
|
+
return_type = opts[:debug_return_type] || 'Submission'
|
|
1352
1354
|
|
|
1353
1355
|
# auth_names
|
|
1354
1356
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1355
1357
|
|
|
1356
1358
|
new_options = opts.merge(
|
|
1357
|
-
:operation => :"Client.
|
|
1359
|
+
:operation => :"Client.generate_submission_preview",
|
|
1358
1360
|
:header_params => header_params,
|
|
1359
1361
|
:query_params => query_params,
|
|
1360
1362
|
:form_params => form_params,
|
|
@@ -1365,36 +1367,36 @@ end
|
|
|
1365
1367
|
|
|
1366
1368
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1367
1369
|
if @api_client.config.debugging
|
|
1368
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1370
|
+
@api_client.config.logger.debug "API called: Client#generate_submission_preview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1369
1371
|
end
|
|
1370
1372
|
return data, status_code, headers
|
|
1371
1373
|
end
|
|
1372
1374
|
|
|
1373
|
-
#
|
|
1374
|
-
#
|
|
1375
|
-
# @param
|
|
1375
|
+
# Get a combined PDF
|
|
1376
|
+
# Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
1377
|
+
# @param combined_pdf_id [String] The combined PDF's ID.
|
|
1376
1378
|
# @param [Hash] opts the optional parameters
|
|
1377
|
-
# @return [
|
|
1378
|
-
def
|
|
1379
|
-
data, _status_code, _headers =
|
|
1379
|
+
# @return [CombinedPdf]
|
|
1380
|
+
def get_combined_pdf(combined_pdf_id, opts = {})
|
|
1381
|
+
data, _status_code, _headers = get_combined_pdf_with_http_info(combined_pdf_id, opts)
|
|
1380
1382
|
data
|
|
1381
1383
|
end
|
|
1382
1384
|
|
|
1383
|
-
#
|
|
1384
|
-
#
|
|
1385
|
-
# @param
|
|
1385
|
+
# Get a combined PDF
|
|
1386
|
+
# Returns a combined PDF, with a temporary link to download it once it has been generated.
|
|
1387
|
+
# @param combined_pdf_id [String] The combined PDF's ID.
|
|
1386
1388
|
# @param [Hash] opts the optional parameters
|
|
1387
|
-
# @return [Array<(
|
|
1388
|
-
def
|
|
1389
|
+
# @return [Array<(CombinedPdf, Integer, Hash)>] CombinedPdf data, response status code and response headers
|
|
1390
|
+
def get_combined_pdf_with_http_info(combined_pdf_id, opts = {})
|
|
1389
1391
|
if @api_client.config.debugging
|
|
1390
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1392
|
+
@api_client.config.logger.debug 'Calling API: Client.get_combined_pdf ...'
|
|
1391
1393
|
end
|
|
1392
|
-
# verify the required parameter '
|
|
1393
|
-
if @api_client.config.client_side_validation &&
|
|
1394
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1394
|
+
# verify the required parameter 'combined_pdf_id' is set
|
|
1395
|
+
if @api_client.config.client_side_validation && combined_pdf_id.nil?
|
|
1396
|
+
fail ArgumentError, "Missing the required parameter 'combined_pdf_id' when calling Client.get_combined_pdf"
|
|
1395
1397
|
end
|
|
1396
1398
|
# resource path
|
|
1397
|
-
local_var_path = '/
|
|
1399
|
+
local_var_path = '/combined_pdfs/{combined_pdf_id}'.sub('{combined_pdf_id}', CGI.escape(combined_pdf_id.to_s))
|
|
1398
1400
|
|
|
1399
1401
|
# query parameters
|
|
1400
1402
|
query_params = opts[:query_params] || {}
|
|
@@ -1411,13 +1413,13 @@ end
|
|
|
1411
1413
|
post_body = opts[:debug_body]
|
|
1412
1414
|
|
|
1413
1415
|
# return_type
|
|
1414
|
-
return_type = opts[:debug_return_type] || '
|
|
1416
|
+
return_type = opts[:debug_return_type] || 'CombinedPdf'
|
|
1415
1417
|
|
|
1416
1418
|
# auth_names
|
|
1417
1419
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1418
1420
|
|
|
1419
1421
|
new_options = opts.merge(
|
|
1420
|
-
:operation => :"Client.
|
|
1422
|
+
:operation => :"Client.get_combined_pdf",
|
|
1421
1423
|
:header_params => header_params,
|
|
1422
1424
|
:query_params => query_params,
|
|
1423
1425
|
:form_params => form_params,
|
|
@@ -1428,36 +1430,36 @@ end
|
|
|
1428
1430
|
|
|
1429
1431
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1430
1432
|
if @api_client.config.debugging
|
|
1431
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1433
|
+
@api_client.config.logger.debug "API called: Client#get_combined_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1432
1434
|
end
|
|
1433
1435
|
return data, status_code, headers
|
|
1434
1436
|
end
|
|
1435
1437
|
|
|
1436
|
-
#
|
|
1437
|
-
#
|
|
1438
|
-
# @param
|
|
1438
|
+
# Get a custom file
|
|
1439
|
+
# Returns a custom file, with a temporary URL to download it.
|
|
1440
|
+
# @param custom_file_id [String] The custom file's ID.
|
|
1439
1441
|
# @param [Hash] opts the optional parameters
|
|
1440
|
-
# @return [
|
|
1441
|
-
def
|
|
1442
|
-
data, _status_code, _headers =
|
|
1442
|
+
# @return [CustomFile]
|
|
1443
|
+
def get_custom_file(custom_file_id, opts = {})
|
|
1444
|
+
data, _status_code, _headers = get_custom_file_with_http_info(custom_file_id, opts)
|
|
1443
1445
|
data
|
|
1444
1446
|
end
|
|
1445
1447
|
|
|
1446
|
-
#
|
|
1447
|
-
#
|
|
1448
|
-
# @param
|
|
1448
|
+
# Get a custom file
|
|
1449
|
+
# Returns a custom file, with a temporary URL to download it.
|
|
1450
|
+
# @param custom_file_id [String] The custom file's ID.
|
|
1449
1451
|
# @param [Hash] opts the optional parameters
|
|
1450
|
-
# @return [Array<(
|
|
1451
|
-
def
|
|
1452
|
+
# @return [Array<(CustomFile, Integer, Hash)>] CustomFile data, response status code and response headers
|
|
1453
|
+
def get_custom_file_with_http_info(custom_file_id, opts = {})
|
|
1452
1454
|
if @api_client.config.debugging
|
|
1453
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1455
|
+
@api_client.config.logger.debug 'Calling API: Client.get_custom_file ...'
|
|
1454
1456
|
end
|
|
1455
|
-
# verify the required parameter '
|
|
1456
|
-
if @api_client.config.client_side_validation &&
|
|
1457
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1457
|
+
# verify the required parameter 'custom_file_id' is set
|
|
1458
|
+
if @api_client.config.client_side_validation && custom_file_id.nil?
|
|
1459
|
+
fail ArgumentError, "Missing the required parameter 'custom_file_id' when calling Client.get_custom_file"
|
|
1458
1460
|
end
|
|
1459
1461
|
# resource path
|
|
1460
|
-
local_var_path = '/
|
|
1462
|
+
local_var_path = '/custom_files/{custom_file_id}'.sub('{custom_file_id}', CGI.escape(custom_file_id.to_s))
|
|
1461
1463
|
|
|
1462
1464
|
# query parameters
|
|
1463
1465
|
query_params = opts[:query_params] || {}
|
|
@@ -1474,13 +1476,13 @@ end
|
|
|
1474
1476
|
post_body = opts[:debug_body]
|
|
1475
1477
|
|
|
1476
1478
|
# return_type
|
|
1477
|
-
return_type = opts[:debug_return_type] || '
|
|
1479
|
+
return_type = opts[:debug_return_type] || 'CustomFile'
|
|
1478
1480
|
|
|
1479
1481
|
# auth_names
|
|
1480
1482
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1481
1483
|
|
|
1482
1484
|
new_options = opts.merge(
|
|
1483
|
-
:operation => :"Client.
|
|
1485
|
+
:operation => :"Client.get_custom_file",
|
|
1484
1486
|
:header_params => header_params,
|
|
1485
1487
|
:query_params => query_params,
|
|
1486
1488
|
:form_params => form_params,
|
|
@@ -1491,36 +1493,36 @@ end
|
|
|
1491
1493
|
|
|
1492
1494
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1493
1495
|
if @api_client.config.debugging
|
|
1494
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1496
|
+
@api_client.config.logger.debug "API called: Client#get_custom_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1495
1497
|
end
|
|
1496
1498
|
return data, status_code, headers
|
|
1497
1499
|
end
|
|
1498
1500
|
|
|
1499
|
-
#
|
|
1500
|
-
#
|
|
1501
|
-
# @param
|
|
1501
|
+
# Get a folder
|
|
1502
|
+
# Returns a folder.
|
|
1503
|
+
# @param folder_id [String] The folder's ID.
|
|
1502
1504
|
# @param [Hash] opts the optional parameters
|
|
1503
|
-
# @return [
|
|
1504
|
-
def
|
|
1505
|
-
data, _status_code, _headers =
|
|
1505
|
+
# @return [Folder]
|
|
1506
|
+
def get_folder(folder_id, opts = {})
|
|
1507
|
+
data, _status_code, _headers = get_folder_with_http_info(folder_id, opts)
|
|
1506
1508
|
data
|
|
1507
1509
|
end
|
|
1508
1510
|
|
|
1509
|
-
#
|
|
1510
|
-
#
|
|
1511
|
-
# @param
|
|
1511
|
+
# Get a folder
|
|
1512
|
+
# Returns a folder.
|
|
1513
|
+
# @param folder_id [String] The folder's ID.
|
|
1512
1514
|
# @param [Hash] opts the optional parameters
|
|
1513
|
-
# @return [Array<(
|
|
1514
|
-
def
|
|
1515
|
+
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
1516
|
+
def get_folder_with_http_info(folder_id, opts = {})
|
|
1515
1517
|
if @api_client.config.debugging
|
|
1516
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1518
|
+
@api_client.config.logger.debug 'Calling API: Client.get_folder ...'
|
|
1517
1519
|
end
|
|
1518
|
-
# verify the required parameter '
|
|
1519
|
-
if @api_client.config.client_side_validation &&
|
|
1520
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1520
|
+
# verify the required parameter 'folder_id' is set
|
|
1521
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
1522
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.get_folder"
|
|
1521
1523
|
end
|
|
1522
1524
|
# resource path
|
|
1523
|
-
local_var_path = '/
|
|
1525
|
+
local_var_path = '/folders/{folder_id}'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
1524
1526
|
|
|
1525
1527
|
# query parameters
|
|
1526
1528
|
query_params = opts[:query_params] || {}
|
|
@@ -1537,13 +1539,13 @@ end
|
|
|
1537
1539
|
post_body = opts[:debug_body]
|
|
1538
1540
|
|
|
1539
1541
|
# return_type
|
|
1540
|
-
return_type = opts[:debug_return_type] || '
|
|
1542
|
+
return_type = opts[:debug_return_type] || 'Folder'
|
|
1541
1543
|
|
|
1542
1544
|
# auth_names
|
|
1543
1545
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1544
1546
|
|
|
1545
1547
|
new_options = opts.merge(
|
|
1546
|
-
:operation => :"Client.
|
|
1548
|
+
:operation => :"Client.get_folder",
|
|
1547
1549
|
:header_params => header_params,
|
|
1548
1550
|
:query_params => query_params,
|
|
1549
1551
|
:form_params => form_params,
|
|
@@ -1554,24 +1556,24 @@ end
|
|
|
1554
1556
|
|
|
1555
1557
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1556
1558
|
if @api_client.config.debugging
|
|
1557
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1559
|
+
@api_client.config.logger.debug "API called: Client#get_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1558
1560
|
end
|
|
1559
1561
|
return data, status_code, headers
|
|
1560
1562
|
end
|
|
1561
1563
|
|
|
1562
|
-
# Get a presigned
|
|
1563
|
-
# Returns a presigned S3
|
|
1564
|
+
# Get a presigned URL to upload a file
|
|
1565
|
+
# 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.
|
|
1564
1566
|
# @param [Hash] opts the optional parameters
|
|
1565
|
-
# @return [
|
|
1567
|
+
# @return [UploadPresign]
|
|
1566
1568
|
def get_presign_url(opts = {})
|
|
1567
1569
|
data, _status_code, _headers = get_presign_url_with_http_info(opts)
|
|
1568
1570
|
data
|
|
1569
1571
|
end
|
|
1570
1572
|
|
|
1571
|
-
# Get a presigned
|
|
1572
|
-
# Returns a presigned S3
|
|
1573
|
+
# Get a presigned URL to upload a file
|
|
1574
|
+
# 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.
|
|
1573
1575
|
# @param [Hash] opts the optional parameters
|
|
1574
|
-
# @return [Array<(
|
|
1576
|
+
# @return [Array<(UploadPresign, Integer, Hash)>] UploadPresign data, response status code and response headers
|
|
1575
1577
|
def get_presign_url_with_http_info(opts = {})
|
|
1576
1578
|
if @api_client.config.debugging
|
|
1577
1579
|
@api_client.config.logger.debug 'Calling API: Client.get_presign_url ...'
|
|
@@ -1594,7 +1596,7 @@ end
|
|
|
1594
1596
|
post_body = opts[:debug_body]
|
|
1595
1597
|
|
|
1596
1598
|
# return_type
|
|
1597
|
-
return_type = opts[:debug_return_type] || '
|
|
1599
|
+
return_type = opts[:debug_return_type] || 'UploadPresign'
|
|
1598
1600
|
|
|
1599
1601
|
# auth_names
|
|
1600
1602
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -1616,22 +1618,83 @@ end
|
|
|
1616
1618
|
return data, status_code, headers
|
|
1617
1619
|
end
|
|
1618
1620
|
|
|
1619
|
-
#
|
|
1620
|
-
#
|
|
1621
|
-
# @param
|
|
1621
|
+
# Get a signature request
|
|
1622
|
+
# Returns a signature request, with the values the person has entered so far.
|
|
1623
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
1624
|
+
# @param [Hash] opts the optional parameters
|
|
1625
|
+
# @return [SignatureRequest]
|
|
1626
|
+
def get_signature_request(signature_request_id, opts = {})
|
|
1627
|
+
data, _status_code, _headers = get_signature_request_with_http_info(signature_request_id, opts)
|
|
1628
|
+
data
|
|
1629
|
+
end
|
|
1630
|
+
|
|
1631
|
+
# Get a signature request
|
|
1632
|
+
# Returns a signature request, with the values the person has entered so far.
|
|
1633
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
1634
|
+
# @param [Hash] opts the optional parameters
|
|
1635
|
+
# @return [Array<(SignatureRequest, Integer, Hash)>] SignatureRequest data, response status code and response headers
|
|
1636
|
+
def get_signature_request_with_http_info(signature_request_id, opts = {})
|
|
1637
|
+
if @api_client.config.debugging
|
|
1638
|
+
@api_client.config.logger.debug 'Calling API: Client.get_signature_request ...'
|
|
1639
|
+
end
|
|
1640
|
+
# verify the required parameter 'signature_request_id' is set
|
|
1641
|
+
if @api_client.config.client_side_validation && signature_request_id.nil?
|
|
1642
|
+
fail ArgumentError, "Missing the required parameter 'signature_request_id' when calling Client.get_signature_request"
|
|
1643
|
+
end
|
|
1644
|
+
# resource path
|
|
1645
|
+
local_var_path = '/signature_requests/{signature_request_id}'.sub('{signature_request_id}', CGI.escape(signature_request_id.to_s))
|
|
1646
|
+
|
|
1647
|
+
# query parameters
|
|
1648
|
+
query_params = opts[:query_params] || {}
|
|
1649
|
+
|
|
1650
|
+
# header parameters
|
|
1651
|
+
header_params = opts[:header_params] || {}
|
|
1652
|
+
# HTTP header 'Accept' (if needed)
|
|
1653
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1654
|
+
|
|
1655
|
+
# form parameters
|
|
1656
|
+
form_params = opts[:form_params] || {}
|
|
1657
|
+
|
|
1658
|
+
# http body (model)
|
|
1659
|
+
post_body = opts[:debug_body]
|
|
1660
|
+
|
|
1661
|
+
# return_type
|
|
1662
|
+
return_type = opts[:debug_return_type] || 'SignatureRequest'
|
|
1663
|
+
|
|
1664
|
+
# auth_names
|
|
1665
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1666
|
+
|
|
1667
|
+
new_options = opts.merge(
|
|
1668
|
+
:operation => :"Client.get_signature_request",
|
|
1669
|
+
:header_params => header_params,
|
|
1670
|
+
:query_params => query_params,
|
|
1671
|
+
:form_params => form_params,
|
|
1672
|
+
:body => post_body,
|
|
1673
|
+
:auth_names => auth_names,
|
|
1674
|
+
:return_type => return_type
|
|
1675
|
+
)
|
|
1676
|
+
|
|
1677
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1678
|
+
if @api_client.config.debugging
|
|
1679
|
+
@api_client.config.logger.debug "API called: Client#get_signature_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1680
|
+
end
|
|
1681
|
+
return data, status_code, headers
|
|
1682
|
+
end
|
|
1683
|
+
|
|
1684
|
+
# Get a submission
|
|
1685
|
+
# Returns a submission, with its data and links to download its PDF.
|
|
1686
|
+
# @param submission_id [String] The submission's ID.
|
|
1622
1687
|
# @param [Hash] opts the optional parameters
|
|
1623
|
-
# @option opts [Boolean] :include_data
|
|
1624
1688
|
# @return [Submission]
|
|
1625
1689
|
def get_submission(submission_id, opts = {})
|
|
1626
1690
|
data, _status_code, _headers = get_submission_with_http_info(submission_id, opts)
|
|
1627
1691
|
data
|
|
1628
1692
|
end
|
|
1629
1693
|
|
|
1630
|
-
#
|
|
1631
|
-
#
|
|
1632
|
-
# @param submission_id [String]
|
|
1694
|
+
# Get a submission
|
|
1695
|
+
# Returns a submission, with its data and links to download its PDF.
|
|
1696
|
+
# @param submission_id [String] The submission's ID.
|
|
1633
1697
|
# @param [Hash] opts the optional parameters
|
|
1634
|
-
# @option opts [Boolean] :include_data
|
|
1635
1698
|
# @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
|
|
1636
1699
|
def get_submission_with_http_info(submission_id, opts = {})
|
|
1637
1700
|
if @api_client.config.debugging
|
|
@@ -1642,11 +1705,10 @@ end
|
|
|
1642
1705
|
fail ArgumentError, "Missing the required parameter 'submission_id' when calling Client.get_submission"
|
|
1643
1706
|
end
|
|
1644
1707
|
# resource path
|
|
1645
|
-
local_var_path = '/submissions/{submission_id}'.sub('{
|
|
1708
|
+
local_var_path = '/submissions/{submission_id}'.sub('{submission_id}', CGI.escape(submission_id.to_s))
|
|
1646
1709
|
|
|
1647
1710
|
# query parameters
|
|
1648
1711
|
query_params = opts[:query_params] || {}
|
|
1649
|
-
query_params[:'include_data'] = opts[:'include_data'] if !opts[:'include_data'].nil?
|
|
1650
1712
|
|
|
1651
1713
|
# header parameters
|
|
1652
1714
|
header_params = opts[:header_params] || {}
|
|
@@ -1682,23 +1744,23 @@ end
|
|
|
1682
1744
|
return data, status_code, headers
|
|
1683
1745
|
end
|
|
1684
1746
|
|
|
1685
|
-
#
|
|
1686
|
-
#
|
|
1687
|
-
# @param submission_batch_id [String]
|
|
1747
|
+
# Get a batch
|
|
1748
|
+
# 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.
|
|
1749
|
+
# @param submission_batch_id [String] The batch's ID.
|
|
1688
1750
|
# @param [Hash] opts the optional parameters
|
|
1689
|
-
# @option opts [Boolean] :
|
|
1690
|
-
# @return [
|
|
1751
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
1752
|
+
# @return [SubmissionBatch]
|
|
1691
1753
|
def get_submission_batch(submission_batch_id, opts = {})
|
|
1692
1754
|
data, _status_code, _headers = get_submission_batch_with_http_info(submission_batch_id, opts)
|
|
1693
1755
|
data
|
|
1694
1756
|
end
|
|
1695
1757
|
|
|
1696
|
-
#
|
|
1697
|
-
#
|
|
1698
|
-
# @param submission_batch_id [String]
|
|
1758
|
+
# Get a batch
|
|
1759
|
+
# 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.
|
|
1760
|
+
# @param submission_batch_id [String] The batch's ID.
|
|
1699
1761
|
# @param [Hash] opts the optional parameters
|
|
1700
|
-
# @option opts [Boolean] :
|
|
1701
|
-
# @return [Array<(
|
|
1762
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
1763
|
+
# @return [Array<(SubmissionBatch, Integer, Hash)>] SubmissionBatch data, response status code and response headers
|
|
1702
1764
|
def get_submission_batch_with_http_info(submission_batch_id, opts = {})
|
|
1703
1765
|
if @api_client.config.debugging
|
|
1704
1766
|
@api_client.config.logger.debug 'Calling API: Client.get_submission_batch ...'
|
|
@@ -1708,11 +1770,11 @@ end
|
|
|
1708
1770
|
fail ArgumentError, "Missing the required parameter 'submission_batch_id' when calling Client.get_submission_batch"
|
|
1709
1771
|
end
|
|
1710
1772
|
# resource path
|
|
1711
|
-
local_var_path = '/submissions/batches/{submission_batch_id}'.sub('{
|
|
1773
|
+
local_var_path = '/submissions/batches/{submission_batch_id}'.sub('{submission_batch_id}', CGI.escape(submission_batch_id.to_s))
|
|
1712
1774
|
|
|
1713
1775
|
# query parameters
|
|
1714
1776
|
query_params = opts[:query_params] || {}
|
|
1715
|
-
query_params[:'
|
|
1777
|
+
query_params[:'include_data'] = opts[:'include_data'] if !opts[:'include_data'].nil?
|
|
1716
1778
|
|
|
1717
1779
|
# header parameters
|
|
1718
1780
|
header_params = opts[:header_params] || {}
|
|
@@ -1726,7 +1788,7 @@ end
|
|
|
1726
1788
|
post_body = opts[:debug_body]
|
|
1727
1789
|
|
|
1728
1790
|
# return_type
|
|
1729
|
-
return_type = opts[:debug_return_type] || '
|
|
1791
|
+
return_type = opts[:debug_return_type] || 'SubmissionBatch'
|
|
1730
1792
|
|
|
1731
1793
|
# auth_names
|
|
1732
1794
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -1748,21 +1810,23 @@ end
|
|
|
1748
1810
|
return data, status_code, headers
|
|
1749
1811
|
end
|
|
1750
1812
|
|
|
1751
|
-
#
|
|
1752
|
-
#
|
|
1753
|
-
# @param template_id [String]
|
|
1813
|
+
# Get a template
|
|
1814
|
+
# Returns a template: its draft, or one of its published versions.
|
|
1815
|
+
# @param template_id [String] The template's ID.
|
|
1754
1816
|
# @param [Hash] opts the optional parameters
|
|
1755
|
-
# @
|
|
1817
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1818
|
+
# @return [Template]
|
|
1756
1819
|
def get_template(template_id, opts = {})
|
|
1757
1820
|
data, _status_code, _headers = get_template_with_http_info(template_id, opts)
|
|
1758
1821
|
data
|
|
1759
1822
|
end
|
|
1760
1823
|
|
|
1761
|
-
#
|
|
1762
|
-
#
|
|
1763
|
-
# @param template_id [String]
|
|
1824
|
+
# Get a template
|
|
1825
|
+
# Returns a template: its draft, or one of its published versions.
|
|
1826
|
+
# @param template_id [String] The template's ID.
|
|
1764
1827
|
# @param [Hash] opts the optional parameters
|
|
1765
|
-
# @
|
|
1828
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1829
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
1766
1830
|
def get_template_with_http_info(template_id, opts = {})
|
|
1767
1831
|
if @api_client.config.debugging
|
|
1768
1832
|
@api_client.config.logger.debug 'Calling API: Client.get_template ...'
|
|
@@ -1772,10 +1836,11 @@ end
|
|
|
1772
1836
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.get_template"
|
|
1773
1837
|
end
|
|
1774
1838
|
# resource path
|
|
1775
|
-
local_var_path = '/templates/{template_id}'.sub('{
|
|
1839
|
+
local_var_path = '/templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
1776
1840
|
|
|
1777
1841
|
# query parameters
|
|
1778
1842
|
query_params = opts[:query_params] || {}
|
|
1843
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1779
1844
|
|
|
1780
1845
|
# header parameters
|
|
1781
1846
|
header_params = opts[:header_params] || {}
|
|
@@ -1789,7 +1854,7 @@ end
|
|
|
1789
1854
|
post_body = opts[:debug_body]
|
|
1790
1855
|
|
|
1791
1856
|
# return_type
|
|
1792
|
-
return_type = opts[:debug_return_type] || '
|
|
1857
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
1793
1858
|
|
|
1794
1859
|
# auth_names
|
|
1795
1860
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -1811,46 +1876,37 @@ end
|
|
|
1811
1876
|
return data, status_code, headers
|
|
1812
1877
|
end
|
|
1813
1878
|
|
|
1814
|
-
#
|
|
1815
|
-
#
|
|
1816
|
-
# @param template_id [String]
|
|
1817
|
-
# @param lang [String] The language to generate code for
|
|
1879
|
+
# Compare a version of a template with the one before it
|
|
1880
|
+
# Returns what changed in the template's draft since its latest published version (or in a published version since the one before it): fields added, removed, changed and moved, the settings that changed, and whether the document was replaced. Check it before you publish a version.
|
|
1881
|
+
# @param template_id [String] The template's ID.
|
|
1818
1882
|
# @param [Hash] opts the optional parameters
|
|
1819
|
-
# @
|
|
1820
|
-
|
|
1821
|
-
|
|
1883
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1884
|
+
# @return [TemplateDiff]
|
|
1885
|
+
def get_template_diff(template_id, opts = {})
|
|
1886
|
+
data, _status_code, _headers = get_template_diff_with_http_info(template_id, opts)
|
|
1822
1887
|
data
|
|
1823
1888
|
end
|
|
1824
1889
|
|
|
1825
|
-
#
|
|
1826
|
-
#
|
|
1827
|
-
# @param template_id [String]
|
|
1828
|
-
# @param lang [String] The language to generate code for
|
|
1890
|
+
# Compare a version of a template with the one before it
|
|
1891
|
+
# Returns what changed in the template's draft since its latest published version (or in a published version since the one before it): fields added, removed, changed and moved, the settings that changed, and whether the document was replaced. Check it before you publish a version.
|
|
1892
|
+
# @param template_id [String] The template's ID.
|
|
1829
1893
|
# @param [Hash] opts the optional parameters
|
|
1830
|
-
# @
|
|
1831
|
-
|
|
1894
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
1895
|
+
# @return [Array<(TemplateDiff, Integer, Hash)>] TemplateDiff data, response status code and response headers
|
|
1896
|
+
def get_template_diff_with_http_info(template_id, opts = {})
|
|
1832
1897
|
if @api_client.config.debugging
|
|
1833
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1898
|
+
@api_client.config.logger.debug 'Calling API: Client.get_template_diff ...'
|
|
1834
1899
|
end
|
|
1835
1900
|
# verify the required parameter 'template_id' is set
|
|
1836
1901
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
1837
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.
|
|
1838
|
-
end
|
|
1839
|
-
# verify the required parameter 'lang' is set
|
|
1840
|
-
if @api_client.config.client_side_validation && lang.nil?
|
|
1841
|
-
fail ArgumentError, "Missing the required parameter 'lang' when calling Client.get_template_model_code"
|
|
1842
|
-
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}"
|
|
1902
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.get_template_diff"
|
|
1847
1903
|
end
|
|
1848
1904
|
# resource path
|
|
1849
|
-
local_var_path = '/templates/{template_id}/
|
|
1905
|
+
local_var_path = '/templates/{template_id}/diff'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
1850
1906
|
|
|
1851
1907
|
# query parameters
|
|
1852
1908
|
query_params = opts[:query_params] || {}
|
|
1853
|
-
query_params[:'
|
|
1909
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1854
1910
|
|
|
1855
1911
|
# header parameters
|
|
1856
1912
|
header_params = opts[:header_params] || {}
|
|
@@ -1864,13 +1920,13 @@ end
|
|
|
1864
1920
|
post_body = opts[:debug_body]
|
|
1865
1921
|
|
|
1866
1922
|
# return_type
|
|
1867
|
-
return_type = opts[:debug_return_type] || '
|
|
1923
|
+
return_type = opts[:debug_return_type] || 'TemplateDiff'
|
|
1868
1924
|
|
|
1869
1925
|
# auth_names
|
|
1870
1926
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1871
1927
|
|
|
1872
1928
|
new_options = opts.merge(
|
|
1873
|
-
:operation => :"Client.
|
|
1929
|
+
:operation => :"Client.get_template_diff",
|
|
1874
1930
|
:header_params => header_params,
|
|
1875
1931
|
:query_params => query_params,
|
|
1876
1932
|
:form_params => form_params,
|
|
@@ -1881,39 +1937,49 @@ end
|
|
|
1881
1937
|
|
|
1882
1938
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1883
1939
|
if @api_client.config.debugging
|
|
1884
|
-
@api_client.config.logger.debug "API called: Client#
|
|
1940
|
+
@api_client.config.logger.debug "API called: Client#get_template_diff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1885
1941
|
end
|
|
1886
1942
|
return data, status_code, headers
|
|
1887
1943
|
end
|
|
1888
1944
|
|
|
1889
|
-
#
|
|
1890
|
-
#
|
|
1891
|
-
# @param template_id [String]
|
|
1945
|
+
# Generate typed code for a template's submission data
|
|
1946
|
+
# 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.
|
|
1947
|
+
# @param template_id [String] The template's ID.
|
|
1948
|
+
# @param lang [ModelCodeLanguage] The language to generate the code in.
|
|
1892
1949
|
# @param [Hash] opts the optional parameters
|
|
1893
|
-
# @
|
|
1894
|
-
|
|
1895
|
-
|
|
1950
|
+
# @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.
|
|
1951
|
+
# @return [TemplateModelCode]
|
|
1952
|
+
def get_template_model_code(template_id, lang, opts = {})
|
|
1953
|
+
data, _status_code, _headers = get_template_model_code_with_http_info(template_id, lang, opts)
|
|
1896
1954
|
data
|
|
1897
1955
|
end
|
|
1898
1956
|
|
|
1899
|
-
#
|
|
1900
|
-
#
|
|
1901
|
-
# @param template_id [String]
|
|
1957
|
+
# Generate typed code for a template's submission data
|
|
1958
|
+
# 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.
|
|
1959
|
+
# @param template_id [String] The template's ID.
|
|
1960
|
+
# @param lang [ModelCodeLanguage] The language to generate the code in.
|
|
1902
1961
|
# @param [Hash] opts the optional parameters
|
|
1903
|
-
# @
|
|
1904
|
-
|
|
1962
|
+
# @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.
|
|
1963
|
+
# @return [Array<(TemplateModelCode, Integer, Hash)>] TemplateModelCode data, response status code and response headers
|
|
1964
|
+
def get_template_model_code_with_http_info(template_id, lang, opts = {})
|
|
1905
1965
|
if @api_client.config.debugging
|
|
1906
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
1966
|
+
@api_client.config.logger.debug 'Calling API: Client.get_template_model_code ...'
|
|
1907
1967
|
end
|
|
1908
1968
|
# verify the required parameter 'template_id' is set
|
|
1909
1969
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
1910
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.
|
|
1970
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.get_template_model_code"
|
|
1971
|
+
end
|
|
1972
|
+
# verify the required parameter 'lang' is set
|
|
1973
|
+
if @api_client.config.client_side_validation && lang.nil?
|
|
1974
|
+
fail ArgumentError, "Missing the required parameter 'lang' when calling Client.get_template_model_code"
|
|
1911
1975
|
end
|
|
1912
1976
|
# resource path
|
|
1913
|
-
local_var_path = '/templates/{template_id}/
|
|
1977
|
+
local_var_path = '/templates/{template_id}/model_code'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
1914
1978
|
|
|
1915
1979
|
# query parameters
|
|
1916
1980
|
query_params = opts[:query_params] || {}
|
|
1981
|
+
query_params[:'lang'] = lang
|
|
1982
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1917
1983
|
|
|
1918
1984
|
# header parameters
|
|
1919
1985
|
header_params = opts[:header_params] || {}
|
|
@@ -1927,13 +1993,13 @@ end
|
|
|
1927
1993
|
post_body = opts[:debug_body]
|
|
1928
1994
|
|
|
1929
1995
|
# return_type
|
|
1930
|
-
return_type = opts[:debug_return_type] || '
|
|
1996
|
+
return_type = opts[:debug_return_type] || 'TemplateModelCode'
|
|
1931
1997
|
|
|
1932
1998
|
# auth_names
|
|
1933
1999
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1934
2000
|
|
|
1935
2001
|
new_options = opts.merge(
|
|
1936
|
-
:operation => :"Client.
|
|
2002
|
+
:operation => :"Client.get_template_model_code",
|
|
1937
2003
|
:header_params => header_params,
|
|
1938
2004
|
:query_params => query_params,
|
|
1939
2005
|
:form_params => form_params,
|
|
@@ -1944,39 +2010,42 @@ end
|
|
|
1944
2010
|
|
|
1945
2011
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1946
2012
|
if @api_client.config.debugging
|
|
1947
|
-
@api_client.config.logger.debug "API called: Client#
|
|
2013
|
+
@api_client.config.logger.debug "API called: Client#get_template_model_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1948
2014
|
end
|
|
1949
2015
|
return data, status_code, headers
|
|
1950
2016
|
end
|
|
1951
2017
|
|
|
1952
|
-
# Get a
|
|
1953
|
-
#
|
|
1954
|
-
# @param
|
|
2018
|
+
# Get images of a template's pages
|
|
2019
|
+
# Returns a JPEG image of each page of a PDF template's PDF, with temporary links to download them: the draft's PDF, or a published version's. Use them to see the pages that fields are placed on.
|
|
2020
|
+
# @param template_id [String] The template's ID.
|
|
1955
2021
|
# @param [Hash] opts the optional parameters
|
|
1956
|
-
# @
|
|
1957
|
-
|
|
1958
|
-
|
|
2022
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2023
|
+
# @return [TemplatePageImages]
|
|
2024
|
+
def get_template_page_images(template_id, opts = {})
|
|
2025
|
+
data, _status_code, _headers = get_template_page_images_with_http_info(template_id, opts)
|
|
1959
2026
|
data
|
|
1960
2027
|
end
|
|
1961
2028
|
|
|
1962
|
-
# Get a
|
|
1963
|
-
#
|
|
1964
|
-
# @param
|
|
2029
|
+
# Get images of a template's pages
|
|
2030
|
+
# Returns a JPEG image of each page of a PDF template's PDF, with temporary links to download them: the draft's PDF, or a published version's. Use them to see the pages that fields are placed on.
|
|
2031
|
+
# @param template_id [String] The template's ID.
|
|
1965
2032
|
# @param [Hash] opts the optional parameters
|
|
1966
|
-
# @
|
|
1967
|
-
|
|
2033
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2034
|
+
# @return [Array<(TemplatePageImages, Integer, Hash)>] TemplatePageImages data, response status code and response headers
|
|
2035
|
+
def get_template_page_images_with_http_info(template_id, opts = {})
|
|
1968
2036
|
if @api_client.config.debugging
|
|
1969
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
2037
|
+
@api_client.config.logger.debug 'Calling API: Client.get_template_page_images ...'
|
|
1970
2038
|
end
|
|
1971
|
-
# verify the required parameter '
|
|
1972
|
-
if @api_client.config.client_side_validation &&
|
|
1973
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2039
|
+
# verify the required parameter 'template_id' is set
|
|
2040
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
2041
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.get_template_page_images"
|
|
1974
2042
|
end
|
|
1975
2043
|
# resource path
|
|
1976
|
-
local_var_path = '/
|
|
2044
|
+
local_var_path = '/templates/{template_id}/page_images'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
1977
2045
|
|
|
1978
2046
|
# query parameters
|
|
1979
2047
|
query_params = opts[:query_params] || {}
|
|
2048
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1980
2049
|
|
|
1981
2050
|
# header parameters
|
|
1982
2051
|
header_params = opts[:header_params] || {}
|
|
@@ -1990,13 +2059,13 @@ end
|
|
|
1990
2059
|
post_body = opts[:debug_body]
|
|
1991
2060
|
|
|
1992
2061
|
# return_type
|
|
1993
|
-
return_type = opts[:debug_return_type] || '
|
|
2062
|
+
return_type = opts[:debug_return_type] || 'TemplatePageImages'
|
|
1994
2063
|
|
|
1995
2064
|
# auth_names
|
|
1996
2065
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
1997
2066
|
|
|
1998
2067
|
new_options = opts.merge(
|
|
1999
|
-
:operation => :"Client.
|
|
2068
|
+
:operation => :"Client.get_template_page_images",
|
|
2000
2069
|
:header_params => header_params,
|
|
2001
2070
|
:query_params => query_params,
|
|
2002
2071
|
:form_params => form_params,
|
|
@@ -2007,51 +2076,42 @@ end
|
|
|
2007
2076
|
|
|
2008
2077
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2009
2078
|
if @api_client.config.debugging
|
|
2010
|
-
@api_client.config.logger.debug "API called: Client#
|
|
2079
|
+
@api_client.config.logger.debug "API called: Client#get_template_page_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2011
2080
|
end
|
|
2012
2081
|
return data, status_code, headers
|
|
2013
2082
|
end
|
|
2014
2083
|
|
|
2015
|
-
# Get
|
|
2016
|
-
# Returns a
|
|
2084
|
+
# Get the JSON Schema of a template's submission data
|
|
2085
|
+
# 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.
|
|
2086
|
+
# @param template_id [String] The template's ID.
|
|
2017
2087
|
# @param [Hash] opts the optional parameters
|
|
2018
|
-
# @option opts [
|
|
2019
|
-
# @
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
data, _status_code, _headers = list_combined_submissions_with_http_info(opts)
|
|
2088
|
+
# @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.
|
|
2089
|
+
# @return [Hash<String, Object>]
|
|
2090
|
+
def get_template_schema(template_id, opts = {})
|
|
2091
|
+
data, _status_code, _headers = get_template_schema_with_http_info(template_id, opts)
|
|
2023
2092
|
data
|
|
2024
2093
|
end
|
|
2025
2094
|
|
|
2026
|
-
# Get
|
|
2027
|
-
# Returns a
|
|
2095
|
+
# Get the JSON Schema of a template's submission data
|
|
2096
|
+
# 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.
|
|
2097
|
+
# @param template_id [String] The template's ID.
|
|
2028
2098
|
# @param [Hash] opts the optional parameters
|
|
2029
|
-
# @option opts [
|
|
2030
|
-
# @
|
|
2031
|
-
|
|
2032
|
-
def list_combined_submissions_with_http_info(opts = {})
|
|
2099
|
+
# @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.
|
|
2100
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
2101
|
+
def get_template_schema_with_http_info(template_id, opts = {})
|
|
2033
2102
|
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.'
|
|
2038
|
-
end
|
|
2039
|
-
|
|
2040
|
-
if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 50
|
|
2041
|
-
fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling Client.list_combined_submissions, must be smaller than or equal to 50.'
|
|
2103
|
+
@api_client.config.logger.debug 'Calling API: Client.get_template_schema ...'
|
|
2042
2104
|
end
|
|
2043
|
-
|
|
2044
|
-
if @api_client.config.client_side_validation &&
|
|
2045
|
-
fail ArgumentError,
|
|
2105
|
+
# verify the required parameter 'template_id' is set
|
|
2106
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
2107
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.get_template_schema"
|
|
2046
2108
|
end
|
|
2047
|
-
|
|
2048
2109
|
# resource path
|
|
2049
|
-
local_var_path = '/
|
|
2110
|
+
local_var_path = '/templates/{template_id}/schema'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
2050
2111
|
|
|
2051
2112
|
# query parameters
|
|
2052
2113
|
query_params = opts[:query_params] || {}
|
|
2053
|
-
query_params[:'
|
|
2054
|
-
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
2114
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
2055
2115
|
|
|
2056
2116
|
# header parameters
|
|
2057
2117
|
header_params = opts[:header_params] || {}
|
|
@@ -2065,13 +2125,13 @@ end
|
|
|
2065
2125
|
post_body = opts[:debug_body]
|
|
2066
2126
|
|
|
2067
2127
|
# return_type
|
|
2068
|
-
return_type = opts[:debug_return_type] || '
|
|
2128
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
2069
2129
|
|
|
2070
2130
|
# auth_names
|
|
2071
2131
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2072
2132
|
|
|
2073
2133
|
new_options = opts.merge(
|
|
2074
|
-
:operation => :"Client.
|
|
2134
|
+
:operation => :"Client.get_template_schema",
|
|
2075
2135
|
:header_params => header_params,
|
|
2076
2136
|
:query_params => query_params,
|
|
2077
2137
|
:form_params => form_params,
|
|
@@ -2082,36 +2142,231 @@ end
|
|
|
2082
2142
|
|
|
2083
2143
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2084
2144
|
if @api_client.config.debugging
|
|
2085
|
-
@api_client.config.logger.debug "API called: Client#
|
|
2145
|
+
@api_client.config.logger.debug "API called: Client#get_template_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2086
2146
|
end
|
|
2087
2147
|
return data, status_code, headers
|
|
2088
2148
|
end
|
|
2089
2149
|
|
|
2090
|
-
# Get a
|
|
2091
|
-
# Returns a
|
|
2150
|
+
# Get a webhook
|
|
2151
|
+
# Returns a webhook.
|
|
2152
|
+
# @param webhook_id [String] The webhook's ID.
|
|
2092
2153
|
# @param [Hash] opts the optional parameters
|
|
2093
|
-
# @
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
data
|
|
2154
|
+
# @return [Webhook]
|
|
2155
|
+
def get_webhook(webhook_id, opts = {})
|
|
2156
|
+
data, _status_code, _headers = get_webhook_with_http_info(webhook_id, opts)
|
|
2157
|
+
data
|
|
2158
|
+
end
|
|
2159
|
+
|
|
2160
|
+
# Get a webhook
|
|
2161
|
+
# Returns a webhook.
|
|
2162
|
+
# @param webhook_id [String] The webhook's ID.
|
|
2163
|
+
# @param [Hash] opts the optional parameters
|
|
2164
|
+
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
2165
|
+
def get_webhook_with_http_info(webhook_id, opts = {})
|
|
2166
|
+
if @api_client.config.debugging
|
|
2167
|
+
@api_client.config.logger.debug 'Calling API: Client.get_webhook ...'
|
|
2168
|
+
end
|
|
2169
|
+
# verify the required parameter 'webhook_id' is set
|
|
2170
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
|
2171
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling Client.get_webhook"
|
|
2172
|
+
end
|
|
2173
|
+
# resource path
|
|
2174
|
+
local_var_path = '/webhooks/{webhook_id}'.sub('{webhook_id}', CGI.escape(webhook_id.to_s))
|
|
2175
|
+
|
|
2176
|
+
# query parameters
|
|
2177
|
+
query_params = opts[:query_params] || {}
|
|
2178
|
+
|
|
2179
|
+
# header parameters
|
|
2180
|
+
header_params = opts[:header_params] || {}
|
|
2181
|
+
# HTTP header 'Accept' (if needed)
|
|
2182
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2183
|
+
|
|
2184
|
+
# form parameters
|
|
2185
|
+
form_params = opts[:form_params] || {}
|
|
2186
|
+
|
|
2187
|
+
# http body (model)
|
|
2188
|
+
post_body = opts[:debug_body]
|
|
2189
|
+
|
|
2190
|
+
# return_type
|
|
2191
|
+
return_type = opts[:debug_return_type] || 'Webhook'
|
|
2192
|
+
|
|
2193
|
+
# auth_names
|
|
2194
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2195
|
+
|
|
2196
|
+
new_options = opts.merge(
|
|
2197
|
+
:operation => :"Client.get_webhook",
|
|
2198
|
+
:header_params => header_params,
|
|
2199
|
+
:query_params => query_params,
|
|
2200
|
+
:form_params => form_params,
|
|
2201
|
+
:body => post_body,
|
|
2202
|
+
:auth_names => auth_names,
|
|
2203
|
+
:return_type => return_type
|
|
2204
|
+
)
|
|
2205
|
+
|
|
2206
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2207
|
+
if @api_client.config.debugging
|
|
2208
|
+
@api_client.config.logger.debug "API called: Client#get_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2209
|
+
end
|
|
2210
|
+
return data, status_code, headers
|
|
2211
|
+
end
|
|
2212
|
+
|
|
2213
|
+
# List combined PDFs
|
|
2214
|
+
# Returns the combined PDFs in your account, newest first, one page at a time.
|
|
2215
|
+
# @param [Hash] opts the optional parameters
|
|
2216
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2217
|
+
# @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.
|
|
2218
|
+
# @return [CombinedPdfList]
|
|
2219
|
+
def list_combined_pdfs(opts = {})
|
|
2220
|
+
data, _status_code, _headers = list_combined_pdfs_with_http_info(opts)
|
|
2221
|
+
data
|
|
2222
|
+
end
|
|
2223
|
+
|
|
2224
|
+
# List combined PDFs
|
|
2225
|
+
# Returns the combined PDFs in your account, newest first, one page at a time.
|
|
2226
|
+
# @param [Hash] opts the optional parameters
|
|
2227
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2228
|
+
# @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.
|
|
2229
|
+
# @return [Array<(CombinedPdfList, Integer, Hash)>] CombinedPdfList data, response status code and response headers
|
|
2230
|
+
def list_combined_pdfs_with_http_info(opts = {})
|
|
2231
|
+
if @api_client.config.debugging
|
|
2232
|
+
@api_client.config.logger.debug 'Calling API: Client.list_combined_pdfs ...'
|
|
2233
|
+
end
|
|
2234
|
+
# resource path
|
|
2235
|
+
local_var_path = '/combined_pdfs'
|
|
2236
|
+
|
|
2237
|
+
# query parameters
|
|
2238
|
+
query_params = opts[:query_params] || {}
|
|
2239
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2240
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2241
|
+
|
|
2242
|
+
# header parameters
|
|
2243
|
+
header_params = opts[:header_params] || {}
|
|
2244
|
+
# HTTP header 'Accept' (if needed)
|
|
2245
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2246
|
+
|
|
2247
|
+
# form parameters
|
|
2248
|
+
form_params = opts[:form_params] || {}
|
|
2249
|
+
|
|
2250
|
+
# http body (model)
|
|
2251
|
+
post_body = opts[:debug_body]
|
|
2252
|
+
|
|
2253
|
+
# return_type
|
|
2254
|
+
return_type = opts[:debug_return_type] || 'CombinedPdfList'
|
|
2255
|
+
|
|
2256
|
+
# auth_names
|
|
2257
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2258
|
+
|
|
2259
|
+
new_options = opts.merge(
|
|
2260
|
+
:operation => :"Client.list_combined_pdfs",
|
|
2261
|
+
:header_params => header_params,
|
|
2262
|
+
:query_params => query_params,
|
|
2263
|
+
:form_params => form_params,
|
|
2264
|
+
:body => post_body,
|
|
2265
|
+
:auth_names => auth_names,
|
|
2266
|
+
:return_type => return_type
|
|
2267
|
+
)
|
|
2268
|
+
|
|
2269
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2270
|
+
if @api_client.config.debugging
|
|
2271
|
+
@api_client.config.logger.debug "API called: Client#list_combined_pdfs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2272
|
+
end
|
|
2273
|
+
return data, status_code, headers
|
|
2274
|
+
end
|
|
2275
|
+
|
|
2276
|
+
# List custom files
|
|
2277
|
+
# Returns the custom files in your account, newest first, one page at a time.
|
|
2278
|
+
# @param [Hash] opts the optional parameters
|
|
2279
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2280
|
+
# @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.
|
|
2281
|
+
# @return [CustomFileList]
|
|
2282
|
+
def list_custom_files(opts = {})
|
|
2283
|
+
data, _status_code, _headers = list_custom_files_with_http_info(opts)
|
|
2284
|
+
data
|
|
2285
|
+
end
|
|
2286
|
+
|
|
2287
|
+
# List custom files
|
|
2288
|
+
# Returns the custom files in your account, newest first, one page at a time.
|
|
2289
|
+
# @param [Hash] opts the optional parameters
|
|
2290
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2291
|
+
# @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.
|
|
2292
|
+
# @return [Array<(CustomFileList, Integer, Hash)>] CustomFileList data, response status code and response headers
|
|
2293
|
+
def list_custom_files_with_http_info(opts = {})
|
|
2294
|
+
if @api_client.config.debugging
|
|
2295
|
+
@api_client.config.logger.debug 'Calling API: Client.list_custom_files ...'
|
|
2296
|
+
end
|
|
2297
|
+
# resource path
|
|
2298
|
+
local_var_path = '/custom_files'
|
|
2299
|
+
|
|
2300
|
+
# query parameters
|
|
2301
|
+
query_params = opts[:query_params] || {}
|
|
2302
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2303
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2304
|
+
|
|
2305
|
+
# header parameters
|
|
2306
|
+
header_params = opts[:header_params] || {}
|
|
2307
|
+
# HTTP header 'Accept' (if needed)
|
|
2308
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2309
|
+
|
|
2310
|
+
# form parameters
|
|
2311
|
+
form_params = opts[:form_params] || {}
|
|
2312
|
+
|
|
2313
|
+
# http body (model)
|
|
2314
|
+
post_body = opts[:debug_body]
|
|
2315
|
+
|
|
2316
|
+
# return_type
|
|
2317
|
+
return_type = opts[:debug_return_type] || 'CustomFileList'
|
|
2318
|
+
|
|
2319
|
+
# auth_names
|
|
2320
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2321
|
+
|
|
2322
|
+
new_options = opts.merge(
|
|
2323
|
+
:operation => :"Client.list_custom_files",
|
|
2324
|
+
:header_params => header_params,
|
|
2325
|
+
:query_params => query_params,
|
|
2326
|
+
:form_params => form_params,
|
|
2327
|
+
:body => post_body,
|
|
2328
|
+
:auth_names => auth_names,
|
|
2329
|
+
:return_type => return_type
|
|
2330
|
+
)
|
|
2331
|
+
|
|
2332
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2333
|
+
if @api_client.config.debugging
|
|
2334
|
+
@api_client.config.logger.debug "API called: Client#list_custom_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2335
|
+
end
|
|
2336
|
+
return data, status_code, headers
|
|
2337
|
+
end
|
|
2338
|
+
|
|
2339
|
+
# List folders
|
|
2340
|
+
# Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
|
|
2341
|
+
# @param [Hash] opts the optional parameters
|
|
2342
|
+
# @option opts [String] :parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
2343
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2344
|
+
# @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.
|
|
2345
|
+
# @return [FolderList]
|
|
2346
|
+
def list_folders(opts = {})
|
|
2347
|
+
data, _status_code, _headers = list_folders_with_http_info(opts)
|
|
2097
2348
|
data
|
|
2098
2349
|
end
|
|
2099
2350
|
|
|
2100
|
-
#
|
|
2101
|
-
# Returns
|
|
2351
|
+
# List folders
|
|
2352
|
+
# 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
2353
|
# @param [Hash] opts the optional parameters
|
|
2103
|
-
# @option opts [String] :parent_folder_id
|
|
2104
|
-
# @
|
|
2354
|
+
# @option opts [String] :parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
|
|
2355
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2356
|
+
# @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.
|
|
2357
|
+
# @return [Array<(FolderList, Integer, Hash)>] FolderList data, response status code and response headers
|
|
2105
2358
|
def list_folders_with_http_info(opts = {})
|
|
2106
2359
|
if @api_client.config.debugging
|
|
2107
2360
|
@api_client.config.logger.debug 'Calling API: Client.list_folders ...'
|
|
2108
2361
|
end
|
|
2109
2362
|
# resource path
|
|
2110
|
-
local_var_path = '/folders
|
|
2363
|
+
local_var_path = '/folders'
|
|
2111
2364
|
|
|
2112
2365
|
# query parameters
|
|
2113
2366
|
query_params = opts[:query_params] || {}
|
|
2114
2367
|
query_params[:'parent_folder_id'] = opts[:'parent_folder_id'] if !opts[:'parent_folder_id'].nil?
|
|
2368
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2369
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2115
2370
|
|
|
2116
2371
|
# header parameters
|
|
2117
2372
|
header_params = opts[:header_params] || {}
|
|
@@ -2125,7 +2380,7 @@ end
|
|
|
2125
2380
|
post_body = opts[:debug_body]
|
|
2126
2381
|
|
|
2127
2382
|
# return_type
|
|
2128
|
-
return_type = opts[:debug_return_type] || '
|
|
2383
|
+
return_type = opts[:debug_return_type] || 'FolderList'
|
|
2129
2384
|
|
|
2130
2385
|
# auth_names
|
|
2131
2386
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2147,31 +2402,33 @@ end
|
|
|
2147
2402
|
return data, status_code, headers
|
|
2148
2403
|
end
|
|
2149
2404
|
|
|
2150
|
-
# List
|
|
2151
|
-
# Returns
|
|
2405
|
+
# List submissions
|
|
2406
|
+
# 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
2407
|
# @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
|
-
# @
|
|
2408
|
+
# @option opts [String] :template_id Only list this template's submissions.
|
|
2409
|
+
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
2410
|
+
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
2411
|
+
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
2412
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
2413
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2414
|
+
# @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.
|
|
2415
|
+
# @return [SubmissionList]
|
|
2160
2416
|
def list_submissions(opts = {})
|
|
2161
2417
|
data, _status_code, _headers = list_submissions_with_http_info(opts)
|
|
2162
2418
|
data
|
|
2163
2419
|
end
|
|
2164
2420
|
|
|
2165
|
-
# List
|
|
2166
|
-
# Returns
|
|
2421
|
+
# List submissions
|
|
2422
|
+
# 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
2423
|
# @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
|
-
# @
|
|
2424
|
+
# @option opts [String] :template_id Only list this template's submissions.
|
|
2425
|
+
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
2426
|
+
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
2427
|
+
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
2428
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
2429
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2430
|
+
# @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.
|
|
2431
|
+
# @return [Array<(SubmissionList, Integer, Hash)>] SubmissionList data, response status code and response headers
|
|
2175
2432
|
def list_submissions_with_http_info(opts = {})
|
|
2176
2433
|
if @api_client.config.debugging
|
|
2177
2434
|
@api_client.config.logger.debug 'Calling API: Client.list_submissions ...'
|
|
@@ -2181,12 +2438,13 @@ end
|
|
|
2181
2438
|
|
|
2182
2439
|
# query parameters
|
|
2183
2440
|
query_params = opts[:query_params] || {}
|
|
2184
|
-
query_params[:'
|
|
2185
|
-
query_params[:'
|
|
2441
|
+
query_params[:'template_id'] = opts[:'template_id'] if !opts[:'template_id'].nil?
|
|
2442
|
+
query_params[:'test'] = opts[:'test'] if !opts[:'test'].nil?
|
|
2186
2443
|
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
|
2187
2444
|
query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
|
2188
|
-
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
2189
2445
|
query_params[:'include_data'] = opts[:'include_data'] if !opts[:'include_data'].nil?
|
|
2446
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2447
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2190
2448
|
|
|
2191
2449
|
# header parameters
|
|
2192
2450
|
header_params = opts[:header_params] || {}
|
|
@@ -2200,7 +2458,7 @@ end
|
|
|
2200
2458
|
post_body = opts[:debug_body]
|
|
2201
2459
|
|
|
2202
2460
|
# return_type
|
|
2203
|
-
return_type = opts[:debug_return_type] || '
|
|
2461
|
+
return_type = opts[:debug_return_type] || 'SubmissionList'
|
|
2204
2462
|
|
|
2205
2463
|
# auth_names
|
|
2206
2464
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2222,33 +2480,99 @@ end
|
|
|
2222
2480
|
return data, status_code, headers
|
|
2223
2481
|
end
|
|
2224
2482
|
|
|
2225
|
-
# List
|
|
2226
|
-
# Returns a
|
|
2227
|
-
# @param template_id [String]
|
|
2483
|
+
# List a template's fields
|
|
2484
|
+
# Returns a template's fields with all of their settings, page by page: the draft's fields, or a published version's. A PDF template's fields are placed on its pages: GET /templates/{template_id}/page_images has images of the pages.
|
|
2485
|
+
# @param template_id [String] The template's ID.
|
|
2486
|
+
# @param [Hash] opts the optional parameters
|
|
2487
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2488
|
+
# @return [TemplateFields]
|
|
2489
|
+
def list_template_fields(template_id, opts = {})
|
|
2490
|
+
data, _status_code, _headers = list_template_fields_with_http_info(template_id, opts)
|
|
2491
|
+
data
|
|
2492
|
+
end
|
|
2493
|
+
|
|
2494
|
+
# List a template's fields
|
|
2495
|
+
# Returns a template's fields with all of their settings, page by page: the draft's fields, or a published version's. A PDF template's fields are placed on its pages: GET /templates/{template_id}/page_images has images of the pages.
|
|
2496
|
+
# @param template_id [String] The template's ID.
|
|
2497
|
+
# @param [Hash] opts the optional parameters
|
|
2498
|
+
# @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
|
|
2499
|
+
# @return [Array<(TemplateFields, Integer, Hash)>] TemplateFields data, response status code and response headers
|
|
2500
|
+
def list_template_fields_with_http_info(template_id, opts = {})
|
|
2501
|
+
if @api_client.config.debugging
|
|
2502
|
+
@api_client.config.logger.debug 'Calling API: Client.list_template_fields ...'
|
|
2503
|
+
end
|
|
2504
|
+
# verify the required parameter 'template_id' is set
|
|
2505
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
2506
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.list_template_fields"
|
|
2507
|
+
end
|
|
2508
|
+
# resource path
|
|
2509
|
+
local_var_path = '/templates/{template_id}/fields'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
2510
|
+
|
|
2511
|
+
# query parameters
|
|
2512
|
+
query_params = opts[:query_params] || {}
|
|
2513
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
2514
|
+
|
|
2515
|
+
# header parameters
|
|
2516
|
+
header_params = opts[:header_params] || {}
|
|
2517
|
+
# HTTP header 'Accept' (if needed)
|
|
2518
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2519
|
+
|
|
2520
|
+
# form parameters
|
|
2521
|
+
form_params = opts[:form_params] || {}
|
|
2522
|
+
|
|
2523
|
+
# http body (model)
|
|
2524
|
+
post_body = opts[:debug_body]
|
|
2525
|
+
|
|
2526
|
+
# return_type
|
|
2527
|
+
return_type = opts[:debug_return_type] || 'TemplateFields'
|
|
2528
|
+
|
|
2529
|
+
# auth_names
|
|
2530
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2531
|
+
|
|
2532
|
+
new_options = opts.merge(
|
|
2533
|
+
:operation => :"Client.list_template_fields",
|
|
2534
|
+
:header_params => header_params,
|
|
2535
|
+
:query_params => query_params,
|
|
2536
|
+
:form_params => form_params,
|
|
2537
|
+
:body => post_body,
|
|
2538
|
+
:auth_names => auth_names,
|
|
2539
|
+
:return_type => return_type
|
|
2540
|
+
)
|
|
2541
|
+
|
|
2542
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2543
|
+
if @api_client.config.debugging
|
|
2544
|
+
@api_client.config.logger.debug "API called: Client#list_template_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2545
|
+
end
|
|
2546
|
+
return data, status_code, headers
|
|
2547
|
+
end
|
|
2548
|
+
|
|
2549
|
+
# List a template's submissions
|
|
2550
|
+
# Returns a template's submissions (from every version of the template), newest first.
|
|
2551
|
+
# @param template_id [String] The template's ID.
|
|
2228
2552
|
# @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 [
|
|
2553
|
+
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
2554
|
+
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
2555
|
+
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
2556
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
2557
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2558
|
+
# @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.
|
|
2559
|
+
# @return [SubmissionList]
|
|
2236
2560
|
def list_template_submissions(template_id, opts = {})
|
|
2237
2561
|
data, _status_code, _headers = list_template_submissions_with_http_info(template_id, opts)
|
|
2238
2562
|
data
|
|
2239
2563
|
end
|
|
2240
2564
|
|
|
2241
|
-
# List
|
|
2242
|
-
# Returns a
|
|
2243
|
-
# @param template_id [String]
|
|
2565
|
+
# List a template's submissions
|
|
2566
|
+
# Returns a template's submissions (from every version of the template), newest first.
|
|
2567
|
+
# @param template_id [String] The template's ID.
|
|
2244
2568
|
# @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<(
|
|
2569
|
+
# @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
|
|
2570
|
+
# @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
|
|
2571
|
+
# @option opts [Time] :created_before Only list submissions created before this time.
|
|
2572
|
+
# @option opts [Boolean] :include_data Include each submission's `data` (null without it).
|
|
2573
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2574
|
+
# @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.
|
|
2575
|
+
# @return [Array<(SubmissionList, Integer, Hash)>] SubmissionList data, response status code and response headers
|
|
2252
2576
|
def list_template_submissions_with_http_info(template_id, opts = {})
|
|
2253
2577
|
if @api_client.config.debugging
|
|
2254
2578
|
@api_client.config.logger.debug 'Calling API: Client.list_template_submissions ...'
|
|
@@ -2258,16 +2582,16 @@ end
|
|
|
2258
2582
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.list_template_submissions"
|
|
2259
2583
|
end
|
|
2260
2584
|
# resource path
|
|
2261
|
-
local_var_path = '/templates/{template_id}/submissions'.sub('{
|
|
2585
|
+
local_var_path = '/templates/{template_id}/submissions'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
2262
2586
|
|
|
2263
2587
|
# query parameters
|
|
2264
2588
|
query_params = opts[:query_params] || {}
|
|
2265
|
-
query_params[:'
|
|
2266
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2589
|
+
query_params[:'test'] = opts[:'test'] if !opts[:'test'].nil?
|
|
2267
2590
|
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
|
2268
2591
|
query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
|
2269
|
-
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
2270
2592
|
query_params[:'include_data'] = opts[:'include_data'] if !opts[:'include_data'].nil?
|
|
2593
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2594
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2271
2595
|
|
|
2272
2596
|
# header parameters
|
|
2273
2597
|
header_params = opts[:header_params] || {}
|
|
@@ -2281,7 +2605,7 @@ end
|
|
|
2281
2605
|
post_body = opts[:debug_body]
|
|
2282
2606
|
|
|
2283
2607
|
# return_type
|
|
2284
|
-
return_type = opts[:debug_return_type] || '
|
|
2608
|
+
return_type = opts[:debug_return_type] || 'SubmissionList'
|
|
2285
2609
|
|
|
2286
2610
|
# auth_names
|
|
2287
2611
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2303,43 +2627,31 @@ end
|
|
|
2303
2627
|
return data, status_code, headers
|
|
2304
2628
|
end
|
|
2305
2629
|
|
|
2306
|
-
#
|
|
2307
|
-
#
|
|
2630
|
+
# List templates
|
|
2631
|
+
# 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
2632
|
# @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 [
|
|
2633
|
+
# @option opts [String] :query Only list templates whose name contains this text (ignoring case).
|
|
2634
|
+
# @option opts [String] :parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
2635
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2636
|
+
# @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.
|
|
2637
|
+
# @return [TemplateSummaryList]
|
|
2314
2638
|
def list_templates(opts = {})
|
|
2315
2639
|
data, _status_code, _headers = list_templates_with_http_info(opts)
|
|
2316
2640
|
data
|
|
2317
2641
|
end
|
|
2318
2642
|
|
|
2319
|
-
#
|
|
2320
|
-
#
|
|
2643
|
+
# List templates
|
|
2644
|
+
# 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
2645
|
# @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<(
|
|
2646
|
+
# @option opts [String] :query Only list templates whose name contains this text (ignoring case).
|
|
2647
|
+
# @option opts [String] :parent_folder_id Only list the templates in this folder (not in its subfolders).
|
|
2648
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2649
|
+
# @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.
|
|
2650
|
+
# @return [Array<(TemplateSummaryList, Integer, Hash)>] TemplateSummaryList data, response status code and response headers
|
|
2327
2651
|
def list_templates_with_http_info(opts = {})
|
|
2328
2652
|
if @api_client.config.debugging
|
|
2329
2653
|
@api_client.config.logger.debug 'Calling API: Client.list_templates ...'
|
|
2330
2654
|
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
2655
|
# resource path
|
|
2344
2656
|
local_var_path = '/templates'
|
|
2345
2657
|
|
|
@@ -2347,8 +2659,8 @@ end
|
|
|
2347
2659
|
query_params = opts[:query_params] || {}
|
|
2348
2660
|
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
|
2349
2661
|
query_params[:'parent_folder_id'] = opts[:'parent_folder_id'] if !opts[:'parent_folder_id'].nil?
|
|
2350
|
-
query_params[:'
|
|
2351
|
-
query_params[:'
|
|
2662
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2663
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2352
2664
|
|
|
2353
2665
|
# header parameters
|
|
2354
2666
|
header_params = opts[:header_params] || {}
|
|
@@ -2362,7 +2674,7 @@ end
|
|
|
2362
2674
|
post_body = opts[:debug_body]
|
|
2363
2675
|
|
|
2364
2676
|
# return_type
|
|
2365
|
-
return_type = opts[:debug_return_type] || '
|
|
2677
|
+
return_type = opts[:debug_return_type] || 'TemplateSummaryList'
|
|
2366
2678
|
|
|
2367
2679
|
# auth_names
|
|
2368
2680
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2384,61 +2696,49 @@ end
|
|
|
2384
2696
|
return data, status_code, headers
|
|
2385
2697
|
end
|
|
2386
2698
|
|
|
2387
|
-
#
|
|
2388
|
-
# Returns
|
|
2699
|
+
# List webhooks
|
|
2700
|
+
# 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
2701
|
# @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 [
|
|
2702
|
+
# @option opts [WebhookEventType] :event_type Only list webhooks that subscribe to this event.
|
|
2703
|
+
# @option opts [WebhookMode] :mode Only list webhooks set to this mode.
|
|
2704
|
+
# @option opts [String] :template_id Only list webhooks scoped to this template.
|
|
2705
|
+
# @option opts [String] :folder_id Only list webhooks scoped to this folder.
|
|
2706
|
+
# @option opts [String] :api_token_id Only list webhooks scoped to this API token.
|
|
2707
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2708
|
+
# @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.
|
|
2709
|
+
# @return [WebhookList]
|
|
2398
2710
|
def list_webhooks(opts = {})
|
|
2399
2711
|
data, _status_code, _headers = list_webhooks_with_http_info(opts)
|
|
2400
2712
|
data
|
|
2401
2713
|
end
|
|
2402
2714
|
|
|
2403
|
-
#
|
|
2404
|
-
# Returns
|
|
2715
|
+
# List webhooks
|
|
2716
|
+
# 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
2717
|
# @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<(
|
|
2718
|
+
# @option opts [WebhookEventType] :event_type Only list webhooks that subscribe to this event.
|
|
2719
|
+
# @option opts [WebhookMode] :mode Only list webhooks set to this mode.
|
|
2720
|
+
# @option opts [String] :template_id Only list webhooks scoped to this template.
|
|
2721
|
+
# @option opts [String] :folder_id Only list webhooks scoped to this folder.
|
|
2722
|
+
# @option opts [String] :api_token_id Only list webhooks scoped to this API token.
|
|
2723
|
+
# @option opts [Integer] :limit How many items to return (1-100, default 50). (default to 50)
|
|
2724
|
+
# @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.
|
|
2725
|
+
# @return [Array<(WebhookList, Integer, Hash)>] WebhookList data, response status code and response headers
|
|
2414
2726
|
def list_webhooks_with_http_info(opts = {})
|
|
2415
2727
|
if @api_client.config.debugging
|
|
2416
2728
|
@api_client.config.logger.debug 'Calling API: Client.list_webhooks ...'
|
|
2417
2729
|
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
2730
|
# resource path
|
|
2431
2731
|
local_var_path = '/webhooks'
|
|
2432
2732
|
|
|
2433
2733
|
# query parameters
|
|
2434
2734
|
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
2735
|
query_params[:'event_type'] = opts[:'event_type'] if !opts[:'event_type'].nil?
|
|
2438
2736
|
query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?
|
|
2439
2737
|
query_params[:'template_id'] = opts[:'template_id'] if !opts[:'template_id'].nil?
|
|
2440
2738
|
query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil?
|
|
2441
2739
|
query_params[:'api_token_id'] = opts[:'api_token_id'] if !opts[:'api_token_id'].nil?
|
|
2740
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2741
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2442
2742
|
|
|
2443
2743
|
# header parameters
|
|
2444
2744
|
header_params = opts[:header_params] || {}
|
|
@@ -2452,7 +2752,7 @@ end
|
|
|
2452
2752
|
post_body = opts[:debug_body]
|
|
2453
2753
|
|
|
2454
2754
|
# return_type
|
|
2455
|
-
return_type = opts[:debug_return_type] || '
|
|
2755
|
+
return_type = opts[:debug_return_type] || 'WebhookList'
|
|
2456
2756
|
|
|
2457
2757
|
# auth_names
|
|
2458
2758
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2475,36 +2775,36 @@ end
|
|
|
2475
2775
|
end
|
|
2476
2776
|
|
|
2477
2777
|
# Move a folder
|
|
2478
|
-
# Moves a folder
|
|
2479
|
-
# @param folder_id [String]
|
|
2480
|
-
# @param
|
|
2778
|
+
# 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.
|
|
2779
|
+
# @param folder_id [String] The folder's ID.
|
|
2780
|
+
# @param body [MoveFolderRequest] Where to move the folder.
|
|
2481
2781
|
# @param [Hash] opts the optional parameters
|
|
2482
2782
|
# @return [Folder]
|
|
2483
|
-
def
|
|
2484
|
-
data, _status_code, _headers =
|
|
2783
|
+
def move_folder(folder_id, body, opts = {})
|
|
2784
|
+
data, _status_code, _headers = move_folder_with_http_info(folder_id, body, opts)
|
|
2485
2785
|
data
|
|
2486
2786
|
end
|
|
2487
2787
|
|
|
2488
2788
|
# Move a folder
|
|
2489
|
-
# Moves a folder
|
|
2490
|
-
# @param folder_id [String]
|
|
2491
|
-
# @param
|
|
2789
|
+
# 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.
|
|
2790
|
+
# @param folder_id [String] The folder's ID.
|
|
2791
|
+
# @param body [MoveFolderRequest] Where to move the folder.
|
|
2492
2792
|
# @param [Hash] opts the optional parameters
|
|
2493
2793
|
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
2494
|
-
def
|
|
2794
|
+
def move_folder_with_http_info(folder_id, body, opts = {})
|
|
2495
2795
|
if @api_client.config.debugging
|
|
2496
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
2796
|
+
@api_client.config.logger.debug 'Calling API: Client.move_folder ...'
|
|
2497
2797
|
end
|
|
2498
2798
|
# verify the required parameter 'folder_id' is set
|
|
2499
2799
|
if @api_client.config.client_side_validation && folder_id.nil?
|
|
2500
|
-
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.
|
|
2800
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.move_folder"
|
|
2501
2801
|
end
|
|
2502
|
-
# verify the required parameter '
|
|
2503
|
-
if @api_client.config.client_side_validation &&
|
|
2504
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2802
|
+
# verify the required parameter 'body' is set
|
|
2803
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2804
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.move_folder"
|
|
2505
2805
|
end
|
|
2506
2806
|
# resource path
|
|
2507
|
-
local_var_path = '/folders/{folder_id}/move'.sub('{
|
|
2807
|
+
local_var_path = '/folders/{folder_id}/move'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
2508
2808
|
|
|
2509
2809
|
# query parameters
|
|
2510
2810
|
query_params = opts[:query_params] || {}
|
|
@@ -2523,7 +2823,7 @@ end
|
|
|
2523
2823
|
form_params = opts[:form_params] || {}
|
|
2524
2824
|
|
|
2525
2825
|
# http body (model)
|
|
2526
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
2826
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2527
2827
|
|
|
2528
2828
|
# return_type
|
|
2529
2829
|
return_type = opts[:debug_return_type] || 'Folder'
|
|
@@ -2532,7 +2832,7 @@ end
|
|
|
2532
2832
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2533
2833
|
|
|
2534
2834
|
new_options = opts.merge(
|
|
2535
|
-
:operation => :"Client.
|
|
2835
|
+
:operation => :"Client.move_folder",
|
|
2536
2836
|
:header_params => header_params,
|
|
2537
2837
|
:query_params => query_params,
|
|
2538
2838
|
:form_params => form_params,
|
|
@@ -2543,42 +2843,42 @@ end
|
|
|
2543
2843
|
|
|
2544
2844
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2545
2845
|
if @api_client.config.debugging
|
|
2546
|
-
@api_client.config.logger.debug "API called: Client#
|
|
2846
|
+
@api_client.config.logger.debug "API called: Client#move_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2547
2847
|
end
|
|
2548
2848
|
return data, status_code, headers
|
|
2549
2849
|
end
|
|
2550
2850
|
|
|
2551
|
-
# Move
|
|
2552
|
-
# Moves a template
|
|
2553
|
-
# @param template_id [String]
|
|
2554
|
-
# @param
|
|
2851
|
+
# Move a template to a folder
|
|
2852
|
+
# Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
2853
|
+
# @param template_id [String] The template's ID.
|
|
2854
|
+
# @param body [MoveTemplateRequest] Where to move the template.
|
|
2555
2855
|
# @param [Hash] opts the optional parameters
|
|
2556
|
-
# @return [
|
|
2557
|
-
def
|
|
2558
|
-
data, _status_code, _headers =
|
|
2856
|
+
# @return [Template]
|
|
2857
|
+
def move_template(template_id, body, opts = {})
|
|
2858
|
+
data, _status_code, _headers = move_template_with_http_info(template_id, body, opts)
|
|
2559
2859
|
data
|
|
2560
2860
|
end
|
|
2561
2861
|
|
|
2562
|
-
# Move
|
|
2563
|
-
# Moves a template
|
|
2564
|
-
# @param template_id [String]
|
|
2565
|
-
# @param
|
|
2862
|
+
# Move a template to a folder
|
|
2863
|
+
# Moves a template and all of its published versions to a folder, or to the root (`null`).
|
|
2864
|
+
# @param template_id [String] The template's ID.
|
|
2865
|
+
# @param body [MoveTemplateRequest] Where to move the template.
|
|
2566
2866
|
# @param [Hash] opts the optional parameters
|
|
2567
|
-
# @return [Array<(
|
|
2568
|
-
def
|
|
2867
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
2868
|
+
def move_template_with_http_info(template_id, body, opts = {})
|
|
2569
2869
|
if @api_client.config.debugging
|
|
2570
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
2870
|
+
@api_client.config.logger.debug 'Calling API: Client.move_template ...'
|
|
2571
2871
|
end
|
|
2572
2872
|
# verify the required parameter 'template_id' is set
|
|
2573
2873
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
2574
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.
|
|
2874
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.move_template"
|
|
2575
2875
|
end
|
|
2576
|
-
# verify the required parameter '
|
|
2577
|
-
if @api_client.config.client_side_validation &&
|
|
2578
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2876
|
+
# verify the required parameter 'body' is set
|
|
2877
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2878
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.move_template"
|
|
2579
2879
|
end
|
|
2580
2880
|
# resource path
|
|
2581
|
-
local_var_path = '/templates/{template_id}/move'.sub('{
|
|
2881
|
+
local_var_path = '/templates/{template_id}/move'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
2582
2882
|
|
|
2583
2883
|
# query parameters
|
|
2584
2884
|
query_params = opts[:query_params] || {}
|
|
@@ -2597,16 +2897,16 @@ end
|
|
|
2597
2897
|
form_params = opts[:form_params] || {}
|
|
2598
2898
|
|
|
2599
2899
|
# http body (model)
|
|
2600
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
2900
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2601
2901
|
|
|
2602
2902
|
# return_type
|
|
2603
|
-
return_type = opts[:debug_return_type] || '
|
|
2903
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
2604
2904
|
|
|
2605
2905
|
# auth_names
|
|
2606
2906
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2607
2907
|
|
|
2608
2908
|
new_options = opts.merge(
|
|
2609
|
-
:operation => :"Client.
|
|
2909
|
+
:operation => :"Client.move_template",
|
|
2610
2910
|
:header_params => header_params,
|
|
2611
2911
|
:query_params => query_params,
|
|
2612
2912
|
:form_params => form_params,
|
|
@@ -2617,29 +2917,29 @@ end
|
|
|
2617
2917
|
|
|
2618
2918
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2619
2919
|
if @api_client.config.debugging
|
|
2620
|
-
@api_client.config.logger.debug "API called: Client#
|
|
2920
|
+
@api_client.config.logger.debug "API called: Client#move_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2621
2921
|
end
|
|
2622
2922
|
return data, status_code, headers
|
|
2623
2923
|
end
|
|
2624
2924
|
|
|
2625
2925
|
# Publish a template version
|
|
2626
|
-
# Publishes the
|
|
2627
|
-
# @param template_id [String]
|
|
2628
|
-
# @param
|
|
2926
|
+
# Publishes the template's draft as a new version that doesn't change. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
|
|
2927
|
+
# @param template_id [String] The template's ID.
|
|
2928
|
+
# @param body [PublishTemplateVersionRequest] The version to publish.
|
|
2629
2929
|
# @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,
|
|
2930
|
+
# @return [TemplateVersion]
|
|
2931
|
+
def publish_template_version(template_id, body, opts = {})
|
|
2932
|
+
data, _status_code, _headers = publish_template_version_with_http_info(template_id, body, opts)
|
|
2633
2933
|
data
|
|
2634
2934
|
end
|
|
2635
2935
|
|
|
2636
2936
|
# Publish a template version
|
|
2637
|
-
# Publishes the
|
|
2638
|
-
# @param template_id [String]
|
|
2639
|
-
# @param
|
|
2937
|
+
# Publishes the template's draft as a new version that doesn't change. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
|
|
2938
|
+
# @param template_id [String] The template's ID.
|
|
2939
|
+
# @param body [PublishTemplateVersionRequest] The version to publish.
|
|
2640
2940
|
# @param [Hash] opts the optional parameters
|
|
2641
|
-
# @return [Array<(
|
|
2642
|
-
def publish_template_version_with_http_info(template_id,
|
|
2941
|
+
# @return [Array<(TemplateVersion, Integer, Hash)>] TemplateVersion data, response status code and response headers
|
|
2942
|
+
def publish_template_version_with_http_info(template_id, body, opts = {})
|
|
2643
2943
|
if @api_client.config.debugging
|
|
2644
2944
|
@api_client.config.logger.debug 'Calling API: Client.publish_template_version ...'
|
|
2645
2945
|
end
|
|
@@ -2647,12 +2947,12 @@ end
|
|
|
2647
2947
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
2648
2948
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.publish_template_version"
|
|
2649
2949
|
end
|
|
2650
|
-
# verify the required parameter '
|
|
2651
|
-
if @api_client.config.client_side_validation &&
|
|
2652
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2950
|
+
# verify the required parameter 'body' is set
|
|
2951
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
2952
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.publish_template_version"
|
|
2653
2953
|
end
|
|
2654
2954
|
# resource path
|
|
2655
|
-
local_var_path = '/templates/{template_id}/publish_version'.sub('{
|
|
2955
|
+
local_var_path = '/templates/{template_id}/publish_version'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
2656
2956
|
|
|
2657
2957
|
# query parameters
|
|
2658
2958
|
query_params = opts[:query_params] || {}
|
|
@@ -2671,10 +2971,10 @@ end
|
|
|
2671
2971
|
form_params = opts[:form_params] || {}
|
|
2672
2972
|
|
|
2673
2973
|
# http body (model)
|
|
2674
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
2974
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2675
2975
|
|
|
2676
2976
|
# return_type
|
|
2677
|
-
return_type = opts[:debug_return_type] || '
|
|
2977
|
+
return_type = opts[:debug_return_type] || 'TemplateVersion'
|
|
2678
2978
|
|
|
2679
2979
|
# auth_names
|
|
2680
2980
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2696,24 +2996,98 @@ end
|
|
|
2696
2996
|
return data, status_code, headers
|
|
2697
2997
|
end
|
|
2698
2998
|
|
|
2999
|
+
# Remove fields from a template
|
|
3000
|
+
# Removes fields from a template's draft and returns the fields that are left. Conditional logic that used only the removed fields is removed too.
|
|
3001
|
+
# @param template_id [String] The template's ID.
|
|
3002
|
+
# @param body [RemoveTemplateFieldsRequest] The fields to remove from the template's draft.
|
|
3003
|
+
# @param [Hash] opts the optional parameters
|
|
3004
|
+
# @return [TemplateFields]
|
|
3005
|
+
def remove_template_fields(template_id, body, opts = {})
|
|
3006
|
+
data, _status_code, _headers = remove_template_fields_with_http_info(template_id, body, opts)
|
|
3007
|
+
data
|
|
3008
|
+
end
|
|
3009
|
+
|
|
3010
|
+
# Remove fields from a template
|
|
3011
|
+
# Removes fields from a template's draft and returns the fields that are left. Conditional logic that used only the removed fields is removed too.
|
|
3012
|
+
# @param template_id [String] The template's ID.
|
|
3013
|
+
# @param body [RemoveTemplateFieldsRequest] The fields to remove from the template's draft.
|
|
3014
|
+
# @param [Hash] opts the optional parameters
|
|
3015
|
+
# @return [Array<(TemplateFields, Integer, Hash)>] TemplateFields data, response status code and response headers
|
|
3016
|
+
def remove_template_fields_with_http_info(template_id, body, opts = {})
|
|
3017
|
+
if @api_client.config.debugging
|
|
3018
|
+
@api_client.config.logger.debug 'Calling API: Client.remove_template_fields ...'
|
|
3019
|
+
end
|
|
3020
|
+
# verify the required parameter 'template_id' is set
|
|
3021
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
3022
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.remove_template_fields"
|
|
3023
|
+
end
|
|
3024
|
+
# verify the required parameter 'body' is set
|
|
3025
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3026
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.remove_template_fields"
|
|
3027
|
+
end
|
|
3028
|
+
# resource path
|
|
3029
|
+
local_var_path = '/templates/{template_id}/fields/remove'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
3030
|
+
|
|
3031
|
+
# query parameters
|
|
3032
|
+
query_params = opts[:query_params] || {}
|
|
3033
|
+
|
|
3034
|
+
# header parameters
|
|
3035
|
+
header_params = opts[:header_params] || {}
|
|
3036
|
+
# HTTP header 'Accept' (if needed)
|
|
3037
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3038
|
+
# HTTP header 'Content-Type'
|
|
3039
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3040
|
+
if !content_type.nil?
|
|
3041
|
+
header_params['Content-Type'] = content_type
|
|
3042
|
+
end
|
|
3043
|
+
|
|
3044
|
+
# form parameters
|
|
3045
|
+
form_params = opts[:form_params] || {}
|
|
3046
|
+
|
|
3047
|
+
# http body (model)
|
|
3048
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3049
|
+
|
|
3050
|
+
# return_type
|
|
3051
|
+
return_type = opts[:debug_return_type] || 'TemplateFields'
|
|
3052
|
+
|
|
3053
|
+
# auth_names
|
|
3054
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3055
|
+
|
|
3056
|
+
new_options = opts.merge(
|
|
3057
|
+
:operation => :"Client.remove_template_fields",
|
|
3058
|
+
:header_params => header_params,
|
|
3059
|
+
:query_params => query_params,
|
|
3060
|
+
:form_params => form_params,
|
|
3061
|
+
:body => post_body,
|
|
3062
|
+
:auth_names => auth_names,
|
|
3063
|
+
:return_type => return_type
|
|
3064
|
+
)
|
|
3065
|
+
|
|
3066
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3067
|
+
if @api_client.config.debugging
|
|
3068
|
+
@api_client.config.logger.debug "API called: Client#remove_template_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3069
|
+
end
|
|
3070
|
+
return data, status_code, headers
|
|
3071
|
+
end
|
|
3072
|
+
|
|
2699
3073
|
# Rename a folder
|
|
2700
|
-
# Renames
|
|
2701
|
-
# @param folder_id [String]
|
|
2702
|
-
# @param
|
|
3074
|
+
# Renames a folder. The name must be unique within its parent folder.
|
|
3075
|
+
# @param folder_id [String] The folder's ID.
|
|
3076
|
+
# @param body [RenameFolderRequest] The folder's new name.
|
|
2703
3077
|
# @param [Hash] opts the optional parameters
|
|
2704
3078
|
# @return [Folder]
|
|
2705
|
-
def rename_folder(folder_id,
|
|
2706
|
-
data, _status_code, _headers = rename_folder_with_http_info(folder_id,
|
|
3079
|
+
def rename_folder(folder_id, body, opts = {})
|
|
3080
|
+
data, _status_code, _headers = rename_folder_with_http_info(folder_id, body, opts)
|
|
2707
3081
|
data
|
|
2708
3082
|
end
|
|
2709
3083
|
|
|
2710
3084
|
# Rename a folder
|
|
2711
|
-
# Renames
|
|
2712
|
-
# @param folder_id [String]
|
|
2713
|
-
# @param
|
|
3085
|
+
# Renames a folder. The name must be unique within its parent folder.
|
|
3086
|
+
# @param folder_id [String] The folder's ID.
|
|
3087
|
+
# @param body [RenameFolderRequest] The folder's new name.
|
|
2714
3088
|
# @param [Hash] opts the optional parameters
|
|
2715
3089
|
# @return [Array<(Folder, Integer, Hash)>] Folder data, response status code and response headers
|
|
2716
|
-
def rename_folder_with_http_info(folder_id,
|
|
3090
|
+
def rename_folder_with_http_info(folder_id, body, opts = {})
|
|
2717
3091
|
if @api_client.config.debugging
|
|
2718
3092
|
@api_client.config.logger.debug 'Calling API: Client.rename_folder ...'
|
|
2719
3093
|
end
|
|
@@ -2721,12 +3095,12 @@ end
|
|
|
2721
3095
|
if @api_client.config.client_side_validation && folder_id.nil?
|
|
2722
3096
|
fail ArgumentError, "Missing the required parameter 'folder_id' when calling Client.rename_folder"
|
|
2723
3097
|
end
|
|
2724
|
-
# verify the required parameter '
|
|
2725
|
-
if @api_client.config.client_side_validation &&
|
|
2726
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3098
|
+
# verify the required parameter 'body' is set
|
|
3099
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3100
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.rename_folder"
|
|
2727
3101
|
end
|
|
2728
3102
|
# resource path
|
|
2729
|
-
local_var_path = '/folders/{folder_id}/rename'.sub('{
|
|
3103
|
+
local_var_path = '/folders/{folder_id}/rename'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
2730
3104
|
|
|
2731
3105
|
# query parameters
|
|
2732
3106
|
query_params = opts[:query_params] || {}
|
|
@@ -2745,7 +3119,7 @@ end
|
|
|
2745
3119
|
form_params = opts[:form_params] || {}
|
|
2746
3120
|
|
|
2747
3121
|
# http body (model)
|
|
2748
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
3122
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2749
3123
|
|
|
2750
3124
|
# return_type
|
|
2751
3125
|
return_type = opts[:debug_return_type] || 'Folder'
|
|
@@ -2770,24 +3144,98 @@ end
|
|
|
2770
3144
|
return data, status_code, headers
|
|
2771
3145
|
end
|
|
2772
3146
|
|
|
3147
|
+
# Reorder a template's fields
|
|
3148
|
+
# Changes the order of the fields in a template's draft and returns them in their new order. Send every field's ID: each field stays on its page, and a page's fields are printed in this order, so a later field prints over an earlier one where they overlap. Their values are in this order in the template's data schema and forms.
|
|
3149
|
+
# @param template_id [String] The template's ID.
|
|
3150
|
+
# @param body [ReorderTemplateFieldsRequest] The new order of the fields in the template's draft.
|
|
3151
|
+
# @param [Hash] opts the optional parameters
|
|
3152
|
+
# @return [TemplateFields]
|
|
3153
|
+
def reorder_template_fields(template_id, body, opts = {})
|
|
3154
|
+
data, _status_code, _headers = reorder_template_fields_with_http_info(template_id, body, opts)
|
|
3155
|
+
data
|
|
3156
|
+
end
|
|
3157
|
+
|
|
3158
|
+
# Reorder a template's fields
|
|
3159
|
+
# Changes the order of the fields in a template's draft and returns them in their new order. Send every field's ID: each field stays on its page, and a page's fields are printed in this order, so a later field prints over an earlier one where they overlap. Their values are in this order in the template's data schema and forms.
|
|
3160
|
+
# @param template_id [String] The template's ID.
|
|
3161
|
+
# @param body [ReorderTemplateFieldsRequest] The new order of the fields in the template's draft.
|
|
3162
|
+
# @param [Hash] opts the optional parameters
|
|
3163
|
+
# @return [Array<(TemplateFields, Integer, Hash)>] TemplateFields data, response status code and response headers
|
|
3164
|
+
def reorder_template_fields_with_http_info(template_id, body, opts = {})
|
|
3165
|
+
if @api_client.config.debugging
|
|
3166
|
+
@api_client.config.logger.debug 'Calling API: Client.reorder_template_fields ...'
|
|
3167
|
+
end
|
|
3168
|
+
# verify the required parameter 'template_id' is set
|
|
3169
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
3170
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.reorder_template_fields"
|
|
3171
|
+
end
|
|
3172
|
+
# verify the required parameter 'body' is set
|
|
3173
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3174
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.reorder_template_fields"
|
|
3175
|
+
end
|
|
3176
|
+
# resource path
|
|
3177
|
+
local_var_path = '/templates/{template_id}/fields/reorder'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
3178
|
+
|
|
3179
|
+
# query parameters
|
|
3180
|
+
query_params = opts[:query_params] || {}
|
|
3181
|
+
|
|
3182
|
+
# header parameters
|
|
3183
|
+
header_params = opts[:header_params] || {}
|
|
3184
|
+
# HTTP header 'Accept' (if needed)
|
|
3185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3186
|
+
# HTTP header 'Content-Type'
|
|
3187
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3188
|
+
if !content_type.nil?
|
|
3189
|
+
header_params['Content-Type'] = content_type
|
|
3190
|
+
end
|
|
3191
|
+
|
|
3192
|
+
# form parameters
|
|
3193
|
+
form_params = opts[:form_params] || {}
|
|
3194
|
+
|
|
3195
|
+
# http body (model)
|
|
3196
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3197
|
+
|
|
3198
|
+
# return_type
|
|
3199
|
+
return_type = opts[:debug_return_type] || 'TemplateFields'
|
|
3200
|
+
|
|
3201
|
+
# auth_names
|
|
3202
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3203
|
+
|
|
3204
|
+
new_options = opts.merge(
|
|
3205
|
+
:operation => :"Client.reorder_template_fields",
|
|
3206
|
+
:header_params => header_params,
|
|
3207
|
+
:query_params => query_params,
|
|
3208
|
+
:form_params => form_params,
|
|
3209
|
+
:body => post_body,
|
|
3210
|
+
:auth_names => auth_names,
|
|
3211
|
+
:return_type => return_type
|
|
3212
|
+
)
|
|
3213
|
+
|
|
3214
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3215
|
+
if @api_client.config.debugging
|
|
3216
|
+
@api_client.config.logger.debug "API called: Client#reorder_template_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3217
|
+
end
|
|
3218
|
+
return data, status_code, headers
|
|
3219
|
+
end
|
|
3220
|
+
|
|
2773
3221
|
# Restore a template version
|
|
2774
|
-
#
|
|
2775
|
-
# @param template_id [String]
|
|
2776
|
-
# @param
|
|
3222
|
+
# Replaces the template's draft with a copy of one of its published versions.
|
|
3223
|
+
# @param template_id [String] The template's ID.
|
|
3224
|
+
# @param body [RestoreTemplateVersionRequest] The version to restore.
|
|
2777
3225
|
# @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,
|
|
3226
|
+
# @return [Template]
|
|
3227
|
+
def restore_template_version(template_id, body, opts = {})
|
|
3228
|
+
data, _status_code, _headers = restore_template_version_with_http_info(template_id, body, opts)
|
|
2781
3229
|
data
|
|
2782
3230
|
end
|
|
2783
3231
|
|
|
2784
3232
|
# Restore a template version
|
|
2785
|
-
#
|
|
2786
|
-
# @param template_id [String]
|
|
2787
|
-
# @param
|
|
3233
|
+
# Replaces the template's draft with a copy of one of its published versions.
|
|
3234
|
+
# @param template_id [String] The template's ID.
|
|
3235
|
+
# @param body [RestoreTemplateVersionRequest] The version to restore.
|
|
2788
3236
|
# @param [Hash] opts the optional parameters
|
|
2789
|
-
# @return [Array<(
|
|
2790
|
-
def restore_template_version_with_http_info(template_id,
|
|
3237
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3238
|
+
def restore_template_version_with_http_info(template_id, body, opts = {})
|
|
2791
3239
|
if @api_client.config.debugging
|
|
2792
3240
|
@api_client.config.logger.debug 'Calling API: Client.restore_template_version ...'
|
|
2793
3241
|
end
|
|
@@ -2795,12 +3243,12 @@ end
|
|
|
2795
3243
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
2796
3244
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.restore_template_version"
|
|
2797
3245
|
end
|
|
2798
|
-
# verify the required parameter '
|
|
2799
|
-
if @api_client.config.client_side_validation &&
|
|
2800
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3246
|
+
# verify the required parameter 'body' is set
|
|
3247
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3248
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.restore_template_version"
|
|
2801
3249
|
end
|
|
2802
3250
|
# resource path
|
|
2803
|
-
local_var_path = '/templates/{template_id}/restore_version'.sub('{
|
|
3251
|
+
local_var_path = '/templates/{template_id}/restore_version'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
2804
3252
|
|
|
2805
3253
|
# query parameters
|
|
2806
3254
|
query_params = opts[:query_params] || {}
|
|
@@ -2819,10 +3267,10 @@ end
|
|
|
2819
3267
|
form_params = opts[:form_params] || {}
|
|
2820
3268
|
|
|
2821
3269
|
# http body (model)
|
|
2822
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
3270
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2823
3271
|
|
|
2824
3272
|
# return_type
|
|
2825
|
-
return_type = opts[:debug_return_type] || '
|
|
3273
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
2826
3274
|
|
|
2827
3275
|
# auth_names
|
|
2828
3276
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2845,18 +3293,18 @@ end
|
|
|
2845
3293
|
end
|
|
2846
3294
|
|
|
2847
3295
|
# Test authentication
|
|
2848
|
-
# Checks whether your API token is valid by making an authenticated request.
|
|
3296
|
+
# 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
3297
|
# @param [Hash] opts the optional parameters
|
|
2850
|
-
# @return [
|
|
3298
|
+
# @return [AuthenticationCheck]
|
|
2851
3299
|
def test_authentication(opts = {})
|
|
2852
3300
|
data, _status_code, _headers = test_authentication_with_http_info(opts)
|
|
2853
3301
|
data
|
|
2854
3302
|
end
|
|
2855
3303
|
|
|
2856
3304
|
# Test authentication
|
|
2857
|
-
# Checks whether your API token is valid by making an authenticated request.
|
|
3305
|
+
# 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
3306
|
# @param [Hash] opts the optional parameters
|
|
2859
|
-
# @return [Array<(
|
|
3307
|
+
# @return [Array<(AuthenticationCheck, Integer, Hash)>] AuthenticationCheck data, response status code and response headers
|
|
2860
3308
|
def test_authentication_with_http_info(opts = {})
|
|
2861
3309
|
if @api_client.config.debugging
|
|
2862
3310
|
@api_client.config.logger.debug 'Calling API: Client.test_authentication ...'
|
|
@@ -2879,7 +3327,7 @@ end
|
|
|
2879
3327
|
post_body = opts[:debug_body]
|
|
2880
3328
|
|
|
2881
3329
|
# return_type
|
|
2882
|
-
return_type = opts[:debug_return_type] || '
|
|
3330
|
+
return_type = opts[:debug_return_type] || 'AuthenticationCheck'
|
|
2883
3331
|
|
|
2884
3332
|
# auth_names
|
|
2885
3333
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -2901,37 +3349,37 @@ end
|
|
|
2901
3349
|
return data, status_code, headers
|
|
2902
3350
|
end
|
|
2903
3351
|
|
|
2904
|
-
# Update a
|
|
2905
|
-
#
|
|
2906
|
-
# @param
|
|
2907
|
-
# @param
|
|
3352
|
+
# Update a signature request
|
|
3353
|
+
# 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.
|
|
3354
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
3355
|
+
# @param body [UpdateSignatureRequestRequest] The settings to change. Properties left out keep their values.
|
|
2908
3356
|
# @param [Hash] opts the optional parameters
|
|
2909
|
-
# @return [
|
|
2910
|
-
def
|
|
2911
|
-
data, _status_code, _headers =
|
|
3357
|
+
# @return [SignatureRequest]
|
|
3358
|
+
def update_signature_request(signature_request_id, body, opts = {})
|
|
3359
|
+
data, _status_code, _headers = update_signature_request_with_http_info(signature_request_id, body, opts)
|
|
2912
3360
|
data
|
|
2913
3361
|
end
|
|
2914
3362
|
|
|
2915
|
-
# Update a
|
|
2916
|
-
#
|
|
2917
|
-
# @param
|
|
2918
|
-
# @param
|
|
3363
|
+
# Update a signature request
|
|
3364
|
+
# 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.
|
|
3365
|
+
# @param signature_request_id [String] The signature request's ID.
|
|
3366
|
+
# @param body [UpdateSignatureRequestRequest] The settings to change. Properties left out keep their values.
|
|
2919
3367
|
# @param [Hash] opts the optional parameters
|
|
2920
|
-
# @return [Array<(
|
|
2921
|
-
def
|
|
3368
|
+
# @return [Array<(SignatureRequest, Integer, Hash)>] SignatureRequest data, response status code and response headers
|
|
3369
|
+
def update_signature_request_with_http_info(signature_request_id, body, opts = {})
|
|
2922
3370
|
if @api_client.config.debugging
|
|
2923
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
3371
|
+
@api_client.config.logger.debug 'Calling API: Client.update_signature_request ...'
|
|
2924
3372
|
end
|
|
2925
|
-
# verify the required parameter '
|
|
2926
|
-
if @api_client.config.client_side_validation &&
|
|
2927
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3373
|
+
# verify the required parameter 'signature_request_id' is set
|
|
3374
|
+
if @api_client.config.client_side_validation && signature_request_id.nil?
|
|
3375
|
+
fail ArgumentError, "Missing the required parameter 'signature_request_id' when calling Client.update_signature_request"
|
|
2928
3376
|
end
|
|
2929
|
-
# verify the required parameter '
|
|
2930
|
-
if @api_client.config.client_side_validation &&
|
|
2931
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3377
|
+
# verify the required parameter 'body' is set
|
|
3378
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3379
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.update_signature_request"
|
|
2932
3380
|
end
|
|
2933
3381
|
# resource path
|
|
2934
|
-
local_var_path = '/
|
|
3382
|
+
local_var_path = '/signature_requests/{signature_request_id}'.sub('{signature_request_id}', CGI.escape(signature_request_id.to_s))
|
|
2935
3383
|
|
|
2936
3384
|
# query parameters
|
|
2937
3385
|
query_params = opts[:query_params] || {}
|
|
@@ -2950,16 +3398,16 @@ end
|
|
|
2950
3398
|
form_params = opts[:form_params] || {}
|
|
2951
3399
|
|
|
2952
3400
|
# http body (model)
|
|
2953
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
3401
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2954
3402
|
|
|
2955
3403
|
# return_type
|
|
2956
|
-
return_type = opts[:debug_return_type] || '
|
|
3404
|
+
return_type = opts[:debug_return_type] || 'SignatureRequest'
|
|
2957
3405
|
|
|
2958
3406
|
# auth_names
|
|
2959
3407
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
2960
3408
|
|
|
2961
3409
|
new_options = opts.merge(
|
|
2962
|
-
:operation => :"Client.
|
|
3410
|
+
:operation => :"Client.update_signature_request",
|
|
2963
3411
|
:header_params => header_params,
|
|
2964
3412
|
:query_params => query_params,
|
|
2965
3413
|
:form_params => form_params,
|
|
@@ -2970,29 +3418,29 @@ end
|
|
|
2970
3418
|
|
|
2971
3419
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2972
3420
|
if @api_client.config.debugging
|
|
2973
|
-
@api_client.config.logger.debug "API called: Client#
|
|
3421
|
+
@api_client.config.logger.debug "API called: Client#update_signature_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2974
3422
|
end
|
|
2975
3423
|
return data, status_code, headers
|
|
2976
3424
|
end
|
|
2977
3425
|
|
|
2978
|
-
# Update a
|
|
2979
|
-
#
|
|
2980
|
-
# @param template_id [String]
|
|
2981
|
-
# @param
|
|
3426
|
+
# Update a template
|
|
3427
|
+
# Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists. Setting `parent_folder_id` moves the template and all of its published versions.
|
|
3428
|
+
# @param template_id [String] The template's ID.
|
|
3429
|
+
# @param body [UpdateTemplateRequest] The settings to change. Properties left out keep their values.
|
|
2982
3430
|
# @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,
|
|
3431
|
+
# @return [Template]
|
|
3432
|
+
def update_template(template_id, body, opts = {})
|
|
3433
|
+
data, _status_code, _headers = update_template_with_http_info(template_id, body, opts)
|
|
2986
3434
|
data
|
|
2987
3435
|
end
|
|
2988
3436
|
|
|
2989
|
-
# Update a
|
|
2990
|
-
#
|
|
2991
|
-
# @param template_id [String]
|
|
2992
|
-
# @param
|
|
3437
|
+
# Update a template
|
|
3438
|
+
# Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists. Setting `parent_folder_id` moves the template and all of its published versions.
|
|
3439
|
+
# @param template_id [String] The template's ID.
|
|
3440
|
+
# @param body [UpdateTemplateRequest] The settings to change. Properties left out keep their values.
|
|
2993
3441
|
# @param [Hash] opts the optional parameters
|
|
2994
|
-
# @return [Array<(
|
|
2995
|
-
def update_template_with_http_info(template_id,
|
|
3442
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3443
|
+
def update_template_with_http_info(template_id, body, opts = {})
|
|
2996
3444
|
if @api_client.config.debugging
|
|
2997
3445
|
@api_client.config.logger.debug 'Calling API: Client.update_template ...'
|
|
2998
3446
|
end
|
|
@@ -3000,12 +3448,12 @@ end
|
|
|
3000
3448
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
3001
3449
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.update_template"
|
|
3002
3450
|
end
|
|
3003
|
-
# verify the required parameter '
|
|
3004
|
-
if @api_client.config.client_side_validation &&
|
|
3005
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3451
|
+
# verify the required parameter 'body' is set
|
|
3452
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3453
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.update_template"
|
|
3006
3454
|
end
|
|
3007
3455
|
# resource path
|
|
3008
|
-
local_var_path = '/templates/{template_id}'.sub('{
|
|
3456
|
+
local_var_path = '/templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
3009
3457
|
|
|
3010
3458
|
# query parameters
|
|
3011
3459
|
query_params = opts[:query_params] || {}
|
|
@@ -3024,10 +3472,10 @@ end
|
|
|
3024
3472
|
form_params = opts[:form_params] || {}
|
|
3025
3473
|
|
|
3026
3474
|
# http body (model)
|
|
3027
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
3475
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3028
3476
|
|
|
3029
3477
|
# return_type
|
|
3030
|
-
return_type = opts[:debug_return_type] || '
|
|
3478
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
3031
3479
|
|
|
3032
3480
|
# auth_names
|
|
3033
3481
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -3049,26 +3497,26 @@ end
|
|
|
3049
3497
|
return data, status_code, headers
|
|
3050
3498
|
end
|
|
3051
3499
|
|
|
3052
|
-
#
|
|
3053
|
-
#
|
|
3054
|
-
# @param template_id [String]
|
|
3055
|
-
# @param
|
|
3500
|
+
# Replace a template's PDF
|
|
3501
|
+
# Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
|
|
3502
|
+
# @param template_id [String] The template's ID.
|
|
3503
|
+
# @param body [UpdateTemplateDocumentRequest] The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
|
|
3056
3504
|
# @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,
|
|
3505
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
3506
|
+
# @return [Template]
|
|
3507
|
+
def update_template_document(template_id, body, opts = {})
|
|
3508
|
+
data, _status_code, _headers = update_template_document_with_http_info(template_id, body, opts)
|
|
3061
3509
|
data
|
|
3062
3510
|
end
|
|
3063
3511
|
|
|
3064
|
-
#
|
|
3065
|
-
#
|
|
3066
|
-
# @param template_id [String]
|
|
3067
|
-
# @param
|
|
3512
|
+
# Replace a template's PDF
|
|
3513
|
+
# Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
|
|
3514
|
+
# @param template_id [String] The template's ID.
|
|
3515
|
+
# @param body [UpdateTemplateDocumentRequest] The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
|
|
3068
3516
|
# @param [Hash] opts the optional parameters
|
|
3069
|
-
# @option opts [
|
|
3070
|
-
# @return [Array<(
|
|
3071
|
-
def update_template_document_with_http_info(template_id,
|
|
3517
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
3518
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3519
|
+
def update_template_document_with_http_info(template_id, body, opts = {})
|
|
3072
3520
|
if @api_client.config.debugging
|
|
3073
3521
|
@api_client.config.logger.debug 'Calling API: Client.update_template_document ...'
|
|
3074
3522
|
end
|
|
@@ -3076,36 +3524,35 @@ end
|
|
|
3076
3524
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
3077
3525
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.update_template_document"
|
|
3078
3526
|
end
|
|
3079
|
-
# verify the required parameter '
|
|
3080
|
-
if @api_client.config.client_side_validation &&
|
|
3081
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3527
|
+
# verify the required parameter 'body' is set
|
|
3528
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3529
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.update_template_document"
|
|
3082
3530
|
end
|
|
3083
3531
|
# resource path
|
|
3084
|
-
local_var_path = '/templates/{template_id}
|
|
3532
|
+
local_var_path = '/templates/{template_id}/document'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
3085
3533
|
|
|
3086
3534
|
# query parameters
|
|
3087
3535
|
query_params = opts[:query_params] || {}
|
|
3536
|
+
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
3088
3537
|
|
|
3089
3538
|
# header parameters
|
|
3090
3539
|
header_params = opts[:header_params] || {}
|
|
3091
3540
|
# HTTP header 'Accept' (if needed)
|
|
3092
3541
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3093
3542
|
# HTTP header 'Content-Type'
|
|
3094
|
-
content_type = @api_client.select_header_content_type(['
|
|
3543
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3095
3544
|
if !content_type.nil?
|
|
3096
3545
|
header_params['Content-Type'] = content_type
|
|
3097
3546
|
end
|
|
3098
3547
|
|
|
3099
3548
|
# form parameters
|
|
3100
3549
|
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
3550
|
|
|
3104
3551
|
# http body (model)
|
|
3105
|
-
post_body = opts[:debug_body]
|
|
3552
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3106
3553
|
|
|
3107
3554
|
# return_type
|
|
3108
|
-
return_type = opts[:debug_return_type] || '
|
|
3555
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
3109
3556
|
|
|
3110
3557
|
# auth_names
|
|
3111
3558
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
@@ -3127,37 +3574,37 @@ end
|
|
|
3127
3574
|
return data, status_code, headers
|
|
3128
3575
|
end
|
|
3129
3576
|
|
|
3130
|
-
# Update a template's
|
|
3131
|
-
#
|
|
3132
|
-
# @param template_id [String]
|
|
3133
|
-
# @param
|
|
3577
|
+
# Update a template's fields
|
|
3578
|
+
# Changes fields of a template's draft and returns all of its fields. Settings left out keep their values. A shared setting (`type`, `required`, `default`, ...) changes for every field with the same name.
|
|
3579
|
+
# @param template_id [String] The template's ID.
|
|
3580
|
+
# @param body [UpdateTemplateFieldsRequest] The fields to change in the template's draft.
|
|
3134
3581
|
# @param [Hash] opts the optional parameters
|
|
3135
|
-
# @return [
|
|
3136
|
-
def
|
|
3137
|
-
data, _status_code, _headers =
|
|
3582
|
+
# @return [TemplateFields]
|
|
3583
|
+
def update_template_fields(template_id, body, opts = {})
|
|
3584
|
+
data, _status_code, _headers = update_template_fields_with_http_info(template_id, body, opts)
|
|
3138
3585
|
data
|
|
3139
3586
|
end
|
|
3140
3587
|
|
|
3141
|
-
# Update a template
|
|
3142
|
-
#
|
|
3143
|
-
# @param template_id [String]
|
|
3144
|
-
# @param
|
|
3588
|
+
# Update a template's fields
|
|
3589
|
+
# Changes fields of a template's draft and returns all of its fields. Settings left out keep their values. A shared setting (`type`, `required`, `default`, ...) changes for every field with the same name.
|
|
3590
|
+
# @param template_id [String] The template's ID.
|
|
3591
|
+
# @param body [UpdateTemplateFieldsRequest] The fields to change in the template's draft.
|
|
3145
3592
|
# @param [Hash] opts the optional parameters
|
|
3146
|
-
# @return [Array<(
|
|
3147
|
-
def
|
|
3593
|
+
# @return [Array<(TemplateFields, Integer, Hash)>] TemplateFields data, response status code and response headers
|
|
3594
|
+
def update_template_fields_with_http_info(template_id, body, opts = {})
|
|
3148
3595
|
if @api_client.config.debugging
|
|
3149
|
-
@api_client.config.logger.debug 'Calling API: Client.
|
|
3596
|
+
@api_client.config.logger.debug 'Calling API: Client.update_template_fields ...'
|
|
3150
3597
|
end
|
|
3151
3598
|
# verify the required parameter 'template_id' is set
|
|
3152
3599
|
if @api_client.config.client_side_validation && template_id.nil?
|
|
3153
|
-
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.
|
|
3600
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.update_template_fields"
|
|
3154
3601
|
end
|
|
3155
|
-
# verify the required parameter '
|
|
3156
|
-
if @api_client.config.client_side_validation &&
|
|
3157
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3602
|
+
# verify the required parameter 'body' is set
|
|
3603
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3604
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.update_template_fields"
|
|
3158
3605
|
end
|
|
3159
3606
|
# resource path
|
|
3160
|
-
local_var_path = '/templates/{template_id}
|
|
3607
|
+
local_var_path = '/templates/{template_id}/fields'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
3161
3608
|
|
|
3162
3609
|
# query parameters
|
|
3163
3610
|
query_params = opts[:query_params] || {}
|
|
@@ -3176,16 +3623,16 @@ end
|
|
|
3176
3623
|
form_params = opts[:form_params] || {}
|
|
3177
3624
|
|
|
3178
3625
|
# http body (model)
|
|
3179
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
3626
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3180
3627
|
|
|
3181
3628
|
# return_type
|
|
3182
|
-
return_type = opts[:debug_return_type] || '
|
|
3629
|
+
return_type = opts[:debug_return_type] || 'TemplateFields'
|
|
3183
3630
|
|
|
3184
3631
|
# auth_names
|
|
3185
3632
|
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3186
3633
|
|
|
3187
3634
|
new_options = opts.merge(
|
|
3188
|
-
:operation => :"Client.
|
|
3635
|
+
:operation => :"Client.update_template_fields",
|
|
3189
3636
|
:header_params => header_params,
|
|
3190
3637
|
:query_params => query_params,
|
|
3191
3638
|
:form_params => form_params,
|
|
@@ -3196,29 +3643,29 @@ end
|
|
|
3196
3643
|
|
|
3197
3644
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3198
3645
|
if @api_client.config.debugging
|
|
3199
|
-
@api_client.config.logger.debug "API called: Client#
|
|
3646
|
+
@api_client.config.logger.debug "API called: Client#update_template_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3200
3647
|
end
|
|
3201
3648
|
return data, status_code, headers
|
|
3202
3649
|
end
|
|
3203
3650
|
|
|
3204
3651
|
# Update a webhook
|
|
3205
|
-
# Updates the
|
|
3206
|
-
# @param webhook_id [String]
|
|
3207
|
-
# @param
|
|
3652
|
+
# Updates a webhook. Only the properties you send change.
|
|
3653
|
+
# @param webhook_id [String] The webhook's ID.
|
|
3654
|
+
# @param body [UpdateWebhookRequest] The settings to change. Properties left out keep their values.
|
|
3208
3655
|
# @param [Hash] opts the optional parameters
|
|
3209
3656
|
# @return [Webhook]
|
|
3210
|
-
def update_webhook(webhook_id,
|
|
3211
|
-
data, _status_code, _headers = update_webhook_with_http_info(webhook_id,
|
|
3657
|
+
def update_webhook(webhook_id, body, opts = {})
|
|
3658
|
+
data, _status_code, _headers = update_webhook_with_http_info(webhook_id, body, opts)
|
|
3212
3659
|
data
|
|
3213
3660
|
end
|
|
3214
3661
|
|
|
3215
3662
|
# Update a webhook
|
|
3216
|
-
# Updates the
|
|
3217
|
-
# @param webhook_id [String]
|
|
3218
|
-
# @param
|
|
3663
|
+
# Updates a webhook. Only the properties you send change.
|
|
3664
|
+
# @param webhook_id [String] The webhook's ID.
|
|
3665
|
+
# @param body [UpdateWebhookRequest] The settings to change. Properties left out keep their values.
|
|
3219
3666
|
# @param [Hash] opts the optional parameters
|
|
3220
3667
|
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
3221
|
-
def update_webhook_with_http_info(webhook_id,
|
|
3668
|
+
def update_webhook_with_http_info(webhook_id, body, opts = {})
|
|
3222
3669
|
if @api_client.config.debugging
|
|
3223
3670
|
@api_client.config.logger.debug 'Calling API: Client.update_webhook ...'
|
|
3224
3671
|
end
|
|
@@ -3226,12 +3673,12 @@ end
|
|
|
3226
3673
|
if @api_client.config.client_side_validation && webhook_id.nil?
|
|
3227
3674
|
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling Client.update_webhook"
|
|
3228
3675
|
end
|
|
3229
|
-
# verify the required parameter '
|
|
3230
|
-
if @api_client.config.client_side_validation &&
|
|
3231
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3676
|
+
# verify the required parameter 'body' is set
|
|
3677
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3678
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.update_webhook"
|
|
3232
3679
|
end
|
|
3233
3680
|
# resource path
|
|
3234
|
-
local_var_path = '/webhooks/{webhook_id}'.sub('{
|
|
3681
|
+
local_var_path = '/webhooks/{webhook_id}'.sub('{webhook_id}', CGI.escape(webhook_id.to_s))
|
|
3235
3682
|
|
|
3236
3683
|
# query parameters
|
|
3237
3684
|
query_params = opts[:query_params] || {}
|
|
@@ -3250,7 +3697,7 @@ end
|
|
|
3250
3697
|
form_params = opts[:form_params] || {}
|
|
3251
3698
|
|
|
3252
3699
|
# http body (model)
|
|
3253
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
3700
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3254
3701
|
|
|
3255
3702
|
# return_type
|
|
3256
3703
|
return_type = opts[:debug_return_type] || 'Webhook'
|
|
@@ -3274,5 +3721,259 @@ end
|
|
|
3274
3721
|
end
|
|
3275
3722
|
return data, status_code, headers
|
|
3276
3723
|
end
|
|
3724
|
+
|
|
3725
|
+
# Create a PDF template from an uploaded PDF
|
|
3726
|
+
# 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.
|
|
3727
|
+
# @param document [File] The PDF.
|
|
3728
|
+
# @param [Hash] opts the optional parameters
|
|
3729
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
3730
|
+
# @option opts [String] :name The template's name.
|
|
3731
|
+
# @option opts [String] :description The template's description.
|
|
3732
|
+
# @option opts [String] :parent_folder_id The folder to put the template in. Left out, it's created at the root.
|
|
3733
|
+
# @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.
|
|
3734
|
+
# @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.
|
|
3735
|
+
# @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.
|
|
3736
|
+
# @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`.
|
|
3737
|
+
# @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.
|
|
3738
|
+
# @return [Template]
|
|
3739
|
+
def upload_template(document, opts = {})
|
|
3740
|
+
data, _status_code, _headers = upload_template_with_http_info(document, opts)
|
|
3741
|
+
data
|
|
3742
|
+
end
|
|
3743
|
+
|
|
3744
|
+
# Create a PDF template from an uploaded PDF
|
|
3745
|
+
# 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.
|
|
3746
|
+
# @param document [File] The PDF.
|
|
3747
|
+
# @param [Hash] opts the optional parameters
|
|
3748
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
3749
|
+
# @option opts [String] :name The template's name.
|
|
3750
|
+
# @option opts [String] :description The template's description.
|
|
3751
|
+
# @option opts [String] :parent_folder_id The folder to put the template in. Left out, it's created at the root.
|
|
3752
|
+
# @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.
|
|
3753
|
+
# @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.
|
|
3754
|
+
# @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.
|
|
3755
|
+
# @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`.
|
|
3756
|
+
# @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.
|
|
3757
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3758
|
+
def upload_template_with_http_info(document, opts = {})
|
|
3759
|
+
if @api_client.config.debugging
|
|
3760
|
+
@api_client.config.logger.debug 'Calling API: Client.upload_template ...'
|
|
3761
|
+
end
|
|
3762
|
+
# verify the required parameter 'document' is set
|
|
3763
|
+
if @api_client.config.client_side_validation && document.nil?
|
|
3764
|
+
fail ArgumentError, "Missing the required parameter 'document' when calling Client.upload_template"
|
|
3765
|
+
end
|
|
3766
|
+
# resource path
|
|
3767
|
+
local_var_path = '/templates/upload'
|
|
3768
|
+
|
|
3769
|
+
# query parameters
|
|
3770
|
+
query_params = opts[:query_params] || {}
|
|
3771
|
+
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
3772
|
+
|
|
3773
|
+
# header parameters
|
|
3774
|
+
header_params = opts[:header_params] || {}
|
|
3775
|
+
# HTTP header 'Accept' (if needed)
|
|
3776
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3777
|
+
# HTTP header 'Content-Type'
|
|
3778
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
|
3779
|
+
if !content_type.nil?
|
|
3780
|
+
header_params['Content-Type'] = content_type
|
|
3781
|
+
end
|
|
3782
|
+
|
|
3783
|
+
# form parameters
|
|
3784
|
+
form_params = opts[:form_params] || {}
|
|
3785
|
+
form_params['document'] = document
|
|
3786
|
+
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
3787
|
+
form_params['description'] = opts[:'description'] if !opts[:'description'].nil?
|
|
3788
|
+
form_params['parent_folder_id'] = opts[:'parent_folder_id'] if !opts[:'parent_folder_id'].nil?
|
|
3789
|
+
form_params['ai_field_naming_language'] = opts[:'ai_field_naming_language'] if !opts[:'ai_field_naming_language'].nil?
|
|
3790
|
+
form_params['detect_fields'] = opts[:'detect_fields'] if !opts[:'detect_fields'].nil?
|
|
3791
|
+
form_params['field_source'] = opts[:'field_source'] if !opts[:'field_source'].nil?
|
|
3792
|
+
form_params['field_naming'] = opts[:'field_naming'] if !opts[:'field_naming'].nil?
|
|
3793
|
+
form_params['field_logic'] = opts[:'field_logic'] if !opts[:'field_logic'].nil?
|
|
3794
|
+
|
|
3795
|
+
# http body (model)
|
|
3796
|
+
post_body = opts[:debug_body]
|
|
3797
|
+
|
|
3798
|
+
# return_type
|
|
3799
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
3800
|
+
|
|
3801
|
+
# auth_names
|
|
3802
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3803
|
+
|
|
3804
|
+
new_options = opts.merge(
|
|
3805
|
+
:operation => :"Client.upload_template",
|
|
3806
|
+
:header_params => header_params,
|
|
3807
|
+
:query_params => query_params,
|
|
3808
|
+
:form_params => form_params,
|
|
3809
|
+
:body => post_body,
|
|
3810
|
+
:auth_names => auth_names,
|
|
3811
|
+
:return_type => return_type
|
|
3812
|
+
)
|
|
3813
|
+
|
|
3814
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3815
|
+
if @api_client.config.debugging
|
|
3816
|
+
@api_client.config.logger.debug "API called: Client#upload_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3817
|
+
end
|
|
3818
|
+
return data, status_code, headers
|
|
3819
|
+
end
|
|
3820
|
+
|
|
3821
|
+
# Replace a template's PDF with an uploaded PDF
|
|
3822
|
+
# 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.
|
|
3823
|
+
# @param template_id [String] The template's ID.
|
|
3824
|
+
# @param document [File] The new PDF.
|
|
3825
|
+
# @param [Hash] opts the optional parameters
|
|
3826
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
3827
|
+
# @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.
|
|
3828
|
+
# @return [Template]
|
|
3829
|
+
def upload_template_document(template_id, document, opts = {})
|
|
3830
|
+
data, _status_code, _headers = upload_template_document_with_http_info(template_id, document, opts)
|
|
3831
|
+
data
|
|
3832
|
+
end
|
|
3833
|
+
|
|
3834
|
+
# Replace a template's PDF with an uploaded PDF
|
|
3835
|
+
# 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.
|
|
3836
|
+
# @param template_id [String] The template's ID.
|
|
3837
|
+
# @param document [File] The new PDF.
|
|
3838
|
+
# @param [Hash] opts the optional parameters
|
|
3839
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
|
|
3840
|
+
# @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.
|
|
3841
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3842
|
+
def upload_template_document_with_http_info(template_id, document, opts = {})
|
|
3843
|
+
if @api_client.config.debugging
|
|
3844
|
+
@api_client.config.logger.debug 'Calling API: Client.upload_template_document ...'
|
|
3845
|
+
end
|
|
3846
|
+
# verify the required parameter 'template_id' is set
|
|
3847
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
3848
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.upload_template_document"
|
|
3849
|
+
end
|
|
3850
|
+
# verify the required parameter 'document' is set
|
|
3851
|
+
if @api_client.config.client_side_validation && document.nil?
|
|
3852
|
+
fail ArgumentError, "Missing the required parameter 'document' when calling Client.upload_template_document"
|
|
3853
|
+
end
|
|
3854
|
+
# resource path
|
|
3855
|
+
local_var_path = '/templates/{template_id}/document/upload'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
3856
|
+
|
|
3857
|
+
# query parameters
|
|
3858
|
+
query_params = opts[:query_params] || {}
|
|
3859
|
+
query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
|
|
3860
|
+
|
|
3861
|
+
# header parameters
|
|
3862
|
+
header_params = opts[:header_params] || {}
|
|
3863
|
+
# HTTP header 'Accept' (if needed)
|
|
3864
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3865
|
+
# HTTP header 'Content-Type'
|
|
3866
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
|
3867
|
+
if !content_type.nil?
|
|
3868
|
+
header_params['Content-Type'] = content_type
|
|
3869
|
+
end
|
|
3870
|
+
|
|
3871
|
+
# form parameters
|
|
3872
|
+
form_params = opts[:form_params] || {}
|
|
3873
|
+
form_params['document'] = document
|
|
3874
|
+
form_params['reimport_fields'] = opts[:'reimport_fields'] if !opts[:'reimport_fields'].nil?
|
|
3875
|
+
|
|
3876
|
+
# http body (model)
|
|
3877
|
+
post_body = opts[:debug_body]
|
|
3878
|
+
|
|
3879
|
+
# return_type
|
|
3880
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
3881
|
+
|
|
3882
|
+
# auth_names
|
|
3883
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3884
|
+
|
|
3885
|
+
new_options = opts.merge(
|
|
3886
|
+
:operation => :"Client.upload_template_document",
|
|
3887
|
+
:header_params => header_params,
|
|
3888
|
+
:query_params => query_params,
|
|
3889
|
+
:form_params => form_params,
|
|
3890
|
+
:body => post_body,
|
|
3891
|
+
:auth_names => auth_names,
|
|
3892
|
+
:return_type => return_type
|
|
3893
|
+
)
|
|
3894
|
+
|
|
3895
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3896
|
+
if @api_client.config.debugging
|
|
3897
|
+
@api_client.config.logger.debug "API called: Client#upload_template_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3898
|
+
end
|
|
3899
|
+
return data, status_code, headers
|
|
3900
|
+
end
|
|
3901
|
+
|
|
3902
|
+
# Check a submission without creating it
|
|
3903
|
+
# Checks a submission as creating it would (its data against the template's fields, its settings and signature requests) without saving it, generating anything or using credits. It doesn't check your account's credits. The response says whether the submission is valid, and if not, has the error that creating it would return.
|
|
3904
|
+
# @param template_id [String] The template's ID.
|
|
3905
|
+
# @param body [ValidateSubmissionRequest] The submission's data and settings.
|
|
3906
|
+
# @param [Hash] opts the optional parameters
|
|
3907
|
+
# @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).
|
|
3908
|
+
# @return [SubmissionValidation]
|
|
3909
|
+
def validate_submission(template_id, body, opts = {})
|
|
3910
|
+
data, _status_code, _headers = validate_submission_with_http_info(template_id, body, opts)
|
|
3911
|
+
data
|
|
3912
|
+
end
|
|
3913
|
+
|
|
3914
|
+
# Check a submission without creating it
|
|
3915
|
+
# Checks a submission as creating it would (its data against the template's fields, its settings and signature requests) without saving it, generating anything or using credits. It doesn't check your account's credits. The response says whether the submission is valid, and if not, has the error that creating it would return.
|
|
3916
|
+
# @param template_id [String] The template's ID.
|
|
3917
|
+
# @param body [ValidateSubmissionRequest] The submission's data and settings.
|
|
3918
|
+
# @param [Hash] opts the optional parameters
|
|
3919
|
+
# @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).
|
|
3920
|
+
# @return [Array<(SubmissionValidation, Integer, Hash)>] SubmissionValidation data, response status code and response headers
|
|
3921
|
+
def validate_submission_with_http_info(template_id, body, opts = {})
|
|
3922
|
+
if @api_client.config.debugging
|
|
3923
|
+
@api_client.config.logger.debug 'Calling API: Client.validate_submission ...'
|
|
3924
|
+
end
|
|
3925
|
+
# verify the required parameter 'template_id' is set
|
|
3926
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
3927
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling Client.validate_submission"
|
|
3928
|
+
end
|
|
3929
|
+
# verify the required parameter 'body' is set
|
|
3930
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
3931
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling Client.validate_submission"
|
|
3932
|
+
end
|
|
3933
|
+
# resource path
|
|
3934
|
+
local_var_path = '/templates/{template_id}/submissions/validate'.sub('{template_id}', CGI.escape(template_id.to_s))
|
|
3935
|
+
|
|
3936
|
+
# query parameters
|
|
3937
|
+
query_params = opts[:query_params] || {}
|
|
3938
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
3939
|
+
|
|
3940
|
+
# header parameters
|
|
3941
|
+
header_params = opts[:header_params] || {}
|
|
3942
|
+
# HTTP header 'Accept' (if needed)
|
|
3943
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3944
|
+
# HTTP header 'Content-Type'
|
|
3945
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3946
|
+
if !content_type.nil?
|
|
3947
|
+
header_params['Content-Type'] = content_type
|
|
3948
|
+
end
|
|
3949
|
+
|
|
3950
|
+
# form parameters
|
|
3951
|
+
form_params = opts[:form_params] || {}
|
|
3952
|
+
|
|
3953
|
+
# http body (model)
|
|
3954
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
3955
|
+
|
|
3956
|
+
# return_type
|
|
3957
|
+
return_type = opts[:debug_return_type] || 'SubmissionValidation'
|
|
3958
|
+
|
|
3959
|
+
# auth_names
|
|
3960
|
+
auth_names = opts[:debug_auth_names] || ['api_token_basic']
|
|
3961
|
+
|
|
3962
|
+
new_options = opts.merge(
|
|
3963
|
+
:operation => :"Client.validate_submission",
|
|
3964
|
+
:header_params => header_params,
|
|
3965
|
+
:query_params => query_params,
|
|
3966
|
+
:form_params => form_params,
|
|
3967
|
+
:body => post_body,
|
|
3968
|
+
:auth_names => auth_names,
|
|
3969
|
+
:return_type => return_type
|
|
3970
|
+
)
|
|
3971
|
+
|
|
3972
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3973
|
+
if @api_client.config.debugging
|
|
3974
|
+
@api_client.config.logger.debug "API called: Client#validate_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3975
|
+
end
|
|
3976
|
+
return data, status_code, headers
|
|
3977
|
+
end
|
|
3277
3978
|
end
|
|
3278
3979
|
end
|