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,34 +14,49 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DocSpring
|
|
17
|
-
|
|
17
|
+
# A PDF made by merging other PDFs: submissions, other combined PDFs, templates, custom files and PDFs from URLs.
|
|
18
|
+
class CombinedPdf < ApiModelBase
|
|
19
|
+
# The combined PDF's ID.
|
|
18
20
|
attr_accessor :id
|
|
19
21
|
|
|
22
|
+
# `pending` until the PDF has been generated, then `processed`. `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. `error`: the PDFs couldn't be merged (see `error_message`). Waiting ends in `error` if it's discarded or takes over 30 days.
|
|
20
23
|
attr_accessor :state
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
# The PDFs to merge, in order.
|
|
26
|
+
attr_accessor :source_pdfs
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
# Your own data about the combined PDF, such as an ID from your app.
|
|
29
|
+
attr_accessor :metadata
|
|
25
30
|
|
|
26
|
-
|
|
31
|
+
# Whether the PDF needs a password to open (`password`).
|
|
32
|
+
attr_accessor :has_password
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
# Delete the custom files in `source_pdfs` once the combined PDF has been generated (they're kept if it fails). Other combined PDFs can't use them after that. A test API token can't delete custom files.
|
|
35
|
+
attr_accessor :delete_custom_files
|
|
29
36
|
|
|
37
|
+
# Why the PDFs couldn't be merged, when `state` is `error`.
|
|
30
38
|
attr_accessor :error_message
|
|
31
39
|
|
|
32
|
-
|
|
40
|
+
# The generated files, by format. Empty until the PDF has been generated, and once it has expired.
|
|
41
|
+
attr_accessor :files
|
|
33
42
|
|
|
34
|
-
|
|
43
|
+
# The uploads of the PDF to your storage (account integrations).
|
|
44
|
+
attr_accessor :actions
|
|
35
45
|
|
|
36
|
-
|
|
46
|
+
# An expired combined PDF's PDF, metadata, password and source URLs have been deleted.
|
|
47
|
+
attr_accessor :expired
|
|
37
48
|
|
|
38
|
-
|
|
49
|
+
# When the combined PDF expires (`expires_in` after it's generated). Null if it's kept until you delete it.
|
|
50
|
+
attr_accessor :expires_at
|
|
39
51
|
|
|
40
|
-
|
|
52
|
+
# When the PDF was generated. Null until then.
|
|
53
|
+
attr_accessor :processed_at
|
|
41
54
|
|
|
42
|
-
|
|
55
|
+
# When the combined PDF was created.
|
|
56
|
+
attr_accessor :created_at
|
|
43
57
|
|
|
44
|
-
|
|
58
|
+
# When the combined PDF was last updated.
|
|
59
|
+
attr_accessor :updated_at
|
|
45
60
|
|
|
46
61
|
class EnumAttributeValidator
|
|
47
62
|
attr_reader :datatype
|
|
@@ -70,18 +85,18 @@ module DocSpring
|
|
|
70
85
|
{
|
|
71
86
|
:'id' => :'id',
|
|
72
87
|
:'state' => :'state',
|
|
88
|
+
:'source_pdfs' => :'source_pdfs',
|
|
89
|
+
:'metadata' => :'metadata',
|
|
90
|
+
:'has_password' => :'has_password',
|
|
91
|
+
:'delete_custom_files' => :'delete_custom_files',
|
|
92
|
+
:'error_message' => :'error_message',
|
|
93
|
+
:'files' => :'files',
|
|
94
|
+
:'actions' => :'actions',
|
|
73
95
|
:'expired' => :'expired',
|
|
74
|
-
:'expires_in' => :'expires_in',
|
|
75
96
|
:'expires_at' => :'expires_at',
|
|
76
97
|
:'processed_at' => :'processed_at',
|
|
77
|
-
:'
|
|
78
|
-
:'
|
|
79
|
-
:'source_pdfs' => :'source_pdfs',
|
|
80
|
-
:'metadata' => :'metadata',
|
|
81
|
-
:'password' => :'password',
|
|
82
|
-
:'pdf_hash' => :'pdf_hash',
|
|
83
|
-
:'download_url' => :'download_url',
|
|
84
|
-
:'actions' => :'actions'
|
|
98
|
+
:'created_at' => :'created_at',
|
|
99
|
+
:'updated_at' => :'updated_at'
|
|
85
100
|
}
|
|
86
101
|
end
|
|
87
102
|
|
|
@@ -99,48 +114,53 @@ module DocSpring
|
|
|
99
114
|
def self.openapi_types
|
|
100
115
|
{
|
|
101
116
|
:'id' => :'String',
|
|
102
|
-
:'state' => :'
|
|
103
|
-
:'
|
|
104
|
-
:'
|
|
105
|
-
:'
|
|
106
|
-
:'
|
|
117
|
+
:'state' => :'CombinedPdfState',
|
|
118
|
+
:'source_pdfs' => :'Array<CombinedPdfSource>',
|
|
119
|
+
:'metadata' => :'Hash<String, Object>',
|
|
120
|
+
:'has_password' => :'Boolean',
|
|
121
|
+
:'delete_custom_files' => :'Boolean',
|
|
107
122
|
:'error_message' => :'String',
|
|
108
|
-
:'
|
|
109
|
-
:'
|
|
110
|
-
:'
|
|
111
|
-
:'
|
|
112
|
-
:'
|
|
113
|
-
:'
|
|
114
|
-
:'
|
|
123
|
+
:'files' => :'CombinedPdfFiles',
|
|
124
|
+
:'actions' => :'Array<SubmissionAction>',
|
|
125
|
+
:'expired' => :'Boolean',
|
|
126
|
+
:'expires_at' => :'Time',
|
|
127
|
+
:'processed_at' => :'Time',
|
|
128
|
+
:'created_at' => :'Time',
|
|
129
|
+
:'updated_at' => :'Time'
|
|
115
130
|
}
|
|
116
131
|
end
|
|
117
132
|
|
|
118
133
|
# List of attributes with nullable: true
|
|
119
134
|
def self.openapi_nullable
|
|
120
135
|
Set.new([
|
|
121
|
-
:'
|
|
122
|
-
:'expires_in',
|
|
136
|
+
:'error_message',
|
|
123
137
|
:'expires_at',
|
|
124
138
|
:'processed_at',
|
|
125
|
-
:'error_message',
|
|
126
|
-
:'password',
|
|
127
|
-
:'pdf_hash',
|
|
128
|
-
:'download_url',
|
|
129
139
|
])
|
|
130
140
|
end
|
|
131
141
|
|
|
142
|
+
# Returns attribute type mapping
|
|
143
|
+
def self.acceptable_openapi_types
|
|
144
|
+
openapi_types
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the nullable attributes
|
|
148
|
+
def self.acceptable_openapi_nullable
|
|
149
|
+
openapi_nullable
|
|
150
|
+
end
|
|
151
|
+
|
|
132
152
|
# Initializes the object
|
|
133
153
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
134
154
|
def initialize(attributes = {})
|
|
135
155
|
if (!attributes.is_a?(Hash))
|
|
136
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::
|
|
156
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::CombinedPdf` initialize method"
|
|
137
157
|
end
|
|
138
158
|
|
|
139
159
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
140
160
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
141
161
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
142
162
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
143
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::
|
|
163
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::CombinedPdf`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
144
164
|
end
|
|
145
165
|
h[k.to_sym] = v
|
|
146
166
|
}
|
|
@@ -157,28 +177,32 @@ module DocSpring
|
|
|
157
177
|
self.state = nil
|
|
158
178
|
end
|
|
159
179
|
|
|
160
|
-
if attributes.key?(:'
|
|
161
|
-
|
|
180
|
+
if attributes.key?(:'source_pdfs')
|
|
181
|
+
if (value = attributes[:'source_pdfs']).is_a?(Array)
|
|
182
|
+
self.source_pdfs = value
|
|
183
|
+
end
|
|
162
184
|
else
|
|
163
|
-
self.
|
|
185
|
+
self.source_pdfs = nil
|
|
164
186
|
end
|
|
165
187
|
|
|
166
|
-
if attributes.key?(:'
|
|
167
|
-
|
|
188
|
+
if attributes.key?(:'metadata')
|
|
189
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
190
|
+
self.metadata = value
|
|
191
|
+
end
|
|
168
192
|
else
|
|
169
|
-
self.
|
|
193
|
+
self.metadata = nil
|
|
170
194
|
end
|
|
171
195
|
|
|
172
|
-
if attributes.key?(:'
|
|
173
|
-
self.
|
|
196
|
+
if attributes.key?(:'has_password')
|
|
197
|
+
self.has_password = attributes[:'has_password']
|
|
174
198
|
else
|
|
175
|
-
self.
|
|
199
|
+
self.has_password = nil
|
|
176
200
|
end
|
|
177
201
|
|
|
178
|
-
if attributes.key?(:'
|
|
179
|
-
self.
|
|
202
|
+
if attributes.key?(:'delete_custom_files')
|
|
203
|
+
self.delete_custom_files = attributes[:'delete_custom_files']
|
|
180
204
|
else
|
|
181
|
-
self.
|
|
205
|
+
self.delete_custom_files = nil
|
|
182
206
|
end
|
|
183
207
|
|
|
184
208
|
if attributes.key?(:'error_message')
|
|
@@ -187,52 +211,48 @@ module DocSpring
|
|
|
187
211
|
self.error_message = nil
|
|
188
212
|
end
|
|
189
213
|
|
|
190
|
-
if attributes.key?(:'
|
|
191
|
-
|
|
192
|
-
self.submission_ids = value
|
|
193
|
-
end
|
|
214
|
+
if attributes.key?(:'files')
|
|
215
|
+
self.files = attributes[:'files']
|
|
194
216
|
else
|
|
195
|
-
self.
|
|
217
|
+
self.files = nil
|
|
196
218
|
end
|
|
197
219
|
|
|
198
|
-
if attributes.key?(:'
|
|
199
|
-
if (value = attributes[:'
|
|
200
|
-
self.
|
|
220
|
+
if attributes.key?(:'actions')
|
|
221
|
+
if (value = attributes[:'actions']).is_a?(Array)
|
|
222
|
+
self.actions = value
|
|
201
223
|
end
|
|
202
224
|
else
|
|
203
|
-
self.
|
|
225
|
+
self.actions = nil
|
|
204
226
|
end
|
|
205
227
|
|
|
206
|
-
if attributes.key?(:'
|
|
207
|
-
self.
|
|
228
|
+
if attributes.key?(:'expired')
|
|
229
|
+
self.expired = attributes[:'expired']
|
|
208
230
|
else
|
|
209
|
-
self.
|
|
231
|
+
self.expired = nil
|
|
210
232
|
end
|
|
211
233
|
|
|
212
|
-
if attributes.key?(:'
|
|
213
|
-
self.
|
|
234
|
+
if attributes.key?(:'expires_at')
|
|
235
|
+
self.expires_at = attributes[:'expires_at']
|
|
214
236
|
else
|
|
215
|
-
self.
|
|
237
|
+
self.expires_at = nil
|
|
216
238
|
end
|
|
217
239
|
|
|
218
|
-
if attributes.key?(:'
|
|
219
|
-
self.
|
|
240
|
+
if attributes.key?(:'processed_at')
|
|
241
|
+
self.processed_at = attributes[:'processed_at']
|
|
220
242
|
else
|
|
221
|
-
self.
|
|
243
|
+
self.processed_at = nil
|
|
222
244
|
end
|
|
223
245
|
|
|
224
|
-
if attributes.key?(:'
|
|
225
|
-
self.
|
|
246
|
+
if attributes.key?(:'created_at')
|
|
247
|
+
self.created_at = attributes[:'created_at']
|
|
226
248
|
else
|
|
227
|
-
self.
|
|
249
|
+
self.created_at = nil
|
|
228
250
|
end
|
|
229
251
|
|
|
230
|
-
if attributes.key?(:'
|
|
231
|
-
|
|
232
|
-
self.actions = value
|
|
233
|
-
end
|
|
252
|
+
if attributes.key?(:'updated_at')
|
|
253
|
+
self.updated_at = attributes[:'updated_at']
|
|
234
254
|
else
|
|
235
|
-
self.
|
|
255
|
+
self.updated_at = nil
|
|
236
256
|
end
|
|
237
257
|
end
|
|
238
258
|
|
|
@@ -241,16 +261,12 @@ module DocSpring
|
|
|
241
261
|
def list_invalid_properties
|
|
242
262
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
243
263
|
invalid_properties = Array.new
|
|
244
|
-
if @
|
|
245
|
-
invalid_properties.push('invalid value for "
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
if @expired.nil?
|
|
249
|
-
invalid_properties.push('invalid value for "expired", expired cannot be nil.')
|
|
264
|
+
if @id.nil?
|
|
265
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
250
266
|
end
|
|
251
267
|
|
|
252
|
-
if @
|
|
253
|
-
invalid_properties.push('invalid value for "
|
|
268
|
+
if @state.nil?
|
|
269
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
254
270
|
end
|
|
255
271
|
|
|
256
272
|
if @source_pdfs.nil?
|
|
@@ -261,10 +277,34 @@ module DocSpring
|
|
|
261
277
|
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
|
|
262
278
|
end
|
|
263
279
|
|
|
280
|
+
if @has_password.nil?
|
|
281
|
+
invalid_properties.push('invalid value for "has_password", has_password cannot be nil.')
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
if @delete_custom_files.nil?
|
|
285
|
+
invalid_properties.push('invalid value for "delete_custom_files", delete_custom_files cannot be nil.')
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
if @files.nil?
|
|
289
|
+
invalid_properties.push('invalid value for "files", files cannot be nil.')
|
|
290
|
+
end
|
|
291
|
+
|
|
264
292
|
if @actions.nil?
|
|
265
293
|
invalid_properties.push('invalid value for "actions", actions cannot be nil.')
|
|
266
294
|
end
|
|
267
295
|
|
|
296
|
+
if @expired.nil?
|
|
297
|
+
invalid_properties.push('invalid value for "expired", expired cannot be nil.')
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
if @created_at.nil?
|
|
301
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
if @updated_at.nil?
|
|
305
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
306
|
+
end
|
|
307
|
+
|
|
268
308
|
invalid_properties
|
|
269
309
|
end
|
|
270
310
|
|
|
@@ -272,46 +312,38 @@ module DocSpring
|
|
|
272
312
|
# @return true if the model is valid
|
|
273
313
|
def valid?
|
|
274
314
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
315
|
+
return false if @id.nil?
|
|
275
316
|
return false if @state.nil?
|
|
276
|
-
state_validator = EnumAttributeValidator.new('String', ["pending", "processed", "error", "insufficient_credits"])
|
|
277
|
-
return false unless state_validator.valid?(@state)
|
|
278
|
-
return false if @expired.nil?
|
|
279
|
-
return false if @submission_ids.nil?
|
|
280
317
|
return false if @source_pdfs.nil?
|
|
281
318
|
return false if @metadata.nil?
|
|
319
|
+
return false if @has_password.nil?
|
|
320
|
+
return false if @delete_custom_files.nil?
|
|
321
|
+
return false if @files.nil?
|
|
282
322
|
return false if @actions.nil?
|
|
323
|
+
return false if @expired.nil?
|
|
324
|
+
return false if @created_at.nil?
|
|
325
|
+
return false if @updated_at.nil?
|
|
283
326
|
true
|
|
284
327
|
end
|
|
285
328
|
|
|
286
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
287
|
-
# @param [Object] state Object to be assigned
|
|
288
|
-
def state=(state)
|
|
289
|
-
validator = EnumAttributeValidator.new('String', ["pending", "processed", "error", "insufficient_credits"])
|
|
290
|
-
# build_from_hash accepts enum values this client doesn't know about yet
|
|
291
|
-
unless defined?(@_skip_enum_validation) || validator.valid?(state)
|
|
292
|
-
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
293
|
-
end
|
|
294
|
-
@state = state
|
|
295
|
-
end
|
|
296
|
-
|
|
297
329
|
# Custom attribute writer method with validation
|
|
298
|
-
# @param [Object]
|
|
299
|
-
def
|
|
300
|
-
if
|
|
301
|
-
fail ArgumentError, '
|
|
330
|
+
# @param [Object] id Value to be assigned
|
|
331
|
+
def id=(id)
|
|
332
|
+
if id.nil?
|
|
333
|
+
fail ArgumentError, 'id cannot be nil'
|
|
302
334
|
end
|
|
303
335
|
|
|
304
|
-
@
|
|
336
|
+
@id = id
|
|
305
337
|
end
|
|
306
338
|
|
|
307
339
|
# Custom attribute writer method with validation
|
|
308
|
-
# @param [Object]
|
|
309
|
-
def
|
|
310
|
-
if
|
|
311
|
-
fail ArgumentError, '
|
|
340
|
+
# @param [Object] state Value to be assigned
|
|
341
|
+
def state=(state)
|
|
342
|
+
if state.nil?
|
|
343
|
+
fail ArgumentError, 'state cannot be nil'
|
|
312
344
|
end
|
|
313
345
|
|
|
314
|
-
@
|
|
346
|
+
@state = state
|
|
315
347
|
end
|
|
316
348
|
|
|
317
349
|
# Custom attribute writer method with validation
|
|
@@ -334,6 +366,36 @@ module DocSpring
|
|
|
334
366
|
@metadata = metadata
|
|
335
367
|
end
|
|
336
368
|
|
|
369
|
+
# Custom attribute writer method with validation
|
|
370
|
+
# @param [Object] has_password Value to be assigned
|
|
371
|
+
def has_password=(has_password)
|
|
372
|
+
if has_password.nil?
|
|
373
|
+
fail ArgumentError, 'has_password cannot be nil'
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
@has_password = has_password
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
# Custom attribute writer method with validation
|
|
380
|
+
# @param [Object] delete_custom_files Value to be assigned
|
|
381
|
+
def delete_custom_files=(delete_custom_files)
|
|
382
|
+
if delete_custom_files.nil?
|
|
383
|
+
fail ArgumentError, 'delete_custom_files cannot be nil'
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
@delete_custom_files = delete_custom_files
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
# Custom attribute writer method with validation
|
|
390
|
+
# @param [Object] files Value to be assigned
|
|
391
|
+
def files=(files)
|
|
392
|
+
if files.nil?
|
|
393
|
+
fail ArgumentError, 'files cannot be nil'
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
@files = files
|
|
397
|
+
end
|
|
398
|
+
|
|
337
399
|
# Custom attribute writer method with validation
|
|
338
400
|
# @param [Object] actions Value to be assigned
|
|
339
401
|
def actions=(actions)
|
|
@@ -344,6 +406,36 @@ module DocSpring
|
|
|
344
406
|
@actions = actions
|
|
345
407
|
end
|
|
346
408
|
|
|
409
|
+
# Custom attribute writer method with validation
|
|
410
|
+
# @param [Object] expired Value to be assigned
|
|
411
|
+
def expired=(expired)
|
|
412
|
+
if expired.nil?
|
|
413
|
+
fail ArgumentError, 'expired cannot be nil'
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
@expired = expired
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
# Custom attribute writer method with validation
|
|
420
|
+
# @param [Object] created_at Value to be assigned
|
|
421
|
+
def created_at=(created_at)
|
|
422
|
+
if created_at.nil?
|
|
423
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
@created_at = created_at
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
# Custom attribute writer method with validation
|
|
430
|
+
# @param [Object] updated_at Value to be assigned
|
|
431
|
+
def updated_at=(updated_at)
|
|
432
|
+
if updated_at.nil?
|
|
433
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
@updated_at = updated_at
|
|
437
|
+
end
|
|
438
|
+
|
|
347
439
|
# Checks equality by comparing each attribute.
|
|
348
440
|
# @param [Object] Object to be compared
|
|
349
441
|
def ==(o)
|
|
@@ -351,18 +443,18 @@ module DocSpring
|
|
|
351
443
|
self.class == o.class &&
|
|
352
444
|
id == o.id &&
|
|
353
445
|
state == o.state &&
|
|
446
|
+
source_pdfs == o.source_pdfs &&
|
|
447
|
+
metadata == o.metadata &&
|
|
448
|
+
has_password == o.has_password &&
|
|
449
|
+
delete_custom_files == o.delete_custom_files &&
|
|
450
|
+
error_message == o.error_message &&
|
|
451
|
+
files == o.files &&
|
|
452
|
+
actions == o.actions &&
|
|
354
453
|
expired == o.expired &&
|
|
355
|
-
expires_in == o.expires_in &&
|
|
356
454
|
expires_at == o.expires_at &&
|
|
357
455
|
processed_at == o.processed_at &&
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
source_pdfs == o.source_pdfs &&
|
|
361
|
-
metadata == o.metadata &&
|
|
362
|
-
password == o.password &&
|
|
363
|
-
pdf_hash == o.pdf_hash &&
|
|
364
|
-
download_url == o.download_url &&
|
|
365
|
-
actions == o.actions
|
|
456
|
+
created_at == o.created_at &&
|
|
457
|
+
updated_at == o.updated_at
|
|
366
458
|
end
|
|
367
459
|
|
|
368
460
|
# @see the `==` method
|
|
@@ -374,7 +466,7 @@ module DocSpring
|
|
|
374
466
|
# Calculates hash code according to all attributes.
|
|
375
467
|
# @return [Integer] Hash code
|
|
376
468
|
def hash
|
|
377
|
-
[id, state,
|
|
469
|
+
[id, state, source_pdfs, metadata, has_password, delete_custom_files, error_message, files, actions, expired, expires_at, processed_at, created_at, updated_at].hash
|
|
378
470
|
end
|
|
379
471
|
|
|
380
472
|
# Builds the object from hash
|
|
@@ -383,18 +475,20 @@ module DocSpring
|
|
|
383
475
|
def self.build_from_hash(attributes)
|
|
384
476
|
return nil unless attributes.is_a?(Hash)
|
|
385
477
|
attributes = attributes.transform_keys(&:to_sym)
|
|
478
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
479
|
+
map = acceptable_attribute_map
|
|
386
480
|
transformed_hash = {}
|
|
387
|
-
|
|
388
|
-
if attributes.key?(
|
|
481
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
482
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
389
483
|
transformed_hash["#{key}"] = nil
|
|
390
484
|
elsif type =~ /\AArray<(.*)>/i
|
|
391
485
|
# check to ensure the input is an array given that the attribute
|
|
392
486
|
# is documented as an array but the input is not
|
|
393
|
-
if attributes[
|
|
394
|
-
transformed_hash["#{key}"] = attributes[
|
|
487
|
+
if attributes[map[key]].is_a?(Array)
|
|
488
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
395
489
|
end
|
|
396
|
-
elsif !attributes[
|
|
397
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
490
|
+
elsif !attributes[map[key]].nil?
|
|
491
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
398
492
|
end
|
|
399
493
|
end
|
|
400
494
|
# Responses can include enum values added after this client was released, so the enum setters
|
|
@@ -406,69 +500,15 @@ module DocSpring
|
|
|
406
500
|
end
|
|
407
501
|
end
|
|
408
502
|
|
|
409
|
-
# Deserializes the data based on type
|
|
410
|
-
# @param string type Data type
|
|
411
|
-
# @param string value Value to be deserialized
|
|
412
|
-
# @return [Object] Deserialized data
|
|
413
|
-
def self._deserialize(type, value)
|
|
414
|
-
case type.to_sym
|
|
415
|
-
when :Time
|
|
416
|
-
Time.parse(value)
|
|
417
|
-
when :Date
|
|
418
|
-
Date.parse(value)
|
|
419
|
-
when :String
|
|
420
|
-
value.to_s
|
|
421
|
-
when :Integer
|
|
422
|
-
value.to_i
|
|
423
|
-
when :Float
|
|
424
|
-
value.to_f
|
|
425
|
-
when :Boolean
|
|
426
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
427
|
-
true
|
|
428
|
-
else
|
|
429
|
-
false
|
|
430
|
-
end
|
|
431
|
-
when :Object
|
|
432
|
-
# generic object (usually a Hash), return directly
|
|
433
|
-
value
|
|
434
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
435
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
436
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
437
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
438
|
-
k_type = Regexp.last_match[:k_type]
|
|
439
|
-
v_type = Regexp.last_match[:v_type]
|
|
440
|
-
{}.tap do |hash|
|
|
441
|
-
value.each do |k, v|
|
|
442
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
443
|
-
end
|
|
444
|
-
end
|
|
445
|
-
else # model
|
|
446
|
-
# models (e.g. Pet) or oneOf
|
|
447
|
-
klass = DocSpring.const_get(type)
|
|
448
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
449
|
-
end
|
|
450
|
-
end
|
|
451
|
-
|
|
452
|
-
# Returns the string representation of the object
|
|
453
|
-
# @return [String] String presentation of the object
|
|
454
|
-
def to_s
|
|
455
|
-
to_hash.to_s
|
|
456
|
-
end
|
|
457
|
-
|
|
458
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
459
|
-
# @return [Hash] Returns the object in the form of hash
|
|
460
|
-
def to_body
|
|
461
|
-
to_hash
|
|
462
|
-
end
|
|
463
|
-
|
|
464
503
|
# Returns the object in the form of hash
|
|
465
504
|
# @return [Hash] Returns the object in the form of hash
|
|
466
505
|
def to_hash
|
|
467
506
|
hash = {}
|
|
468
|
-
|
|
507
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
508
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
469
509
|
value = self.send(attr)
|
|
470
510
|
if value.nil?
|
|
471
|
-
is_nullable = self.class.
|
|
511
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
472
512
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
473
513
|
end
|
|
474
514
|
|
|
@@ -477,24 +517,6 @@ module DocSpring
|
|
|
477
517
|
hash
|
|
478
518
|
end
|
|
479
519
|
|
|
480
|
-
# Outputs non-array value in the form of hash
|
|
481
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
482
|
-
# @param [Object] value Any valid value
|
|
483
|
-
# @return [Hash] Returns the value in the form of hash
|
|
484
|
-
def _to_hash(value)
|
|
485
|
-
if value.is_a?(Array)
|
|
486
|
-
value.compact.map { |v| _to_hash(v) }
|
|
487
|
-
elsif value.is_a?(Hash)
|
|
488
|
-
{}.tap do |hash|
|
|
489
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
490
|
-
end
|
|
491
|
-
elsif value.respond_to? :to_hash
|
|
492
|
-
value.to_hash
|
|
493
|
-
else
|
|
494
|
-
value
|
|
495
|
-
end
|
|
496
|
-
end
|
|
497
|
-
|
|
498
520
|
end
|
|
499
521
|
|
|
500
522
|
end
|