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,52 +14,82 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DocSpring
|
|
17
|
-
|
|
17
|
+
# A request for someone to fill in their fields of a submission and sign it. Someone who only fills in fields for the people who sign later (such as an employer's section) has a signature request too. The submission's PDF is generated once every signature request is completed.
|
|
18
|
+
class SignatureRequest < ApiModelBase
|
|
19
|
+
# The signature request's ID.
|
|
18
20
|
attr_accessor :id
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
# The ID of the submission the signature request belongs to.
|
|
23
|
+
attr_accessor :submission_id
|
|
21
24
|
|
|
25
|
+
# The name of the person the request is for.
|
|
22
26
|
attr_accessor :name
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
attr_accessor :sort_order
|
|
28
|
+
# Their email address.
|
|
29
|
+
attr_accessor :email
|
|
27
30
|
|
|
31
|
+
# The fields this person fills in. Null for a signature request created with API v1 without a field list: it asks for every field the submission's data doesn't have.
|
|
28
32
|
attr_accessor :fields
|
|
29
33
|
|
|
34
|
+
# Your own data about the signature request, such as an ID from your app.
|
|
30
35
|
attr_accessor :metadata
|
|
31
36
|
|
|
37
|
+
# Which of the template's signers the person is. Until templates have roles of their own, a template's signers are `Signer 1`, `Signer 2` and so on, up to `Signer 100`: `Signer 1` is the one whose details the template's `@@signature_requests/0` fields print.
|
|
38
|
+
attr_accessor :role
|
|
39
|
+
|
|
40
|
+
# The signer's position, from 0: `Signer 1` is 0. The template's `@@signature_requests/<sort_order>` fields print this signature request's details.
|
|
41
|
+
attr_accessor :sort_order
|
|
42
|
+
|
|
43
|
+
# `pending` until the person completes the signature request (`completed`) or declines it (`declined`).
|
|
32
44
|
attr_accessor :state
|
|
33
45
|
|
|
46
|
+
# The values this person entered for their own fields (`fields`). Null when their submission's data is left out: in lists without `include_data=true`, in the events of a webhook that leaves out submission data, and once the submission has expired.
|
|
47
|
+
attr_accessor :data
|
|
48
|
+
|
|
49
|
+
# When the person first opened the signature request.
|
|
34
50
|
attr_accessor :viewed_at
|
|
35
51
|
|
|
52
|
+
# When they completed it.
|
|
36
53
|
attr_accessor :completed_at
|
|
37
54
|
|
|
55
|
+
# When they declined it.
|
|
38
56
|
attr_accessor :declined_at
|
|
39
57
|
|
|
40
|
-
|
|
41
|
-
|
|
58
|
+
# How your app authenticated the person before it showed them the signature request.
|
|
42
59
|
attr_accessor :auth_type
|
|
43
60
|
|
|
61
|
+
# The second factor your app authenticated them with, if any.
|
|
44
62
|
attr_accessor :auth_second_factor_type
|
|
45
63
|
|
|
64
|
+
# The service that authenticated them, such as `google`. Required when `auth_type` is `oauth`.
|
|
46
65
|
attr_accessor :auth_provider
|
|
47
66
|
|
|
67
|
+
# When your app authenticated them. Set for you with `email_link`.
|
|
48
68
|
attr_accessor :auth_session_started_at
|
|
49
69
|
|
|
70
|
+
# A hash of your app's session ID, for the audit trail.
|
|
50
71
|
attr_accessor :auth_session_id_hash
|
|
51
72
|
|
|
73
|
+
# Their user ID in your app, or a SHA-256 hash of a salt and the user ID.
|
|
52
74
|
attr_accessor :auth_user_id_hash
|
|
53
75
|
|
|
76
|
+
# Their username in your app, or a SHA-256 hash of a salt and the username.
|
|
54
77
|
attr_accessor :auth_username_hash
|
|
55
78
|
|
|
79
|
+
# The phone number they authenticated with, or a SHA-256 hash of a salt and the phone number.
|
|
56
80
|
attr_accessor :auth_phone_number_hash
|
|
57
81
|
|
|
82
|
+
# The IP address they completed the signature request from. Null in the events of a webhook that leaves out submission data.
|
|
58
83
|
attr_accessor :ip_address
|
|
59
84
|
|
|
85
|
+
# The User-Agent header of the browser they completed the signature request with. Null in the events of a webhook that leaves out submission data.
|
|
60
86
|
attr_accessor :user_agent
|
|
61
87
|
|
|
62
|
-
|
|
88
|
+
# When the signature request was created.
|
|
89
|
+
attr_accessor :created_at
|
|
90
|
+
|
|
91
|
+
# When the signature request was last updated.
|
|
92
|
+
attr_accessor :updated_at
|
|
63
93
|
|
|
64
94
|
class EnumAttributeValidator
|
|
65
95
|
attr_reader :datatype
|
|
@@ -87,17 +117,18 @@ module DocSpring
|
|
|
87
117
|
def self.attribute_map
|
|
88
118
|
{
|
|
89
119
|
:'id' => :'id',
|
|
90
|
-
:'
|
|
120
|
+
:'submission_id' => :'submission_id',
|
|
91
121
|
:'name' => :'name',
|
|
92
|
-
:'
|
|
93
|
-
:'sort_order' => :'sort_order',
|
|
122
|
+
:'email' => :'email',
|
|
94
123
|
:'fields' => :'fields',
|
|
95
124
|
:'metadata' => :'metadata',
|
|
125
|
+
:'role' => :'role',
|
|
126
|
+
:'sort_order' => :'sort_order',
|
|
96
127
|
:'state' => :'state',
|
|
128
|
+
:'data' => :'data',
|
|
97
129
|
:'viewed_at' => :'viewed_at',
|
|
98
130
|
:'completed_at' => :'completed_at',
|
|
99
131
|
:'declined_at' => :'declined_at',
|
|
100
|
-
:'data' => :'data',
|
|
101
132
|
:'auth_type' => :'auth_type',
|
|
102
133
|
:'auth_second_factor_type' => :'auth_second_factor_type',
|
|
103
134
|
:'auth_provider' => :'auth_provider',
|
|
@@ -108,7 +139,8 @@ module DocSpring
|
|
|
108
139
|
:'auth_phone_number_hash' => :'auth_phone_number_hash',
|
|
109
140
|
:'ip_address' => :'ip_address',
|
|
110
141
|
:'user_agent' => :'user_agent',
|
|
111
|
-
:'
|
|
142
|
+
:'created_at' => :'created_at',
|
|
143
|
+
:'updated_at' => :'updated_at'
|
|
112
144
|
}
|
|
113
145
|
end
|
|
114
146
|
|
|
@@ -126,44 +158,43 @@ module DocSpring
|
|
|
126
158
|
def self.openapi_types
|
|
127
159
|
{
|
|
128
160
|
:'id' => :'String',
|
|
129
|
-
:'
|
|
161
|
+
:'submission_id' => :'String',
|
|
130
162
|
:'name' => :'String',
|
|
131
|
-
:'
|
|
132
|
-
:'sort_order' => :'Integer',
|
|
163
|
+
:'email' => :'String',
|
|
133
164
|
:'fields' => :'Array<String>',
|
|
134
|
-
:'metadata' => :'Object',
|
|
135
|
-
:'
|
|
136
|
-
:'
|
|
137
|
-
:'
|
|
138
|
-
:'
|
|
139
|
-
:'
|
|
140
|
-
:'
|
|
141
|
-
:'
|
|
165
|
+
:'metadata' => :'Hash<String, Object>',
|
|
166
|
+
:'role' => :'String',
|
|
167
|
+
:'sort_order' => :'Integer',
|
|
168
|
+
:'state' => :'SignatureRequestState',
|
|
169
|
+
:'data' => :'Hash<String, Object>',
|
|
170
|
+
:'viewed_at' => :'Time',
|
|
171
|
+
:'completed_at' => :'Time',
|
|
172
|
+
:'declined_at' => :'Time',
|
|
173
|
+
:'auth_type' => :'SignatureRequestAuthType',
|
|
174
|
+
:'auth_second_factor_type' => :'SignatureRequestAuthSecondFactorType',
|
|
142
175
|
:'auth_provider' => :'String',
|
|
143
|
-
:'auth_session_started_at' => :'
|
|
176
|
+
:'auth_session_started_at' => :'Time',
|
|
144
177
|
:'auth_session_id_hash' => :'String',
|
|
145
178
|
:'auth_user_id_hash' => :'String',
|
|
146
179
|
:'auth_username_hash' => :'String',
|
|
147
180
|
:'auth_phone_number_hash' => :'String',
|
|
148
181
|
:'ip_address' => :'String',
|
|
149
182
|
:'user_agent' => :'String',
|
|
150
|
-
:'
|
|
183
|
+
:'created_at' => :'Time',
|
|
184
|
+
:'updated_at' => :'Time'
|
|
151
185
|
}
|
|
152
186
|
end
|
|
153
187
|
|
|
154
188
|
# List of attributes with nullable: true
|
|
155
189
|
def self.openapi_nullable
|
|
156
190
|
Set.new([
|
|
157
|
-
:'id',
|
|
158
|
-
:'email',
|
|
159
191
|
:'name',
|
|
160
|
-
:'
|
|
192
|
+
:'email',
|
|
161
193
|
:'fields',
|
|
162
|
-
:'
|
|
194
|
+
:'data',
|
|
163
195
|
:'viewed_at',
|
|
164
196
|
:'completed_at',
|
|
165
197
|
:'declined_at',
|
|
166
|
-
:'data',
|
|
167
198
|
:'auth_provider',
|
|
168
199
|
:'auth_session_started_at',
|
|
169
200
|
:'auth_session_id_hash',
|
|
@@ -172,22 +203,31 @@ module DocSpring
|
|
|
172
203
|
:'auth_phone_number_hash',
|
|
173
204
|
:'ip_address',
|
|
174
205
|
:'user_agent',
|
|
175
|
-
:'submission_id'
|
|
176
206
|
])
|
|
177
207
|
end
|
|
178
208
|
|
|
209
|
+
# Returns attribute type mapping
|
|
210
|
+
def self.acceptable_openapi_types
|
|
211
|
+
openapi_types
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Returns the nullable attributes
|
|
215
|
+
def self.acceptable_openapi_nullable
|
|
216
|
+
openapi_nullable
|
|
217
|
+
end
|
|
218
|
+
|
|
179
219
|
# Initializes the object
|
|
180
220
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
181
221
|
def initialize(attributes = {})
|
|
182
222
|
if (!attributes.is_a?(Hash))
|
|
183
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::
|
|
223
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::SignatureRequest` initialize method"
|
|
184
224
|
end
|
|
185
225
|
|
|
186
226
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
187
227
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
188
228
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
189
229
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
190
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::
|
|
230
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::SignatureRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
191
231
|
end
|
|
192
232
|
h[k.to_sym] = v
|
|
193
233
|
}
|
|
@@ -198,10 +238,10 @@ module DocSpring
|
|
|
198
238
|
self.id = nil
|
|
199
239
|
end
|
|
200
240
|
|
|
201
|
-
if attributes.key?(:'
|
|
202
|
-
self.
|
|
241
|
+
if attributes.key?(:'submission_id')
|
|
242
|
+
self.submission_id = attributes[:'submission_id']
|
|
203
243
|
else
|
|
204
|
-
self.
|
|
244
|
+
self.submission_id = nil
|
|
205
245
|
end
|
|
206
246
|
|
|
207
247
|
if attributes.key?(:'name')
|
|
@@ -210,20 +250,14 @@ module DocSpring
|
|
|
210
250
|
self.name = nil
|
|
211
251
|
end
|
|
212
252
|
|
|
213
|
-
if attributes.key?(:'
|
|
214
|
-
self.
|
|
215
|
-
else
|
|
216
|
-
self.order = nil
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
if attributes.key?(:'sort_order')
|
|
220
|
-
self.sort_order = attributes[:'sort_order']
|
|
253
|
+
if attributes.key?(:'email')
|
|
254
|
+
self.email = attributes[:'email']
|
|
221
255
|
else
|
|
222
|
-
self.
|
|
256
|
+
self.email = nil
|
|
223
257
|
end
|
|
224
258
|
|
|
225
259
|
if attributes.key?(:'fields')
|
|
226
|
-
if (value = attributes[:'fields']).is_a?(Array)
|
|
260
|
+
if (value = attributes[:'fields']).is_a?(Array) || value.nil?
|
|
227
261
|
self.fields = value
|
|
228
262
|
end
|
|
229
263
|
else
|
|
@@ -231,17 +265,39 @@ module DocSpring
|
|
|
231
265
|
end
|
|
232
266
|
|
|
233
267
|
if attributes.key?(:'metadata')
|
|
234
|
-
|
|
268
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
269
|
+
self.metadata = value
|
|
270
|
+
end
|
|
235
271
|
else
|
|
236
272
|
self.metadata = nil
|
|
237
273
|
end
|
|
238
274
|
|
|
275
|
+
if attributes.key?(:'role')
|
|
276
|
+
self.role = attributes[:'role']
|
|
277
|
+
else
|
|
278
|
+
self.role = nil
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
if attributes.key?(:'sort_order')
|
|
282
|
+
self.sort_order = attributes[:'sort_order']
|
|
283
|
+
else
|
|
284
|
+
self.sort_order = nil
|
|
285
|
+
end
|
|
286
|
+
|
|
239
287
|
if attributes.key?(:'state')
|
|
240
288
|
self.state = attributes[:'state']
|
|
241
289
|
else
|
|
242
290
|
self.state = nil
|
|
243
291
|
end
|
|
244
292
|
|
|
293
|
+
if attributes.key?(:'data')
|
|
294
|
+
if (value = attributes[:'data']).is_a?(Hash) || value.nil?
|
|
295
|
+
self.data = value
|
|
296
|
+
end
|
|
297
|
+
else
|
|
298
|
+
self.data = nil
|
|
299
|
+
end
|
|
300
|
+
|
|
245
301
|
if attributes.key?(:'viewed_at')
|
|
246
302
|
self.viewed_at = attributes[:'viewed_at']
|
|
247
303
|
else
|
|
@@ -260,12 +316,6 @@ module DocSpring
|
|
|
260
316
|
self.declined_at = nil
|
|
261
317
|
end
|
|
262
318
|
|
|
263
|
-
if attributes.key?(:'data')
|
|
264
|
-
self.data = attributes[:'data']
|
|
265
|
-
else
|
|
266
|
-
self.data = nil
|
|
267
|
-
end
|
|
268
|
-
|
|
269
319
|
if attributes.key?(:'auth_type')
|
|
270
320
|
self.auth_type = attributes[:'auth_type']
|
|
271
321
|
else
|
|
@@ -326,10 +376,16 @@ module DocSpring
|
|
|
326
376
|
self.user_agent = nil
|
|
327
377
|
end
|
|
328
378
|
|
|
329
|
-
if attributes.key?(:'
|
|
330
|
-
self.
|
|
379
|
+
if attributes.key?(:'created_at')
|
|
380
|
+
self.created_at = attributes[:'created_at']
|
|
331
381
|
else
|
|
332
|
-
self.
|
|
382
|
+
self.created_at = nil
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
if attributes.key?(:'updated_at')
|
|
386
|
+
self.updated_at = attributes[:'updated_at']
|
|
387
|
+
else
|
|
388
|
+
self.updated_at = nil
|
|
333
389
|
end
|
|
334
390
|
end
|
|
335
391
|
|
|
@@ -338,6 +394,22 @@ module DocSpring
|
|
|
338
394
|
def list_invalid_properties
|
|
339
395
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
340
396
|
invalid_properties = Array.new
|
|
397
|
+
if @id.nil?
|
|
398
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
if @submission_id.nil?
|
|
402
|
+
invalid_properties.push('invalid value for "submission_id", submission_id cannot be nil.')
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
if @metadata.nil?
|
|
406
|
+
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
if @role.nil?
|
|
410
|
+
invalid_properties.push('invalid value for "role", role cannot be nil.')
|
|
411
|
+
end
|
|
412
|
+
|
|
341
413
|
if @sort_order.nil?
|
|
342
414
|
invalid_properties.push('invalid value for "sort_order", sort_order cannot be nil.')
|
|
343
415
|
end
|
|
@@ -354,6 +426,14 @@ module DocSpring
|
|
|
354
426
|
invalid_properties.push('invalid value for "auth_second_factor_type", auth_second_factor_type cannot be nil.')
|
|
355
427
|
end
|
|
356
428
|
|
|
429
|
+
if @created_at.nil?
|
|
430
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
if @updated_at.nil?
|
|
434
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
435
|
+
end
|
|
436
|
+
|
|
357
437
|
invalid_properties
|
|
358
438
|
end
|
|
359
439
|
|
|
@@ -361,19 +441,59 @@ module DocSpring
|
|
|
361
441
|
# @return true if the model is valid
|
|
362
442
|
def valid?
|
|
363
443
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
444
|
+
return false if @id.nil?
|
|
445
|
+
return false if @submission_id.nil?
|
|
446
|
+
return false if @metadata.nil?
|
|
447
|
+
return false if @role.nil?
|
|
364
448
|
return false if @sort_order.nil?
|
|
365
449
|
return false if @state.nil?
|
|
366
|
-
state_validator = EnumAttributeValidator.new('String', ["pending", "completed", "declined"])
|
|
367
|
-
return false unless state_validator.valid?(@state)
|
|
368
450
|
return false if @auth_type.nil?
|
|
369
|
-
auth_type_validator = EnumAttributeValidator.new('String', ["none", "password", "oauth", "email_link", "phone_number", "ldap", "saml"])
|
|
370
|
-
return false unless auth_type_validator.valid?(@auth_type)
|
|
371
451
|
return false if @auth_second_factor_type.nil?
|
|
372
|
-
|
|
373
|
-
return false
|
|
452
|
+
return false if @created_at.nil?
|
|
453
|
+
return false if @updated_at.nil?
|
|
374
454
|
true
|
|
375
455
|
end
|
|
376
456
|
|
|
457
|
+
# Custom attribute writer method with validation
|
|
458
|
+
# @param [Object] id Value to be assigned
|
|
459
|
+
def id=(id)
|
|
460
|
+
if id.nil?
|
|
461
|
+
fail ArgumentError, 'id cannot be nil'
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
@id = id
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
# Custom attribute writer method with validation
|
|
468
|
+
# @param [Object] submission_id Value to be assigned
|
|
469
|
+
def submission_id=(submission_id)
|
|
470
|
+
if submission_id.nil?
|
|
471
|
+
fail ArgumentError, 'submission_id cannot be nil'
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
@submission_id = submission_id
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
# Custom attribute writer method with validation
|
|
478
|
+
# @param [Object] metadata Value to be assigned
|
|
479
|
+
def metadata=(metadata)
|
|
480
|
+
if metadata.nil?
|
|
481
|
+
fail ArgumentError, 'metadata cannot be nil'
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
@metadata = metadata
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
# Custom attribute writer method with validation
|
|
488
|
+
# @param [Object] role Value to be assigned
|
|
489
|
+
def role=(role)
|
|
490
|
+
if role.nil?
|
|
491
|
+
fail ArgumentError, 'role cannot be nil'
|
|
492
|
+
end
|
|
493
|
+
|
|
494
|
+
@role = role
|
|
495
|
+
end
|
|
496
|
+
|
|
377
497
|
# Custom attribute writer method with validation
|
|
378
498
|
# @param [Object] sort_order Value to be assigned
|
|
379
499
|
def sort_order=(sort_order)
|
|
@@ -384,56 +504,74 @@ module DocSpring
|
|
|
384
504
|
@sort_order = sort_order
|
|
385
505
|
end
|
|
386
506
|
|
|
387
|
-
# Custom attribute writer method
|
|
388
|
-
# @param [Object] state
|
|
507
|
+
# Custom attribute writer method with validation
|
|
508
|
+
# @param [Object] state Value to be assigned
|
|
389
509
|
def state=(state)
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
unless defined?(@_skip_enum_validation) || validator.valid?(state)
|
|
393
|
-
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
510
|
+
if state.nil?
|
|
511
|
+
fail ArgumentError, 'state cannot be nil'
|
|
394
512
|
end
|
|
513
|
+
|
|
395
514
|
@state = state
|
|
396
515
|
end
|
|
397
516
|
|
|
398
|
-
# Custom attribute writer method
|
|
399
|
-
# @param [Object] auth_type
|
|
517
|
+
# Custom attribute writer method with validation
|
|
518
|
+
# @param [Object] auth_type Value to be assigned
|
|
400
519
|
def auth_type=(auth_type)
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
unless defined?(@_skip_enum_validation) || validator.valid?(auth_type)
|
|
404
|
-
fail ArgumentError, "invalid value for \"auth_type\", must be one of #{validator.allowable_values}."
|
|
520
|
+
if auth_type.nil?
|
|
521
|
+
fail ArgumentError, 'auth_type cannot be nil'
|
|
405
522
|
end
|
|
523
|
+
|
|
406
524
|
@auth_type = auth_type
|
|
407
525
|
end
|
|
408
526
|
|
|
409
|
-
# Custom attribute writer method
|
|
410
|
-
# @param [Object] auth_second_factor_type
|
|
527
|
+
# Custom attribute writer method with validation
|
|
528
|
+
# @param [Object] auth_second_factor_type Value to be assigned
|
|
411
529
|
def auth_second_factor_type=(auth_second_factor_type)
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
unless defined?(@_skip_enum_validation) || validator.valid?(auth_second_factor_type)
|
|
415
|
-
fail ArgumentError, "invalid value for \"auth_second_factor_type\", must be one of #{validator.allowable_values}."
|
|
530
|
+
if auth_second_factor_type.nil?
|
|
531
|
+
fail ArgumentError, 'auth_second_factor_type cannot be nil'
|
|
416
532
|
end
|
|
533
|
+
|
|
417
534
|
@auth_second_factor_type = auth_second_factor_type
|
|
418
535
|
end
|
|
419
536
|
|
|
537
|
+
# Custom attribute writer method with validation
|
|
538
|
+
# @param [Object] created_at Value to be assigned
|
|
539
|
+
def created_at=(created_at)
|
|
540
|
+
if created_at.nil?
|
|
541
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
542
|
+
end
|
|
543
|
+
|
|
544
|
+
@created_at = created_at
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
# Custom attribute writer method with validation
|
|
548
|
+
# @param [Object] updated_at Value to be assigned
|
|
549
|
+
def updated_at=(updated_at)
|
|
550
|
+
if updated_at.nil?
|
|
551
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
@updated_at = updated_at
|
|
555
|
+
end
|
|
556
|
+
|
|
420
557
|
# Checks equality by comparing each attribute.
|
|
421
558
|
# @param [Object] Object to be compared
|
|
422
559
|
def ==(o)
|
|
423
560
|
return true if self.equal?(o)
|
|
424
561
|
self.class == o.class &&
|
|
425
562
|
id == o.id &&
|
|
426
|
-
|
|
563
|
+
submission_id == o.submission_id &&
|
|
427
564
|
name == o.name &&
|
|
428
|
-
|
|
429
|
-
sort_order == o.sort_order &&
|
|
565
|
+
email == o.email &&
|
|
430
566
|
fields == o.fields &&
|
|
431
567
|
metadata == o.metadata &&
|
|
568
|
+
role == o.role &&
|
|
569
|
+
sort_order == o.sort_order &&
|
|
432
570
|
state == o.state &&
|
|
571
|
+
data == o.data &&
|
|
433
572
|
viewed_at == o.viewed_at &&
|
|
434
573
|
completed_at == o.completed_at &&
|
|
435
574
|
declined_at == o.declined_at &&
|
|
436
|
-
data == o.data &&
|
|
437
575
|
auth_type == o.auth_type &&
|
|
438
576
|
auth_second_factor_type == o.auth_second_factor_type &&
|
|
439
577
|
auth_provider == o.auth_provider &&
|
|
@@ -444,7 +582,8 @@ module DocSpring
|
|
|
444
582
|
auth_phone_number_hash == o.auth_phone_number_hash &&
|
|
445
583
|
ip_address == o.ip_address &&
|
|
446
584
|
user_agent == o.user_agent &&
|
|
447
|
-
|
|
585
|
+
created_at == o.created_at &&
|
|
586
|
+
updated_at == o.updated_at
|
|
448
587
|
end
|
|
449
588
|
|
|
450
589
|
# @see the `==` method
|
|
@@ -456,7 +595,7 @@ module DocSpring
|
|
|
456
595
|
# Calculates hash code according to all attributes.
|
|
457
596
|
# @return [Integer] Hash code
|
|
458
597
|
def hash
|
|
459
|
-
[id,
|
|
598
|
+
[id, submission_id, name, email, fields, metadata, role, sort_order, state, data, viewed_at, completed_at, declined_at, auth_type, auth_second_factor_type, auth_provider, auth_session_started_at, auth_session_id_hash, auth_user_id_hash, auth_username_hash, auth_phone_number_hash, ip_address, user_agent, created_at, updated_at].hash
|
|
460
599
|
end
|
|
461
600
|
|
|
462
601
|
# Builds the object from hash
|
|
@@ -465,18 +604,20 @@ module DocSpring
|
|
|
465
604
|
def self.build_from_hash(attributes)
|
|
466
605
|
return nil unless attributes.is_a?(Hash)
|
|
467
606
|
attributes = attributes.transform_keys(&:to_sym)
|
|
607
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
608
|
+
map = acceptable_attribute_map
|
|
468
609
|
transformed_hash = {}
|
|
469
|
-
|
|
470
|
-
if attributes.key?(
|
|
610
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
611
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
471
612
|
transformed_hash["#{key}"] = nil
|
|
472
613
|
elsif type =~ /\AArray<(.*)>/i
|
|
473
614
|
# check to ensure the input is an array given that the attribute
|
|
474
615
|
# is documented as an array but the input is not
|
|
475
|
-
if attributes[
|
|
476
|
-
transformed_hash["#{key}"] = attributes[
|
|
616
|
+
if attributes[map[key]].is_a?(Array)
|
|
617
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
477
618
|
end
|
|
478
|
-
elsif !attributes[
|
|
479
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
619
|
+
elsif !attributes[map[key]].nil?
|
|
620
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
480
621
|
end
|
|
481
622
|
end
|
|
482
623
|
# Responses can include enum values added after this client was released, so the enum setters
|
|
@@ -488,69 +629,15 @@ module DocSpring
|
|
|
488
629
|
end
|
|
489
630
|
end
|
|
490
631
|
|
|
491
|
-
# Deserializes the data based on type
|
|
492
|
-
# @param string type Data type
|
|
493
|
-
# @param string value Value to be deserialized
|
|
494
|
-
# @return [Object] Deserialized data
|
|
495
|
-
def self._deserialize(type, value)
|
|
496
|
-
case type.to_sym
|
|
497
|
-
when :Time
|
|
498
|
-
Time.parse(value)
|
|
499
|
-
when :Date
|
|
500
|
-
Date.parse(value)
|
|
501
|
-
when :String
|
|
502
|
-
value.to_s
|
|
503
|
-
when :Integer
|
|
504
|
-
value.to_i
|
|
505
|
-
when :Float
|
|
506
|
-
value.to_f
|
|
507
|
-
when :Boolean
|
|
508
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
509
|
-
true
|
|
510
|
-
else
|
|
511
|
-
false
|
|
512
|
-
end
|
|
513
|
-
when :Object
|
|
514
|
-
# generic object (usually a Hash), return directly
|
|
515
|
-
value
|
|
516
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
517
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
518
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
519
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
520
|
-
k_type = Regexp.last_match[:k_type]
|
|
521
|
-
v_type = Regexp.last_match[:v_type]
|
|
522
|
-
{}.tap do |hash|
|
|
523
|
-
value.each do |k, v|
|
|
524
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
525
|
-
end
|
|
526
|
-
end
|
|
527
|
-
else # model
|
|
528
|
-
# models (e.g. Pet) or oneOf
|
|
529
|
-
klass = DocSpring.const_get(type)
|
|
530
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
531
|
-
end
|
|
532
|
-
end
|
|
533
|
-
|
|
534
|
-
# Returns the string representation of the object
|
|
535
|
-
# @return [String] String presentation of the object
|
|
536
|
-
def to_s
|
|
537
|
-
to_hash.to_s
|
|
538
|
-
end
|
|
539
|
-
|
|
540
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
541
|
-
# @return [Hash] Returns the object in the form of hash
|
|
542
|
-
def to_body
|
|
543
|
-
to_hash
|
|
544
|
-
end
|
|
545
|
-
|
|
546
632
|
# Returns the object in the form of hash
|
|
547
633
|
# @return [Hash] Returns the object in the form of hash
|
|
548
634
|
def to_hash
|
|
549
635
|
hash = {}
|
|
550
|
-
|
|
636
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
637
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
551
638
|
value = self.send(attr)
|
|
552
639
|
if value.nil?
|
|
553
|
-
is_nullable = self.class.
|
|
640
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
554
641
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
555
642
|
end
|
|
556
643
|
|
|
@@ -559,24 +646,6 @@ module DocSpring
|
|
|
559
646
|
hash
|
|
560
647
|
end
|
|
561
648
|
|
|
562
|
-
# Outputs non-array value in the form of hash
|
|
563
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
564
|
-
# @param [Object] value Any valid value
|
|
565
|
-
# @return [Hash] Returns the value in the form of hash
|
|
566
|
-
def _to_hash(value)
|
|
567
|
-
if value.is_a?(Array)
|
|
568
|
-
value.compact.map { |v| _to_hash(v) }
|
|
569
|
-
elsif value.is_a?(Hash)
|
|
570
|
-
{}.tap do |hash|
|
|
571
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
572
|
-
end
|
|
573
|
-
elsif value.respond_to? :to_hash
|
|
574
|
-
value.to_hash
|
|
575
|
-
else
|
|
576
|
-
value
|
|
577
|
-
end
|
|
578
|
-
end
|
|
579
|
-
|
|
580
649
|
end
|
|
581
650
|
|
|
582
651
|
end
|