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,60 +14,79 @@ 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
|
|
57
|
-
|
|
58
|
-
attr_accessor :preview_download_url
|
|
70
|
+
# The generated files: `pdf` once the submission has been processed, `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired.
|
|
71
|
+
attr_accessor :files
|
|
59
72
|
|
|
73
|
+
# When the preview PDF was generated. Null if there is no preview.
|
|
60
74
|
attr_accessor :preview_generated_at
|
|
61
75
|
|
|
62
|
-
|
|
76
|
+
# An expired submission's data, metadata, password and PDF have been deleted.
|
|
77
|
+
attr_accessor :expired
|
|
63
78
|
|
|
64
|
-
|
|
79
|
+
# When the submission expires. Null if it's kept until you delete it.
|
|
80
|
+
attr_accessor :expires_at
|
|
65
81
|
|
|
66
|
-
|
|
82
|
+
# When the PDF was generated. Null until then.
|
|
83
|
+
attr_accessor :processed_at
|
|
67
84
|
|
|
68
|
-
|
|
85
|
+
# When the submission was created.
|
|
86
|
+
attr_accessor :created_at
|
|
69
87
|
|
|
70
|
-
|
|
88
|
+
# When the submission was last updated.
|
|
89
|
+
attr_accessor :updated_at
|
|
71
90
|
|
|
72
91
|
class EnumAttributeValidator
|
|
73
92
|
attr_reader :datatype
|
|
@@ -94,33 +113,30 @@ module DocSpring
|
|
|
94
113
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
95
114
|
def self.attribute_map
|
|
96
115
|
{
|
|
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
116
|
:'id' => :'id',
|
|
104
|
-
:'json_schema_errors' => :'json_schema_errors',
|
|
105
|
-
:'metadata' => :'metadata',
|
|
106
|
-
:'password' => :'password',
|
|
107
|
-
:'processed_at' => :'processed_at',
|
|
108
|
-
:'state' => :'state',
|
|
109
117
|
:'template_id' => :'template_id',
|
|
110
118
|
:'template_type' => :'template_type',
|
|
111
119
|
:'template_version' => :'template_version',
|
|
120
|
+
:'batch_id' => :'batch_id',
|
|
121
|
+
:'source' => :'source',
|
|
122
|
+
:'state' => :'state',
|
|
112
123
|
:'test' => :'test',
|
|
124
|
+
:'editable' => :'editable',
|
|
125
|
+
:'data' => :'data',
|
|
126
|
+
:'data_errors' => :'data_errors',
|
|
127
|
+
:'error_message' => :'error_message',
|
|
128
|
+
:'metadata' => :'metadata',
|
|
129
|
+
:'has_password' => :'has_password',
|
|
130
|
+
:'signature_requests' => :'signature_requests',
|
|
131
|
+
:'actions' => :'actions',
|
|
113
132
|
:'truncated_text' => :'truncated_text',
|
|
114
|
-
:'
|
|
115
|
-
:'download_url' => :'download_url',
|
|
116
|
-
:'permanent_download_url' => :'permanent_download_url',
|
|
117
|
-
:'preview_download_url' => :'preview_download_url',
|
|
133
|
+
:'files' => :'files',
|
|
118
134
|
:'preview_generated_at' => :'preview_generated_at',
|
|
119
|
-
:'
|
|
120
|
-
:'
|
|
121
|
-
:'
|
|
122
|
-
:'
|
|
123
|
-
:'
|
|
135
|
+
:'expired' => :'expired',
|
|
136
|
+
:'expires_at' => :'expires_at',
|
|
137
|
+
:'processed_at' => :'processed_at',
|
|
138
|
+
:'created_at' => :'created_at',
|
|
139
|
+
:'updated_at' => :'updated_at'
|
|
124
140
|
}
|
|
125
141
|
end
|
|
126
142
|
|
|
@@ -137,61 +153,58 @@ module DocSpring
|
|
|
137
153
|
# Attribute type mapping.
|
|
138
154
|
def self.openapi_types
|
|
139
155
|
{
|
|
140
|
-
:'batch_id' => :'String',
|
|
141
|
-
:'data_requests' => :'Array<SubmissionDataRequest>',
|
|
142
|
-
:'editable' => :'Boolean',
|
|
143
|
-
:'error_message' => :'String',
|
|
144
|
-
:'expired' => :'Boolean',
|
|
145
|
-
:'expires_at' => :'String',
|
|
146
156
|
:'id' => :'String',
|
|
147
|
-
:'json_schema_errors' => :'Array<String>',
|
|
148
|
-
:'metadata' => :'Object',
|
|
149
|
-
:'password' => :'String',
|
|
150
|
-
:'processed_at' => :'String',
|
|
151
|
-
:'state' => :'String',
|
|
152
157
|
:'template_id' => :'String',
|
|
153
|
-
:'template_type' => :'
|
|
158
|
+
:'template_type' => :'TemplateType',
|
|
154
159
|
:'template_version' => :'String',
|
|
160
|
+
:'batch_id' => :'String',
|
|
161
|
+
:'source' => :'SubmissionSource',
|
|
162
|
+
:'state' => :'SubmissionState',
|
|
155
163
|
:'test' => :'Boolean',
|
|
156
|
-
:'
|
|
157
|
-
:'
|
|
158
|
-
:'
|
|
159
|
-
:'
|
|
160
|
-
:'
|
|
161
|
-
:'
|
|
162
|
-
:'
|
|
164
|
+
:'editable' => :'Boolean',
|
|
165
|
+
:'data' => :'Hash<String, Object>',
|
|
166
|
+
:'data_errors' => :'Array<ErrorDetail>',
|
|
167
|
+
:'error_message' => :'String',
|
|
168
|
+
:'metadata' => :'Hash<String, Object>',
|
|
169
|
+
:'has_password' => :'Boolean',
|
|
170
|
+
:'signature_requests' => :'Array<SignatureRequest>',
|
|
163
171
|
:'actions' => :'Array<SubmissionAction>',
|
|
164
|
-
:'
|
|
165
|
-
:'
|
|
166
|
-
:'
|
|
172
|
+
:'truncated_text' => :'Hash<String, Array<String>>',
|
|
173
|
+
:'files' => :'SubmissionFiles',
|
|
174
|
+
:'preview_generated_at' => :'Time',
|
|
175
|
+
:'expired' => :'Boolean',
|
|
176
|
+
:'expires_at' => :'Time',
|
|
177
|
+
:'processed_at' => :'Time',
|
|
178
|
+
:'created_at' => :'Time',
|
|
179
|
+
:'updated_at' => :'Time'
|
|
167
180
|
}
|
|
168
181
|
end
|
|
169
182
|
|
|
170
183
|
# List of attributes with nullable: true
|
|
171
184
|
def self.openapi_nullable
|
|
172
185
|
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
186
|
:'template_id',
|
|
182
187
|
:'template_version',
|
|
188
|
+
:'batch_id',
|
|
189
|
+
:'data',
|
|
190
|
+
:'error_message',
|
|
183
191
|
:'truncated_text',
|
|
184
|
-
:'pdf_hash',
|
|
185
|
-
:'download_url',
|
|
186
|
-
:'permanent_download_url',
|
|
187
|
-
:'preview_download_url',
|
|
188
192
|
:'preview_generated_at',
|
|
189
|
-
:'
|
|
190
|
-
:'
|
|
191
|
-
:'data'
|
|
193
|
+
:'expires_at',
|
|
194
|
+
:'processed_at',
|
|
192
195
|
])
|
|
193
196
|
end
|
|
194
197
|
|
|
198
|
+
# Returns attribute type mapping
|
|
199
|
+
def self.acceptable_openapi_types
|
|
200
|
+
openapi_types
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Returns the nullable attributes
|
|
204
|
+
def self.acceptable_openapi_nullable
|
|
205
|
+
openapi_nullable
|
|
206
|
+
end
|
|
207
|
+
|
|
195
208
|
# Initializes the object
|
|
196
209
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
197
210
|
def initialize(attributes = {})
|
|
@@ -208,134 +221,124 @@ module DocSpring
|
|
|
208
221
|
h[k.to_sym] = v
|
|
209
222
|
}
|
|
210
223
|
|
|
211
|
-
if attributes.key?(:'
|
|
212
|
-
self.
|
|
224
|
+
if attributes.key?(:'id')
|
|
225
|
+
self.id = attributes[:'id']
|
|
213
226
|
else
|
|
214
|
-
self.
|
|
227
|
+
self.id = nil
|
|
215
228
|
end
|
|
216
229
|
|
|
217
|
-
if attributes.key?(:'
|
|
218
|
-
|
|
219
|
-
self.data_requests = value
|
|
220
|
-
end
|
|
230
|
+
if attributes.key?(:'template_id')
|
|
231
|
+
self.template_id = attributes[:'template_id']
|
|
221
232
|
else
|
|
222
|
-
self.
|
|
233
|
+
self.template_id = nil
|
|
223
234
|
end
|
|
224
235
|
|
|
225
|
-
if attributes.key?(:'
|
|
226
|
-
self.
|
|
236
|
+
if attributes.key?(:'template_type')
|
|
237
|
+
self.template_type = attributes[:'template_type']
|
|
227
238
|
else
|
|
228
|
-
self.
|
|
239
|
+
self.template_type = nil
|
|
229
240
|
end
|
|
230
241
|
|
|
231
|
-
if attributes.key?(:'
|
|
232
|
-
self.
|
|
242
|
+
if attributes.key?(:'template_version')
|
|
243
|
+
self.template_version = attributes[:'template_version']
|
|
233
244
|
else
|
|
234
|
-
self.
|
|
245
|
+
self.template_version = nil
|
|
235
246
|
end
|
|
236
247
|
|
|
237
|
-
if attributes.key?(:'
|
|
238
|
-
self.
|
|
248
|
+
if attributes.key?(:'batch_id')
|
|
249
|
+
self.batch_id = attributes[:'batch_id']
|
|
239
250
|
else
|
|
240
|
-
self.
|
|
251
|
+
self.batch_id = nil
|
|
241
252
|
end
|
|
242
253
|
|
|
243
|
-
if attributes.key?(:'
|
|
244
|
-
self.
|
|
254
|
+
if attributes.key?(:'source')
|
|
255
|
+
self.source = attributes[:'source']
|
|
245
256
|
else
|
|
246
|
-
self.
|
|
257
|
+
self.source = nil
|
|
247
258
|
end
|
|
248
259
|
|
|
249
|
-
if attributes.key?(:'
|
|
250
|
-
self.
|
|
260
|
+
if attributes.key?(:'state')
|
|
261
|
+
self.state = attributes[:'state']
|
|
251
262
|
else
|
|
252
|
-
self.
|
|
263
|
+
self.state = nil
|
|
253
264
|
end
|
|
254
265
|
|
|
255
|
-
if attributes.key?(:'
|
|
256
|
-
|
|
257
|
-
self.json_schema_errors = value
|
|
258
|
-
end
|
|
266
|
+
if attributes.key?(:'test')
|
|
267
|
+
self.test = attributes[:'test']
|
|
259
268
|
else
|
|
260
|
-
self.
|
|
269
|
+
self.test = nil
|
|
261
270
|
end
|
|
262
271
|
|
|
263
|
-
if attributes.key?(:'
|
|
264
|
-
self.
|
|
272
|
+
if attributes.key?(:'editable')
|
|
273
|
+
self.editable = attributes[:'editable']
|
|
265
274
|
else
|
|
266
|
-
self.
|
|
275
|
+
self.editable = nil
|
|
267
276
|
end
|
|
268
277
|
|
|
269
|
-
if attributes.key?(:'
|
|
270
|
-
|
|
278
|
+
if attributes.key?(:'data')
|
|
279
|
+
if (value = attributes[:'data']).is_a?(Hash) || value.nil?
|
|
280
|
+
self.data = value
|
|
281
|
+
end
|
|
271
282
|
else
|
|
272
|
-
self.
|
|
283
|
+
self.data = nil
|
|
273
284
|
end
|
|
274
285
|
|
|
275
|
-
if attributes.key?(:'
|
|
276
|
-
|
|
286
|
+
if attributes.key?(:'data_errors')
|
|
287
|
+
if (value = attributes[:'data_errors']).is_a?(Array)
|
|
288
|
+
self.data_errors = value
|
|
289
|
+
end
|
|
277
290
|
else
|
|
278
|
-
self.
|
|
291
|
+
self.data_errors = nil
|
|
279
292
|
end
|
|
280
293
|
|
|
281
|
-
if attributes.key?(:'
|
|
282
|
-
self.
|
|
294
|
+
if attributes.key?(:'error_message')
|
|
295
|
+
self.error_message = attributes[:'error_message']
|
|
283
296
|
else
|
|
284
|
-
self.
|
|
297
|
+
self.error_message = nil
|
|
285
298
|
end
|
|
286
299
|
|
|
287
|
-
if attributes.key?(:'
|
|
288
|
-
|
|
300
|
+
if attributes.key?(:'metadata')
|
|
301
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
302
|
+
self.metadata = value
|
|
303
|
+
end
|
|
289
304
|
else
|
|
290
|
-
self.
|
|
305
|
+
self.metadata = nil
|
|
291
306
|
end
|
|
292
307
|
|
|
293
|
-
if attributes.key?(:'
|
|
294
|
-
self.
|
|
308
|
+
if attributes.key?(:'has_password')
|
|
309
|
+
self.has_password = attributes[:'has_password']
|
|
295
310
|
else
|
|
296
|
-
self.
|
|
311
|
+
self.has_password = nil
|
|
297
312
|
end
|
|
298
313
|
|
|
299
|
-
if attributes.key?(:'
|
|
300
|
-
|
|
314
|
+
if attributes.key?(:'signature_requests')
|
|
315
|
+
if (value = attributes[:'signature_requests']).is_a?(Array)
|
|
316
|
+
self.signature_requests = value
|
|
317
|
+
end
|
|
301
318
|
else
|
|
302
|
-
self.
|
|
319
|
+
self.signature_requests = nil
|
|
303
320
|
end
|
|
304
321
|
|
|
305
|
-
if attributes.key?(:'
|
|
306
|
-
|
|
322
|
+
if attributes.key?(:'actions')
|
|
323
|
+
if (value = attributes[:'actions']).is_a?(Array)
|
|
324
|
+
self.actions = value
|
|
325
|
+
end
|
|
307
326
|
else
|
|
308
|
-
self.
|
|
327
|
+
self.actions = nil
|
|
309
328
|
end
|
|
310
329
|
|
|
311
330
|
if attributes.key?(:'truncated_text')
|
|
312
|
-
|
|
331
|
+
if (value = attributes[:'truncated_text']).is_a?(Hash) || value.nil?
|
|
332
|
+
self.truncated_text = value
|
|
333
|
+
end
|
|
313
334
|
else
|
|
314
335
|
self.truncated_text = nil
|
|
315
336
|
end
|
|
316
337
|
|
|
317
|
-
if attributes.key?(:'
|
|
318
|
-
self.
|
|
338
|
+
if attributes.key?(:'files')
|
|
339
|
+
self.files = attributes[:'files']
|
|
319
340
|
else
|
|
320
|
-
self.
|
|
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']
|
|
331
|
-
else
|
|
332
|
-
self.permanent_download_url = nil
|
|
333
|
-
end
|
|
334
|
-
|
|
335
|
-
if attributes.key?(:'preview_download_url')
|
|
336
|
-
self.preview_download_url = attributes[:'preview_download_url']
|
|
337
|
-
else
|
|
338
|
-
self.preview_download_url = nil
|
|
341
|
+
self.files = nil
|
|
339
342
|
end
|
|
340
343
|
|
|
341
344
|
if attributes.key?(:'preview_generated_at')
|
|
@@ -344,30 +347,34 @@ module DocSpring
|
|
|
344
347
|
self.preview_generated_at = nil
|
|
345
348
|
end
|
|
346
349
|
|
|
347
|
-
if attributes.key?(:'
|
|
348
|
-
self.
|
|
350
|
+
if attributes.key?(:'expired')
|
|
351
|
+
self.expired = attributes[:'expired']
|
|
349
352
|
else
|
|
350
|
-
self.
|
|
353
|
+
self.expired = nil
|
|
351
354
|
end
|
|
352
355
|
|
|
353
|
-
if attributes.key?(:'
|
|
354
|
-
|
|
355
|
-
self.actions = value
|
|
356
|
-
end
|
|
356
|
+
if attributes.key?(:'expires_at')
|
|
357
|
+
self.expires_at = attributes[:'expires_at']
|
|
357
358
|
else
|
|
358
|
-
self.
|
|
359
|
+
self.expires_at = nil
|
|
359
360
|
end
|
|
360
361
|
|
|
361
|
-
if attributes.key?(:'
|
|
362
|
-
self.
|
|
362
|
+
if attributes.key?(:'processed_at')
|
|
363
|
+
self.processed_at = attributes[:'processed_at']
|
|
364
|
+
else
|
|
365
|
+
self.processed_at = nil
|
|
363
366
|
end
|
|
364
367
|
|
|
365
|
-
if attributes.key?(:'
|
|
366
|
-
self.
|
|
368
|
+
if attributes.key?(:'created_at')
|
|
369
|
+
self.created_at = attributes[:'created_at']
|
|
370
|
+
else
|
|
371
|
+
self.created_at = nil
|
|
367
372
|
end
|
|
368
373
|
|
|
369
|
-
if attributes.key?(:'
|
|
370
|
-
self.
|
|
374
|
+
if attributes.key?(:'updated_at')
|
|
375
|
+
self.updated_at = attributes[:'updated_at']
|
|
376
|
+
else
|
|
377
|
+
self.updated_at = nil
|
|
371
378
|
end
|
|
372
379
|
end
|
|
373
380
|
|
|
@@ -376,34 +383,66 @@ module DocSpring
|
|
|
376
383
|
def list_invalid_properties
|
|
377
384
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
378
385
|
invalid_properties = Array.new
|
|
379
|
-
if @
|
|
380
|
-
invalid_properties.push('invalid value for "
|
|
386
|
+
if @id.nil?
|
|
387
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
381
388
|
end
|
|
382
389
|
|
|
383
|
-
if @
|
|
384
|
-
invalid_properties.push('invalid value for "
|
|
390
|
+
if @template_type.nil?
|
|
391
|
+
invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
|
|
385
392
|
end
|
|
386
393
|
|
|
387
|
-
if @
|
|
388
|
-
invalid_properties.push('invalid value for "
|
|
394
|
+
if @source.nil?
|
|
395
|
+
invalid_properties.push('invalid value for "source", source cannot be nil.')
|
|
389
396
|
end
|
|
390
397
|
|
|
391
398
|
if @state.nil?
|
|
392
399
|
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
393
400
|
end
|
|
394
401
|
|
|
395
|
-
if @template_type.nil?
|
|
396
|
-
invalid_properties.push('invalid value for "template_type", template_type cannot be nil.')
|
|
397
|
-
end
|
|
398
|
-
|
|
399
402
|
if @test.nil?
|
|
400
403
|
invalid_properties.push('invalid value for "test", test cannot be nil.')
|
|
401
404
|
end
|
|
402
405
|
|
|
406
|
+
if @editable.nil?
|
|
407
|
+
invalid_properties.push('invalid value for "editable", editable cannot be nil.')
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
if @data_errors.nil?
|
|
411
|
+
invalid_properties.push('invalid value for "data_errors", data_errors cannot be nil.')
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
if @metadata.nil?
|
|
415
|
+
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
if @has_password.nil?
|
|
419
|
+
invalid_properties.push('invalid value for "has_password", has_password cannot be nil.')
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
if @signature_requests.nil?
|
|
423
|
+
invalid_properties.push('invalid value for "signature_requests", signature_requests cannot be nil.')
|
|
424
|
+
end
|
|
425
|
+
|
|
403
426
|
if @actions.nil?
|
|
404
427
|
invalid_properties.push('invalid value for "actions", actions cannot be nil.')
|
|
405
428
|
end
|
|
406
429
|
|
|
430
|
+
if @files.nil?
|
|
431
|
+
invalid_properties.push('invalid value for "files", files cannot be nil.')
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
if @expired.nil?
|
|
435
|
+
invalid_properties.push('invalid value for "expired", expired cannot be nil.')
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
if @created_at.nil?
|
|
439
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
if @updated_at.nil?
|
|
443
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
444
|
+
end
|
|
445
|
+
|
|
407
446
|
invalid_properties
|
|
408
447
|
end
|
|
409
448
|
|
|
@@ -411,72 +450,62 @@ module DocSpring
|
|
|
411
450
|
# @return true if the model is valid
|
|
412
451
|
def valid?
|
|
413
452
|
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)
|
|
453
|
+
return false if @id.nil?
|
|
420
454
|
return false if @template_type.nil?
|
|
421
|
-
|
|
422
|
-
return false
|
|
455
|
+
return false if @source.nil?
|
|
456
|
+
return false if @state.nil?
|
|
423
457
|
return false if @test.nil?
|
|
458
|
+
return false if @editable.nil?
|
|
459
|
+
return false if @data_errors.nil?
|
|
460
|
+
return false if @metadata.nil?
|
|
461
|
+
return false if @has_password.nil?
|
|
462
|
+
return false if @signature_requests.nil?
|
|
424
463
|
return false if @actions.nil?
|
|
425
|
-
|
|
426
|
-
return false
|
|
464
|
+
return false if @files.nil?
|
|
465
|
+
return false if @expired.nil?
|
|
466
|
+
return false if @created_at.nil?
|
|
467
|
+
return false if @updated_at.nil?
|
|
427
468
|
true
|
|
428
469
|
end
|
|
429
470
|
|
|
430
471
|
# Custom attribute writer method with validation
|
|
431
|
-
# @param [Object]
|
|
432
|
-
def
|
|
433
|
-
if
|
|
434
|
-
fail ArgumentError, '
|
|
472
|
+
# @param [Object] id Value to be assigned
|
|
473
|
+
def id=(id)
|
|
474
|
+
if id.nil?
|
|
475
|
+
fail ArgumentError, 'id cannot be nil'
|
|
435
476
|
end
|
|
436
477
|
|
|
437
|
-
@
|
|
478
|
+
@id = id
|
|
438
479
|
end
|
|
439
480
|
|
|
440
481
|
# Custom attribute writer method with validation
|
|
441
|
-
# @param [Object]
|
|
442
|
-
def
|
|
443
|
-
if
|
|
444
|
-
fail ArgumentError, '
|
|
482
|
+
# @param [Object] template_type Value to be assigned
|
|
483
|
+
def template_type=(template_type)
|
|
484
|
+
if template_type.nil?
|
|
485
|
+
fail ArgumentError, 'template_type cannot be nil'
|
|
445
486
|
end
|
|
446
487
|
|
|
447
|
-
@
|
|
488
|
+
@template_type = template_type
|
|
448
489
|
end
|
|
449
490
|
|
|
450
491
|
# Custom attribute writer method with validation
|
|
451
|
-
# @param [Object]
|
|
452
|
-
def
|
|
453
|
-
if
|
|
454
|
-
fail ArgumentError, '
|
|
492
|
+
# @param [Object] source Value to be assigned
|
|
493
|
+
def source=(source)
|
|
494
|
+
if source.nil?
|
|
495
|
+
fail ArgumentError, 'source cannot be nil'
|
|
455
496
|
end
|
|
456
497
|
|
|
457
|
-
@
|
|
498
|
+
@source = source
|
|
458
499
|
end
|
|
459
500
|
|
|
460
|
-
# Custom attribute writer method
|
|
461
|
-
# @param [Object] state
|
|
501
|
+
# Custom attribute writer method with validation
|
|
502
|
+
# @param [Object] state Value to be assigned
|
|
462
503
|
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}."
|
|
504
|
+
if state.nil?
|
|
505
|
+
fail ArgumentError, 'state cannot be nil'
|
|
467
506
|
end
|
|
468
|
-
@state = state
|
|
469
|
-
end
|
|
470
507
|
|
|
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
|
|
508
|
+
@state = state
|
|
480
509
|
end
|
|
481
510
|
|
|
482
511
|
# Custom attribute writer method with validation
|
|
@@ -489,6 +518,56 @@ module DocSpring
|
|
|
489
518
|
@test = test
|
|
490
519
|
end
|
|
491
520
|
|
|
521
|
+
# Custom attribute writer method with validation
|
|
522
|
+
# @param [Object] editable Value to be assigned
|
|
523
|
+
def editable=(editable)
|
|
524
|
+
if editable.nil?
|
|
525
|
+
fail ArgumentError, 'editable cannot be nil'
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
@editable = editable
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
# Custom attribute writer method with validation
|
|
532
|
+
# @param [Object] data_errors Value to be assigned
|
|
533
|
+
def data_errors=(data_errors)
|
|
534
|
+
if data_errors.nil?
|
|
535
|
+
fail ArgumentError, 'data_errors cannot be nil'
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
@data_errors = data_errors
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
# Custom attribute writer method with validation
|
|
542
|
+
# @param [Object] metadata Value to be assigned
|
|
543
|
+
def metadata=(metadata)
|
|
544
|
+
if metadata.nil?
|
|
545
|
+
fail ArgumentError, 'metadata cannot be nil'
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
@metadata = metadata
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
# Custom attribute writer method with validation
|
|
552
|
+
# @param [Object] has_password Value to be assigned
|
|
553
|
+
def has_password=(has_password)
|
|
554
|
+
if has_password.nil?
|
|
555
|
+
fail ArgumentError, 'has_password cannot be nil'
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
@has_password = has_password
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
# Custom attribute writer method with validation
|
|
562
|
+
# @param [Object] signature_requests Value to be assigned
|
|
563
|
+
def signature_requests=(signature_requests)
|
|
564
|
+
if signature_requests.nil?
|
|
565
|
+
fail ArgumentError, 'signature_requests cannot be nil'
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
@signature_requests = signature_requests
|
|
569
|
+
end
|
|
570
|
+
|
|
492
571
|
# Custom attribute writer method with validation
|
|
493
572
|
# @param [Object] actions Value to be assigned
|
|
494
573
|
def actions=(actions)
|
|
@@ -499,15 +578,44 @@ module DocSpring
|
|
|
499
578
|
@actions = actions
|
|
500
579
|
end
|
|
501
580
|
|
|
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}."
|
|
581
|
+
# Custom attribute writer method with validation
|
|
582
|
+
# @param [Object] files Value to be assigned
|
|
583
|
+
def files=(files)
|
|
584
|
+
if files.nil?
|
|
585
|
+
fail ArgumentError, 'files cannot be nil'
|
|
509
586
|
end
|
|
510
|
-
|
|
587
|
+
|
|
588
|
+
@files = files
|
|
589
|
+
end
|
|
590
|
+
|
|
591
|
+
# Custom attribute writer method with validation
|
|
592
|
+
# @param [Object] expired Value to be assigned
|
|
593
|
+
def expired=(expired)
|
|
594
|
+
if expired.nil?
|
|
595
|
+
fail ArgumentError, 'expired cannot be nil'
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
@expired = expired
|
|
599
|
+
end
|
|
600
|
+
|
|
601
|
+
# Custom attribute writer method with validation
|
|
602
|
+
# @param [Object] created_at Value to be assigned
|
|
603
|
+
def created_at=(created_at)
|
|
604
|
+
if created_at.nil?
|
|
605
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
606
|
+
end
|
|
607
|
+
|
|
608
|
+
@created_at = created_at
|
|
609
|
+
end
|
|
610
|
+
|
|
611
|
+
# Custom attribute writer method with validation
|
|
612
|
+
# @param [Object] updated_at Value to be assigned
|
|
613
|
+
def updated_at=(updated_at)
|
|
614
|
+
if updated_at.nil?
|
|
615
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
616
|
+
end
|
|
617
|
+
|
|
618
|
+
@updated_at = updated_at
|
|
511
619
|
end
|
|
512
620
|
|
|
513
621
|
# Checks equality by comparing each attribute.
|
|
@@ -515,33 +623,30 @@ module DocSpring
|
|
|
515
623
|
def ==(o)
|
|
516
624
|
return true if self.equal?(o)
|
|
517
625
|
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
626
|
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
627
|
template_id == o.template_id &&
|
|
531
628
|
template_type == o.template_type &&
|
|
532
629
|
template_version == o.template_version &&
|
|
630
|
+
batch_id == o.batch_id &&
|
|
631
|
+
source == o.source &&
|
|
632
|
+
state == o.state &&
|
|
533
633
|
test == o.test &&
|
|
634
|
+
editable == o.editable &&
|
|
635
|
+
data == o.data &&
|
|
636
|
+
data_errors == o.data_errors &&
|
|
637
|
+
error_message == o.error_message &&
|
|
638
|
+
metadata == o.metadata &&
|
|
639
|
+
has_password == o.has_password &&
|
|
640
|
+
signature_requests == o.signature_requests &&
|
|
641
|
+
actions == o.actions &&
|
|
534
642
|
truncated_text == o.truncated_text &&
|
|
535
|
-
|
|
536
|
-
download_url == o.download_url &&
|
|
537
|
-
permanent_download_url == o.permanent_download_url &&
|
|
538
|
-
preview_download_url == o.preview_download_url &&
|
|
643
|
+
files == o.files &&
|
|
539
644
|
preview_generated_at == o.preview_generated_at &&
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
645
|
+
expired == o.expired &&
|
|
646
|
+
expires_at == o.expires_at &&
|
|
647
|
+
processed_at == o.processed_at &&
|
|
648
|
+
created_at == o.created_at &&
|
|
649
|
+
updated_at == o.updated_at
|
|
545
650
|
end
|
|
546
651
|
|
|
547
652
|
# @see the `==` method
|
|
@@ -553,7 +658,7 @@ module DocSpring
|
|
|
553
658
|
# Calculates hash code according to all attributes.
|
|
554
659
|
# @return [Integer] Hash code
|
|
555
660
|
def hash
|
|
556
|
-
[
|
|
661
|
+
[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, files, preview_generated_at, expired, expires_at, processed_at, created_at, updated_at].hash
|
|
557
662
|
end
|
|
558
663
|
|
|
559
664
|
# Builds the object from hash
|
|
@@ -562,18 +667,20 @@ module DocSpring
|
|
|
562
667
|
def self.build_from_hash(attributes)
|
|
563
668
|
return nil unless attributes.is_a?(Hash)
|
|
564
669
|
attributes = attributes.transform_keys(&:to_sym)
|
|
670
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
671
|
+
map = acceptable_attribute_map
|
|
565
672
|
transformed_hash = {}
|
|
566
|
-
|
|
567
|
-
if attributes.key?(
|
|
673
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
674
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
568
675
|
transformed_hash["#{key}"] = nil
|
|
569
676
|
elsif type =~ /\AArray<(.*)>/i
|
|
570
677
|
# check to ensure the input is an array given that the attribute
|
|
571
678
|
# is documented as an array but the input is not
|
|
572
|
-
if attributes[
|
|
573
|
-
transformed_hash["#{key}"] = attributes[
|
|
679
|
+
if attributes[map[key]].is_a?(Array)
|
|
680
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
574
681
|
end
|
|
575
|
-
elsif !attributes[
|
|
576
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
682
|
+
elsif !attributes[map[key]].nil?
|
|
683
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
577
684
|
end
|
|
578
685
|
end
|
|
579
686
|
# Responses can include enum values added after this client was released, so the enum setters
|
|
@@ -585,69 +692,15 @@ module DocSpring
|
|
|
585
692
|
end
|
|
586
693
|
end
|
|
587
694
|
|
|
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
695
|
# Returns the object in the form of hash
|
|
644
696
|
# @return [Hash] Returns the object in the form of hash
|
|
645
697
|
def to_hash
|
|
646
698
|
hash = {}
|
|
647
|
-
|
|
699
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
700
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
648
701
|
value = self.send(attr)
|
|
649
702
|
if value.nil?
|
|
650
|
-
is_nullable = self.class.
|
|
703
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
651
704
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
652
705
|
end
|
|
653
706
|
|
|
@@ -656,24 +709,6 @@ module DocSpring
|
|
|
656
709
|
hash
|
|
657
710
|
end
|
|
658
711
|
|
|
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
712
|
end
|
|
678
713
|
|
|
679
714
|
end
|