docspring 3.5.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +361 -150
- data/.openapi-generator/VERSION +1 -1
- data/.rubocop.yml +1 -1
- data/.travis.yml +1 -1
- data/AGENTS.md +79 -19
- data/CHANGELOG.md +123 -0
- data/Gemfile.lock +7 -7
- data/README.md +60 -53
- data/docs/{RenameFolderData.md → AiFieldNamingLanguage.md} +2 -5
- data/docs/AuthenticationCheck.md +18 -0
- data/docs/{CreateFolderData.md → BarcodeSymbology.md} +2 -5
- data/docs/{CreateWebhookData.md → CheckCharacter.md} +2 -5
- data/docs/Client.md +890 -777
- data/docs/{UpdateWebhookData.md → CombinedFieldType.md} +2 -5
- data/docs/CombinedPdf.md +44 -0
- data/docs/CombinedPdfFiles.md +18 -0
- data/docs/CombinedPdfList.md +20 -0
- data/docs/CombinedPdfSource.md +26 -0
- data/docs/CombinedPdfSourceInput.md +88 -0
- data/docs/CombinedPdfSourcePdf.md +20 -0
- data/docs/CombinedPdfSourceType.md +15 -0
- data/docs/CombinedPdfState.md +15 -0
- data/docs/CopyTemplateRequest.md +22 -0
- data/docs/CreateCombinedPdfRequest.md +26 -0
- data/docs/CreateCustomFileFromUploadRequest.md +18 -0
- data/docs/CreateFolderRequest.md +20 -0
- data/docs/CreateSignatureRequestEventRequest.md +24 -0
- data/docs/CreateSignatureRequestTokenRequest.md +18 -0
- data/docs/CreateSubmissionBatchRequest.md +26 -0
- data/docs/CreateSubmissionRequest.md +36 -0
- data/docs/CreateTemplateRequest.md +94 -0
- data/docs/CreateWebhookRequest.md +38 -0
- data/docs/CustomFile.md +11 -3
- data/docs/CustomFileList.md +20 -0
- data/docs/CustomFileSourcePdf.md +20 -0
- data/docs/ErrorCode.md +15 -0
- data/docs/ErrorDetail.md +26 -0
- data/docs/ErrorInfo.md +32 -0
- data/docs/ErrorResponse.md +1 -3
- data/docs/ExpirationInterval.md +15 -0
- data/docs/FieldComparisonCondition.md +22 -0
- data/docs/FieldComparisonOperator.md +15 -0
- data/docs/FieldDisplayType.md +15 -0
- data/docs/FieldEqualsCondition.md +22 -0
- data/docs/FieldEqualsOperator.md +15 -0
- data/docs/FieldInCondition.md +22 -0
- data/docs/FieldOverride.md +142 -0
- data/docs/FieldPresenceCondition.md +20 -0
- data/docs/FieldPresenceOperator.md +15 -0
- data/docs/FieldRangeCondition.md +24 -0
- data/docs/FieldReimportState.md +15 -0
- data/docs/FieldSetupLogic.md +15 -0
- data/docs/FieldSetupNaming.md +15 -0
- data/docs/FieldSetupSource.md +15 -0
- data/docs/Folder.md +9 -5
- data/docs/FolderList.md +20 -0
- data/docs/GeneratedFile.md +32 -0
- data/docs/GeneratedFileState.md +15 -0
- data/docs/HtmlEngineOptions.md +36 -0
- data/docs/HtmlEngineOptionsInput.md +36 -0
- data/docs/ImageGravity.md +15 -0
- data/docs/ImageScaleType.md +15 -0
- data/docs/ModelCodeLanguage.md +15 -0
- data/docs/MoveFolderRequest.md +18 -0
- data/docs/MoveTemplateRequest.md +18 -0
- data/docs/NumberConditionType.md +15 -0
- data/docs/PageFormat.md +15 -0
- data/docs/PublishTemplateVersionRequest.md +20 -0
- data/docs/RenameFolderRequest.md +18 -0
- data/docs/RestoreTemplateVersionRequest.md +18 -0
- data/docs/ShapeType.md +15 -0
- data/docs/SignatureRequest.md +66 -0
- data/docs/SignatureRequestAuthSecondFactorType.md +15 -0
- data/docs/SignatureRequestAuthType.md +15 -0
- data/docs/SignatureRequestEvent.md +32 -0
- data/docs/SignatureRequestEventType.md +15 -0
- data/docs/SignatureRequestInput.md +46 -0
- data/docs/SignatureRequestMessageType.md +15 -0
- data/docs/SignatureRequestState.md +15 -0
- data/docs/SignatureRequestToken.md +30 -0
- data/docs/SignatureRequestTokenType.md +15 -0
- data/docs/StringConditionType.md +15 -0
- data/docs/Submission.md +41 -47
- data/docs/SubmissionAction.md +6 -8
- data/docs/SubmissionActionState.md +15 -0
- data/docs/SubmissionActionType.md +15 -0
- data/docs/SubmissionBatch.md +16 -10
- data/docs/SubmissionBatchState.md +15 -0
- data/docs/SubmissionFiles.md +22 -0
- data/docs/SubmissionInput.md +38 -0
- data/docs/SubmissionList.md +20 -0
- data/docs/SubmissionSource.md +15 -0
- data/docs/SubmissionSourcePdf.md +20 -0
- data/docs/SubmissionState.md +15 -0
- data/docs/Template.md +73 -107
- data/docs/TemplateActor.md +26 -0
- data/docs/TemplateActorType.md +15 -0
- data/docs/TemplateDefaults.md +56 -0
- data/docs/TemplateDefaultsInput.md +56 -0
- data/docs/TemplateDocument.md +40 -0
- data/docs/TemplateDocumentState.md +15 -0
- data/docs/TemplateFieldDependency.md +26 -0
- data/docs/TemplateFieldDependencyAction.md +15 -0
- data/docs/TemplateFieldDependencyCondition.md +24 -0
- data/docs/TemplateFieldDependencyConditionInput.md +93 -0
- data/docs/TemplateFieldDependencyInput.md +26 -0
- data/docs/TemplateFieldDependencyMatch.md +15 -0
- data/docs/TemplateFieldDependencyOperator.md +15 -0
- data/docs/TemplateFieldLogicStatus.md +15 -0
- data/docs/TemplateFormMode.md +15 -0
- data/docs/TemplateModelCode.md +22 -0
- data/docs/TemplatePageAiError.md +15 -0
- data/docs/TemplatePageAiNamingStatus.md +15 -0
- data/docs/TemplatePageFieldsStatus.md +15 -0
- data/docs/TemplatePageImageStatus.md +15 -0
- data/docs/TemplatePageProcessingStatus.md +26 -0
- data/docs/TemplateSourcePdf.md +24 -0
- data/docs/TemplateSummary.md +90 -0
- data/docs/TemplateSummaryList.md +20 -0
- data/docs/TemplateType.md +15 -0
- data/docs/TemplateVersion.md +24 -0
- data/docs/TemplateVersionType.md +15 -0
- data/docs/TextAlignment.md +15 -0
- data/docs/TextOverflow.md +15 -0
- data/docs/TextVerticalAlignment.md +15 -0
- data/docs/Typeface.md +15 -0
- data/docs/UpdateSignatureRequestRequest.md +34 -0
- data/docs/UpdateTemplateDocumentRequest.md +22 -0
- data/docs/UpdateTemplateRequest.md +80 -0
- data/docs/UpdateWebhookRequest.md +38 -0
- data/docs/UploadMethod.md +15 -0
- data/docs/UploadPresign.md +24 -0
- data/docs/UrlSourcePdf.md +20 -0
- data/docs/Webhook.md +20 -20
- data/docs/WebhookEventType.md +15 -0
- data/docs/WebhookList.md +20 -0
- data/docs/WebhookMode.md +15 -0
- data/docspring.gemspec +3 -3
- data/lib/docspring/api/client.rb +995 -942
- data/lib/docspring/api_client.rb +14 -6
- data/lib/docspring/api_error.rb +3 -3
- data/lib/docspring/api_model_base.rb +88 -0
- data/lib/docspring/configuration.rb +12 -7
- data/lib/docspring/models/ai_field_naming_language.rb +42 -0
- data/lib/docspring/models/authentication_check.rb +185 -0
- data/lib/docspring/models/barcode_symbology.rb +47 -0
- data/lib/docspring/models/check_character.rb +44 -0
- data/lib/docspring/models/combined_field_type.rb +41 -0
- data/lib/docspring/models/{combined_submission.rb → combined_pdf.rb} +228 -206
- data/lib/docspring/models/combined_pdf_files.rb +167 -0
- data/lib/docspring/models/combined_pdf_list.rb +200 -0
- data/lib/docspring/models/{update_webhook_data.rb → combined_pdf_source.rb} +107 -103
- data/lib/docspring/models/combined_pdf_source_input.rb +62 -0
- data/lib/docspring/models/combined_pdf_source_pdf.rb +212 -0
- data/lib/docspring/models/combined_pdf_source_type.rb +44 -0
- data/lib/docspring/models/combined_pdf_state.rb +44 -0
- data/lib/docspring/models/{copy_template_options.rb → copy_template_request.rb} +32 -87
- data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +60 -123
- data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +29 -96
- data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +60 -102
- data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +50 -122
- data/lib/docspring/models/create_signature_request_token_request.rb +190 -0
- data/lib/docspring/models/{submission_batch_data.rb → create_submission_batch_request.rb} +53 -108
- data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +97 -149
- data/lib/docspring/models/create_template_request.rb +601 -0
- data/lib/docspring/models/create_webhook_request.rb +368 -0
- data/lib/docspring/models/custom_file.rb +132 -95
- data/lib/docspring/models/custom_file_list.rb +200 -0
- data/lib/docspring/models/custom_file_source_pdf.rb +212 -0
- data/lib/docspring/models/error_code.rb +60 -0
- data/lib/docspring/models/error_detail.rb +242 -0
- data/lib/docspring/models/error_info.rb +316 -0
- data/lib/docspring/models/error_response.rb +28 -138
- data/lib/docspring/models/expiration_interval.rb +42 -0
- data/lib/docspring/models/field_comparison_condition.rb +247 -0
- data/lib/docspring/models/field_comparison_operator.rb +43 -0
- data/lib/docspring/models/field_display_type.rb +45 -0
- data/lib/docspring/models/field_equals_condition.rb +247 -0
- data/lib/docspring/models/field_equals_operator.rb +41 -0
- data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +101 -103
- data/lib/docspring/models/field_override.rb +829 -0
- data/lib/docspring/models/field_presence_condition.rb +234 -0
- data/lib/docspring/models/field_presence_operator.rb +41 -0
- data/lib/docspring/models/field_range_condition.rb +234 -0
- data/lib/docspring/models/field_reimport_state.rb +43 -0
- data/lib/docspring/models/field_setup_logic.rb +41 -0
- data/lib/docspring/models/field_setup_naming.rb +41 -0
- data/lib/docspring/models/field_setup_source.rb +42 -0
- data/lib/docspring/models/folder.rb +134 -93
- data/lib/docspring/models/folder_list.rb +200 -0
- data/lib/docspring/models/generated_file.rb +326 -0
- data/lib/docspring/models/generated_file_state.rb +42 -0
- data/lib/docspring/models/html_engine_options.rb +416 -0
- data/lib/docspring/models/html_engine_options_input.rb +280 -0
- data/lib/docspring/models/image_gravity.rb +48 -0
- data/lib/docspring/models/image_scale_type.rb +42 -0
- data/lib/docspring/models/model_code_language.rb +48 -0
- data/lib/docspring/models/{move_folder_data.rb → move_folder_request.rb} +31 -87
- data/lib/docspring/models/move_template_request.rb +171 -0
- data/lib/docspring/models/number_condition_type.rb +45 -0
- data/lib/docspring/models/page_format.rb +52 -0
- data/lib/docspring/models/{publish_version_data.rb → publish_template_version_request.rb} +64 -99
- data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +29 -87
- data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +29 -87
- data/lib/docspring/models/shape_type.rb +45 -0
- data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +240 -171
- data/lib/docspring/models/signature_request_auth_second_factor_type.rb +45 -0
- data/lib/docspring/models/signature_request_auth_type.rb +46 -0
- data/lib/docspring/models/{submission_data_request_event.rb → signature_request_event.rb} +137 -122
- data/lib/docspring/models/signature_request_event_type.rb +45 -0
- data/lib/docspring/models/{update_submission_data_request_data.rb → signature_request_input.rb} +156 -173
- data/lib/docspring/models/signature_request_message_type.rb +48 -0
- data/lib/docspring/models/signature_request_state.rb +42 -0
- data/lib/docspring/models/signature_request_token.rb +369 -0
- data/lib/docspring/models/signature_request_token_type.rb +41 -0
- data/lib/docspring/models/string_condition_type.rb +44 -0
- data/lib/docspring/models/submission.rb +374 -339
- data/lib/docspring/models/submission_action.rb +64 -136
- data/lib/docspring/models/submission_action_state.rb +43 -0
- data/lib/docspring/models/submission_action_type.rb +46 -0
- data/lib/docspring/models/submission_batch.rb +157 -112
- data/lib/docspring/models/submission_batch_state.rb +42 -0
- data/lib/docspring/models/submission_files.rb +188 -0
- data/lib/docspring/models/submission_input.rb +274 -0
- data/lib/docspring/models/submission_list.rb +200 -0
- data/lib/docspring/models/submission_source.rb +43 -0
- data/lib/docspring/models/submission_source_pdf.rb +212 -0
- data/lib/docspring/models/submission_state.rb +52 -0
- data/lib/docspring/models/template.rb +485 -766
- data/lib/docspring/models/{add_fields_data.rb → template_actor.rb} +119 -105
- data/lib/docspring/models/template_actor_type.rb +42 -0
- data/lib/docspring/models/template_defaults.rb +395 -0
- data/lib/docspring/models/template_defaults_input.rb +395 -0
- data/lib/docspring/models/template_document.rb +396 -0
- data/lib/docspring/models/template_document_state.rb +44 -0
- data/lib/docspring/models/{success_error_response.rb → template_field_dependency.rb} +122 -114
- data/lib/docspring/models/template_field_dependency_action.rb +42 -0
- data/lib/docspring/models/{create_pdf_template.rb → template_field_dependency_condition.rb} +116 -103
- data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
- data/lib/docspring/models/template_field_dependency_input.rb +285 -0
- data/lib/docspring/models/template_field_dependency_match.rb +41 -0
- data/lib/docspring/models/template_field_dependency_operator.rb +49 -0
- data/lib/docspring/models/template_field_logic_status.rb +44 -0
- data/lib/docspring/models/template_form_mode.rb +42 -0
- data/lib/docspring/models/{template_model_code_response.rb → template_model_code.rb} +37 -96
- data/lib/docspring/models/template_page_ai_error.rb +43 -0
- data/lib/docspring/models/template_page_ai_naming_status.rb +41 -0
- data/lib/docspring/models/template_page_fields_status.rb +44 -0
- data/lib/docspring/models/template_page_image_status.rb +41 -0
- data/lib/docspring/models/template_page_processing_status.rb +275 -0
- data/lib/docspring/models/{create_webhook_data.rb → template_source_pdf.rb} +92 -103
- data/lib/docspring/models/{template_preview.rb → template_summary.rb} +436 -589
- data/lib/docspring/models/template_summary_list.rb +200 -0
- data/lib/docspring/models/template_type.rb +41 -0
- data/lib/docspring/models/template_version.rb +238 -0
- data/lib/docspring/models/template_version_type.rb +42 -0
- data/lib/docspring/models/text_alignment.rb +43 -0
- data/lib/docspring/models/text_overflow.rb +41 -0
- data/lib/docspring/models/text_vertical_alignment.rb +42 -0
- data/lib/docspring/models/typeface.rb +56 -0
- data/lib/docspring/models/{create_submission_data_request_data.rb → update_signature_request_request.rb} +72 -196
- data/lib/docspring/models/update_template_document_request.rb +205 -0
- data/lib/docspring/models/update_template_request.rb +514 -0
- data/lib/docspring/models/update_webhook_request.rb +344 -0
- data/lib/docspring/models/upload_method.rb +40 -0
- data/lib/docspring/models/{upload_presign_response.rb → upload_presign.rb} +93 -140
- data/lib/docspring/models/url_source_pdf.rb +212 -0
- data/lib/docspring/models/webhook.rb +97 -107
- data/lib/docspring/models/webhook_event_type.rb +64 -0
- data/lib/docspring/models/webhook_list.rb +200 -0
- data/lib/docspring/models/webhook_mode.rb +41 -0
- data/lib/docspring/request_schemas.json +3187 -0
- data/lib/docspring/request_validator.rb +396 -0
- data/lib/docspring/version.rb +4 -4
- data/lib/docspring.rb +125 -53
- data/spec/api/client_spec.rb +304 -277
- data/spec/models/ai_field_naming_language_spec.rb +30 -0
- data/spec/models/authentication_check_spec.rb +36 -0
- data/spec/models/barcode_symbology_spec.rb +30 -0
- data/spec/models/check_character_spec.rb +30 -0
- data/spec/models/combined_field_type_spec.rb +30 -0
- data/spec/models/combined_pdf_files_spec.rb +36 -0
- data/spec/models/combined_pdf_list_spec.rb +42 -0
- data/spec/models/combined_pdf_source_input_spec.rb +44 -0
- data/spec/models/combined_pdf_source_pdf_spec.rb +42 -0
- data/spec/models/{submission_data_request_token_spec.rb → combined_pdf_source_spec.rb} +18 -12
- data/spec/models/combined_pdf_source_type_spec.rb +30 -0
- data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +20 -24
- data/spec/models/combined_pdf_state_spec.rb +30 -0
- data/spec/models/{copy_template_options_spec.rb → copy_template_request_spec.rb} +9 -9
- data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +12 -18
- data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +9 -9
- data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +11 -11
- data/spec/models/{list_submissions_response_spec.rb → create_signature_request_event_request_spec.rb} +18 -12
- data/spec/models/create_signature_request_token_request_spec.rb +36 -0
- data/spec/models/{submission_batch_data_spec.rb → create_submission_batch_request_spec.rb} +13 -13
- data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +24 -18
- data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +40 -118
- data/spec/models/create_webhook_request_spec.rb +96 -0
- data/spec/models/custom_file_list_spec.rb +42 -0
- data/spec/models/custom_file_source_pdf_spec.rb +42 -0
- data/spec/models/custom_file_spec.rb +29 -5
- data/spec/models/error_code_spec.rb +30 -0
- data/spec/models/{create_submission_response_spec.rb → error_detail_spec.rb} +14 -18
- data/spec/models/{batch_generate_pdfs201_response_spec.rb → error_info_spec.rb} +27 -19
- data/spec/models/error_response_spec.rb +4 -14
- data/spec/models/expiration_interval_spec.rb +30 -0
- data/spec/models/field_comparison_condition_spec.rb +48 -0
- data/spec/models/field_comparison_operator_spec.rb +30 -0
- data/spec/models/field_display_type_spec.rb +30 -0
- data/spec/models/field_equals_condition_spec.rb +48 -0
- data/spec/models/field_equals_operator_spec.rb +30 -0
- data/spec/models/field_in_condition_spec.rb +48 -0
- data/spec/models/field_override_spec.rb +408 -0
- data/spec/models/field_presence_condition_spec.rb +42 -0
- data/spec/models/field_presence_operator_spec.rb +30 -0
- data/spec/models/field_range_condition_spec.rb +54 -0
- data/spec/models/field_reimport_state_spec.rb +30 -0
- data/spec/models/field_setup_logic_spec.rb +30 -0
- data/spec/models/field_setup_naming_spec.rb +30 -0
- data/spec/models/field_setup_source_spec.rb +30 -0
- data/spec/models/folder_list_spec.rb +42 -0
- data/spec/models/folder_spec.rb +16 -4
- data/spec/models/generated_file_spec.rb +78 -0
- data/spec/models/generated_file_state_spec.rb +30 -0
- data/spec/models/html_engine_options_input_spec.rb +90 -0
- data/spec/models/html_engine_options_spec.rb +90 -0
- data/spec/models/image_gravity_spec.rb +30 -0
- data/spec/models/image_scale_type_spec.rb +30 -0
- data/spec/models/model_code_language_spec.rb +30 -0
- data/spec/models/move_folder_request_spec.rb +36 -0
- data/spec/models/move_template_request_spec.rb +36 -0
- data/spec/models/number_condition_type_spec.rb +30 -0
- data/spec/models/page_format_spec.rb +30 -0
- data/spec/models/{publish_version_data_spec.rb → publish_template_version_request_spec.rb} +11 -11
- data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +9 -9
- data/spec/models/restore_template_version_request_spec.rb +36 -0
- data/spec/models/shape_type_spec.rb +30 -0
- data/spec/models/signature_request_auth_second_factor_type_spec.rb +30 -0
- data/spec/models/signature_request_auth_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_event_spec.rb → signature_request_event_spec.rb} +16 -18
- data/spec/models/signature_request_event_type_spec.rb +30 -0
- data/spec/models/{create_submission_data_request_data_spec.rb → signature_request_input_spec.rb} +28 -30
- data/spec/models/signature_request_message_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_show_spec.rb → signature_request_spec.rb} +31 -31
- data/spec/models/signature_request_state_spec.rb +30 -0
- data/spec/models/signature_request_token_spec.rb +72 -0
- data/spec/models/signature_request_token_type_spec.rb +30 -0
- data/spec/models/string_condition_type_spec.rb +30 -0
- data/spec/models/submission_action_spec.rb +4 -22
- data/spec/models/submission_action_state_spec.rb +30 -0
- data/spec/models/submission_action_type_spec.rb +30 -0
- data/spec/models/submission_batch_spec.rb +27 -13
- data/spec/models/submission_batch_state_spec.rb +30 -0
- data/spec/models/submission_files_spec.rb +48 -0
- data/spec/models/submission_input_spec.rb +96 -0
- data/spec/models/submission_list_spec.rb +42 -0
- data/spec/models/submission_source_pdf_spec.rb +42 -0
- data/spec/models/submission_source_spec.rb +30 -0
- data/spec/models/submission_spec.rb +26 -56
- data/spec/models/submission_state_spec.rb +30 -0
- data/spec/models/template_actor_spec.rb +60 -0
- data/spec/models/template_actor_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_spec.rb → template_defaults_input_spec.rb} +29 -53
- data/spec/models/template_defaults_spec.rb +150 -0
- data/spec/models/{json_schema_spec.rb → template_document_spec.rb} +21 -21
- data/spec/models/template_document_state_spec.rb +30 -0
- data/spec/models/template_field_dependency_action_spec.rb +30 -0
- data/spec/models/template_field_dependency_condition_input_spec.rb +44 -0
- data/spec/models/template_field_dependency_condition_spec.rb +54 -0
- data/spec/models/template_field_dependency_input_spec.rb +60 -0
- data/spec/models/template_field_dependency_match_spec.rb +30 -0
- data/spec/models/template_field_dependency_operator_spec.rb +30 -0
- data/spec/models/template_field_dependency_spec.rb +60 -0
- data/spec/models/template_field_logic_status_spec.rb +30 -0
- data/spec/models/template_form_mode_spec.rb +30 -0
- data/spec/models/{template_model_code_response_spec.rb → template_model_code_spec.rb} +9 -13
- data/spec/models/template_page_ai_error_spec.rb +30 -0
- data/spec/models/template_page_ai_naming_status_spec.rb +30 -0
- data/spec/models/template_page_fields_status_spec.rb +30 -0
- data/spec/models/template_page_image_status_spec.rb +30 -0
- data/spec/models/template_page_processing_status_spec.rb +60 -0
- data/spec/models/template_source_pdf_spec.rb +54 -0
- data/spec/models/template_spec.rb +40 -154
- data/spec/models/template_summary_list_spec.rb +42 -0
- data/spec/models/template_summary_spec.rb +252 -0
- data/spec/models/template_type_spec.rb +30 -0
- data/spec/models/template_version_spec.rb +54 -0
- data/spec/models/template_version_type_spec.rb +30 -0
- data/spec/models/text_alignment_spec.rb +30 -0
- data/spec/models/text_overflow_spec.rb +30 -0
- data/spec/models/text_vertical_alignment_spec.rb +30 -0
- data/spec/models/typeface_spec.rb +30 -0
- data/spec/models/{submission_batch_with_submissions_spec.rb → update_signature_request_request_spec.rb} +18 -22
- data/spec/models/update_template_document_request_spec.rb +48 -0
- data/spec/models/{submission_preview_spec.rb → update_template_request_spec.rb} +81 -41
- data/spec/models/update_webhook_request_spec.rb +96 -0
- data/spec/models/upload_method_spec.rb +30 -0
- data/spec/models/{upload_presign_response_spec.rb → upload_presign_spec.rb} +13 -17
- data/spec/models/url_source_pdf_spec.rb +42 -0
- data/spec/models/webhook_event_type_spec.rb +30 -0
- data/spec/models/webhook_list_spec.rb +42 -0
- data/spec/models/webhook_mode_spec.rb +30 -0
- data/spec/models/webhook_spec.rb +4 -8
- data/spec/spec_helper.rb +3 -3
- metadata +485 -202
- data/docs/AddFieldsData.md +0 -18
- data/docs/BatchGeneratePdfs201Response.md +0 -28
- data/docs/CombinePdfsData.md +0 -28
- data/docs/CombinedSubmission.md +0 -44
- data/docs/CombinedSubmissionAction.md +0 -30
- data/docs/CopyTemplateOptions.md +0 -22
- data/docs/CreateCombinedSubmissionResponse.md +0 -26
- data/docs/CreateCustomFileData.md +0 -18
- data/docs/CreateCustomFileResponse.md +0 -24
- data/docs/CreateHtmlTemplate.md +0 -18
- data/docs/CreatePdfSubmissionData.md +0 -34
- data/docs/CreatePdfTemplate.md +0 -18
- data/docs/CreateSubmissionDataRequestData.md +0 -44
- data/docs/CreateSubmissionDataRequestEventRequest.md +0 -24
- data/docs/CreateSubmissionDataRequestEventResponse.md +0 -24
- data/docs/CreateSubmissionDataRequestResponse.md +0 -24
- data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -24
- data/docs/CreateSubmissionResponse.md +0 -26
- data/docs/ErrorOrMultipleErrorsResponse.md +0 -22
- data/docs/ForbiddenErrorResponse.md +0 -22
- data/docs/JsonSchema.md +0 -40
- data/docs/ListSubmissionsResponse.md +0 -22
- data/docs/MoveFolderData.md +0 -18
- data/docs/MoveTemplateData.md +0 -20
- data/docs/MultipleErrorsResponse.md +0 -20
- data/docs/PublishVersionData.md +0 -20
- data/docs/RestoreVersionData.md +0 -18
- data/docs/Submission422Response.md +0 -24
- data/docs/SubmissionBatchData.md +0 -26
- data/docs/SubmissionBatchWithSubmissions.md +0 -34
- data/docs/SubmissionDataRequest.md +0 -60
- data/docs/SubmissionDataRequestEvent.md +0 -30
- data/docs/SubmissionDataRequestShow.md +0 -62
- data/docs/SubmissionDataRequestToken.md +0 -24
- data/docs/SubmissionPreview.md +0 -64
- data/docs/SuccessErrorResponse.md +0 -20
- data/docs/SuccessMultipleErrorsResponse.md +0 -20
- data/docs/TemplateAddFieldsResponse.md +0 -22
- data/docs/TemplateDeleteResponse.md +0 -24
- data/docs/TemplateModelCodeResponse.md +0 -22
- data/docs/TemplatePreview.md +0 -116
- data/docs/TemplatePublishVersionResponse.md +0 -22
- data/docs/UpdateHtmlTemplate.md +0 -18
- data/docs/UpdatePdfTemplate.md +0 -18
- data/docs/UpdateSubmissionDataRequestData.md +0 -42
- data/docs/UploadPresignResponse.md +0 -24
- data/lib/docspring/models/batch_generate_pdfs201_response.rb +0 -352
- data/lib/docspring/models/combined_submission_action.rb +0 -384
- data/lib/docspring/models/create_combined_submission_response.rb +0 -324
- data/lib/docspring/models/create_custom_file_response.rb +0 -314
- data/lib/docspring/models/create_html_template.rb +0 -243
- data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -314
- data/lib/docspring/models/create_submission_data_request_response.rb +0 -314
- data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -314
- data/lib/docspring/models/create_submission_response.rb +0 -324
- data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
- data/lib/docspring/models/forbidden_error_response.rb +0 -323
- data/lib/docspring/models/json_schema.rb +0 -329
- data/lib/docspring/models/list_submissions_response.rb +0 -283
- data/lib/docspring/models/multiple_errors_response.rb +0 -296
- data/lib/docspring/models/submission422_response.rb +0 -299
- data/lib/docspring/models/submission_batch_with_submissions.rb +0 -433
- data/lib/docspring/models/submission_data_request.rb +0 -570
- data/lib/docspring/models/submission_data_request_token.rb +0 -279
- data/lib/docspring/models/submission_preview.rb +0 -637
- data/lib/docspring/models/success_multiple_errors_response.rb +0 -279
- data/lib/docspring/models/template_add_fields_response.rb +0 -290
- data/lib/docspring/models/template_delete_response.rb +0 -300
- data/lib/docspring/models/template_publish_version_response.rb +0 -305
- data/lib/docspring/models/update_html_template.rb +0 -243
- data/lib/docspring/models/update_pdf_template.rb +0 -243
- data/spec/models/add_fields_data_spec.rb +0 -36
- data/spec/models/combined_submission_action_spec.rb +0 -84
- data/spec/models/create_combined_submission_response_spec.rb +0 -64
- data/spec/models/create_custom_file_response_spec.rb +0 -58
- data/spec/models/create_folder_data_spec.rb +0 -36
- data/spec/models/create_html_template_spec.rb +0 -36
- data/spec/models/create_pdf_template_spec.rb +0 -36
- data/spec/models/create_submission_data_request_event_request_spec.rb +0 -62
- data/spec/models/create_submission_data_request_event_response_spec.rb +0 -58
- data/spec/models/create_submission_data_request_response_spec.rb +0 -58
- data/spec/models/create_submission_data_request_token_response_spec.rb +0 -58
- data/spec/models/create_webhook_data_spec.rb +0 -36
- data/spec/models/error_or_multiple_errors_response_spec.rb +0 -52
- data/spec/models/forbidden_error_response_spec.rb +0 -56
- data/spec/models/move_folder_data_spec.rb +0 -36
- data/spec/models/multiple_errors_response_spec.rb +0 -46
- data/spec/models/restore_version_data_spec.rb +0 -36
- data/spec/models/submission422_response_spec.rb +0 -58
- data/spec/models/success_error_response_spec.rb +0 -46
- data/spec/models/success_multiple_errors_response_spec.rb +0 -46
- data/spec/models/template_add_fields_response_spec.rb +0 -52
- data/spec/models/template_delete_response_spec.rb +0 -58
- data/spec/models/template_publish_version_response_spec.rb +0 -52
- data/spec/models/update_html_template_spec.rb +0 -36
- data/spec/models/update_pdf_template_spec.rb +0 -36
- data/spec/models/update_submission_data_request_data_spec.rb +0 -116
- data/spec/models/update_webhook_data_spec.rb +0 -36
|
@@ -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
|
|
|
@@ -14,45 +14,66 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DocSpring
|
|
17
|
-
|
|
17
|
+
# An endpoint that DocSpring sends a POST request to when a subscribed event happens.
|
|
18
|
+
class Webhook < ApiModelBase
|
|
19
|
+
# The webhook's ID.
|
|
18
20
|
attr_accessor :id
|
|
19
21
|
|
|
22
|
+
# A name for the webhook, shown in the dashboard.
|
|
20
23
|
attr_accessor :name
|
|
21
24
|
|
|
25
|
+
# The endpoint that receives webhook POST requests.
|
|
22
26
|
attr_accessor :url
|
|
23
27
|
|
|
28
|
+
# Whether DocSpring sends events to the webhook. Webhooks are disabled after repeated failures.
|
|
24
29
|
attr_accessor :enabled
|
|
25
30
|
|
|
31
|
+
# The events the webhook subscribes to. A webhook made in the dashboard can also subscribe to API token, account integration and user events, which are listed with their own names.
|
|
26
32
|
attr_accessor :event_types
|
|
27
33
|
|
|
34
|
+
# Only send events for test or live submissions. Null sends both.
|
|
28
35
|
attr_accessor :mode
|
|
29
36
|
|
|
37
|
+
# The format of the requests DocSpring sends. Webhooks created with API v2 use 4: each event's `data` is the resource as API v2 returns it. Webhooks made in the dashboard or with API v1 use 3, which has API v1's resources and names (`combined_submission`, `submission_data_request`). Versions 1 and 2 are legacy formats for submission events.
|
|
30
38
|
attr_accessor :version
|
|
31
39
|
|
|
40
|
+
# Only send events from these API tokens. Combined with the other scope lists using OR. Applies to submission, signature request, combined PDF, submission batch and custom file events.
|
|
32
41
|
attr_accessor :api_token_ids
|
|
33
42
|
|
|
43
|
+
# Only send events for these templates. Combined with the other scope lists using OR. Applies to submission, signature request and template events.
|
|
34
44
|
attr_accessor :template_ids
|
|
35
45
|
|
|
46
|
+
# Only send events for templates in these folders, including their subfolders. Combined with the other scope lists using OR. Applies to submission, signature request, template and folder events.
|
|
36
47
|
attr_accessor :folder_ids
|
|
37
48
|
|
|
49
|
+
# Include the submission's field data in the payload. When false, the submission's data and truncated_text, and each signature request's data, ip_address and user_agent, are null.
|
|
38
50
|
attr_accessor :include_submission_data
|
|
39
51
|
|
|
52
|
+
# Dot-separated paths to remove from the event's data object. Form fields live under `data` (`data.ssn` removes the ssn field). A bare name removes a top-level key (`metadata` removes the whole metadata object).
|
|
40
53
|
attr_accessor :strip_fields
|
|
41
54
|
|
|
55
|
+
# Headers to send with each request.
|
|
42
56
|
attr_accessor :headers
|
|
43
57
|
|
|
58
|
+
# How many deliveries in a row have failed.
|
|
44
59
|
attr_accessor :consecutive_failures
|
|
45
60
|
|
|
61
|
+
# When a delivery last failed.
|
|
46
62
|
attr_accessor :last_failure_at
|
|
47
63
|
|
|
64
|
+
# When the webhook was disabled. Null while it is enabled.
|
|
48
65
|
attr_accessor :disabled_at
|
|
49
66
|
|
|
67
|
+
# Why the webhook was disabled, such as after repeated failures.
|
|
50
68
|
attr_accessor :disabled_reason
|
|
51
69
|
|
|
70
|
+
# The key that signs each request (the X-DocSpring-Signature header), so you can check that a request came from DocSpring. Null for some webhooks created before signing existed.
|
|
52
71
|
attr_accessor :secret
|
|
53
72
|
|
|
73
|
+
# When the webhook was created.
|
|
54
74
|
attr_accessor :created_at
|
|
55
75
|
|
|
76
|
+
# When the webhook was last updated.
|
|
56
77
|
attr_accessor :updated_at
|
|
57
78
|
|
|
58
79
|
class EnumAttributeValidator
|
|
@@ -120,8 +141,8 @@ module DocSpring
|
|
|
120
141
|
:'name' => :'String',
|
|
121
142
|
:'url' => :'String',
|
|
122
143
|
:'enabled' => :'Boolean',
|
|
123
|
-
:'event_types' => :'Array<
|
|
124
|
-
:'mode' => :'
|
|
144
|
+
:'event_types' => :'Array<WebhookEventType>',
|
|
145
|
+
:'mode' => :'WebhookMode',
|
|
125
146
|
:'version' => :'Integer',
|
|
126
147
|
:'api_token_ids' => :'Array<String>',
|
|
127
148
|
:'template_ids' => :'Array<String>',
|
|
@@ -130,12 +151,12 @@ module DocSpring
|
|
|
130
151
|
:'strip_fields' => :'Array<String>',
|
|
131
152
|
:'headers' => :'Hash<String, String>',
|
|
132
153
|
:'consecutive_failures' => :'Integer',
|
|
133
|
-
:'last_failure_at' => :'
|
|
134
|
-
:'disabled_at' => :'
|
|
154
|
+
:'last_failure_at' => :'Time',
|
|
155
|
+
:'disabled_at' => :'Time',
|
|
135
156
|
:'disabled_reason' => :'String',
|
|
136
157
|
:'secret' => :'String',
|
|
137
|
-
:'created_at' => :'
|
|
138
|
-
:'updated_at' => :'
|
|
158
|
+
:'created_at' => :'Time',
|
|
159
|
+
:'updated_at' => :'Time'
|
|
139
160
|
}
|
|
140
161
|
end
|
|
141
162
|
|
|
@@ -143,17 +164,24 @@ module DocSpring
|
|
|
143
164
|
def self.openapi_nullable
|
|
144
165
|
Set.new([
|
|
145
166
|
:'name',
|
|
146
|
-
:'url',
|
|
147
167
|
:'mode',
|
|
148
168
|
:'last_failure_at',
|
|
149
169
|
:'disabled_at',
|
|
150
170
|
:'disabled_reason',
|
|
151
171
|
:'secret',
|
|
152
|
-
:'created_at',
|
|
153
|
-
:'updated_at'
|
|
154
172
|
])
|
|
155
173
|
end
|
|
156
174
|
|
|
175
|
+
# Returns attribute type mapping
|
|
176
|
+
def self.acceptable_openapi_types
|
|
177
|
+
openapi_types
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Returns the nullable attributes
|
|
181
|
+
def self.acceptable_openapi_nullable
|
|
182
|
+
openapi_nullable
|
|
183
|
+
end
|
|
184
|
+
|
|
157
185
|
# Initializes the object
|
|
158
186
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
159
187
|
def initialize(attributes = {})
|
|
@@ -312,6 +340,10 @@ module DocSpring
|
|
|
312
340
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
313
341
|
end
|
|
314
342
|
|
|
343
|
+
if @url.nil?
|
|
344
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
345
|
+
end
|
|
346
|
+
|
|
315
347
|
if @enabled.nil?
|
|
316
348
|
invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
|
|
317
349
|
end
|
|
@@ -352,6 +384,14 @@ module DocSpring
|
|
|
352
384
|
invalid_properties.push('invalid value for "consecutive_failures", consecutive_failures cannot be nil.')
|
|
353
385
|
end
|
|
354
386
|
|
|
387
|
+
if @created_at.nil?
|
|
388
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
if @updated_at.nil?
|
|
392
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
393
|
+
end
|
|
394
|
+
|
|
355
395
|
invalid_properties
|
|
356
396
|
end
|
|
357
397
|
|
|
@@ -360,10 +400,9 @@ module DocSpring
|
|
|
360
400
|
def valid?
|
|
361
401
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
362
402
|
return false if @id.nil?
|
|
403
|
+
return false if @url.nil?
|
|
363
404
|
return false if @enabled.nil?
|
|
364
405
|
return false if @event_types.nil?
|
|
365
|
-
mode_validator = EnumAttributeValidator.new('String', ["test", "live"])
|
|
366
|
-
return false unless mode_validator.valid?(@mode)
|
|
367
406
|
return false if @version.nil?
|
|
368
407
|
return false if @api_token_ids.nil?
|
|
369
408
|
return false if @template_ids.nil?
|
|
@@ -372,6 +411,8 @@ module DocSpring
|
|
|
372
411
|
return false if @strip_fields.nil?
|
|
373
412
|
return false if @headers.nil?
|
|
374
413
|
return false if @consecutive_failures.nil?
|
|
414
|
+
return false if @created_at.nil?
|
|
415
|
+
return false if @updated_at.nil?
|
|
375
416
|
true
|
|
376
417
|
end
|
|
377
418
|
|
|
@@ -385,6 +426,16 @@ module DocSpring
|
|
|
385
426
|
@id = id
|
|
386
427
|
end
|
|
387
428
|
|
|
429
|
+
# Custom attribute writer method with validation
|
|
430
|
+
# @param [Object] url Value to be assigned
|
|
431
|
+
def url=(url)
|
|
432
|
+
if url.nil?
|
|
433
|
+
fail ArgumentError, 'url cannot be nil'
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
@url = url
|
|
437
|
+
end
|
|
438
|
+
|
|
388
439
|
# Custom attribute writer method with validation
|
|
389
440
|
# @param [Object] enabled Value to be assigned
|
|
390
441
|
def enabled=(enabled)
|
|
@@ -405,17 +456,6 @@ module DocSpring
|
|
|
405
456
|
@event_types = event_types
|
|
406
457
|
end
|
|
407
458
|
|
|
408
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
409
|
-
# @param [Object] mode Object to be assigned
|
|
410
|
-
def mode=(mode)
|
|
411
|
-
validator = EnumAttributeValidator.new('String', ["test", "live"])
|
|
412
|
-
# build_from_hash accepts enum values this client doesn't know about yet
|
|
413
|
-
unless defined?(@_skip_enum_validation) || validator.valid?(mode)
|
|
414
|
-
fail ArgumentError, "invalid value for \"mode\", must be one of #{validator.allowable_values}."
|
|
415
|
-
end
|
|
416
|
-
@mode = mode
|
|
417
|
-
end
|
|
418
|
-
|
|
419
459
|
# Custom attribute writer method with validation
|
|
420
460
|
# @param [Object] version Value to be assigned
|
|
421
461
|
def version=(version)
|
|
@@ -496,6 +536,26 @@ module DocSpring
|
|
|
496
536
|
@consecutive_failures = consecutive_failures
|
|
497
537
|
end
|
|
498
538
|
|
|
539
|
+
# Custom attribute writer method with validation
|
|
540
|
+
# @param [Object] created_at Value to be assigned
|
|
541
|
+
def created_at=(created_at)
|
|
542
|
+
if created_at.nil?
|
|
543
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
@created_at = created_at
|
|
547
|
+
end
|
|
548
|
+
|
|
549
|
+
# Custom attribute writer method with validation
|
|
550
|
+
# @param [Object] updated_at Value to be assigned
|
|
551
|
+
def updated_at=(updated_at)
|
|
552
|
+
if updated_at.nil?
|
|
553
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
@updated_at = updated_at
|
|
557
|
+
end
|
|
558
|
+
|
|
499
559
|
# Checks equality by comparing each attribute.
|
|
500
560
|
# @param [Object] Object to be compared
|
|
501
561
|
def ==(o)
|
|
@@ -541,18 +601,20 @@ module DocSpring
|
|
|
541
601
|
def self.build_from_hash(attributes)
|
|
542
602
|
return nil unless attributes.is_a?(Hash)
|
|
543
603
|
attributes = attributes.transform_keys(&:to_sym)
|
|
604
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
605
|
+
map = acceptable_attribute_map
|
|
544
606
|
transformed_hash = {}
|
|
545
|
-
|
|
546
|
-
if attributes.key?(
|
|
607
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
608
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
547
609
|
transformed_hash["#{key}"] = nil
|
|
548
610
|
elsif type =~ /\AArray<(.*)>/i
|
|
549
611
|
# check to ensure the input is an array given that the attribute
|
|
550
612
|
# is documented as an array but the input is not
|
|
551
|
-
if attributes[
|
|
552
|
-
transformed_hash["#{key}"] = attributes[
|
|
613
|
+
if attributes[map[key]].is_a?(Array)
|
|
614
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
553
615
|
end
|
|
554
|
-
elsif !attributes[
|
|
555
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
616
|
+
elsif !attributes[map[key]].nil?
|
|
617
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
556
618
|
end
|
|
557
619
|
end
|
|
558
620
|
# Responses can include enum values added after this client was released, so the enum setters
|
|
@@ -564,69 +626,15 @@ module DocSpring
|
|
|
564
626
|
end
|
|
565
627
|
end
|
|
566
628
|
|
|
567
|
-
# Deserializes the data based on type
|
|
568
|
-
# @param string type Data type
|
|
569
|
-
# @param string value Value to be deserialized
|
|
570
|
-
# @return [Object] Deserialized data
|
|
571
|
-
def self._deserialize(type, value)
|
|
572
|
-
case type.to_sym
|
|
573
|
-
when :Time
|
|
574
|
-
Time.parse(value)
|
|
575
|
-
when :Date
|
|
576
|
-
Date.parse(value)
|
|
577
|
-
when :String
|
|
578
|
-
value.to_s
|
|
579
|
-
when :Integer
|
|
580
|
-
value.to_i
|
|
581
|
-
when :Float
|
|
582
|
-
value.to_f
|
|
583
|
-
when :Boolean
|
|
584
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
585
|
-
true
|
|
586
|
-
else
|
|
587
|
-
false
|
|
588
|
-
end
|
|
589
|
-
when :Object
|
|
590
|
-
# generic object (usually a Hash), return directly
|
|
591
|
-
value
|
|
592
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
593
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
594
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
595
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
596
|
-
k_type = Regexp.last_match[:k_type]
|
|
597
|
-
v_type = Regexp.last_match[:v_type]
|
|
598
|
-
{}.tap do |hash|
|
|
599
|
-
value.each do |k, v|
|
|
600
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
601
|
-
end
|
|
602
|
-
end
|
|
603
|
-
else # model
|
|
604
|
-
# models (e.g. Pet) or oneOf
|
|
605
|
-
klass = DocSpring.const_get(type)
|
|
606
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
607
|
-
end
|
|
608
|
-
end
|
|
609
|
-
|
|
610
|
-
# Returns the string representation of the object
|
|
611
|
-
# @return [String] String presentation of the object
|
|
612
|
-
def to_s
|
|
613
|
-
to_hash.to_s
|
|
614
|
-
end
|
|
615
|
-
|
|
616
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
617
|
-
# @return [Hash] Returns the object in the form of hash
|
|
618
|
-
def to_body
|
|
619
|
-
to_hash
|
|
620
|
-
end
|
|
621
|
-
|
|
622
629
|
# Returns the object in the form of hash
|
|
623
630
|
# @return [Hash] Returns the object in the form of hash
|
|
624
631
|
def to_hash
|
|
625
632
|
hash = {}
|
|
626
|
-
|
|
633
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
634
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
627
635
|
value = self.send(attr)
|
|
628
636
|
if value.nil?
|
|
629
|
-
is_nullable = self.class.
|
|
637
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
630
638
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
631
639
|
end
|
|
632
640
|
|
|
@@ -635,24 +643,6 @@ module DocSpring
|
|
|
635
643
|
hash
|
|
636
644
|
end
|
|
637
645
|
|
|
638
|
-
# Outputs non-array value in the form of hash
|
|
639
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
640
|
-
# @param [Object] value Any valid value
|
|
641
|
-
# @return [Hash] Returns the value in the form of hash
|
|
642
|
-
def _to_hash(value)
|
|
643
|
-
if value.is_a?(Array)
|
|
644
|
-
value.compact.map { |v| _to_hash(v) }
|
|
645
|
-
elsif value.is_a?(Hash)
|
|
646
|
-
{}.tap do |hash|
|
|
647
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
648
|
-
end
|
|
649
|
-
elsif value.respond_to? :to_hash
|
|
650
|
-
value.to_hash
|
|
651
|
-
else
|
|
652
|
-
value
|
|
653
|
-
end
|
|
654
|
-
end
|
|
655
|
-
|
|
656
646
|
end
|
|
657
647
|
|
|
658
648
|
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#DocSpring API
|
|
3
|
+
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0-DOCSPRING
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DocSpring
|
|
17
|
+
class WebhookEventType
|
|
18
|
+
SUBMISSION_PROCESSED = "submission.processed".freeze
|
|
19
|
+
SUBMISSION_FAILED = "submission.failed".freeze
|
|
20
|
+
SUBMISSION_DECLINED = "submission.declined".freeze
|
|
21
|
+
SIGNATURE_REQUEST_VIEWED = "signature_request.viewed".freeze
|
|
22
|
+
SIGNATURE_REQUEST_COMPLETED = "signature_request.completed".freeze
|
|
23
|
+
SIGNATURE_REQUEST_DECLINED = "signature_request.declined".freeze
|
|
24
|
+
COMBINED_PDF_PROCESSED = "combined_pdf.processed".freeze
|
|
25
|
+
COMBINED_PDF_FAILED = "combined_pdf.failed".freeze
|
|
26
|
+
SUBMISSION_BATCH_PROCESSED = "submission_batch.processed".freeze
|
|
27
|
+
SUBMISSION_BATCH_FAILED = "submission_batch.failed".freeze
|
|
28
|
+
SUBMISSION_CREATED = "submission.created".freeze
|
|
29
|
+
SUBMISSION_UPDATED = "submission.updated".freeze
|
|
30
|
+
SUBMISSION_EXPIRED = "submission.expired".freeze
|
|
31
|
+
SIGNATURE_REQUEST_UPDATED = "signature_request.updated".freeze
|
|
32
|
+
COMBINED_PDF_EXPIRED = "combined_pdf.expired".freeze
|
|
33
|
+
TEMPLATE_CREATED = "template.created".freeze
|
|
34
|
+
TEMPLATE_UPDATED = "template.updated".freeze
|
|
35
|
+
TEMPLATE_DELETED = "template.deleted".freeze
|
|
36
|
+
WEBHOOK_CREATED = "webhook.created".freeze
|
|
37
|
+
WEBHOOK_UPDATED = "webhook.updated".freeze
|
|
38
|
+
WEBHOOK_DELETED = "webhook.deleted".freeze
|
|
39
|
+
CUSTOM_FILE_CREATED = "custom_file.created".freeze
|
|
40
|
+
FOLDER_CREATED = "folder.created".freeze
|
|
41
|
+
FOLDER_UPDATED = "folder.updated".freeze
|
|
42
|
+
FOLDER_DELETED = "folder.deleted".freeze
|
|
43
|
+
|
|
44
|
+
def self.all_vars
|
|
45
|
+
@all_vars ||= [SUBMISSION_PROCESSED, SUBMISSION_FAILED, SUBMISSION_DECLINED, SIGNATURE_REQUEST_VIEWED, SIGNATURE_REQUEST_COMPLETED, SIGNATURE_REQUEST_DECLINED, COMBINED_PDF_PROCESSED, COMBINED_PDF_FAILED, SUBMISSION_BATCH_PROCESSED, SUBMISSION_BATCH_FAILED, SUBMISSION_CREATED, SUBMISSION_UPDATED, SUBMISSION_EXPIRED, SIGNATURE_REQUEST_UPDATED, COMBINED_PDF_EXPIRED, TEMPLATE_CREATED, TEMPLATE_UPDATED, TEMPLATE_DELETED, WEBHOOK_CREATED, WEBHOOK_UPDATED, WEBHOOK_DELETED, CUSTOM_FILE_CREATED, FOLDER_CREATED, FOLDER_UPDATED, FOLDER_DELETED].freeze
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Builds the enum from string
|
|
49
|
+
# @param [String] The enum value in the form of the string
|
|
50
|
+
# @return [String] The enum value
|
|
51
|
+
def self.build_from_hash(value)
|
|
52
|
+
new.build_from_hash(value)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Builds the enum from string
|
|
56
|
+
# @param [String] The enum value in the form of the string
|
|
57
|
+
# @return [String] The enum value
|
|
58
|
+
def build_from_hash(value)
|
|
59
|
+
# Only responses are built from hashes, and a value added to the API after this client was released is kept as it
|
|
60
|
+
# is: the constants are the values this client knows
|
|
61
|
+
value
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#DocSpring API
|
|
3
|
+
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0-DOCSPRING
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DocSpring
|
|
17
|
+
# A page of webhooks, newest first.
|
|
18
|
+
class WebhookList < ApiModelBase
|
|
19
|
+
# The items on this page.
|
|
20
|
+
attr_accessor :data
|
|
21
|
+
|
|
22
|
+
# Pass it as `cursor` to get the next page. Null on the last page.
|
|
23
|
+
attr_accessor :next_cursor
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'data' => :'data',
|
|
29
|
+
:'next_cursor' => :'next_cursor'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'data' => :'Array<Webhook>',
|
|
47
|
+
:'next_cursor' => :'String'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
:'next_cursor'
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns attribute type mapping
|
|
59
|
+
def self.acceptable_openapi_types
|
|
60
|
+
openapi_types
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Returns the nullable attributes
|
|
64
|
+
def self.acceptable_openapi_nullable
|
|
65
|
+
openapi_nullable
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Initializes the object
|
|
69
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
70
|
+
def initialize(attributes = {})
|
|
71
|
+
if (!attributes.is_a?(Hash))
|
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::WebhookList` initialize method"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
76
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
77
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
78
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::WebhookList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
80
|
+
end
|
|
81
|
+
h[k.to_sym] = v
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'data')
|
|
85
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
86
|
+
self.data = value
|
|
87
|
+
end
|
|
88
|
+
else
|
|
89
|
+
self.data = nil
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'next_cursor')
|
|
93
|
+
self.next_cursor = attributes[:'next_cursor']
|
|
94
|
+
else
|
|
95
|
+
self.next_cursor = nil
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
100
|
+
# @return Array for valid properties with the reasons
|
|
101
|
+
def list_invalid_properties
|
|
102
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
103
|
+
invalid_properties = Array.new
|
|
104
|
+
if @data.nil?
|
|
105
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
invalid_properties
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Check to see if the all the properties in the model are valid
|
|
112
|
+
# @return true if the model is valid
|
|
113
|
+
def valid?
|
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
115
|
+
return false if @data.nil?
|
|
116
|
+
true
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Custom attribute writer method with validation
|
|
120
|
+
# @param [Object] data Value to be assigned
|
|
121
|
+
def data=(data)
|
|
122
|
+
if data.nil?
|
|
123
|
+
fail ArgumentError, 'data cannot be nil'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
@data = data
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Checks equality by comparing each attribute.
|
|
130
|
+
# @param [Object] Object to be compared
|
|
131
|
+
def ==(o)
|
|
132
|
+
return true if self.equal?(o)
|
|
133
|
+
self.class == o.class &&
|
|
134
|
+
data == o.data &&
|
|
135
|
+
next_cursor == o.next_cursor
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# @see the `==` method
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def eql?(o)
|
|
141
|
+
self == o
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Calculates hash code according to all attributes.
|
|
145
|
+
# @return [Integer] Hash code
|
|
146
|
+
def hash
|
|
147
|
+
[data, next_cursor].hash
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Builds the object from hash
|
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
152
|
+
# @return [Object] Returns the model itself
|
|
153
|
+
def self.build_from_hash(attributes)
|
|
154
|
+
return nil unless attributes.is_a?(Hash)
|
|
155
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
156
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
157
|
+
map = acceptable_attribute_map
|
|
158
|
+
transformed_hash = {}
|
|
159
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
160
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
161
|
+
transformed_hash["#{key}"] = nil
|
|
162
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
163
|
+
# check to ensure the input is an array given that the attribute
|
|
164
|
+
# is documented as an array but the input is not
|
|
165
|
+
if attributes[map[key]].is_a?(Array)
|
|
166
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
167
|
+
end
|
|
168
|
+
elsif !attributes[map[key]].nil?
|
|
169
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
173
|
+
# accept any value while the model is built from a response
|
|
174
|
+
allocate.tap do |model|
|
|
175
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
176
|
+
model.send(:initialize, transformed_hash)
|
|
177
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Returns the object in the form of hash
|
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
|
183
|
+
def to_hash
|
|
184
|
+
hash = {}
|
|
185
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
186
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
187
|
+
value = self.send(attr)
|
|
188
|
+
if value.nil?
|
|
189
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
190
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
hash[param] = _to_hash(value)
|
|
194
|
+
end
|
|
195
|
+
hash
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#DocSpring API
|
|
3
|
+
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0-DOCSPRING
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DocSpring
|
|
17
|
+
class WebhookMode
|
|
18
|
+
TEST = "test".freeze
|
|
19
|
+
LIVE = "live".freeze
|
|
20
|
+
|
|
21
|
+
def self.all_vars
|
|
22
|
+
@all_vars ||= [TEST, LIVE].freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Builds the enum from string
|
|
26
|
+
# @param [String] The enum value in the form of the string
|
|
27
|
+
# @return [String] The enum value
|
|
28
|
+
def self.build_from_hash(value)
|
|
29
|
+
new.build_from_hash(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Builds the enum from string
|
|
33
|
+
# @param [String] The enum value in the form of the string
|
|
34
|
+
# @return [String] The enum value
|
|
35
|
+
def build_from_hash(value)
|
|
36
|
+
# Only responses are built from hashes, and a value added to the API after this client was released is kept as it
|
|
37
|
+
# is: the constants are the values this client knows
|
|
38
|
+
value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|