docspring 3.4.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 -147
- data/.openapi-generator/VERSION +1 -1
- data/.rubocop.yml +1 -1
- data/.travis.yml +1 -1
- data/AGENTS.md +79 -19
- data/CHANGELOG.md +134 -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 +2 -2
- data/lib/docspring/api/client.rb +994 -941
- data/lib/docspring/api_client.rb +13 -5
- data/lib/docspring/api_error.rb +2 -2
- data/lib/docspring/api_model_base.rb +88 -0
- data/lib/docspring/configuration.rb +11 -6
- 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} +227 -205
- 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_pdf_template.rb → combined_pdf_source.rb} +106 -102
- 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} +31 -86
- data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +59 -122
- data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +28 -95
- data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +59 -101
- data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +49 -121
- 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} +52 -106
- data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +96 -147
- 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 +131 -94
- 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 +27 -137
- data/lib/docspring/models/expiration_interval.rb +42 -0
- data/lib/docspring/models/{create_pdf_template.rb → field_comparison_condition.rb} +106 -102
- data/lib/docspring/models/field_comparison_operator.rb +43 -0
- data/lib/docspring/models/field_display_type.rb +45 -0
- data/lib/docspring/models/{create_webhook_data.rb → field_equals_condition.rb} +106 -102
- data/lib/docspring/models/field_equals_operator.rb +41 -0
- data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +100 -102
- 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 +133 -92
- 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} +30 -86
- 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} +63 -98
- data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +28 -86
- data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +28 -86
- data/lib/docspring/models/shape_type.rb +45 -0
- data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +239 -170
- 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} +136 -121
- 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} +155 -172
- 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 +373 -338
- data/lib/docspring/models/submission_action.rb +63 -135
- 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 +156 -111
- 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 +484 -765
- data/lib/docspring/models/{add_fields_data.rb → template_actor.rb} +118 -104
- 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} +121 -113
- data/lib/docspring/models/template_field_dependency_action.rb +42 -0
- data/lib/docspring/models/template_field_dependency_condition.rb +256 -0
- data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
- data/lib/docspring/models/{success_multiple_errors_response.rb → template_field_dependency_input.rb} +120 -114
- 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} +36 -95
- 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/{update_webhook_data.rb → template_source_pdf.rb} +91 -102
- data/lib/docspring/models/{template_preview.rb → template_summary.rb} +435 -588
- 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} +71 -195
- 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} +92 -139
- data/lib/docspring/models/url_source_pdf.rb +212 -0
- data/lib/docspring/models/webhook.rb +96 -106
- 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 +3 -3
- data/lib/docspring.rb +124 -51
- data/spec/api/client_spec.rb +303 -276
- data/spec/models/ai_field_naming_language_spec.rb +30 -0
- data/spec/models/{create_folder_data_spec.rb → authentication_check_spec.rb} +9 -9
- 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/{add_fields_data_spec.rb → combined_pdf_files_spec.rb} +9 -9
- 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/combined_pdf_source_spec.rb +60 -0
- data/spec/models/combined_pdf_source_type_spec.rb +30 -0
- data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +19 -23
- data/spec/models/combined_pdf_state_spec.rb +30 -0
- data/spec/models/{copy_template_options_spec.rb → copy_template_request_spec.rb} +8 -8
- data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +11 -17
- data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +8 -8
- data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +10 -10
- data/spec/models/{submission422_response_spec.rb → create_signature_request_event_request_spec.rb} +12 -16
- 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} +12 -12
- data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +23 -17
- data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +39 -117
- 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 +28 -4
- data/spec/models/error_code_spec.rb +30 -0
- data/spec/models/error_detail_spec.rb +60 -0
- data/spec/models/error_info_spec.rb +78 -0
- data/spec/models/error_response_spec.rb +3 -13
- data/spec/models/expiration_interval_spec.rb +30 -0
- data/spec/models/{list_submissions_response_spec.rb → field_comparison_condition_spec.rb} +11 -11
- 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 +15 -3
- 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_data_spec.rb → move_folder_request_spec.rb} +8 -8
- data/spec/models/{create_html_template_spec.rb → move_template_request_spec.rb} +9 -9
- 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} +10 -10
- data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +8 -8
- data/spec/models/{restore_version_data_spec.rb → restore_template_version_request_spec.rb} +8 -8
- 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} +15 -17
- 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} +27 -29
- data/spec/models/signature_request_message_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_show_spec.rb → signature_request_spec.rb} +30 -30
- 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 +3 -21
- 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 +26 -12
- 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 +25 -55
- 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} +28 -52
- data/spec/models/{submission_preview_spec.rb → template_defaults_spec.rb} +28 -60
- data/spec/models/{json_schema_spec.rb → template_document_spec.rb} +20 -20
- 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/{batch_generate_pdfs201_response_spec.rb → template_field_dependency_input_spec.rb} +13 -17
- 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} +8 -12
- 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/{submission_data_request_token_spec.rb → template_source_pdf_spec.rb} +12 -12
- data/spec/models/template_spec.rb +39 -153
- 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} +17 -21
- data/spec/models/{create_submission_response_spec.rb → update_template_document_request_spec.rb} +11 -15
- data/spec/models/update_template_request_spec.rb +222 -0
- data/spec/models/update_webhook_request_spec.rb +96 -0
- data/spec/models/upload_method_spec.rb +30 -0
- data/spec/models/{upload_presign_response_spec.rb → upload_presign_spec.rb} +12 -16
- 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 +3 -7
- data/spec/spec_helper.rb +2 -2
- metadata +485 -198
- data/docs/AddFieldsData.md +0 -18
- data/docs/BatchGeneratePdfs201Response.md +0 -26
- 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 -22
- data/docs/CreateCustomFileData.md +0 -18
- data/docs/CreateCustomFileResponse.md +0 -22
- 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 -22
- data/docs/CreateSubmissionDataRequestResponse.md +0 -22
- data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -22
- data/docs/CreateSubmissionResponse.md +0 -22
- data/docs/ErrorOrMultipleErrorsResponse.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 -342
- data/lib/docspring/models/combined_submission_action.rb +0 -384
- data/lib/docspring/models/create_combined_submission_response.rb +0 -305
- data/lib/docspring/models/create_custom_file_response.rb +0 -305
- data/lib/docspring/models/create_html_template.rb +0 -243
- data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -305
- data/lib/docspring/models/create_submission_data_request_response.rb +0 -305
- data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -305
- data/lib/docspring/models/create_submission_response.rb +0 -305
- data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
- 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/template_add_fields_response.rb +0 -290
- data/lib/docspring/models/template_delete_response.rb +0 -300
- data/lib/docspring/models/template_publish_version_response.rb +0 -305
- data/lib/docspring/models/update_html_template.rb +0 -243
- data/spec/models/combined_submission_action_spec.rb +0 -84
- data/spec/models/create_combined_submission_response_spec.rb +0 -52
- data/spec/models/create_custom_file_response_spec.rb +0 -52
- 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 -52
- data/spec/models/create_submission_data_request_response_spec.rb +0 -52
- data/spec/models/create_submission_data_request_token_response_spec.rb +0 -52
- 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/multiple_errors_response_spec.rb +0 -46
- 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
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#DocSpring API
|
|
3
|
+
|
|
4
|
+
#Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0-DOCSPRING
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DocSpring
|
|
17
|
+
# The kind of link to make. Send no body for an `api` token.
|
|
18
|
+
class CreateSignatureRequestTokenRequest < ApiModelBase
|
|
19
|
+
# `api` (the default): the link opens the signature request for 24 hours, for a form your app opens or a link it gives the person right away. `email`: 7 days, for a link you send by email.
|
|
20
|
+
attr_accessor :type
|
|
21
|
+
|
|
22
|
+
class EnumAttributeValidator
|
|
23
|
+
attr_reader :datatype
|
|
24
|
+
attr_reader :allowable_values
|
|
25
|
+
|
|
26
|
+
def initialize(datatype, allowable_values)
|
|
27
|
+
@allowable_values = allowable_values.map do |value|
|
|
28
|
+
case datatype.to_s
|
|
29
|
+
when /Integer/i
|
|
30
|
+
value.to_i
|
|
31
|
+
when /Float/i
|
|
32
|
+
value.to_f
|
|
33
|
+
else
|
|
34
|
+
value
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def valid?(value)
|
|
40
|
+
!value || allowable_values.include?(value)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
45
|
+
def self.attribute_map
|
|
46
|
+
{
|
|
47
|
+
:'type' => :'type'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns attribute mapping this model knows about
|
|
52
|
+
def self.acceptable_attribute_map
|
|
53
|
+
attribute_map
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns all the JSON keys this model knows about
|
|
57
|
+
def self.acceptable_attributes
|
|
58
|
+
acceptable_attribute_map.values
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute type mapping.
|
|
62
|
+
def self.openapi_types
|
|
63
|
+
{
|
|
64
|
+
:'type' => :'SignatureRequestTokenType'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# List of attributes with nullable: true
|
|
69
|
+
def self.openapi_nullable
|
|
70
|
+
Set.new([
|
|
71
|
+
])
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Returns attribute type mapping
|
|
75
|
+
def self.acceptable_openapi_types
|
|
76
|
+
openapi_types
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Returns the nullable attributes
|
|
80
|
+
def self.acceptable_openapi_nullable
|
|
81
|
+
openapi_nullable
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Initializes the object
|
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
86
|
+
def initialize(attributes = {})
|
|
87
|
+
if (!attributes.is_a?(Hash))
|
|
88
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::CreateSignatureRequestTokenRequest` initialize method"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
92
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
93
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
94
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
95
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::CreateSignatureRequestTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
96
|
+
end
|
|
97
|
+
h[k.to_sym] = v
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'type')
|
|
101
|
+
self.type = attributes[:'type']
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
+
# @return Array for valid properties with the reasons
|
|
107
|
+
def list_invalid_properties
|
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
invalid_properties
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Check to see if the all the properties in the model are valid
|
|
114
|
+
# @return true if the model is valid
|
|
115
|
+
def valid?
|
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Checks equality by comparing each attribute.
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def ==(o)
|
|
123
|
+
return true if self.equal?(o)
|
|
124
|
+
self.class == o.class &&
|
|
125
|
+
type == o.type
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# @see the `==` method
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def eql?(o)
|
|
131
|
+
self == o
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Calculates hash code according to all attributes.
|
|
135
|
+
# @return [Integer] Hash code
|
|
136
|
+
def hash
|
|
137
|
+
[type].hash
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Builds the object from hash
|
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
142
|
+
# @return [Object] Returns the model itself
|
|
143
|
+
def self.build_from_hash(attributes)
|
|
144
|
+
return nil unless attributes.is_a?(Hash)
|
|
145
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
146
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
147
|
+
map = acceptable_attribute_map
|
|
148
|
+
transformed_hash = {}
|
|
149
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
150
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
151
|
+
transformed_hash["#{key}"] = nil
|
|
152
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
153
|
+
# check to ensure the input is an array given that the attribute
|
|
154
|
+
# is documented as an array but the input is not
|
|
155
|
+
if attributes[map[key]].is_a?(Array)
|
|
156
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
157
|
+
end
|
|
158
|
+
elsif !attributes[map[key]].nil?
|
|
159
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
163
|
+
# accept any value while the model is built from a response
|
|
164
|
+
allocate.tap do |model|
|
|
165
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
166
|
+
model.send(:initialize, transformed_hash)
|
|
167
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Returns the object in the form of hash
|
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
|
173
|
+
def to_hash
|
|
174
|
+
hash = {}
|
|
175
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
176
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
177
|
+
value = self.send(attr)
|
|
178
|
+
if value.nil?
|
|
179
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
180
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
hash[param] = _to_hash(value)
|
|
184
|
+
end
|
|
185
|
+
hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
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,25 +14,31 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module DocSpring
|
|
17
|
-
|
|
17
|
+
# The submissions to create, and the settings they share.
|
|
18
|
+
class CreateSubmissionBatchRequest < ApiModelBase
|
|
19
|
+
# Your own data about the batch, such as an ID from your app.
|
|
18
20
|
attr_accessor :metadata
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
# The template for each submission that doesn't name its own `template_id`.
|
|
22
23
|
attr_accessor :template_id
|
|
23
24
|
|
|
25
|
+
# The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
|
|
24
26
|
attr_accessor :template_version
|
|
25
27
|
|
|
28
|
+
# The default `test` for each submission that doesn't set its own.
|
|
26
29
|
attr_accessor :test
|
|
27
30
|
|
|
31
|
+
# Up to 50 submissions. Each one takes the properties of POST /templates/{template_id}/submissions except `signature_requests`, plus `template_id` and `template_version` when it uses a different template from the batch.
|
|
32
|
+
attr_accessor :submissions
|
|
33
|
+
|
|
28
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
35
|
def self.attribute_map
|
|
30
36
|
{
|
|
31
37
|
:'metadata' => :'metadata',
|
|
32
|
-
:'submissions' => :'submissions',
|
|
33
38
|
:'template_id' => :'template_id',
|
|
34
39
|
:'template_version' => :'template_version',
|
|
35
|
-
:'test' => :'test'
|
|
40
|
+
:'test' => :'test',
|
|
41
|
+
:'submissions' => :'submissions'
|
|
36
42
|
}
|
|
37
43
|
end
|
|
38
44
|
|
|
@@ -49,48 +55,50 @@ module DocSpring
|
|
|
49
55
|
# Attribute type mapping.
|
|
50
56
|
def self.openapi_types
|
|
51
57
|
{
|
|
52
|
-
:'metadata' => :'Object',
|
|
53
|
-
:'submissions' => :'Array<Object>',
|
|
58
|
+
:'metadata' => :'Hash<String, Object>',
|
|
54
59
|
:'template_id' => :'String',
|
|
55
60
|
:'template_version' => :'String',
|
|
56
|
-
:'test' => :'Boolean'
|
|
61
|
+
:'test' => :'Boolean',
|
|
62
|
+
:'submissions' => :'Array<SubmissionInput>'
|
|
57
63
|
}
|
|
58
64
|
end
|
|
59
65
|
|
|
60
66
|
# List of attributes with nullable: true
|
|
61
67
|
def self.openapi_nullable
|
|
62
68
|
Set.new([
|
|
63
|
-
:'template_id',
|
|
64
|
-
:'template_version',
|
|
65
69
|
])
|
|
66
70
|
end
|
|
67
71
|
|
|
72
|
+
# Returns attribute type mapping
|
|
73
|
+
def self.acceptable_openapi_types
|
|
74
|
+
openapi_types
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Returns the nullable attributes
|
|
78
|
+
def self.acceptable_openapi_nullable
|
|
79
|
+
openapi_nullable
|
|
80
|
+
end
|
|
81
|
+
|
|
68
82
|
# Initializes the object
|
|
69
83
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
70
84
|
def initialize(attributes = {})
|
|
71
85
|
if (!attributes.is_a?(Hash))
|
|
72
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::
|
|
86
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::CreateSubmissionBatchRequest` initialize method"
|
|
73
87
|
end
|
|
74
88
|
|
|
75
89
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
76
90
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
77
91
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
78
92
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
79
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::
|
|
93
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::CreateSubmissionBatchRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
80
94
|
end
|
|
81
95
|
h[k.to_sym] = v
|
|
82
96
|
}
|
|
83
97
|
|
|
84
98
|
if attributes.key?(:'metadata')
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if attributes.key?(:'submissions')
|
|
89
|
-
if (value = attributes[:'submissions']).is_a?(Array)
|
|
90
|
-
self.submissions = value
|
|
99
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
100
|
+
self.metadata = value
|
|
91
101
|
end
|
|
92
|
-
else
|
|
93
|
-
self.submissions = nil
|
|
94
102
|
end
|
|
95
103
|
|
|
96
104
|
if attributes.key?(:'template_id')
|
|
@@ -104,6 +112,14 @@ module DocSpring
|
|
|
104
112
|
if attributes.key?(:'test')
|
|
105
113
|
self.test = attributes[:'test']
|
|
106
114
|
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'submissions')
|
|
117
|
+
if (value = attributes[:'submissions']).is_a?(Array)
|
|
118
|
+
self.submissions = value
|
|
119
|
+
end
|
|
120
|
+
else
|
|
121
|
+
self.submissions = nil
|
|
122
|
+
end
|
|
107
123
|
end
|
|
108
124
|
|
|
109
125
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -142,10 +158,10 @@ module DocSpring
|
|
|
142
158
|
return true if self.equal?(o)
|
|
143
159
|
self.class == o.class &&
|
|
144
160
|
metadata == o.metadata &&
|
|
145
|
-
submissions == o.submissions &&
|
|
146
161
|
template_id == o.template_id &&
|
|
147
162
|
template_version == o.template_version &&
|
|
148
|
-
test == o.test
|
|
163
|
+
test == o.test &&
|
|
164
|
+
submissions == o.submissions
|
|
149
165
|
end
|
|
150
166
|
|
|
151
167
|
# @see the `==` method
|
|
@@ -157,7 +173,7 @@ module DocSpring
|
|
|
157
173
|
# Calculates hash code according to all attributes.
|
|
158
174
|
# @return [Integer] Hash code
|
|
159
175
|
def hash
|
|
160
|
-
[metadata,
|
|
176
|
+
[metadata, template_id, template_version, test, submissions].hash
|
|
161
177
|
end
|
|
162
178
|
|
|
163
179
|
# Builds the object from hash
|
|
@@ -166,18 +182,20 @@ module DocSpring
|
|
|
166
182
|
def self.build_from_hash(attributes)
|
|
167
183
|
return nil unless attributes.is_a?(Hash)
|
|
168
184
|
attributes = attributes.transform_keys(&:to_sym)
|
|
185
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
186
|
+
map = acceptable_attribute_map
|
|
169
187
|
transformed_hash = {}
|
|
170
|
-
|
|
171
|
-
if attributes.key?(
|
|
188
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
189
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
172
190
|
transformed_hash["#{key}"] = nil
|
|
173
191
|
elsif type =~ /\AArray<(.*)>/i
|
|
174
192
|
# check to ensure the input is an array given that the attribute
|
|
175
193
|
# is documented as an array but the input is not
|
|
176
|
-
if attributes[
|
|
177
|
-
transformed_hash["#{key}"] = attributes[
|
|
194
|
+
if attributes[map[key]].is_a?(Array)
|
|
195
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
178
196
|
end
|
|
179
|
-
elsif !attributes[
|
|
180
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[
|
|
197
|
+
elsif !attributes[map[key]].nil?
|
|
198
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
181
199
|
end
|
|
182
200
|
end
|
|
183
201
|
# Responses can include enum values added after this client was released, so the enum setters
|
|
@@ -189,69 +207,15 @@ module DocSpring
|
|
|
189
207
|
end
|
|
190
208
|
end
|
|
191
209
|
|
|
192
|
-
# Deserializes the data based on type
|
|
193
|
-
# @param string type Data type
|
|
194
|
-
# @param string value Value to be deserialized
|
|
195
|
-
# @return [Object] Deserialized data
|
|
196
|
-
def self._deserialize(type, value)
|
|
197
|
-
case type.to_sym
|
|
198
|
-
when :Time
|
|
199
|
-
Time.parse(value)
|
|
200
|
-
when :Date
|
|
201
|
-
Date.parse(value)
|
|
202
|
-
when :String
|
|
203
|
-
value.to_s
|
|
204
|
-
when :Integer
|
|
205
|
-
value.to_i
|
|
206
|
-
when :Float
|
|
207
|
-
value.to_f
|
|
208
|
-
when :Boolean
|
|
209
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
210
|
-
true
|
|
211
|
-
else
|
|
212
|
-
false
|
|
213
|
-
end
|
|
214
|
-
when :Object
|
|
215
|
-
# generic object (usually a Hash), return directly
|
|
216
|
-
value
|
|
217
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
218
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
219
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
220
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
221
|
-
k_type = Regexp.last_match[:k_type]
|
|
222
|
-
v_type = Regexp.last_match[:v_type]
|
|
223
|
-
{}.tap do |hash|
|
|
224
|
-
value.each do |k, v|
|
|
225
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
226
|
-
end
|
|
227
|
-
end
|
|
228
|
-
else # model
|
|
229
|
-
# models (e.g. Pet) or oneOf
|
|
230
|
-
klass = DocSpring.const_get(type)
|
|
231
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
232
|
-
end
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
# Returns the string representation of the object
|
|
236
|
-
# @return [String] String presentation of the object
|
|
237
|
-
def to_s
|
|
238
|
-
to_hash.to_s
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
242
|
-
# @return [Hash] Returns the object in the form of hash
|
|
243
|
-
def to_body
|
|
244
|
-
to_hash
|
|
245
|
-
end
|
|
246
|
-
|
|
247
210
|
# Returns the object in the form of hash
|
|
248
211
|
# @return [Hash] Returns the object in the form of hash
|
|
249
212
|
def to_hash
|
|
250
213
|
hash = {}
|
|
251
|
-
|
|
214
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
215
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
252
216
|
value = self.send(attr)
|
|
253
217
|
if value.nil?
|
|
254
|
-
is_nullable = self.class.
|
|
218
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
255
219
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
256
220
|
end
|
|
257
221
|
|
|
@@ -260,24 +224,6 @@ module DocSpring
|
|
|
260
224
|
hash
|
|
261
225
|
end
|
|
262
226
|
|
|
263
|
-
# Outputs non-array value in the form of hash
|
|
264
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
265
|
-
# @param [Object] value Any valid value
|
|
266
|
-
# @return [Hash] Returns the value in the form of hash
|
|
267
|
-
def _to_hash(value)
|
|
268
|
-
if value.is_a?(Array)
|
|
269
|
-
value.compact.map { |v| _to_hash(v) }
|
|
270
|
-
elsif value.is_a?(Hash)
|
|
271
|
-
{}.tap do |hash|
|
|
272
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
273
|
-
end
|
|
274
|
-
elsif value.respond_to? :to_hash
|
|
275
|
-
value.to_hash
|
|
276
|
-
else
|
|
277
|
-
value
|
|
278
|
-
end
|
|
279
|
-
end
|
|
280
|
-
|
|
281
227
|
end
|
|
282
228
|
|
|
283
229
|
end
|