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,16 +14,19 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DocSpring
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
# The folder to create.
|
|
18
|
+
class CreateFolderRequest < ApiModelBase
|
|
19
|
+
# The folder's name. It can't contain `/`, and is unique within its parent folder.
|
|
20
|
+
attr_accessor :name
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
# The ID of the folder this folder is in. Null for a folder at the root.
|
|
23
|
+
attr_accessor :parent_folder_id
|
|
21
24
|
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
26
|
def self.attribute_map
|
|
24
27
|
{
|
|
25
|
-
:'
|
|
26
|
-
:'
|
|
28
|
+
:'name' => :'name',
|
|
29
|
+
:'parent_folder_id' => :'parent_folder_id'
|
|
27
30
|
}
|
|
28
31
|
end
|
|
29
32
|
|
|
@@ -40,42 +43,52 @@ module DocSpring
|
|
|
40
43
|
# Attribute type mapping.
|
|
41
44
|
def self.openapi_types
|
|
42
45
|
{
|
|
43
|
-
:'
|
|
44
|
-
:'
|
|
46
|
+
:'name' => :'String',
|
|
47
|
+
:'parent_folder_id' => :'String'
|
|
45
48
|
}
|
|
46
49
|
end
|
|
47
50
|
|
|
48
51
|
# List of attributes with nullable: true
|
|
49
52
|
def self.openapi_nullable
|
|
50
53
|
Set.new([
|
|
51
|
-
:'parent_folder_id'
|
|
54
|
+
:'parent_folder_id'
|
|
52
55
|
])
|
|
53
56
|
end
|
|
54
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
|
+
|
|
55
68
|
# Initializes the object
|
|
56
69
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
70
|
def initialize(attributes = {})
|
|
58
71
|
if (!attributes.is_a?(Hash))
|
|
59
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::
|
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::CreateFolderRequest` initialize method"
|
|
60
73
|
end
|
|
61
74
|
|
|
62
75
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
76
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
77
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
78
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::CreateFolderRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
80
|
end
|
|
68
81
|
h[k.to_sym] = v
|
|
69
82
|
}
|
|
70
83
|
|
|
71
|
-
if attributes.key?(:'
|
|
72
|
-
self.
|
|
84
|
+
if attributes.key?(:'name')
|
|
85
|
+
self.name = attributes[:'name']
|
|
73
86
|
else
|
|
74
|
-
self.
|
|
87
|
+
self.name = nil
|
|
75
88
|
end
|
|
76
89
|
|
|
77
|
-
if attributes.key?(:'
|
|
78
|
-
self.
|
|
90
|
+
if attributes.key?(:'parent_folder_id')
|
|
91
|
+
self.parent_folder_id = attributes[:'parent_folder_id']
|
|
79
92
|
end
|
|
80
93
|
end
|
|
81
94
|
|
|
@@ -84,6 +97,10 @@ module DocSpring
|
|
|
84
97
|
def list_invalid_properties
|
|
85
98
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
86
99
|
invalid_properties = Array.new
|
|
100
|
+
if @name.nil?
|
|
101
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
102
|
+
end
|
|
103
|
+
|
|
87
104
|
invalid_properties
|
|
88
105
|
end
|
|
89
106
|
|
|
@@ -91,16 +108,27 @@ module DocSpring
|
|
|
91
108
|
# @return true if the model is valid
|
|
92
109
|
def valid?
|
|
93
110
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
111
|
+
return false if @name.nil?
|
|
94
112
|
true
|
|
95
113
|
end
|
|
96
114
|
|
|
115
|
+
# Custom attribute writer method with validation
|
|
116
|
+
# @param [Object] name Value to be assigned
|
|
117
|
+
def name=(name)
|
|
118
|
+
if name.nil?
|
|
119
|
+
fail ArgumentError, 'name cannot be nil'
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
@name = name
|
|
123
|
+
end
|
|
124
|
+
|
|
97
125
|
# Checks equality by comparing each attribute.
|
|
98
126
|
# @param [Object] Object to be compared
|
|
99
127
|
def ==(o)
|
|
100
128
|
return true if self.equal?(o)
|
|
101
129
|
self.class == o.class &&
|
|
102
|
-
|
|
103
|
-
|
|
130
|
+
name == o.name &&
|
|
131
|
+
parent_folder_id == o.parent_folder_id
|
|
104
132
|
end
|
|
105
133
|
|
|
106
134
|
# @see the `==` method
|
|
@@ -112,7 +140,7 @@ module DocSpring
|
|
|
112
140
|
# Calculates hash code according to all attributes.
|
|
113
141
|
# @return [Integer] Hash code
|
|
114
142
|
def hash
|
|
115
|
-
[
|
|
143
|
+
[name, parent_folder_id].hash
|
|
116
144
|
end
|
|
117
145
|
|
|
118
146
|
# Builds the object from hash
|
|
@@ -121,18 +149,20 @@ module DocSpring
|
|
|
121
149
|
def self.build_from_hash(attributes)
|
|
122
150
|
return nil unless attributes.is_a?(Hash)
|
|
123
151
|
attributes = attributes.transform_keys(&:to_sym)
|
|
152
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
153
|
+
map = acceptable_attribute_map
|
|
124
154
|
transformed_hash = {}
|
|
125
|
-
|
|
126
|
-
if attributes.key?(
|
|
155
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
156
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
127
157
|
transformed_hash["#{key}"] = nil
|
|
128
158
|
elsif type =~ /\AArray<(.*)>/i
|
|
129
159
|
# check to ensure the input is an array given that the attribute
|
|
130
160
|
# is documented as an array but the input is not
|
|
131
|
-
if attributes[
|
|
132
|
-
transformed_hash["#{key}"] = attributes[
|
|
161
|
+
if attributes[map[key]].is_a?(Array)
|
|
162
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
133
163
|
end
|
|
134
|
-
elsif !attributes[
|
|
135
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
164
|
+
elsif !attributes[map[key]].nil?
|
|
165
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
136
166
|
end
|
|
137
167
|
end
|
|
138
168
|
# Responses can include enum values added after this client was released, so the enum setters
|
|
@@ -144,69 +174,15 @@ module DocSpring
|
|
|
144
174
|
end
|
|
145
175
|
end
|
|
146
176
|
|
|
147
|
-
# Deserializes the data based on type
|
|
148
|
-
# @param string type Data type
|
|
149
|
-
# @param string value Value to be deserialized
|
|
150
|
-
# @return [Object] Deserialized data
|
|
151
|
-
def self._deserialize(type, value)
|
|
152
|
-
case type.to_sym
|
|
153
|
-
when :Time
|
|
154
|
-
Time.parse(value)
|
|
155
|
-
when :Date
|
|
156
|
-
Date.parse(value)
|
|
157
|
-
when :String
|
|
158
|
-
value.to_s
|
|
159
|
-
when :Integer
|
|
160
|
-
value.to_i
|
|
161
|
-
when :Float
|
|
162
|
-
value.to_f
|
|
163
|
-
when :Boolean
|
|
164
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
165
|
-
true
|
|
166
|
-
else
|
|
167
|
-
false
|
|
168
|
-
end
|
|
169
|
-
when :Object
|
|
170
|
-
# generic object (usually a Hash), return directly
|
|
171
|
-
value
|
|
172
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
173
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
174
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
175
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
176
|
-
k_type = Regexp.last_match[:k_type]
|
|
177
|
-
v_type = Regexp.last_match[:v_type]
|
|
178
|
-
{}.tap do |hash|
|
|
179
|
-
value.each do |k, v|
|
|
180
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
181
|
-
end
|
|
182
|
-
end
|
|
183
|
-
else # model
|
|
184
|
-
# models (e.g. Pet) or oneOf
|
|
185
|
-
klass = DocSpring.const_get(type)
|
|
186
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
187
|
-
end
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
# Returns the string representation of the object
|
|
191
|
-
# @return [String] String presentation of the object
|
|
192
|
-
def to_s
|
|
193
|
-
to_hash.to_s
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
197
|
-
# @return [Hash] Returns the object in the form of hash
|
|
198
|
-
def to_body
|
|
199
|
-
to_hash
|
|
200
|
-
end
|
|
201
|
-
|
|
202
177
|
# Returns the object in the form of hash
|
|
203
178
|
# @return [Hash] Returns the object in the form of hash
|
|
204
179
|
def to_hash
|
|
205
180
|
hash = {}
|
|
206
|
-
|
|
181
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
182
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
207
183
|
value = self.send(attr)
|
|
208
184
|
if value.nil?
|
|
209
|
-
is_nullable = self.class.
|
|
185
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
210
186
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
211
187
|
end
|
|
212
188
|
|
|
@@ -215,24 +191,6 @@ module DocSpring
|
|
|
215
191
|
hash
|
|
216
192
|
end
|
|
217
193
|
|
|
218
|
-
# Outputs non-array value in the form of hash
|
|
219
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
220
|
-
# @param [Object] value Any valid value
|
|
221
|
-
# @return [Hash] Returns the value in the form of hash
|
|
222
|
-
def _to_hash(value)
|
|
223
|
-
if value.is_a?(Array)
|
|
224
|
-
value.compact.map { |v| _to_hash(v) }
|
|
225
|
-
elsif value.is_a?(Hash)
|
|
226
|
-
{}.tap do |hash|
|
|
227
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
228
|
-
end
|
|
229
|
-
elsif value.respond_to? :to_hash
|
|
230
|
-
value.to_hash
|
|
231
|
-
else
|
|
232
|
-
value
|
|
233
|
-
end
|
|
234
|
-
end
|
|
235
|
-
|
|
236
194
|
end
|
|
237
195
|
|
|
238
196
|
end
|
|
@@ -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,13 +14,18 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DocSpring
|
|
17
|
-
|
|
17
|
+
# The event to record.
|
|
18
|
+
class CreateSignatureRequestEventRequest < ApiModelBase
|
|
19
|
+
# `send_request`: you sent the signature request to the person (`message_type` and `message_recipient` are required). It's the only event the API records: DocSpring records everything that happens in the signing form itself, and people decline a signature request in its form.
|
|
18
20
|
attr_accessor :event_type
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
# How you sent the request. Required for `send_request`.
|
|
22
23
|
attr_accessor :message_type
|
|
23
24
|
|
|
25
|
+
# Where you sent the request, such as an email address or a phone number. Required for `send_request`.
|
|
26
|
+
attr_accessor :message_recipient
|
|
27
|
+
|
|
28
|
+
# When it happened. Default now.
|
|
24
29
|
attr_accessor :occurred_at
|
|
25
30
|
|
|
26
31
|
class EnumAttributeValidator
|
|
@@ -49,8 +54,8 @@ module DocSpring
|
|
|
49
54
|
def self.attribute_map
|
|
50
55
|
{
|
|
51
56
|
:'event_type' => :'event_type',
|
|
52
|
-
:'message_recipient' => :'message_recipient',
|
|
53
57
|
:'message_type' => :'message_type',
|
|
58
|
+
:'message_recipient' => :'message_recipient',
|
|
54
59
|
:'occurred_at' => :'occurred_at'
|
|
55
60
|
}
|
|
56
61
|
end
|
|
@@ -68,34 +73,43 @@ module DocSpring
|
|
|
68
73
|
# Attribute type mapping.
|
|
69
74
|
def self.openapi_types
|
|
70
75
|
{
|
|
71
|
-
:'event_type' => :'
|
|
76
|
+
:'event_type' => :'SignatureRequestEventType',
|
|
77
|
+
:'message_type' => :'SignatureRequestMessageType',
|
|
72
78
|
:'message_recipient' => :'String',
|
|
73
|
-
:'
|
|
74
|
-
:'occurred_at' => :'String'
|
|
79
|
+
:'occurred_at' => :'Time'
|
|
75
80
|
}
|
|
76
81
|
end
|
|
77
82
|
|
|
78
83
|
# List of attributes with nullable: true
|
|
79
84
|
def self.openapi_nullable
|
|
80
85
|
Set.new([
|
|
81
|
-
:'message_recipient',
|
|
82
86
|
:'message_type',
|
|
83
|
-
:'
|
|
87
|
+
:'message_recipient',
|
|
84
88
|
])
|
|
85
89
|
end
|
|
86
90
|
|
|
91
|
+
# Returns attribute type mapping
|
|
92
|
+
def self.acceptable_openapi_types
|
|
93
|
+
openapi_types
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Returns the nullable attributes
|
|
97
|
+
def self.acceptable_openapi_nullable
|
|
98
|
+
openapi_nullable
|
|
99
|
+
end
|
|
100
|
+
|
|
87
101
|
# Initializes the object
|
|
88
102
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
89
103
|
def initialize(attributes = {})
|
|
90
104
|
if (!attributes.is_a?(Hash))
|
|
91
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::
|
|
105
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::CreateSignatureRequestEventRequest` initialize method"
|
|
92
106
|
end
|
|
93
107
|
|
|
94
108
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
95
109
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
96
110
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
97
111
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
98
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::
|
|
112
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::CreateSignatureRequestEventRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
99
113
|
end
|
|
100
114
|
h[k.to_sym] = v
|
|
101
115
|
}
|
|
@@ -106,14 +120,14 @@ module DocSpring
|
|
|
106
120
|
self.event_type = nil
|
|
107
121
|
end
|
|
108
122
|
|
|
109
|
-
if attributes.key?(:'message_recipient')
|
|
110
|
-
self.message_recipient = attributes[:'message_recipient']
|
|
111
|
-
end
|
|
112
|
-
|
|
113
123
|
if attributes.key?(:'message_type')
|
|
114
124
|
self.message_type = attributes[:'message_type']
|
|
115
125
|
end
|
|
116
126
|
|
|
127
|
+
if attributes.key?(:'message_recipient')
|
|
128
|
+
self.message_recipient = attributes[:'message_recipient']
|
|
129
|
+
end
|
|
130
|
+
|
|
117
131
|
if attributes.key?(:'occurred_at')
|
|
118
132
|
self.occurred_at = attributes[:'occurred_at']
|
|
119
133
|
end
|
|
@@ -136,33 +150,17 @@ module DocSpring
|
|
|
136
150
|
def valid?
|
|
137
151
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
138
152
|
return false if @event_type.nil?
|
|
139
|
-
event_type_validator = EnumAttributeValidator.new('String', ["send_request", "view_request", "accepted_terms", "decline_request", "sign_request", "all_completed"])
|
|
140
|
-
return false unless event_type_validator.valid?(@event_type)
|
|
141
|
-
message_type_validator = EnumAttributeValidator.new('String', ["email", "sms", "fax", "mail", "slack", "msteams", "discord", "telegram", "whatsapp"])
|
|
142
|
-
return false unless message_type_validator.valid?(@message_type)
|
|
143
153
|
true
|
|
144
154
|
end
|
|
145
155
|
|
|
146
|
-
# Custom attribute writer method
|
|
147
|
-
# @param [Object] event_type
|
|
156
|
+
# Custom attribute writer method with validation
|
|
157
|
+
# @param [Object] event_type Value to be assigned
|
|
148
158
|
def event_type=(event_type)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
unless defined?(@_skip_enum_validation) || validator.valid?(event_type)
|
|
152
|
-
fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}."
|
|
159
|
+
if event_type.nil?
|
|
160
|
+
fail ArgumentError, 'event_type cannot be nil'
|
|
153
161
|
end
|
|
154
|
-
@event_type = event_type
|
|
155
|
-
end
|
|
156
162
|
|
|
157
|
-
|
|
158
|
-
# @param [Object] message_type Object to be assigned
|
|
159
|
-
def message_type=(message_type)
|
|
160
|
-
validator = EnumAttributeValidator.new('String', ["email", "sms", "fax", "mail", "slack", "msteams", "discord", "telegram", "whatsapp"])
|
|
161
|
-
# build_from_hash accepts enum values this client doesn't know about yet
|
|
162
|
-
unless defined?(@_skip_enum_validation) || validator.valid?(message_type)
|
|
163
|
-
fail ArgumentError, "invalid value for \"message_type\", must be one of #{validator.allowable_values}."
|
|
164
|
-
end
|
|
165
|
-
@message_type = message_type
|
|
163
|
+
@event_type = event_type
|
|
166
164
|
end
|
|
167
165
|
|
|
168
166
|
# Checks equality by comparing each attribute.
|
|
@@ -171,8 +169,8 @@ module DocSpring
|
|
|
171
169
|
return true if self.equal?(o)
|
|
172
170
|
self.class == o.class &&
|
|
173
171
|
event_type == o.event_type &&
|
|
174
|
-
message_recipient == o.message_recipient &&
|
|
175
172
|
message_type == o.message_type &&
|
|
173
|
+
message_recipient == o.message_recipient &&
|
|
176
174
|
occurred_at == o.occurred_at
|
|
177
175
|
end
|
|
178
176
|
|
|
@@ -185,7 +183,7 @@ module DocSpring
|
|
|
185
183
|
# Calculates hash code according to all attributes.
|
|
186
184
|
# @return [Integer] Hash code
|
|
187
185
|
def hash
|
|
188
|
-
[event_type,
|
|
186
|
+
[event_type, message_type, message_recipient, occurred_at].hash
|
|
189
187
|
end
|
|
190
188
|
|
|
191
189
|
# Builds the object from hash
|
|
@@ -194,18 +192,20 @@ module DocSpring
|
|
|
194
192
|
def self.build_from_hash(attributes)
|
|
195
193
|
return nil unless attributes.is_a?(Hash)
|
|
196
194
|
attributes = attributes.transform_keys(&:to_sym)
|
|
195
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
196
|
+
map = acceptable_attribute_map
|
|
197
197
|
transformed_hash = {}
|
|
198
|
-
|
|
199
|
-
if attributes.key?(
|
|
198
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
199
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
200
200
|
transformed_hash["#{key}"] = nil
|
|
201
201
|
elsif type =~ /\AArray<(.*)>/i
|
|
202
202
|
# check to ensure the input is an array given that the attribute
|
|
203
203
|
# is documented as an array but the input is not
|
|
204
|
-
if attributes[
|
|
205
|
-
transformed_hash["#{key}"] = attributes[
|
|
204
|
+
if attributes[map[key]].is_a?(Array)
|
|
205
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
206
206
|
end
|
|
207
|
-
elsif !attributes[
|
|
208
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
207
|
+
elsif !attributes[map[key]].nil?
|
|
208
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
209
209
|
end
|
|
210
210
|
end
|
|
211
211
|
# Responses can include enum values added after this client was released, so the enum setters
|
|
@@ -217,69 +217,15 @@ module DocSpring
|
|
|
217
217
|
end
|
|
218
218
|
end
|
|
219
219
|
|
|
220
|
-
# Deserializes the data based on type
|
|
221
|
-
# @param string type Data type
|
|
222
|
-
# @param string value Value to be deserialized
|
|
223
|
-
# @return [Object] Deserialized data
|
|
224
|
-
def self._deserialize(type, value)
|
|
225
|
-
case type.to_sym
|
|
226
|
-
when :Time
|
|
227
|
-
Time.parse(value)
|
|
228
|
-
when :Date
|
|
229
|
-
Date.parse(value)
|
|
230
|
-
when :String
|
|
231
|
-
value.to_s
|
|
232
|
-
when :Integer
|
|
233
|
-
value.to_i
|
|
234
|
-
when :Float
|
|
235
|
-
value.to_f
|
|
236
|
-
when :Boolean
|
|
237
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
238
|
-
true
|
|
239
|
-
else
|
|
240
|
-
false
|
|
241
|
-
end
|
|
242
|
-
when :Object
|
|
243
|
-
# generic object (usually a Hash), return directly
|
|
244
|
-
value
|
|
245
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
246
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
247
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
248
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
249
|
-
k_type = Regexp.last_match[:k_type]
|
|
250
|
-
v_type = Regexp.last_match[:v_type]
|
|
251
|
-
{}.tap do |hash|
|
|
252
|
-
value.each do |k, v|
|
|
253
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
254
|
-
end
|
|
255
|
-
end
|
|
256
|
-
else # model
|
|
257
|
-
# models (e.g. Pet) or oneOf
|
|
258
|
-
klass = DocSpring.const_get(type)
|
|
259
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
260
|
-
end
|
|
261
|
-
end
|
|
262
|
-
|
|
263
|
-
# Returns the string representation of the object
|
|
264
|
-
# @return [String] String presentation of the object
|
|
265
|
-
def to_s
|
|
266
|
-
to_hash.to_s
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
270
|
-
# @return [Hash] Returns the object in the form of hash
|
|
271
|
-
def to_body
|
|
272
|
-
to_hash
|
|
273
|
-
end
|
|
274
|
-
|
|
275
220
|
# Returns the object in the form of hash
|
|
276
221
|
# @return [Hash] Returns the object in the form of hash
|
|
277
222
|
def to_hash
|
|
278
223
|
hash = {}
|
|
279
|
-
|
|
224
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
225
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
280
226
|
value = self.send(attr)
|
|
281
227
|
if value.nil?
|
|
282
|
-
is_nullable = self.class.
|
|
228
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
283
229
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
284
230
|
end
|
|
285
231
|
|
|
@@ -288,24 +234,6 @@ module DocSpring
|
|
|
288
234
|
hash
|
|
289
235
|
end
|
|
290
236
|
|
|
291
|
-
# Outputs non-array value in the form of hash
|
|
292
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
293
|
-
# @param [Object] value Any valid value
|
|
294
|
-
# @return [Hash] Returns the value in the form of hash
|
|
295
|
-
def _to_hash(value)
|
|
296
|
-
if value.is_a?(Array)
|
|
297
|
-
value.compact.map { |v| _to_hash(v) }
|
|
298
|
-
elsif value.is_a?(Hash)
|
|
299
|
-
{}.tap do |hash|
|
|
300
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
301
|
-
end
|
|
302
|
-
elsif value.respond_to? :to_hash
|
|
303
|
-
value.to_hash
|
|
304
|
-
else
|
|
305
|
-
value
|
|
306
|
-
end
|
|
307
|
-
end
|
|
308
|
-
|
|
309
237
|
end
|
|
310
238
|
|
|
311
239
|
end
|