docspring 3.5.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +445 -150
- data/.openapi-generator/VERSION +1 -1
- data/.rubocop.yml +1 -1
- data/.travis.yml +1 -1
- data/AGENTS.md +79 -19
- data/CHANGELOG.md +147 -0
- data/Gemfile.lock +7 -7
- data/README.md +69 -53
- data/docs/AddTemplateFieldsRequest.md +18 -0
- data/docs/{RenameFolderData.md → AiFieldNamingLanguage.md} +2 -5
- data/docs/AuthenticationCheck.md +18 -0
- data/docs/{CreateFolderData.md → BarcodeSymbology.md} +2 -5
- data/docs/{CreateWebhookData.md → CheckCharacter.md} +2 -5
- data/docs/Client.md +1570 -786
- data/docs/{UpdateWebhookData.md → CombinedFieldType.md} +2 -5
- data/docs/CombinedPdf.md +44 -0
- data/docs/CombinedPdfFiles.md +18 -0
- data/docs/CombinedPdfList.md +20 -0
- data/docs/CombinedPdfSource.md +26 -0
- data/docs/CombinedPdfSourceInput.md +88 -0
- data/docs/CombinedPdfSourcePdf.md +20 -0
- data/docs/CombinedPdfSourceType.md +15 -0
- data/docs/CombinedPdfState.md +15 -0
- data/docs/CopyTemplateRequest.md +22 -0
- data/docs/CreateCombinedPdfRequest.md +26 -0
- data/docs/CreateCustomFileFromUploadRequest.md +18 -0
- data/docs/CreateFolderRequest.md +20 -0
- data/docs/CreateSignatureRequestEventRequest.md +24 -0
- data/docs/CreateSignatureRequestTokenRequest.md +18 -0
- data/docs/CreateSubmissionBatchRequest.md +28 -0
- data/docs/CreateSubmissionRequest.md +38 -0
- data/docs/CreateTemplateRequest.md +102 -0
- data/docs/CreateWebhookRequest.md +38 -0
- data/docs/CustomFile.md +11 -3
- data/docs/CustomFileList.md +20 -0
- data/docs/CustomFileSourcePdf.md +20 -0
- data/docs/ErrorCode.md +15 -0
- data/docs/ErrorDetail.md +26 -0
- data/docs/ErrorInfo.md +32 -0
- data/docs/ErrorResponse.md +1 -3
- data/docs/ExpirationInterval.md +15 -0
- data/docs/Field.md +198 -0
- data/docs/FieldComparisonCondition.md +22 -0
- data/docs/FieldComparisonOperator.md +15 -0
- data/docs/FieldDependency.md +22 -0
- data/docs/FieldDependencyInput.md +22 -0
- data/docs/FieldDisplayType.md +15 -0
- data/docs/FieldEqualsCondition.md +22 -0
- data/docs/FieldEqualsOperator.md +15 -0
- data/docs/FieldGroup.md +32 -0
- data/docs/FieldGroupInput.md +30 -0
- data/docs/FieldGroupType.md +15 -0
- data/docs/FieldInCondition.md +22 -0
- data/docs/FieldInput.md +196 -0
- data/docs/FieldOverride.md +142 -0
- data/docs/FieldPresenceCondition.md +20 -0
- data/docs/FieldPresenceOperator.md +15 -0
- data/docs/FieldRangeCondition.md +24 -0
- data/docs/FieldReimportState.md +15 -0
- data/docs/FieldSetupLogic.md +15 -0
- data/docs/FieldSetupNaming.md +15 -0
- data/docs/FieldSetupSource.md +15 -0
- data/docs/FieldType.md +15 -0
- data/docs/Folder.md +9 -5
- data/docs/FolderList.md +20 -0
- data/docs/GenerateFilesFormat.md +15 -0
- data/docs/GenerateSubmissionFilesRequest.md +18 -0
- data/docs/GeneratedFile.md +32 -0
- data/docs/GeneratedFileState.md +15 -0
- data/docs/HtmlEngineOptions.md +36 -0
- data/docs/HtmlEngineOptionsInput.md +36 -0
- data/docs/ImageGravity.md +15 -0
- data/docs/ImageScaleType.md +15 -0
- data/docs/ModelCodeLanguage.md +15 -0
- data/docs/MoveFolderRequest.md +18 -0
- data/docs/MoveTemplateRequest.md +18 -0
- data/docs/NumberConditionType.md +15 -0
- data/docs/OutputFormat.md +15 -0
- data/docs/PageFormat.md +15 -0
- data/docs/PageImage.md +34 -0
- data/docs/PageImages.md +24 -0
- data/docs/PredefinedField.md +30 -0
- data/docs/PredefinedFieldInput.md +30 -0
- data/docs/PublishTemplateVersionRequest.md +20 -0
- data/docs/RemoveTemplateFieldsRequest.md +18 -0
- data/docs/RenameFolderRequest.md +18 -0
- data/docs/ReorderTemplateFieldsRequest.md +18 -0
- data/docs/RestoreTemplateVersionRequest.md +18 -0
- data/docs/ShapeType.md +15 -0
- data/docs/SignatureRequest.md +66 -0
- data/docs/SignatureRequestAuthSecondFactorType.md +15 -0
- data/docs/SignatureRequestAuthType.md +15 -0
- data/docs/SignatureRequestEvent.md +32 -0
- data/docs/SignatureRequestEventType.md +15 -0
- data/docs/SignatureRequestInput.md +46 -0
- data/docs/SignatureRequestMessageType.md +15 -0
- data/docs/SignatureRequestState.md +15 -0
- data/docs/SignatureRequestToken.md +30 -0
- data/docs/SignatureRequestTokenType.md +15 -0
- data/docs/StringConditionType.md +15 -0
- data/docs/Submission.md +43 -47
- data/docs/SubmissionAction.md +6 -8
- data/docs/SubmissionActionState.md +15 -0
- data/docs/SubmissionActionType.md +15 -0
- data/docs/SubmissionBatch.md +16 -10
- data/docs/SubmissionBatchState.md +15 -0
- data/docs/SubmissionFiles.md +24 -0
- data/docs/SubmissionInput.md +40 -0
- data/docs/SubmissionList.md +20 -0
- data/docs/SubmissionSource.md +15 -0
- data/docs/SubmissionSourcePdf.md +20 -0
- data/docs/SubmissionState.md +15 -0
- data/docs/SubmissionValidation.md +24 -0
- data/docs/Template.md +79 -107
- data/docs/TemplateActor.md +26 -0
- data/docs/TemplateActorType.md +15 -0
- data/docs/TemplateDefaults.md +56 -0
- data/docs/TemplateDefaultsInput.md +56 -0
- data/docs/TemplateDiff.md +30 -0
- data/docs/TemplateDiffSummary.md +28 -0
- data/docs/TemplateDocument.md +40 -0
- data/docs/TemplateDocumentState.md +15 -0
- data/docs/TemplateFieldChange.md +24 -0
- data/docs/TemplateFieldChanges.md +24 -0
- data/docs/TemplateFieldDependency.md +26 -0
- data/docs/TemplateFieldDependencyAction.md +15 -0
- data/docs/TemplateFieldDependencyCondition.md +24 -0
- data/docs/TemplateFieldDependencyConditionInput.md +93 -0
- data/docs/TemplateFieldDependencyInput.md +26 -0
- data/docs/TemplateFieldDependencyMatch.md +15 -0
- data/docs/TemplateFieldDependencyOperator.md +15 -0
- data/docs/TemplateFieldLogicStatus.md +15 -0
- data/docs/TemplateFieldMove.md +22 -0
- data/docs/TemplateFields.md +22 -0
- data/docs/TemplateFormMode.md +15 -0
- data/docs/TemplateModelCode.md +22 -0
- data/docs/TemplatePageAiError.md +15 -0
- data/docs/TemplatePageAiNamingStatus.md +15 -0
- data/docs/TemplatePageFieldsStatus.md +15 -0
- data/docs/TemplatePageImageStatus.md +15 -0
- data/docs/TemplatePageImages.md +24 -0
- data/docs/TemplatePageProcessingStatus.md +26 -0
- data/docs/TemplateSourcePdf.md +24 -0
- data/docs/TemplateSummary.md +90 -0
- data/docs/TemplateSummaryList.md +20 -0
- data/docs/TemplateType.md +15 -0
- data/docs/TemplateVersion.md +24 -0
- data/docs/TemplateVersionType.md +15 -0
- data/docs/TextAlignment.md +15 -0
- data/docs/TextOverflow.md +15 -0
- data/docs/TextVerticalAlignment.md +15 -0
- data/docs/Typeface.md +15 -0
- data/docs/UpdateSignatureRequestRequest.md +34 -0
- data/docs/UpdateTemplateDocumentRequest.md +26 -0
- data/docs/UpdateTemplateFieldsRequest.md +18 -0
- data/docs/UpdateTemplateRequest.md +86 -0
- data/docs/UpdateWebhookRequest.md +38 -0
- data/docs/UploadMethod.md +15 -0
- data/docs/UploadPresign.md +24 -0
- data/docs/UrlSourcePdf.md +20 -0
- data/docs/ValidateSubmissionRequest.md +38 -0
- data/docs/Webhook.md +20 -20
- data/docs/WebhookEventType.md +15 -0
- data/docs/WebhookList.md +20 -0
- data/docs/WebhookMode.md +15 -0
- data/docspring.gemspec +3 -3
- data/lib/docspring/api/client.rb +1606 -905
- data/lib/docspring/api_client.rb +14 -6
- data/lib/docspring/api_error.rb +3 -3
- data/lib/docspring/api_model_base.rb +88 -0
- data/lib/docspring/configuration.rb +12 -7
- data/lib/docspring/models/add_template_fields_request.rb +187 -0
- data/lib/docspring/models/ai_field_naming_language.rb +42 -0
- data/lib/docspring/models/authentication_check.rb +185 -0
- data/lib/docspring/models/barcode_symbology.rb +47 -0
- data/lib/docspring/models/check_character.rb +44 -0
- data/lib/docspring/models/combined_field_type.rb +41 -0
- data/lib/docspring/models/{combined_submission.rb → combined_pdf.rb} +228 -206
- data/lib/docspring/models/combined_pdf_files.rb +167 -0
- data/lib/docspring/models/combined_pdf_list.rb +200 -0
- data/lib/docspring/models/{create_webhook_data.rb → combined_pdf_source.rb} +107 -103
- data/lib/docspring/models/combined_pdf_source_input.rb +62 -0
- data/lib/docspring/models/combined_pdf_source_pdf.rb +212 -0
- data/lib/docspring/models/combined_pdf_source_type.rb +44 -0
- data/lib/docspring/models/combined_pdf_state.rb +44 -0
- data/lib/docspring/models/{copy_template_options.rb → copy_template_request.rb} +32 -87
- data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +60 -123
- data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +29 -96
- data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +60 -102
- data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +50 -122
- data/lib/docspring/models/create_signature_request_token_request.rb +190 -0
- data/lib/docspring/models/{submission_batch_data.rb → create_submission_batch_request.rb} +75 -108
- data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +114 -144
- data/lib/docspring/models/create_template_request.rb +646 -0
- data/lib/docspring/models/create_webhook_request.rb +368 -0
- data/lib/docspring/models/custom_file.rb +132 -95
- data/lib/docspring/models/custom_file_list.rb +200 -0
- data/lib/docspring/models/custom_file_source_pdf.rb +212 -0
- data/lib/docspring/models/error_code.rb +60 -0
- data/lib/docspring/models/error_detail.rb +242 -0
- data/lib/docspring/models/error_info.rb +316 -0
- data/lib/docspring/models/error_response.rb +28 -138
- data/lib/docspring/models/expiration_interval.rb +42 -0
- data/lib/docspring/models/field.rb +2217 -0
- data/lib/docspring/models/field_comparison_condition.rb +247 -0
- data/lib/docspring/models/field_comparison_operator.rb +43 -0
- data/lib/docspring/models/field_dependency.rb +246 -0
- data/lib/docspring/models/field_dependency_input.rb +246 -0
- data/lib/docspring/models/field_display_type.rb +45 -0
- data/lib/docspring/models/field_equals_condition.rb +247 -0
- data/lib/docspring/models/field_equals_operator.rb +41 -0
- data/lib/docspring/models/field_group.rb +368 -0
- data/lib/docspring/models/field_group_input.rb +247 -0
- data/lib/docspring/models/field_group_type.rb +41 -0
- data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +101 -103
- data/lib/docspring/models/field_input.rb +1109 -0
- data/lib/docspring/models/field_override.rb +829 -0
- data/lib/docspring/models/field_presence_condition.rb +234 -0
- data/lib/docspring/models/field_presence_operator.rb +41 -0
- data/lib/docspring/models/field_range_condition.rb +234 -0
- data/lib/docspring/models/field_reimport_state.rb +43 -0
- data/lib/docspring/models/field_setup_logic.rb +41 -0
- data/lib/docspring/models/field_setup_naming.rb +41 -0
- data/lib/docspring/models/field_setup_source.rb +42 -0
- data/lib/docspring/models/field_type.rb +54 -0
- data/lib/docspring/models/folder.rb +134 -93
- data/lib/docspring/models/folder_list.rb +200 -0
- data/lib/docspring/models/generate_files_format.rb +40 -0
- data/lib/docspring/models/generate_submission_files_request.rb +187 -0
- data/lib/docspring/models/generated_file.rb +326 -0
- data/lib/docspring/models/generated_file_state.rb +42 -0
- data/lib/docspring/models/html_engine_options.rb +416 -0
- data/lib/docspring/models/html_engine_options_input.rb +280 -0
- data/lib/docspring/models/image_gravity.rb +48 -0
- data/lib/docspring/models/image_scale_type.rb +42 -0
- data/lib/docspring/models/model_code_language.rb +48 -0
- data/lib/docspring/models/{move_folder_data.rb → move_folder_request.rb} +31 -87
- data/lib/docspring/models/move_template_request.rb +171 -0
- data/lib/docspring/models/number_condition_type.rb +45 -0
- data/lib/docspring/models/output_format.rb +41 -0
- data/lib/docspring/models/page_format.rb +52 -0
- data/lib/docspring/models/page_image.rb +359 -0
- data/lib/docspring/models/page_images.rb +248 -0
- data/lib/docspring/models/predefined_field.rb +287 -0
- data/lib/docspring/models/predefined_field_input.rb +287 -0
- data/lib/docspring/models/{publish_version_data.rb → publish_template_version_request.rb} +64 -99
- data/lib/docspring/models/remove_template_fields_request.rb +187 -0
- data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +29 -87
- data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
- data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +29 -87
- data/lib/docspring/models/shape_type.rb +45 -0
- data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +240 -171
- data/lib/docspring/models/signature_request_auth_second_factor_type.rb +45 -0
- data/lib/docspring/models/signature_request_auth_type.rb +46 -0
- data/lib/docspring/models/{submission_data_request_event.rb → signature_request_event.rb} +137 -122
- data/lib/docspring/models/signature_request_event_type.rb +45 -0
- data/lib/docspring/models/{update_submission_data_request_data.rb → signature_request_input.rb} +156 -173
- data/lib/docspring/models/signature_request_message_type.rb +48 -0
- data/lib/docspring/models/signature_request_state.rb +42 -0
- data/lib/docspring/models/signature_request_token.rb +369 -0
- data/lib/docspring/models/signature_request_token_type.rb +41 -0
- data/lib/docspring/models/string_condition_type.rb +44 -0
- data/lib/docspring/models/submission.rb +399 -335
- data/lib/docspring/models/submission_action.rb +64 -136
- data/lib/docspring/models/submission_action_state.rb +43 -0
- data/lib/docspring/models/submission_action_type.rb +46 -0
- data/lib/docspring/models/submission_batch.rb +157 -112
- data/lib/docspring/models/submission_batch_state.rb +42 -0
- data/lib/docspring/models/submission_files.rb +197 -0
- data/lib/docspring/models/submission_input.rb +296 -0
- data/lib/docspring/models/submission_list.rb +200 -0
- data/lib/docspring/models/submission_source.rb +43 -0
- data/lib/docspring/models/submission_source_pdf.rb +212 -0
- data/lib/docspring/models/submission_state.rb +52 -0
- data/lib/docspring/models/submission_validation.rb +234 -0
- data/lib/docspring/models/template.rb +528 -736
- data/lib/docspring/models/template_actor.rb +259 -0
- data/lib/docspring/models/template_actor_type.rb +42 -0
- data/lib/docspring/models/template_defaults.rb +395 -0
- data/lib/docspring/models/template_defaults_input.rb +395 -0
- data/lib/docspring/models/template_diff.rb +321 -0
- data/lib/docspring/models/template_diff_summary.rb +320 -0
- data/lib/docspring/models/template_document.rb +396 -0
- data/lib/docspring/models/template_document_state.rb +46 -0
- data/lib/docspring/models/template_field_change.rb +266 -0
- data/lib/docspring/models/template_field_changes.rb +274 -0
- data/lib/docspring/models/{success_error_response.rb → template_field_dependency.rb} +122 -114
- data/lib/docspring/models/template_field_dependency_action.rb +42 -0
- data/lib/docspring/models/{create_pdf_template.rb → template_field_dependency_condition.rb} +116 -103
- data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
- data/lib/docspring/models/template_field_dependency_input.rb +285 -0
- data/lib/docspring/models/template_field_dependency_match.rb +41 -0
- data/lib/docspring/models/template_field_dependency_operator.rb +49 -0
- data/lib/docspring/models/template_field_logic_status.rb +44 -0
- data/lib/docspring/models/{update_webhook_data.rb → template_field_move.rb} +99 -103
- data/lib/docspring/models/{add_fields_data.rb → template_fields.rb} +71 -89
- data/lib/docspring/models/template_form_mode.rb +42 -0
- data/lib/docspring/models/{template_model_code_response.rb → template_model_code.rb} +37 -96
- data/lib/docspring/models/template_page_ai_error.rb +43 -0
- data/lib/docspring/models/template_page_ai_naming_status.rb +41 -0
- data/lib/docspring/models/template_page_fields_status.rb +44 -0
- data/lib/docspring/models/template_page_image_status.rb +41 -0
- data/lib/docspring/models/template_page_images.rb +254 -0
- data/lib/docspring/models/template_page_processing_status.rb +275 -0
- data/lib/docspring/models/{update_pdf_template.rb → template_source_pdf.rb} +92 -103
- data/lib/docspring/models/{template_preview.rb → template_summary.rb} +436 -589
- data/lib/docspring/models/template_summary_list.rb +200 -0
- data/lib/docspring/models/template_type.rb +41 -0
- data/lib/docspring/models/template_version.rb +238 -0
- data/lib/docspring/models/template_version_type.rb +42 -0
- data/lib/docspring/models/text_alignment.rb +43 -0
- data/lib/docspring/models/text_overflow.rb +41 -0
- data/lib/docspring/models/text_vertical_alignment.rb +42 -0
- data/lib/docspring/models/typeface.rb +56 -0
- data/lib/docspring/models/{create_submission_data_request_data.rb → update_signature_request_request.rb} +72 -196
- data/lib/docspring/models/update_template_document_request.rb +208 -0
- data/lib/docspring/models/update_template_fields_request.rb +187 -0
- data/lib/docspring/models/update_template_request.rb +551 -0
- data/lib/docspring/models/update_webhook_request.rb +344 -0
- data/lib/docspring/models/upload_method.rb +40 -0
- data/lib/docspring/models/{upload_presign_response.rb → upload_presign.rb} +93 -140
- data/lib/docspring/models/url_source_pdf.rb +212 -0
- data/lib/docspring/models/validate_submission_request.rb +288 -0
- data/lib/docspring/models/webhook.rb +97 -107
- data/lib/docspring/models/webhook_event_type.rb +64 -0
- data/lib/docspring/models/webhook_list.rb +200 -0
- data/lib/docspring/models/webhook_mode.rb +41 -0
- data/lib/docspring/request_schemas.json +4967 -0
- data/lib/docspring/request_validator.rb +396 -0
- data/lib/docspring/version.rb +4 -4
- data/lib/docspring.rb +153 -53
- data/spec/api/client_spec.rb +411 -265
- data/spec/models/add_template_fields_request_spec.rb +36 -0
- data/spec/models/ai_field_naming_language_spec.rb +30 -0
- data/spec/models/authentication_check_spec.rb +36 -0
- data/spec/models/barcode_symbology_spec.rb +30 -0
- data/spec/models/check_character_spec.rb +30 -0
- data/spec/models/combined_field_type_spec.rb +30 -0
- data/spec/models/combined_pdf_files_spec.rb +36 -0
- data/spec/models/combined_pdf_list_spec.rb +42 -0
- data/spec/models/combined_pdf_source_input_spec.rb +44 -0
- data/spec/models/combined_pdf_source_pdf_spec.rb +42 -0
- data/spec/models/{submission_data_request_token_spec.rb → combined_pdf_source_spec.rb} +18 -12
- data/spec/models/combined_pdf_source_type_spec.rb +30 -0
- data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +20 -24
- data/spec/models/combined_pdf_state_spec.rb +30 -0
- data/spec/models/{copy_template_options_spec.rb → copy_template_request_spec.rb} +9 -9
- data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +12 -18
- data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +9 -9
- data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +11 -11
- data/spec/models/{list_submissions_response_spec.rb → create_signature_request_event_request_spec.rb} +18 -12
- data/spec/models/create_signature_request_token_request_spec.rb +36 -0
- data/spec/models/{submission_batch_data_spec.rb → create_submission_batch_request_spec.rb} +19 -13
- data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +29 -17
- data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +49 -103
- data/spec/models/create_webhook_request_spec.rb +96 -0
- data/spec/models/custom_file_list_spec.rb +42 -0
- data/spec/models/custom_file_source_pdf_spec.rb +42 -0
- data/spec/models/custom_file_spec.rb +29 -5
- data/spec/models/error_code_spec.rb +30 -0
- data/spec/models/{create_submission_response_spec.rb → error_detail_spec.rb} +14 -18
- data/spec/models/{batch_generate_pdfs201_response_spec.rb → error_info_spec.rb} +27 -19
- data/spec/models/error_response_spec.rb +4 -14
- data/spec/models/expiration_interval_spec.rb +30 -0
- data/spec/models/field_comparison_condition_spec.rb +48 -0
- data/spec/models/field_comparison_operator_spec.rb +30 -0
- data/spec/models/field_dependency_input_spec.rb +48 -0
- data/spec/models/field_dependency_spec.rb +48 -0
- data/spec/models/field_display_type_spec.rb +30 -0
- data/spec/models/field_equals_condition_spec.rb +48 -0
- data/spec/models/field_equals_operator_spec.rb +30 -0
- data/spec/models/field_group_input_spec.rb +72 -0
- data/spec/models/field_group_spec.rb +78 -0
- data/spec/models/field_group_type_spec.rb +30 -0
- data/spec/models/field_in_condition_spec.rb +48 -0
- data/spec/models/field_input_spec.rb +570 -0
- data/spec/models/field_override_spec.rb +408 -0
- data/spec/models/field_presence_condition_spec.rb +42 -0
- data/spec/models/field_presence_operator_spec.rb +30 -0
- data/spec/models/field_range_condition_spec.rb +54 -0
- data/spec/models/field_reimport_state_spec.rb +30 -0
- data/spec/models/field_setup_logic_spec.rb +30 -0
- data/spec/models/field_setup_naming_spec.rb +30 -0
- data/spec/models/field_setup_source_spec.rb +30 -0
- data/spec/models/field_spec.rb +576 -0
- data/spec/models/field_type_spec.rb +30 -0
- data/spec/models/folder_list_spec.rb +42 -0
- data/spec/models/folder_spec.rb +16 -4
- data/spec/models/generate_files_format_spec.rb +30 -0
- data/spec/models/generate_submission_files_request_spec.rb +36 -0
- data/spec/models/generated_file_spec.rb +78 -0
- data/spec/models/generated_file_state_spec.rb +30 -0
- data/spec/models/html_engine_options_input_spec.rb +90 -0
- data/spec/models/html_engine_options_spec.rb +90 -0
- data/spec/models/image_gravity_spec.rb +30 -0
- data/spec/models/image_scale_type_spec.rb +30 -0
- data/spec/models/model_code_language_spec.rb +30 -0
- data/spec/models/move_folder_request_spec.rb +36 -0
- data/spec/models/move_template_request_spec.rb +36 -0
- data/spec/models/number_condition_type_spec.rb +30 -0
- data/spec/models/output_format_spec.rb +30 -0
- data/spec/models/page_format_spec.rb +30 -0
- data/spec/models/page_image_spec.rb +84 -0
- data/spec/models/page_images_spec.rb +54 -0
- data/spec/models/predefined_field_input_spec.rb +72 -0
- data/spec/models/predefined_field_spec.rb +72 -0
- data/spec/models/{publish_version_data_spec.rb → publish_template_version_request_spec.rb} +11 -11
- data/spec/models/remove_template_fields_request_spec.rb +36 -0
- data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +9 -9
- data/spec/models/reorder_template_fields_request_spec.rb +36 -0
- data/spec/models/restore_template_version_request_spec.rb +36 -0
- data/spec/models/shape_type_spec.rb +30 -0
- data/spec/models/signature_request_auth_second_factor_type_spec.rb +30 -0
- data/spec/models/signature_request_auth_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_event_spec.rb → signature_request_event_spec.rb} +16 -18
- data/spec/models/signature_request_event_type_spec.rb +30 -0
- data/spec/models/{create_submission_data_request_data_spec.rb → signature_request_input_spec.rb} +28 -30
- data/spec/models/signature_request_message_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_show_spec.rb → signature_request_spec.rb} +31 -31
- data/spec/models/signature_request_state_spec.rb +30 -0
- data/spec/models/signature_request_token_spec.rb +72 -0
- data/spec/models/signature_request_token_type_spec.rb +30 -0
- data/spec/models/string_condition_type_spec.rb +30 -0
- data/spec/models/submission_action_spec.rb +4 -22
- data/spec/models/submission_action_state_spec.rb +30 -0
- data/spec/models/submission_action_type_spec.rb +30 -0
- data/spec/models/submission_batch_spec.rb +27 -13
- data/spec/models/submission_batch_state_spec.rb +30 -0
- data/spec/models/submission_files_spec.rb +54 -0
- data/spec/models/{json_schema_spec.rb → submission_input_spec.rb} +21 -21
- data/spec/models/submission_list_spec.rb +42 -0
- data/spec/models/submission_source_pdf_spec.rb +42 -0
- data/spec/models/submission_source_spec.rb +30 -0
- data/spec/models/submission_spec.rb +27 -51
- data/spec/models/submission_state_spec.rb +30 -0
- data/spec/models/submission_validation_spec.rb +54 -0
- data/spec/models/template_actor_spec.rb +60 -0
- data/spec/models/template_actor_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_spec.rb → template_defaults_input_spec.rb} +29 -53
- data/spec/models/{submission_preview_spec.rb → template_defaults_spec.rb} +29 -61
- data/spec/models/template_diff_spec.rb +72 -0
- data/spec/models/template_diff_summary_spec.rb +66 -0
- data/spec/models/template_document_spec.rb +102 -0
- data/spec/models/template_document_state_spec.rb +30 -0
- data/spec/models/template_field_change_spec.rb +54 -0
- data/spec/models/template_field_changes_spec.rb +54 -0
- data/spec/models/template_field_dependency_action_spec.rb +30 -0
- data/spec/models/template_field_dependency_condition_input_spec.rb +44 -0
- data/spec/models/template_field_dependency_condition_spec.rb +54 -0
- data/spec/models/template_field_dependency_input_spec.rb +60 -0
- data/spec/models/template_field_dependency_match_spec.rb +30 -0
- data/spec/models/template_field_dependency_operator_spec.rb +30 -0
- data/spec/models/template_field_dependency_spec.rb +60 -0
- data/spec/models/template_field_logic_status_spec.rb +30 -0
- data/spec/models/template_field_move_spec.rb +48 -0
- data/spec/models/template_fields_spec.rb +48 -0
- data/spec/models/template_form_mode_spec.rb +30 -0
- data/spec/models/{template_model_code_response_spec.rb → template_model_code_spec.rb} +9 -13
- data/spec/models/template_page_ai_error_spec.rb +30 -0
- data/spec/models/template_page_ai_naming_status_spec.rb +30 -0
- data/spec/models/template_page_fields_status_spec.rb +30 -0
- data/spec/models/template_page_image_status_spec.rb +30 -0
- data/spec/models/template_page_images_spec.rb +54 -0
- data/spec/models/template_page_processing_status_spec.rb +60 -0
- data/spec/models/template_source_pdf_spec.rb +54 -0
- data/spec/models/template_spec.rb +44 -140
- data/spec/models/template_summary_list_spec.rb +42 -0
- data/spec/models/template_summary_spec.rb +252 -0
- data/spec/models/template_type_spec.rb +30 -0
- data/spec/models/template_version_spec.rb +54 -0
- data/spec/models/template_version_type_spec.rb +30 -0
- data/spec/models/text_alignment_spec.rb +30 -0
- data/spec/models/text_overflow_spec.rb +30 -0
- data/spec/models/text_vertical_alignment_spec.rb +30 -0
- data/spec/models/typeface_spec.rb +30 -0
- data/spec/models/{submission_batch_with_submissions_spec.rb → update_signature_request_request_spec.rb} +18 -22
- data/spec/models/update_template_document_request_spec.rb +60 -0
- data/spec/models/update_template_fields_request_spec.rb +36 -0
- data/spec/models/update_template_request_spec.rb +240 -0
- data/spec/models/update_webhook_request_spec.rb +96 -0
- data/spec/models/upload_method_spec.rb +30 -0
- data/spec/models/{upload_presign_response_spec.rb → upload_presign_spec.rb} +13 -17
- data/spec/models/url_source_pdf_spec.rb +42 -0
- data/spec/models/validate_submission_request_spec.rb +96 -0
- data/spec/models/webhook_event_type_spec.rb +30 -0
- data/spec/models/webhook_list_spec.rb +42 -0
- data/spec/models/webhook_mode_spec.rb +30 -0
- data/spec/models/webhook_spec.rb +4 -8
- data/spec/spec_helper.rb +3 -3
- metadata +597 -202
- data/docs/AddFieldsData.md +0 -18
- data/docs/BatchGeneratePdfs201Response.md +0 -28
- data/docs/CombinePdfsData.md +0 -28
- data/docs/CombinedSubmission.md +0 -44
- data/docs/CombinedSubmissionAction.md +0 -30
- data/docs/CopyTemplateOptions.md +0 -22
- data/docs/CreateCombinedSubmissionResponse.md +0 -26
- data/docs/CreateCustomFileData.md +0 -18
- data/docs/CreateCustomFileResponse.md +0 -24
- data/docs/CreateHtmlTemplate.md +0 -18
- data/docs/CreatePdfSubmissionData.md +0 -34
- data/docs/CreatePdfTemplate.md +0 -18
- data/docs/CreateSubmissionDataRequestData.md +0 -44
- data/docs/CreateSubmissionDataRequestEventRequest.md +0 -24
- data/docs/CreateSubmissionDataRequestEventResponse.md +0 -24
- data/docs/CreateSubmissionDataRequestResponse.md +0 -24
- data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -24
- data/docs/CreateSubmissionResponse.md +0 -26
- data/docs/ErrorOrMultipleErrorsResponse.md +0 -22
- data/docs/ForbiddenErrorResponse.md +0 -22
- data/docs/JsonSchema.md +0 -40
- data/docs/ListSubmissionsResponse.md +0 -22
- data/docs/MoveFolderData.md +0 -18
- data/docs/MoveTemplateData.md +0 -20
- data/docs/MultipleErrorsResponse.md +0 -20
- data/docs/PublishVersionData.md +0 -20
- data/docs/RestoreVersionData.md +0 -18
- data/docs/Submission422Response.md +0 -24
- data/docs/SubmissionBatchData.md +0 -26
- data/docs/SubmissionBatchWithSubmissions.md +0 -34
- data/docs/SubmissionDataRequest.md +0 -60
- data/docs/SubmissionDataRequestEvent.md +0 -30
- data/docs/SubmissionDataRequestShow.md +0 -62
- data/docs/SubmissionDataRequestToken.md +0 -24
- data/docs/SubmissionPreview.md +0 -64
- data/docs/SuccessErrorResponse.md +0 -20
- data/docs/SuccessMultipleErrorsResponse.md +0 -20
- data/docs/TemplateAddFieldsResponse.md +0 -22
- data/docs/TemplateDeleteResponse.md +0 -24
- data/docs/TemplateModelCodeResponse.md +0 -22
- data/docs/TemplatePreview.md +0 -116
- data/docs/TemplatePublishVersionResponse.md +0 -22
- data/docs/UpdateHtmlTemplate.md +0 -18
- data/docs/UpdatePdfTemplate.md +0 -18
- data/docs/UpdateSubmissionDataRequestData.md +0 -42
- data/docs/UploadPresignResponse.md +0 -24
- data/lib/docspring/models/batch_generate_pdfs201_response.rb +0 -352
- data/lib/docspring/models/combined_submission_action.rb +0 -384
- data/lib/docspring/models/create_combined_submission_response.rb +0 -324
- data/lib/docspring/models/create_custom_file_response.rb +0 -314
- data/lib/docspring/models/create_html_template.rb +0 -243
- data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -314
- data/lib/docspring/models/create_submission_data_request_response.rb +0 -314
- data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -314
- data/lib/docspring/models/create_submission_response.rb +0 -324
- data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
- data/lib/docspring/models/forbidden_error_response.rb +0 -323
- data/lib/docspring/models/json_schema.rb +0 -329
- data/lib/docspring/models/list_submissions_response.rb +0 -283
- data/lib/docspring/models/multiple_errors_response.rb +0 -296
- data/lib/docspring/models/submission422_response.rb +0 -299
- data/lib/docspring/models/submission_batch_with_submissions.rb +0 -433
- data/lib/docspring/models/submission_data_request.rb +0 -570
- data/lib/docspring/models/submission_data_request_token.rb +0 -279
- data/lib/docspring/models/submission_preview.rb +0 -637
- data/lib/docspring/models/success_multiple_errors_response.rb +0 -279
- data/lib/docspring/models/template_add_fields_response.rb +0 -290
- data/lib/docspring/models/template_delete_response.rb +0 -300
- data/lib/docspring/models/template_publish_version_response.rb +0 -305
- data/lib/docspring/models/update_html_template.rb +0 -243
- data/spec/models/add_fields_data_spec.rb +0 -36
- data/spec/models/combined_submission_action_spec.rb +0 -84
- data/spec/models/create_combined_submission_response_spec.rb +0 -64
- data/spec/models/create_custom_file_response_spec.rb +0 -58
- data/spec/models/create_folder_data_spec.rb +0 -36
- data/spec/models/create_html_template_spec.rb +0 -36
- data/spec/models/create_pdf_template_spec.rb +0 -36
- data/spec/models/create_submission_data_request_event_request_spec.rb +0 -62
- data/spec/models/create_submission_data_request_event_response_spec.rb +0 -58
- data/spec/models/create_submission_data_request_response_spec.rb +0 -58
- data/spec/models/create_submission_data_request_token_response_spec.rb +0 -58
- data/spec/models/create_webhook_data_spec.rb +0 -36
- data/spec/models/error_or_multiple_errors_response_spec.rb +0 -52
- data/spec/models/forbidden_error_response_spec.rb +0 -56
- data/spec/models/move_folder_data_spec.rb +0 -36
- data/spec/models/multiple_errors_response_spec.rb +0 -46
- data/spec/models/restore_version_data_spec.rb +0 -36
- data/spec/models/submission422_response_spec.rb +0 -58
- data/spec/models/success_error_response_spec.rb +0 -46
- data/spec/models/success_multiple_errors_response_spec.rb +0 -46
- data/spec/models/template_add_fields_response_spec.rb +0 -52
- data/spec/models/template_delete_response_spec.rb +0 -58
- data/spec/models/template_publish_version_response_spec.rb +0 -52
- data/spec/models/update_html_template_spec.rb +0 -36
- data/spec/models/update_pdf_template_spec.rb +0 -36
- data/spec/models/update_submission_data_request_data_spec.rb +0 -116
- data/spec/models/update_webhook_data_spec.rb +0 -36
|
@@ -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,60 +14,82 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DocSpring
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
# Data submitted to a template, and the PDF generated from it.
|
|
18
|
+
class Submission < ApiModelBase
|
|
19
|
+
# The submission's ID.
|
|
20
|
+
attr_accessor :id
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
# Null once the template has been permanently deleted.
|
|
23
|
+
attr_accessor :template_id
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
# The template's type: `pdf` or `html`.
|
|
26
|
+
attr_accessor :template_type
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
# The published version of the template the submission used. Null for the draft.
|
|
29
|
+
attr_accessor :template_version
|
|
25
30
|
|
|
26
|
-
|
|
31
|
+
# The ID of the batch the submission was created in.
|
|
32
|
+
attr_accessor :batch_id
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
# `api`: created with the API. `web`: a web form. `reprocess`: a copy of another submission, made to generate its PDF again.
|
|
35
|
+
attr_accessor :source
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
# `pending` until the PDF has been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the PDF is generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no PDF: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the PDF failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`.
|
|
38
|
+
attr_accessor :state
|
|
31
39
|
|
|
32
|
-
|
|
40
|
+
# Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions.
|
|
41
|
+
attr_accessor :test
|
|
33
42
|
|
|
34
|
-
|
|
43
|
+
# `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`.
|
|
44
|
+
attr_accessor :editable
|
|
35
45
|
|
|
36
|
-
|
|
46
|
+
# The submission's data, with the values entered in completed signature requests. Lists leave it out (null) unless you pass `include_data=true`. Empty once the submission has expired.
|
|
47
|
+
attr_accessor :data
|
|
37
48
|
|
|
38
|
-
|
|
49
|
+
# Why the data doesn't match the template's fields, when `state` is `invalid_data`: the same details as the 422 response that recorded it, with pointers into the request that created the submission (`/data/name`). Cleared once the submission has expired.
|
|
50
|
+
attr_accessor :data_errors
|
|
39
51
|
|
|
40
|
-
|
|
52
|
+
# Why the PDF couldn't be generated, when `state` is `error`.
|
|
53
|
+
attr_accessor :error_message
|
|
41
54
|
|
|
42
|
-
|
|
55
|
+
# Your own data about the submission, such as an ID from your app. It isn't printed on the PDF.
|
|
56
|
+
attr_accessor :metadata
|
|
43
57
|
|
|
44
|
-
|
|
58
|
+
# Whether the PDF needs a password to open (`password`).
|
|
59
|
+
attr_accessor :has_password
|
|
45
60
|
|
|
46
|
-
|
|
61
|
+
# The people asked to sign the submission (and fill in their fields), in order.
|
|
62
|
+
attr_accessor :signature_requests
|
|
47
63
|
|
|
48
|
-
|
|
64
|
+
# The uploads of the submission's PDF to your storage (account integrations).
|
|
65
|
+
attr_accessor :actions
|
|
49
66
|
|
|
67
|
+
# The text of each field that didn't fit in it, by field name. Left out (null) with `data`, and empty once the submission has expired.
|
|
50
68
|
attr_accessor :truncated_text
|
|
51
69
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
attr_accessor :download_url
|
|
55
|
-
|
|
56
|
-
attr_accessor :permanent_download_url
|
|
70
|
+
# What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission.
|
|
71
|
+
attr_accessor :output_formats
|
|
57
72
|
|
|
58
|
-
|
|
73
|
+
# The generated files: `pdf` once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired.
|
|
74
|
+
attr_accessor :files
|
|
59
75
|
|
|
76
|
+
# When the preview PDF was generated. Null if there is no preview.
|
|
60
77
|
attr_accessor :preview_generated_at
|
|
61
78
|
|
|
62
|
-
|
|
79
|
+
# An expired submission's data, metadata, password and PDF have been deleted.
|
|
80
|
+
attr_accessor :expired
|
|
63
81
|
|
|
64
|
-
|
|
82
|
+
# When the submission expires. Null if it's kept until you delete it.
|
|
83
|
+
attr_accessor :expires_at
|
|
65
84
|
|
|
66
|
-
|
|
85
|
+
# When the PDF was generated. Null until then.
|
|
86
|
+
attr_accessor :processed_at
|
|
67
87
|
|
|
68
|
-
|
|
88
|
+
# When the submission was created.
|
|
89
|
+
attr_accessor :created_at
|
|
69
90
|
|
|
70
|
-
|
|
91
|
+
# When the submission was last updated.
|
|
92
|
+
attr_accessor :updated_at
|
|
71
93
|
|
|
72
94
|
class EnumAttributeValidator
|
|
73
95
|
attr_reader :datatype
|
|
@@ -94,33 +116,31 @@ module DocSpring
|
|
|
94
116
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
95
117
|
def self.attribute_map
|
|
96
118
|
{
|
|
97
|
-
:'batch_id' => :'batch_id',
|
|
98
|
-
:'data_requests' => :'data_requests',
|
|
99
|
-
:'editable' => :'editable',
|
|
100
|
-
:'error_message' => :'error_message',
|
|
101
|
-
:'expired' => :'expired',
|
|
102
|
-
:'expires_at' => :'expires_at',
|
|
103
119
|
:'id' => :'id',
|
|
104
|
-
:'json_schema_errors' => :'json_schema_errors',
|
|
105
|
-
:'metadata' => :'metadata',
|
|
106
|
-
:'password' => :'password',
|
|
107
|
-
:'processed_at' => :'processed_at',
|
|
108
|
-
:'state' => :'state',
|
|
109
120
|
:'template_id' => :'template_id',
|
|
110
121
|
:'template_type' => :'template_type',
|
|
111
122
|
:'template_version' => :'template_version',
|
|
123
|
+
:'batch_id' => :'batch_id',
|
|
124
|
+
:'source' => :'source',
|
|
125
|
+
:'state' => :'state',
|
|
112
126
|
:'test' => :'test',
|
|
127
|
+
:'editable' => :'editable',
|
|
128
|
+
:'data' => :'data',
|
|
129
|
+
:'data_errors' => :'data_errors',
|
|
130
|
+
:'error_message' => :'error_message',
|
|
131
|
+
:'metadata' => :'metadata',
|
|
132
|
+
:'has_password' => :'has_password',
|
|
133
|
+
:'signature_requests' => :'signature_requests',
|
|
134
|
+
:'actions' => :'actions',
|
|
113
135
|
:'truncated_text' => :'truncated_text',
|
|
114
|
-
:'
|
|
115
|
-
:'
|
|
116
|
-
:'permanent_download_url' => :'permanent_download_url',
|
|
117
|
-
:'preview_download_url' => :'preview_download_url',
|
|
136
|
+
:'output_formats' => :'output_formats',
|
|
137
|
+
:'files' => :'files',
|
|
118
138
|
:'preview_generated_at' => :'preview_generated_at',
|
|
119
|
-
:'
|
|
120
|
-
:'
|
|
121
|
-
:'
|
|
122
|
-
:'
|
|
123
|
-
:'
|
|
139
|
+
:'expired' => :'expired',
|
|
140
|
+
:'expires_at' => :'expires_at',
|
|
141
|
+
:'processed_at' => :'processed_at',
|
|
142
|
+
:'created_at' => :'created_at',
|
|
143
|
+
:'updated_at' => :'updated_at'
|
|
124
144
|
}
|
|
125
145
|
end
|
|
126
146
|
|
|
@@ -137,61 +157,59 @@ module DocSpring
|
|
|
137
157
|
# Attribute type mapping.
|
|
138
158
|
def self.openapi_types
|
|
139
159
|
{
|
|
140
|
-
:'batch_id' => :'String',
|
|
141
|
-
:'data_requests' => :'Array<SubmissionDataRequest>',
|
|
142
|
-
:'editable' => :'Boolean',
|
|
143
|
-
:'error_message' => :'String',
|
|
144
|
-
:'expired' => :'Boolean',
|
|
145
|
-
:'expires_at' => :'String',
|
|
146
160
|
:'id' => :'String',
|
|
147
|
-
:'json_schema_errors' => :'Array<String>',
|
|
148
|
-
:'metadata' => :'Object',
|
|
149
|
-
:'password' => :'String',
|
|
150
|
-
:'processed_at' => :'String',
|
|
151
|
-
:'state' => :'String',
|
|
152
161
|
:'template_id' => :'String',
|
|
153
|
-
:'template_type' => :'
|
|
162
|
+
:'template_type' => :'TemplateType',
|
|
154
163
|
:'template_version' => :'String',
|
|
164
|
+
:'batch_id' => :'String',
|
|
165
|
+
:'source' => :'SubmissionSource',
|
|
166
|
+
:'state' => :'SubmissionState',
|
|
155
167
|
:'test' => :'Boolean',
|
|
156
|
-
:'
|
|
157
|
-
:'
|
|
158
|
-
:'
|
|
159
|
-
:'
|
|
160
|
-
:'
|
|
161
|
-
:'
|
|
162
|
-
:'
|
|
168
|
+
:'editable' => :'Boolean',
|
|
169
|
+
:'data' => :'Hash<String, Object>',
|
|
170
|
+
:'data_errors' => :'Array<ErrorDetail>',
|
|
171
|
+
:'error_message' => :'String',
|
|
172
|
+
:'metadata' => :'Hash<String, Object>',
|
|
173
|
+
:'has_password' => :'Boolean',
|
|
174
|
+
:'signature_requests' => :'Array<SignatureRequest>',
|
|
163
175
|
:'actions' => :'Array<SubmissionAction>',
|
|
164
|
-
:'
|
|
165
|
-
:'
|
|
166
|
-
:'
|
|
176
|
+
:'truncated_text' => :'Hash<String, Array<String>>',
|
|
177
|
+
:'output_formats' => :'Array<OutputFormat>',
|
|
178
|
+
:'files' => :'SubmissionFiles',
|
|
179
|
+
:'preview_generated_at' => :'Time',
|
|
180
|
+
:'expired' => :'Boolean',
|
|
181
|
+
:'expires_at' => :'Time',
|
|
182
|
+
:'processed_at' => :'Time',
|
|
183
|
+
:'created_at' => :'Time',
|
|
184
|
+
:'updated_at' => :'Time'
|
|
167
185
|
}
|
|
168
186
|
end
|
|
169
187
|
|
|
170
188
|
# List of attributes with nullable: true
|
|
171
189
|
def self.openapi_nullable
|
|
172
190
|
Set.new([
|
|
173
|
-
:'batch_id',
|
|
174
|
-
:'editable',
|
|
175
|
-
:'error_message',
|
|
176
|
-
:'expires_at',
|
|
177
|
-
:'id',
|
|
178
|
-
:'json_schema_errors',
|
|
179
|
-
:'password',
|
|
180
|
-
:'processed_at',
|
|
181
191
|
:'template_id',
|
|
182
192
|
:'template_version',
|
|
193
|
+
:'batch_id',
|
|
194
|
+
:'data',
|
|
195
|
+
:'error_message',
|
|
183
196
|
:'truncated_text',
|
|
184
|
-
:'pdf_hash',
|
|
185
|
-
:'download_url',
|
|
186
|
-
:'permanent_download_url',
|
|
187
|
-
:'preview_download_url',
|
|
188
197
|
:'preview_generated_at',
|
|
189
|
-
:'
|
|
190
|
-
:'
|
|
191
|
-
:'data'
|
|
198
|
+
:'expires_at',
|
|
199
|
+
:'processed_at',
|
|
192
200
|
])
|
|
193
201
|
end
|
|
194
202
|
|
|
203
|
+
# Returns attribute type mapping
|
|
204
|
+
def self.acceptable_openapi_types
|
|
205
|
+
openapi_types
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Returns the nullable attributes
|
|
209
|
+
def self.acceptable_openapi_nullable
|
|
210
|
+
openapi_nullable
|
|
211
|
+
end
|
|
212
|
+
|
|
195
213
|
# Initializes the object
|
|
196
214
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
197
215
|
def initialize(attributes = {})
|
|
@@ -208,134 +226,132 @@ module DocSpring
|
|
|
208
226
|
h[k.to_sym] = v
|
|
209
227
|
}
|
|
210
228
|
|
|
211
|
-
if attributes.key?(:'
|
|
212
|
-
self.
|
|
229
|
+
if attributes.key?(:'id')
|
|
230
|
+
self.id = attributes[:'id']
|
|
213
231
|
else
|
|
214
|
-
self.
|
|
232
|
+
self.id = nil
|
|
215
233
|
end
|
|
216
234
|
|
|
217
|
-
if attributes.key?(:'
|
|
218
|
-
|
|
219
|
-
self.data_requests = value
|
|
220
|
-
end
|
|
235
|
+
if attributes.key?(:'template_id')
|
|
236
|
+
self.template_id = attributes[:'template_id']
|
|
221
237
|
else
|
|
222
|
-
self.
|
|
238
|
+
self.template_id = nil
|
|
223
239
|
end
|
|
224
240
|
|
|
225
|
-
if attributes.key?(:'
|
|
226
|
-
self.
|
|
241
|
+
if attributes.key?(:'template_type')
|
|
242
|
+
self.template_type = attributes[:'template_type']
|
|
227
243
|
else
|
|
228
|
-
self.
|
|
244
|
+
self.template_type = nil
|
|
229
245
|
end
|
|
230
246
|
|
|
231
|
-
if attributes.key?(:'
|
|
232
|
-
self.
|
|
247
|
+
if attributes.key?(:'template_version')
|
|
248
|
+
self.template_version = attributes[:'template_version']
|
|
233
249
|
else
|
|
234
|
-
self.
|
|
250
|
+
self.template_version = nil
|
|
235
251
|
end
|
|
236
252
|
|
|
237
|
-
if attributes.key?(:'
|
|
238
|
-
self.
|
|
253
|
+
if attributes.key?(:'batch_id')
|
|
254
|
+
self.batch_id = attributes[:'batch_id']
|
|
239
255
|
else
|
|
240
|
-
self.
|
|
256
|
+
self.batch_id = nil
|
|
241
257
|
end
|
|
242
258
|
|
|
243
|
-
if attributes.key?(:'
|
|
244
|
-
self.
|
|
259
|
+
if attributes.key?(:'source')
|
|
260
|
+
self.source = attributes[:'source']
|
|
245
261
|
else
|
|
246
|
-
self.
|
|
262
|
+
self.source = nil
|
|
247
263
|
end
|
|
248
264
|
|
|
249
|
-
if attributes.key?(:'
|
|
250
|
-
self.
|
|
265
|
+
if attributes.key?(:'state')
|
|
266
|
+
self.state = attributes[:'state']
|
|
251
267
|
else
|
|
252
|
-
self.
|
|
268
|
+
self.state = nil
|
|
253
269
|
end
|
|
254
270
|
|
|
255
|
-
if attributes.key?(:'
|
|
256
|
-
|
|
257
|
-
self.json_schema_errors = value
|
|
258
|
-
end
|
|
271
|
+
if attributes.key?(:'test')
|
|
272
|
+
self.test = attributes[:'test']
|
|
259
273
|
else
|
|
260
|
-
self.
|
|
274
|
+
self.test = nil
|
|
261
275
|
end
|
|
262
276
|
|
|
263
|
-
if attributes.key?(:'
|
|
264
|
-
self.
|
|
277
|
+
if attributes.key?(:'editable')
|
|
278
|
+
self.editable = attributes[:'editable']
|
|
265
279
|
else
|
|
266
|
-
self.
|
|
280
|
+
self.editable = nil
|
|
267
281
|
end
|
|
268
282
|
|
|
269
|
-
if attributes.key?(:'
|
|
270
|
-
|
|
283
|
+
if attributes.key?(:'data')
|
|
284
|
+
if (value = attributes[:'data']).is_a?(Hash) || value.nil?
|
|
285
|
+
self.data = value
|
|
286
|
+
end
|
|
271
287
|
else
|
|
272
|
-
self.
|
|
288
|
+
self.data = nil
|
|
273
289
|
end
|
|
274
290
|
|
|
275
|
-
if attributes.key?(:'
|
|
276
|
-
|
|
291
|
+
if attributes.key?(:'data_errors')
|
|
292
|
+
if (value = attributes[:'data_errors']).is_a?(Array)
|
|
293
|
+
self.data_errors = value
|
|
294
|
+
end
|
|
277
295
|
else
|
|
278
|
-
self.
|
|
296
|
+
self.data_errors = nil
|
|
279
297
|
end
|
|
280
298
|
|
|
281
|
-
if attributes.key?(:'
|
|
282
|
-
self.
|
|
299
|
+
if attributes.key?(:'error_message')
|
|
300
|
+
self.error_message = attributes[:'error_message']
|
|
283
301
|
else
|
|
284
|
-
self.
|
|
302
|
+
self.error_message = nil
|
|
285
303
|
end
|
|
286
304
|
|
|
287
|
-
if attributes.key?(:'
|
|
288
|
-
|
|
305
|
+
if attributes.key?(:'metadata')
|
|
306
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
307
|
+
self.metadata = value
|
|
308
|
+
end
|
|
289
309
|
else
|
|
290
|
-
self.
|
|
310
|
+
self.metadata = nil
|
|
291
311
|
end
|
|
292
312
|
|
|
293
|
-
if attributes.key?(:'
|
|
294
|
-
self.
|
|
313
|
+
if attributes.key?(:'has_password')
|
|
314
|
+
self.has_password = attributes[:'has_password']
|
|
295
315
|
else
|
|
296
|
-
self.
|
|
316
|
+
self.has_password = nil
|
|
297
317
|
end
|
|
298
318
|
|
|
299
|
-
if attributes.key?(:'
|
|
300
|
-
|
|
319
|
+
if attributes.key?(:'signature_requests')
|
|
320
|
+
if (value = attributes[:'signature_requests']).is_a?(Array)
|
|
321
|
+
self.signature_requests = value
|
|
322
|
+
end
|
|
301
323
|
else
|
|
302
|
-
self.
|
|
324
|
+
self.signature_requests = nil
|
|
303
325
|
end
|
|
304
326
|
|
|
305
|
-
if attributes.key?(:'
|
|
306
|
-
|
|
327
|
+
if attributes.key?(:'actions')
|
|
328
|
+
if (value = attributes[:'actions']).is_a?(Array)
|
|
329
|
+
self.actions = value
|
|
330
|
+
end
|
|
307
331
|
else
|
|
308
|
-
self.
|
|
332
|
+
self.actions = nil
|
|
309
333
|
end
|
|
310
334
|
|
|
311
335
|
if attributes.key?(:'truncated_text')
|
|
312
|
-
|
|
336
|
+
if (value = attributes[:'truncated_text']).is_a?(Hash) || value.nil?
|
|
337
|
+
self.truncated_text = value
|
|
338
|
+
end
|
|
313
339
|
else
|
|
314
340
|
self.truncated_text = nil
|
|
315
341
|
end
|
|
316
342
|
|
|
317
|
-
if attributes.key?(:'
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
if attributes.key?(:'download_url')
|
|
324
|
-
self.download_url = attributes[:'download_url']
|
|
325
|
-
else
|
|
326
|
-
self.download_url = nil
|
|
327
|
-
end
|
|
328
|
-
|
|
329
|
-
if attributes.key?(:'permanent_download_url')
|
|
330
|
-
self.permanent_download_url = attributes[:'permanent_download_url']
|
|
343
|
+
if attributes.key?(:'output_formats')
|
|
344
|
+
if (value = attributes[:'output_formats']).is_a?(Array)
|
|
345
|
+
self.output_formats = value
|
|
346
|
+
end
|
|
331
347
|
else
|
|
332
|
-
self.
|
|
348
|
+
self.output_formats = nil
|
|
333
349
|
end
|
|
334
350
|
|
|
335
|
-
if attributes.key?(:'
|
|
336
|
-
self.
|
|
351
|
+
if attributes.key?(:'files')
|
|
352
|
+
self.files = attributes[:'files']
|
|
337
353
|
else
|
|
338
|
-
self.
|
|
354
|
+
self.files = nil
|
|
339
355
|
end
|
|
340
356
|
|
|
341
357
|
if attributes.key?(:'preview_generated_at')
|
|
@@ -344,30 +360,34 @@ module DocSpring
|
|
|
344
360
|
self.preview_generated_at = nil
|
|
345
361
|
end
|
|
346
362
|
|
|
347
|
-
if attributes.key?(:'
|
|
348
|
-
self.
|
|
363
|
+
if attributes.key?(:'expired')
|
|
364
|
+
self.expired = attributes[:'expired']
|
|
349
365
|
else
|
|
350
|
-
self.
|
|
366
|
+
self.expired = nil
|
|
351
367
|
end
|
|
352
368
|
|
|
353
|
-
if attributes.key?(:'
|
|
354
|
-
|
|
355
|
-
self.actions = value
|
|
356
|
-
end
|
|
369
|
+
if attributes.key?(:'expires_at')
|
|
370
|
+
self.expires_at = attributes[:'expires_at']
|
|
357
371
|
else
|
|
358
|
-
self.
|
|
372
|
+
self.expires_at = nil
|
|
359
373
|
end
|
|
360
374
|
|
|
361
|
-
if attributes.key?(:'
|
|
362
|
-
self.
|
|
375
|
+
if attributes.key?(:'processed_at')
|
|
376
|
+
self.processed_at = attributes[:'processed_at']
|
|
377
|
+
else
|
|
378
|
+
self.processed_at = nil
|
|
363
379
|
end
|
|
364
380
|
|
|
365
|
-
if attributes.key?(:'
|
|
366
|
-
self.
|
|
381
|
+
if attributes.key?(:'created_at')
|
|
382
|
+
self.created_at = attributes[:'created_at']
|
|
383
|
+
else
|
|
384
|
+
self.created_at = nil
|
|
367
385
|
end
|
|
368
386
|
|
|
369
|
-
if attributes.key?(:'
|
|
370
|
-
self.
|
|
387
|
+
if attributes.key?(:'updated_at')
|
|
388
|
+
self.updated_at = attributes[:'updated_at']
|
|
389
|
+
else
|
|
390
|
+
self.updated_at = nil
|
|
371
391
|
end
|
|
372
392
|
end
|
|
373
393
|
|
|
@@ -376,34 +396,70 @@ module DocSpring
|
|
|
376
396
|
def list_invalid_properties
|
|
377
397
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
378
398
|
invalid_properties = Array.new
|
|
379
|
-
if @
|
|
380
|
-
invalid_properties.push('invalid value for "
|
|
399
|
+
if @id.nil?
|
|
400
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
381
401
|
end
|
|
382
402
|
|
|
383
|
-
if @
|
|
384
|
-
invalid_properties.push('invalid value for "
|
|
403
|
+
if @template_type.nil?
|
|
404
|
+
invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
|
|
385
405
|
end
|
|
386
406
|
|
|
387
|
-
if @
|
|
388
|
-
invalid_properties.push('invalid value for "
|
|
407
|
+
if @source.nil?
|
|
408
|
+
invalid_properties.push('invalid value for "source", source cannot be nil.')
|
|
389
409
|
end
|
|
390
410
|
|
|
391
411
|
if @state.nil?
|
|
392
412
|
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
393
413
|
end
|
|
394
414
|
|
|
395
|
-
if @template_type.nil?
|
|
396
|
-
invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
|
|
397
|
-
end
|
|
398
|
-
|
|
399
415
|
if @test.nil?
|
|
400
416
|
invalid_properties.push('invalid value for "test", test cannot be nil.')
|
|
401
417
|
end
|
|
402
418
|
|
|
419
|
+
if @editable.nil?
|
|
420
|
+
invalid_properties.push('invalid value for "editable", editable cannot be nil.')
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
if @data_errors.nil?
|
|
424
|
+
invalid_properties.push('invalid value for "data_errors", data_errors cannot be nil.')
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
if @metadata.nil?
|
|
428
|
+
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
if @has_password.nil?
|
|
432
|
+
invalid_properties.push('invalid value for "has_password", has_password cannot be nil.')
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
if @signature_requests.nil?
|
|
436
|
+
invalid_properties.push('invalid value for "signature_requests", signature_requests cannot be nil.')
|
|
437
|
+
end
|
|
438
|
+
|
|
403
439
|
if @actions.nil?
|
|
404
440
|
invalid_properties.push('invalid value for "actions", actions cannot be nil.')
|
|
405
441
|
end
|
|
406
442
|
|
|
443
|
+
if @output_formats.nil?
|
|
444
|
+
invalid_properties.push('invalid value for "output_formats", output_formats cannot be nil.')
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
if @files.nil?
|
|
448
|
+
invalid_properties.push('invalid value for "files", files cannot be nil.')
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
if @expired.nil?
|
|
452
|
+
invalid_properties.push('invalid value for "expired", expired cannot be nil.')
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
if @created_at.nil?
|
|
456
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
if @updated_at.nil?
|
|
460
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
461
|
+
end
|
|
462
|
+
|
|
407
463
|
invalid_properties
|
|
408
464
|
end
|
|
409
465
|
|
|
@@ -411,72 +467,63 @@ module DocSpring
|
|
|
411
467
|
# @return true if the model is valid
|
|
412
468
|
def valid?
|
|
413
469
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
414
|
-
return false if @
|
|
415
|
-
return false if @expired.nil?
|
|
416
|
-
return false if @metadata.nil?
|
|
417
|
-
return false if @state.nil?
|
|
418
|
-
state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "invalid_data", "error", "image_download_failed", "image_processing_failed", "waiting_for_data_requests", "syntax_error", "insufficient_credits", "account_suspended", "license_revoked", "accidental", "declined"])
|
|
419
|
-
return false unless state_validator.valid?(@state)
|
|
470
|
+
return false if @id.nil?
|
|
420
471
|
return false if @template_type.nil?
|
|
421
|
-
|
|
422
|
-
return false
|
|
472
|
+
return false if @source.nil?
|
|
473
|
+
return false if @state.nil?
|
|
423
474
|
return false if @test.nil?
|
|
475
|
+
return false if @editable.nil?
|
|
476
|
+
return false if @data_errors.nil?
|
|
477
|
+
return false if @metadata.nil?
|
|
478
|
+
return false if @has_password.nil?
|
|
479
|
+
return false if @signature_requests.nil?
|
|
424
480
|
return false if @actions.nil?
|
|
425
|
-
|
|
426
|
-
return false
|
|
481
|
+
return false if @output_formats.nil?
|
|
482
|
+
return false if @files.nil?
|
|
483
|
+
return false if @expired.nil?
|
|
484
|
+
return false if @created_at.nil?
|
|
485
|
+
return false if @updated_at.nil?
|
|
427
486
|
true
|
|
428
487
|
end
|
|
429
488
|
|
|
430
489
|
# Custom attribute writer method with validation
|
|
431
|
-
# @param [Object]
|
|
432
|
-
def
|
|
433
|
-
if
|
|
434
|
-
fail ArgumentError, '
|
|
490
|
+
# @param [Object] id Value to be assigned
|
|
491
|
+
def id=(id)
|
|
492
|
+
if id.nil?
|
|
493
|
+
fail ArgumentError, 'id cannot be nil'
|
|
435
494
|
end
|
|
436
495
|
|
|
437
|
-
@
|
|
496
|
+
@id = id
|
|
438
497
|
end
|
|
439
498
|
|
|
440
499
|
# Custom attribute writer method with validation
|
|
441
|
-
# @param [Object]
|
|
442
|
-
def
|
|
443
|
-
if
|
|
444
|
-
fail ArgumentError, '
|
|
500
|
+
# @param [Object] template_type Value to be assigned
|
|
501
|
+
def template_type=(template_type)
|
|
502
|
+
if template_type.nil?
|
|
503
|
+
fail ArgumentError, 'template_type cannot be nil'
|
|
445
504
|
end
|
|
446
505
|
|
|
447
|
-
@
|
|
506
|
+
@template_type = template_type
|
|
448
507
|
end
|
|
449
508
|
|
|
450
509
|
# Custom attribute writer method with validation
|
|
451
|
-
# @param [Object]
|
|
452
|
-
def
|
|
453
|
-
if
|
|
454
|
-
fail ArgumentError, '
|
|
510
|
+
# @param [Object] source Value to be assigned
|
|
511
|
+
def source=(source)
|
|
512
|
+
if source.nil?
|
|
513
|
+
fail ArgumentError, 'source cannot be nil'
|
|
455
514
|
end
|
|
456
515
|
|
|
457
|
-
@
|
|
516
|
+
@source = source
|
|
458
517
|
end
|
|
459
518
|
|
|
460
|
-
# Custom attribute writer method
|
|
461
|
-
# @param [Object] state
|
|
519
|
+
# Custom attribute writer method with validation
|
|
520
|
+
# @param [Object] state Value to be assigned
|
|
462
521
|
def state=(state)
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
unless defined?(@_skip_enum_validation) || validator.valid?(state)
|
|
466
|
-
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
522
|
+
if state.nil?
|
|
523
|
+
fail ArgumentError, 'state cannot be nil'
|
|
467
524
|
end
|
|
468
|
-
@state = state
|
|
469
|
-
end
|
|
470
525
|
|
|
471
|
-
|
|
472
|
-
# @param [Object] template_type Object to be assigned
|
|
473
|
-
def template_type=(template_type)
|
|
474
|
-
validator = EnumAttributeValidator.new('String', ["pdf", "html"])
|
|
475
|
-
# build_from_hash accepts enum values this client doesn't know about yet
|
|
476
|
-
unless defined?(@_skip_enum_validation) || validator.valid?(template_type)
|
|
477
|
-
fail ArgumentError, "invalid value for \"template_type\", must be one of #{validator.allowable_values}."
|
|
478
|
-
end
|
|
479
|
-
@template_type = template_type
|
|
526
|
+
@state = state
|
|
480
527
|
end
|
|
481
528
|
|
|
482
529
|
# Custom attribute writer method with validation
|
|
@@ -489,6 +536,56 @@ module DocSpring
|
|
|
489
536
|
@test = test
|
|
490
537
|
end
|
|
491
538
|
|
|
539
|
+
# Custom attribute writer method with validation
|
|
540
|
+
# @param [Object] editable Value to be assigned
|
|
541
|
+
def editable=(editable)
|
|
542
|
+
if editable.nil?
|
|
543
|
+
fail ArgumentError, 'editable cannot be nil'
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
@editable = editable
|
|
547
|
+
end
|
|
548
|
+
|
|
549
|
+
# Custom attribute writer method with validation
|
|
550
|
+
# @param [Object] data_errors Value to be assigned
|
|
551
|
+
def data_errors=(data_errors)
|
|
552
|
+
if data_errors.nil?
|
|
553
|
+
fail ArgumentError, 'data_errors cannot be nil'
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
@data_errors = data_errors
|
|
557
|
+
end
|
|
558
|
+
|
|
559
|
+
# Custom attribute writer method with validation
|
|
560
|
+
# @param [Object] metadata Value to be assigned
|
|
561
|
+
def metadata=(metadata)
|
|
562
|
+
if metadata.nil?
|
|
563
|
+
fail ArgumentError, 'metadata cannot be nil'
|
|
564
|
+
end
|
|
565
|
+
|
|
566
|
+
@metadata = metadata
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
# Custom attribute writer method with validation
|
|
570
|
+
# @param [Object] has_password Value to be assigned
|
|
571
|
+
def has_password=(has_password)
|
|
572
|
+
if has_password.nil?
|
|
573
|
+
fail ArgumentError, 'has_password cannot be nil'
|
|
574
|
+
end
|
|
575
|
+
|
|
576
|
+
@has_password = has_password
|
|
577
|
+
end
|
|
578
|
+
|
|
579
|
+
# Custom attribute writer method with validation
|
|
580
|
+
# @param [Object] signature_requests Value to be assigned
|
|
581
|
+
def signature_requests=(signature_requests)
|
|
582
|
+
if signature_requests.nil?
|
|
583
|
+
fail ArgumentError, 'signature_requests cannot be nil'
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
@signature_requests = signature_requests
|
|
587
|
+
end
|
|
588
|
+
|
|
492
589
|
# Custom attribute writer method with validation
|
|
493
590
|
# @param [Object] actions Value to be assigned
|
|
494
591
|
def actions=(actions)
|
|
@@ -499,15 +596,54 @@ module DocSpring
|
|
|
499
596
|
@actions = actions
|
|
500
597
|
end
|
|
501
598
|
|
|
502
|
-
# Custom attribute writer method
|
|
503
|
-
# @param [Object]
|
|
504
|
-
def
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
unless defined?(@_skip_enum_validation) || validator.valid?(source)
|
|
508
|
-
fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}."
|
|
599
|
+
# Custom attribute writer method with validation
|
|
600
|
+
# @param [Object] output_formats Value to be assigned
|
|
601
|
+
def output_formats=(output_formats)
|
|
602
|
+
if output_formats.nil?
|
|
603
|
+
fail ArgumentError, 'output_formats cannot be nil'
|
|
509
604
|
end
|
|
510
|
-
|
|
605
|
+
|
|
606
|
+
@output_formats = output_formats
|
|
607
|
+
end
|
|
608
|
+
|
|
609
|
+
# Custom attribute writer method with validation
|
|
610
|
+
# @param [Object] files Value to be assigned
|
|
611
|
+
def files=(files)
|
|
612
|
+
if files.nil?
|
|
613
|
+
fail ArgumentError, 'files cannot be nil'
|
|
614
|
+
end
|
|
615
|
+
|
|
616
|
+
@files = files
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
# Custom attribute writer method with validation
|
|
620
|
+
# @param [Object] expired Value to be assigned
|
|
621
|
+
def expired=(expired)
|
|
622
|
+
if expired.nil?
|
|
623
|
+
fail ArgumentError, 'expired cannot be nil'
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
@expired = expired
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
# Custom attribute writer method with validation
|
|
630
|
+
# @param [Object] created_at Value to be assigned
|
|
631
|
+
def created_at=(created_at)
|
|
632
|
+
if created_at.nil?
|
|
633
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
@created_at = created_at
|
|
637
|
+
end
|
|
638
|
+
|
|
639
|
+
# Custom attribute writer method with validation
|
|
640
|
+
# @param [Object] updated_at Value to be assigned
|
|
641
|
+
def updated_at=(updated_at)
|
|
642
|
+
if updated_at.nil?
|
|
643
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
644
|
+
end
|
|
645
|
+
|
|
646
|
+
@updated_at = updated_at
|
|
511
647
|
end
|
|
512
648
|
|
|
513
649
|
# Checks equality by comparing each attribute.
|
|
@@ -515,33 +651,31 @@ module DocSpring
|
|
|
515
651
|
def ==(o)
|
|
516
652
|
return true if self.equal?(o)
|
|
517
653
|
self.class == o.class &&
|
|
518
|
-
batch_id == o.batch_id &&
|
|
519
|
-
data_requests == o.data_requests &&
|
|
520
|
-
editable == o.editable &&
|
|
521
|
-
error_message == o.error_message &&
|
|
522
|
-
expired == o.expired &&
|
|
523
|
-
expires_at == o.expires_at &&
|
|
524
654
|
id == o.id &&
|
|
525
|
-
json_schema_errors == o.json_schema_errors &&
|
|
526
|
-
metadata == o.metadata &&
|
|
527
|
-
password == o.password &&
|
|
528
|
-
processed_at == o.processed_at &&
|
|
529
|
-
state == o.state &&
|
|
530
655
|
template_id == o.template_id &&
|
|
531
656
|
template_type == o.template_type &&
|
|
532
657
|
template_version == o.template_version &&
|
|
658
|
+
batch_id == o.batch_id &&
|
|
659
|
+
source == o.source &&
|
|
660
|
+
state == o.state &&
|
|
533
661
|
test == o.test &&
|
|
662
|
+
editable == o.editable &&
|
|
663
|
+
data == o.data &&
|
|
664
|
+
data_errors == o.data_errors &&
|
|
665
|
+
error_message == o.error_message &&
|
|
666
|
+
metadata == o.metadata &&
|
|
667
|
+
has_password == o.has_password &&
|
|
668
|
+
signature_requests == o.signature_requests &&
|
|
669
|
+
actions == o.actions &&
|
|
534
670
|
truncated_text == o.truncated_text &&
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
permanent_download_url == o.permanent_download_url &&
|
|
538
|
-
preview_download_url == o.preview_download_url &&
|
|
671
|
+
output_formats == o.output_formats &&
|
|
672
|
+
files == o.files &&
|
|
539
673
|
preview_generated_at == o.preview_generated_at &&
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
674
|
+
expired == o.expired &&
|
|
675
|
+
expires_at == o.expires_at &&
|
|
676
|
+
processed_at == o.processed_at &&
|
|
677
|
+
created_at == o.created_at &&
|
|
678
|
+
updated_at == o.updated_at
|
|
545
679
|
end
|
|
546
680
|
|
|
547
681
|
# @see the `==` method
|
|
@@ -553,7 +687,7 @@ module DocSpring
|
|
|
553
687
|
# Calculates hash code according to all attributes.
|
|
554
688
|
# @return [Integer] Hash code
|
|
555
689
|
def hash
|
|
556
|
-
[
|
|
690
|
+
[id, template_id, template_type, template_version, batch_id, source, state, test, editable, data, data_errors, error_message, metadata, has_password, signature_requests, actions, truncated_text, output_formats, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at].hash
|
|
557
691
|
end
|
|
558
692
|
|
|
559
693
|
# Builds the object from hash
|
|
@@ -562,18 +696,20 @@ module DocSpring
|
|
|
562
696
|
def self.build_from_hash(attributes)
|
|
563
697
|
return nil unless attributes.is_a?(Hash)
|
|
564
698
|
attributes = attributes.transform_keys(&:to_sym)
|
|
699
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
700
|
+
map = acceptable_attribute_map
|
|
565
701
|
transformed_hash = {}
|
|
566
|
-
|
|
567
|
-
if attributes.key?(
|
|
702
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
703
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
568
704
|
transformed_hash["#{key}"] = nil
|
|
569
705
|
elsif type =~ /\AArray<(.*)>/i
|
|
570
706
|
# check to ensure the input is an array given that the attribute
|
|
571
707
|
# is documented as an array but the input is not
|
|
572
|
-
if attributes[
|
|
573
|
-
transformed_hash["#{key}"] = attributes[
|
|
708
|
+
if attributes[map[key]].is_a?(Array)
|
|
709
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
574
710
|
end
|
|
575
|
-
elsif !attributes[
|
|
576
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
711
|
+
elsif !attributes[map[key]].nil?
|
|
712
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
577
713
|
end
|
|
578
714
|
end
|
|
579
715
|
# Responses can include enum values added after this client was released, so the enum setters
|
|
@@ -585,69 +721,15 @@ module DocSpring
|
|
|
585
721
|
end
|
|
586
722
|
end
|
|
587
723
|
|
|
588
|
-
# Deserializes the data based on type
|
|
589
|
-
# @param string type Data type
|
|
590
|
-
# @param string value Value to be deserialized
|
|
591
|
-
# @return [Object] Deserialized data
|
|
592
|
-
def self._deserialize(type, value)
|
|
593
|
-
case type.to_sym
|
|
594
|
-
when :Time
|
|
595
|
-
Time.parse(value)
|
|
596
|
-
when :Date
|
|
597
|
-
Date.parse(value)
|
|
598
|
-
when :String
|
|
599
|
-
value.to_s
|
|
600
|
-
when :Integer
|
|
601
|
-
value.to_i
|
|
602
|
-
when :Float
|
|
603
|
-
value.to_f
|
|
604
|
-
when :Boolean
|
|
605
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
606
|
-
true
|
|
607
|
-
else
|
|
608
|
-
false
|
|
609
|
-
end
|
|
610
|
-
when :Object
|
|
611
|
-
# generic object (usually a Hash), return directly
|
|
612
|
-
value
|
|
613
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
614
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
615
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
616
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
617
|
-
k_type = Regexp.last_match[:k_type]
|
|
618
|
-
v_type = Regexp.last_match[:v_type]
|
|
619
|
-
{}.tap do |hash|
|
|
620
|
-
value.each do |k, v|
|
|
621
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
622
|
-
end
|
|
623
|
-
end
|
|
624
|
-
else # model
|
|
625
|
-
# models (e.g. Pet) or oneOf
|
|
626
|
-
klass = DocSpring.const_get(type)
|
|
627
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
628
|
-
end
|
|
629
|
-
end
|
|
630
|
-
|
|
631
|
-
# Returns the string representation of the object
|
|
632
|
-
# @return [String] String presentation of the object
|
|
633
|
-
def to_s
|
|
634
|
-
to_hash.to_s
|
|
635
|
-
end
|
|
636
|
-
|
|
637
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
638
|
-
# @return [Hash] Returns the object in the form of hash
|
|
639
|
-
def to_body
|
|
640
|
-
to_hash
|
|
641
|
-
end
|
|
642
|
-
|
|
643
724
|
# Returns the object in the form of hash
|
|
644
725
|
# @return [Hash] Returns the object in the form of hash
|
|
645
726
|
def to_hash
|
|
646
727
|
hash = {}
|
|
647
|
-
|
|
728
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
729
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
648
730
|
value = self.send(attr)
|
|
649
731
|
if value.nil?
|
|
650
|
-
is_nullable = self.class.
|
|
732
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
651
733
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
652
734
|
end
|
|
653
735
|
|
|
@@ -656,24 +738,6 @@ module DocSpring
|
|
|
656
738
|
hash
|
|
657
739
|
end
|
|
658
740
|
|
|
659
|
-
# Outputs non-array value in the form of hash
|
|
660
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
661
|
-
# @param [Object] value Any valid value
|
|
662
|
-
# @return [Hash] Returns the value in the form of hash
|
|
663
|
-
def _to_hash(value)
|
|
664
|
-
if value.is_a?(Array)
|
|
665
|
-
value.compact.map { |v| _to_hash(v) }
|
|
666
|
-
elsif value.is_a?(Hash)
|
|
667
|
-
{}.tap do |hash|
|
|
668
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
669
|
-
end
|
|
670
|
-
elsif value.respond_to? :to_hash
|
|
671
|
-
value.to_hash
|
|
672
|
-
else
|
|
673
|
-
value
|
|
674
|
-
end
|
|
675
|
-
end
|
|
676
|
-
|
|
677
741
|
end
|
|
678
742
|
|
|
679
743
|
end
|