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
|
@@ -0,0 +1,416 @@
|
|
|
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
|
+
# How an HTML template's PDFs are printed.
|
|
18
|
+
class HtmlEngineOptions < ApiModelBase
|
|
19
|
+
# The paper size. `Custom` uses `width` and `height`.
|
|
20
|
+
attr_accessor :format
|
|
21
|
+
|
|
22
|
+
# The page width for the `Custom` format, with a unit (`8.5in`, `210mm`).
|
|
23
|
+
attr_accessor :width
|
|
24
|
+
|
|
25
|
+
# The page height for the `Custom` format, with a unit.
|
|
26
|
+
attr_accessor :height
|
|
27
|
+
|
|
28
|
+
# How much to scale the page, such as `0.8`. `1` prints it at its normal size.
|
|
29
|
+
attr_accessor :scale
|
|
30
|
+
|
|
31
|
+
# Print pages in landscape orientation.
|
|
32
|
+
attr_accessor :landscape
|
|
33
|
+
|
|
34
|
+
# Print background colors and images.
|
|
35
|
+
attr_accessor :print_background
|
|
36
|
+
|
|
37
|
+
# The top margin, with a unit, such as `1in` or `20mm`.
|
|
38
|
+
attr_accessor :margin_top
|
|
39
|
+
|
|
40
|
+
# The bottom margin, with a unit.
|
|
41
|
+
attr_accessor :margin_bottom
|
|
42
|
+
|
|
43
|
+
# The left margin, with a unit.
|
|
44
|
+
attr_accessor :margin_left
|
|
45
|
+
|
|
46
|
+
# The right margin, with a unit.
|
|
47
|
+
attr_accessor :margin_right
|
|
48
|
+
|
|
49
|
+
class EnumAttributeValidator
|
|
50
|
+
attr_reader :datatype
|
|
51
|
+
attr_reader :allowable_values
|
|
52
|
+
|
|
53
|
+
def initialize(datatype, allowable_values)
|
|
54
|
+
@allowable_values = allowable_values.map do |value|
|
|
55
|
+
case datatype.to_s
|
|
56
|
+
when /Integer/i
|
|
57
|
+
value.to_i
|
|
58
|
+
when /Float/i
|
|
59
|
+
value.to_f
|
|
60
|
+
else
|
|
61
|
+
value
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def valid?(value)
|
|
67
|
+
!value || allowable_values.include?(value)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
72
|
+
def self.attribute_map
|
|
73
|
+
{
|
|
74
|
+
:'format' => :'format',
|
|
75
|
+
:'width' => :'width',
|
|
76
|
+
:'height' => :'height',
|
|
77
|
+
:'scale' => :'scale',
|
|
78
|
+
:'landscape' => :'landscape',
|
|
79
|
+
:'print_background' => :'print_background',
|
|
80
|
+
:'margin_top' => :'margin_top',
|
|
81
|
+
:'margin_bottom' => :'margin_bottom',
|
|
82
|
+
:'margin_left' => :'margin_left',
|
|
83
|
+
:'margin_right' => :'margin_right'
|
|
84
|
+
}
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Returns attribute mapping this model knows about
|
|
88
|
+
def self.acceptable_attribute_map
|
|
89
|
+
attribute_map
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Returns all the JSON keys this model knows about
|
|
93
|
+
def self.acceptable_attributes
|
|
94
|
+
acceptable_attribute_map.values
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Attribute type mapping.
|
|
98
|
+
def self.openapi_types
|
|
99
|
+
{
|
|
100
|
+
:'format' => :'PageFormat',
|
|
101
|
+
:'width' => :'String',
|
|
102
|
+
:'height' => :'String',
|
|
103
|
+
:'scale' => :'Float',
|
|
104
|
+
:'landscape' => :'Boolean',
|
|
105
|
+
:'print_background' => :'Boolean',
|
|
106
|
+
:'margin_top' => :'String',
|
|
107
|
+
:'margin_bottom' => :'String',
|
|
108
|
+
:'margin_left' => :'String',
|
|
109
|
+
:'margin_right' => :'String'
|
|
110
|
+
}
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# List of attributes with nullable: true
|
|
114
|
+
def self.openapi_nullable
|
|
115
|
+
Set.new([
|
|
116
|
+
])
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Returns attribute type mapping
|
|
120
|
+
def self.acceptable_openapi_types
|
|
121
|
+
openapi_types
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Returns the nullable attributes
|
|
125
|
+
def self.acceptable_openapi_nullable
|
|
126
|
+
openapi_nullable
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Initializes the object
|
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
131
|
+
def initialize(attributes = {})
|
|
132
|
+
if (!attributes.is_a?(Hash))
|
|
133
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::HtmlEngineOptions` initialize method"
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
137
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
138
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
139
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
140
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::HtmlEngineOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
141
|
+
end
|
|
142
|
+
h[k.to_sym] = v
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'format')
|
|
146
|
+
self.format = attributes[:'format']
|
|
147
|
+
else
|
|
148
|
+
self.format = nil
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'width')
|
|
152
|
+
self.width = attributes[:'width']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'height')
|
|
156
|
+
self.height = attributes[:'height']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'scale')
|
|
160
|
+
self.scale = attributes[:'scale']
|
|
161
|
+
else
|
|
162
|
+
self.scale = nil
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'landscape')
|
|
166
|
+
self.landscape = attributes[:'landscape']
|
|
167
|
+
else
|
|
168
|
+
self.landscape = nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'print_background')
|
|
172
|
+
self.print_background = attributes[:'print_background']
|
|
173
|
+
else
|
|
174
|
+
self.print_background = nil
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'margin_top')
|
|
178
|
+
self.margin_top = attributes[:'margin_top']
|
|
179
|
+
else
|
|
180
|
+
self.margin_top = nil
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'margin_bottom')
|
|
184
|
+
self.margin_bottom = attributes[:'margin_bottom']
|
|
185
|
+
else
|
|
186
|
+
self.margin_bottom = nil
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'margin_left')
|
|
190
|
+
self.margin_left = attributes[:'margin_left']
|
|
191
|
+
else
|
|
192
|
+
self.margin_left = nil
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'margin_right')
|
|
196
|
+
self.margin_right = attributes[:'margin_right']
|
|
197
|
+
else
|
|
198
|
+
self.margin_right = nil
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
203
|
+
# @return Array for valid properties with the reasons
|
|
204
|
+
def list_invalid_properties
|
|
205
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
206
|
+
invalid_properties = Array.new
|
|
207
|
+
if @format.nil?
|
|
208
|
+
invalid_properties.push('invalid value for "format", format cannot be nil.')
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if @scale.nil?
|
|
212
|
+
invalid_properties.push('invalid value for "scale", scale cannot be nil.')
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if @landscape.nil?
|
|
216
|
+
invalid_properties.push('invalid value for "landscape", landscape cannot be nil.')
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if @print_background.nil?
|
|
220
|
+
invalid_properties.push('invalid value for "print_background", print_background cannot be nil.')
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if @margin_top.nil?
|
|
224
|
+
invalid_properties.push('invalid value for "margin_top", margin_top cannot be nil.')
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if @margin_bottom.nil?
|
|
228
|
+
invalid_properties.push('invalid value for "margin_bottom", margin_bottom cannot be nil.')
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if @margin_left.nil?
|
|
232
|
+
invalid_properties.push('invalid value for "margin_left", margin_left cannot be nil.')
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if @margin_right.nil?
|
|
236
|
+
invalid_properties.push('invalid value for "margin_right", margin_right cannot be nil.')
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
invalid_properties
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Check to see if the all the properties in the model are valid
|
|
243
|
+
# @return true if the model is valid
|
|
244
|
+
def valid?
|
|
245
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
246
|
+
return false if @format.nil?
|
|
247
|
+
return false if @scale.nil?
|
|
248
|
+
return false if @landscape.nil?
|
|
249
|
+
return false if @print_background.nil?
|
|
250
|
+
return false if @margin_top.nil?
|
|
251
|
+
return false if @margin_bottom.nil?
|
|
252
|
+
return false if @margin_left.nil?
|
|
253
|
+
return false if @margin_right.nil?
|
|
254
|
+
true
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Custom attribute writer method with validation
|
|
258
|
+
# @param [Object] format Value to be assigned
|
|
259
|
+
def format=(format)
|
|
260
|
+
if format.nil?
|
|
261
|
+
fail ArgumentError, 'format cannot be nil'
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
@format = format
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Custom attribute writer method with validation
|
|
268
|
+
# @param [Object] scale Value to be assigned
|
|
269
|
+
def scale=(scale)
|
|
270
|
+
if scale.nil?
|
|
271
|
+
fail ArgumentError, 'scale cannot be nil'
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
@scale = scale
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Custom attribute writer method with validation
|
|
278
|
+
# @param [Object] landscape Value to be assigned
|
|
279
|
+
def landscape=(landscape)
|
|
280
|
+
if landscape.nil?
|
|
281
|
+
fail ArgumentError, 'landscape cannot be nil'
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
@landscape = landscape
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Custom attribute writer method with validation
|
|
288
|
+
# @param [Object] print_background Value to be assigned
|
|
289
|
+
def print_background=(print_background)
|
|
290
|
+
if print_background.nil?
|
|
291
|
+
fail ArgumentError, 'print_background cannot be nil'
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
@print_background = print_background
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# Custom attribute writer method with validation
|
|
298
|
+
# @param [Object] margin_top Value to be assigned
|
|
299
|
+
def margin_top=(margin_top)
|
|
300
|
+
if margin_top.nil?
|
|
301
|
+
fail ArgumentError, 'margin_top cannot be nil'
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
@margin_top = margin_top
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# Custom attribute writer method with validation
|
|
308
|
+
# @param [Object] margin_bottom Value to be assigned
|
|
309
|
+
def margin_bottom=(margin_bottom)
|
|
310
|
+
if margin_bottom.nil?
|
|
311
|
+
fail ArgumentError, 'margin_bottom cannot be nil'
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
@margin_bottom = margin_bottom
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# Custom attribute writer method with validation
|
|
318
|
+
# @param [Object] margin_left Value to be assigned
|
|
319
|
+
def margin_left=(margin_left)
|
|
320
|
+
if margin_left.nil?
|
|
321
|
+
fail ArgumentError, 'margin_left cannot be nil'
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
@margin_left = margin_left
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Custom attribute writer method with validation
|
|
328
|
+
# @param [Object] margin_right Value to be assigned
|
|
329
|
+
def margin_right=(margin_right)
|
|
330
|
+
if margin_right.nil?
|
|
331
|
+
fail ArgumentError, 'margin_right cannot be nil'
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
@margin_right = margin_right
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Checks equality by comparing each attribute.
|
|
338
|
+
# @param [Object] Object to be compared
|
|
339
|
+
def ==(o)
|
|
340
|
+
return true if self.equal?(o)
|
|
341
|
+
self.class == o.class &&
|
|
342
|
+
format == o.format &&
|
|
343
|
+
width == o.width &&
|
|
344
|
+
height == o.height &&
|
|
345
|
+
scale == o.scale &&
|
|
346
|
+
landscape == o.landscape &&
|
|
347
|
+
print_background == o.print_background &&
|
|
348
|
+
margin_top == o.margin_top &&
|
|
349
|
+
margin_bottom == o.margin_bottom &&
|
|
350
|
+
margin_left == o.margin_left &&
|
|
351
|
+
margin_right == o.margin_right
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# @see the `==` method
|
|
355
|
+
# @param [Object] Object to be compared
|
|
356
|
+
def eql?(o)
|
|
357
|
+
self == o
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Calculates hash code according to all attributes.
|
|
361
|
+
# @return [Integer] Hash code
|
|
362
|
+
def hash
|
|
363
|
+
[format, width, height, scale, landscape, print_background, margin_top, margin_bottom, margin_left, margin_right].hash
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Builds the object from hash
|
|
367
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
368
|
+
# @return [Object] Returns the model itself
|
|
369
|
+
def self.build_from_hash(attributes)
|
|
370
|
+
return nil unless attributes.is_a?(Hash)
|
|
371
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
372
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
373
|
+
map = acceptable_attribute_map
|
|
374
|
+
transformed_hash = {}
|
|
375
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
376
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
377
|
+
transformed_hash["#{key}"] = nil
|
|
378
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
379
|
+
# check to ensure the input is an array given that the attribute
|
|
380
|
+
# is documented as an array but the input is not
|
|
381
|
+
if attributes[map[key]].is_a?(Array)
|
|
382
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
383
|
+
end
|
|
384
|
+
elsif !attributes[map[key]].nil?
|
|
385
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
386
|
+
end
|
|
387
|
+
end
|
|
388
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
389
|
+
# accept any value while the model is built from a response
|
|
390
|
+
allocate.tap do |model|
|
|
391
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
392
|
+
model.send(:initialize, transformed_hash)
|
|
393
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
394
|
+
end
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
# Returns the object in the form of hash
|
|
398
|
+
# @return [Hash] Returns the object in the form of hash
|
|
399
|
+
def to_hash
|
|
400
|
+
hash = {}
|
|
401
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
402
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
403
|
+
value = self.send(attr)
|
|
404
|
+
if value.nil?
|
|
405
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
406
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
hash[param] = _to_hash(value)
|
|
410
|
+
end
|
|
411
|
+
hash
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
end
|
|
@@ -0,0 +1,280 @@
|
|
|
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
|
+
# How an HTML template's PDFs are printed.
|
|
18
|
+
class HtmlEngineOptionsInput < ApiModelBase
|
|
19
|
+
# The paper size. `Custom` uses `width` and `height`.
|
|
20
|
+
attr_accessor :format
|
|
21
|
+
|
|
22
|
+
# The page width for the `Custom` format, with a unit (`8.5in`, `210mm`).
|
|
23
|
+
attr_accessor :width
|
|
24
|
+
|
|
25
|
+
# The page height for the `Custom` format, with a unit.
|
|
26
|
+
attr_accessor :height
|
|
27
|
+
|
|
28
|
+
# How much to scale the page, such as `0.8`. `1` prints it at its normal size.
|
|
29
|
+
attr_accessor :scale
|
|
30
|
+
|
|
31
|
+
# Print pages in landscape orientation.
|
|
32
|
+
attr_accessor :landscape
|
|
33
|
+
|
|
34
|
+
# Print background colors and images.
|
|
35
|
+
attr_accessor :print_background
|
|
36
|
+
|
|
37
|
+
# The top margin, with a unit, such as `1in` or `20mm`.
|
|
38
|
+
attr_accessor :margin_top
|
|
39
|
+
|
|
40
|
+
# The bottom margin, with a unit.
|
|
41
|
+
attr_accessor :margin_bottom
|
|
42
|
+
|
|
43
|
+
# The left margin, with a unit.
|
|
44
|
+
attr_accessor :margin_left
|
|
45
|
+
|
|
46
|
+
# The right margin, with a unit.
|
|
47
|
+
attr_accessor :margin_right
|
|
48
|
+
|
|
49
|
+
class EnumAttributeValidator
|
|
50
|
+
attr_reader :datatype
|
|
51
|
+
attr_reader :allowable_values
|
|
52
|
+
|
|
53
|
+
def initialize(datatype, allowable_values)
|
|
54
|
+
@allowable_values = allowable_values.map do |value|
|
|
55
|
+
case datatype.to_s
|
|
56
|
+
when /Integer/i
|
|
57
|
+
value.to_i
|
|
58
|
+
when /Float/i
|
|
59
|
+
value.to_f
|
|
60
|
+
else
|
|
61
|
+
value
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def valid?(value)
|
|
67
|
+
!value || allowable_values.include?(value)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
72
|
+
def self.attribute_map
|
|
73
|
+
{
|
|
74
|
+
:'format' => :'format',
|
|
75
|
+
:'width' => :'width',
|
|
76
|
+
:'height' => :'height',
|
|
77
|
+
:'scale' => :'scale',
|
|
78
|
+
:'landscape' => :'landscape',
|
|
79
|
+
:'print_background' => :'print_background',
|
|
80
|
+
:'margin_top' => :'margin_top',
|
|
81
|
+
:'margin_bottom' => :'margin_bottom',
|
|
82
|
+
:'margin_left' => :'margin_left',
|
|
83
|
+
:'margin_right' => :'margin_right'
|
|
84
|
+
}
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Returns attribute mapping this model knows about
|
|
88
|
+
def self.acceptable_attribute_map
|
|
89
|
+
attribute_map
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Returns all the JSON keys this model knows about
|
|
93
|
+
def self.acceptable_attributes
|
|
94
|
+
acceptable_attribute_map.values
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Attribute type mapping.
|
|
98
|
+
def self.openapi_types
|
|
99
|
+
{
|
|
100
|
+
:'format' => :'PageFormat',
|
|
101
|
+
:'width' => :'String',
|
|
102
|
+
:'height' => :'String',
|
|
103
|
+
:'scale' => :'Float',
|
|
104
|
+
:'landscape' => :'Boolean',
|
|
105
|
+
:'print_background' => :'Boolean',
|
|
106
|
+
:'margin_top' => :'String',
|
|
107
|
+
:'margin_bottom' => :'String',
|
|
108
|
+
:'margin_left' => :'String',
|
|
109
|
+
:'margin_right' => :'String'
|
|
110
|
+
}
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# List of attributes with nullable: true
|
|
114
|
+
def self.openapi_nullable
|
|
115
|
+
Set.new([
|
|
116
|
+
])
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Returns attribute type mapping
|
|
120
|
+
def self.acceptable_openapi_types
|
|
121
|
+
openapi_types
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Returns the nullable attributes
|
|
125
|
+
def self.acceptable_openapi_nullable
|
|
126
|
+
openapi_nullable
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Initializes the object
|
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
131
|
+
def initialize(attributes = {})
|
|
132
|
+
if (!attributes.is_a?(Hash))
|
|
133
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::HtmlEngineOptionsInput` initialize method"
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
137
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
138
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
139
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
140
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::HtmlEngineOptionsInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
141
|
+
end
|
|
142
|
+
h[k.to_sym] = v
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'format')
|
|
146
|
+
self.format = attributes[:'format']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'width')
|
|
150
|
+
self.width = attributes[:'width']
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'height')
|
|
154
|
+
self.height = attributes[:'height']
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'scale')
|
|
158
|
+
self.scale = attributes[:'scale']
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'landscape')
|
|
162
|
+
self.landscape = attributes[:'landscape']
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'print_background')
|
|
166
|
+
self.print_background = attributes[:'print_background']
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'margin_top')
|
|
170
|
+
self.margin_top = attributes[:'margin_top']
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.key?(:'margin_bottom')
|
|
174
|
+
self.margin_bottom = attributes[:'margin_bottom']
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'margin_left')
|
|
178
|
+
self.margin_left = attributes[:'margin_left']
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if attributes.key?(:'margin_right')
|
|
182
|
+
self.margin_right = attributes[:'margin_right']
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
187
|
+
# @return Array for valid properties with the reasons
|
|
188
|
+
def list_invalid_properties
|
|
189
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
190
|
+
invalid_properties = Array.new
|
|
191
|
+
invalid_properties
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Check to see if the all the properties in the model are valid
|
|
195
|
+
# @return true if the model is valid
|
|
196
|
+
def valid?
|
|
197
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
198
|
+
true
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Checks equality by comparing each attribute.
|
|
202
|
+
# @param [Object] Object to be compared
|
|
203
|
+
def ==(o)
|
|
204
|
+
return true if self.equal?(o)
|
|
205
|
+
self.class == o.class &&
|
|
206
|
+
format == o.format &&
|
|
207
|
+
width == o.width &&
|
|
208
|
+
height == o.height &&
|
|
209
|
+
scale == o.scale &&
|
|
210
|
+
landscape == o.landscape &&
|
|
211
|
+
print_background == o.print_background &&
|
|
212
|
+
margin_top == o.margin_top &&
|
|
213
|
+
margin_bottom == o.margin_bottom &&
|
|
214
|
+
margin_left == o.margin_left &&
|
|
215
|
+
margin_right == o.margin_right
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# @see the `==` method
|
|
219
|
+
# @param [Object] Object to be compared
|
|
220
|
+
def eql?(o)
|
|
221
|
+
self == o
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Calculates hash code according to all attributes.
|
|
225
|
+
# @return [Integer] Hash code
|
|
226
|
+
def hash
|
|
227
|
+
[format, width, height, scale, landscape, print_background, margin_top, margin_bottom, margin_left, margin_right].hash
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Builds the object from hash
|
|
231
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
232
|
+
# @return [Object] Returns the model itself
|
|
233
|
+
def self.build_from_hash(attributes)
|
|
234
|
+
return nil unless attributes.is_a?(Hash)
|
|
235
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
236
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
237
|
+
map = acceptable_attribute_map
|
|
238
|
+
transformed_hash = {}
|
|
239
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
240
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
241
|
+
transformed_hash["#{key}"] = nil
|
|
242
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
243
|
+
# check to ensure the input is an array given that the attribute
|
|
244
|
+
# is documented as an array but the input is not
|
|
245
|
+
if attributes[map[key]].is_a?(Array)
|
|
246
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
247
|
+
end
|
|
248
|
+
elsif !attributes[map[key]].nil?
|
|
249
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
253
|
+
# accept any value while the model is built from a response
|
|
254
|
+
allocate.tap do |model|
|
|
255
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
256
|
+
model.send(:initialize, transformed_hash)
|
|
257
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Returns the object in the form of hash
|
|
262
|
+
# @return [Hash] Returns the object in the form of hash
|
|
263
|
+
def to_hash
|
|
264
|
+
hash = {}
|
|
265
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
266
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
267
|
+
value = self.send(attr)
|
|
268
|
+
if value.nil?
|
|
269
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
270
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
hash[param] = _to_hash(value)
|
|
274
|
+
end
|
|
275
|
+
hash
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
end
|