pdf_generator_api_client 4.0.25
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 +7 -0
- data/Gemfile +9 -0
- data/README.md +519 -0
- data/Rakefile +10 -0
- data/docs/AccessibilityOption.md +15 -0
- data/docs/AddWatermarkRequest.md +49 -0
- data/docs/AssetsApi.md +77 -0
- data/docs/AsyncOutputParam.md +15 -0
- data/docs/CallbackParam.md +20 -0
- data/docs/Component.md +34 -0
- data/docs/ConversionApi.md +217 -0
- data/docs/ConvertHTML2PDFRequest.md +26 -0
- data/docs/ConvertPDF2ImageRequest.md +32 -0
- data/docs/ConvertURL2PDFRequest.md +26 -0
- data/docs/CopyTemplateRequest.md +18 -0
- data/docs/CreateEInvoiceRequest.md +22 -0
- data/docs/CreateFacturXEInvoiceRequest.md +26 -0
- data/docs/CreateFacturXEInvoiceRequestTemplate.md +22 -0
- data/docs/CreateWorkspaceRequest.md +18 -0
- data/docs/DataBatchInner.md +20 -0
- data/docs/Document.md +26 -0
- data/docs/DocumentsApi.md +646 -0
- data/docs/EInvoicesApi.md +284 -0
- data/docs/EncryptAndDecryptBase64.md +26 -0
- data/docs/EncryptAndDecryptUrl.md +26 -0
- data/docs/EncryptDocumentRequest.md +49 -0
- data/docs/ExtractFormFieldsRequest.md +49 -0
- data/docs/FillFormFieldsRequest.md +49 -0
- data/docs/FormActionDownload.md +18 -0
- data/docs/FormActionSend.md +18 -0
- data/docs/FormActionSendSendDocument.md +20 -0
- data/docs/FormActionSendSendDocumentHeadersInner.md +20 -0
- data/docs/FormActionStore.md +18 -0
- data/docs/FormConfiguration.md +22 -0
- data/docs/FormConfigurationNew.md +26 -0
- data/docs/FormConfigurationNewActionsInner.md +22 -0
- data/docs/FormFieldsBase64.md +20 -0
- data/docs/FormFieldsInner.md +24 -0
- data/docs/FormFieldsUrl.md +20 -0
- data/docs/FormFillBase64.md +24 -0
- data/docs/FormFillUrl.md +24 -0
- data/docs/FormatParam.md +15 -0
- data/docs/FormsApi.md +639 -0
- data/docs/GenerateDocumentAsynchronousRequest.md +32 -0
- data/docs/GenerateDocumentBatchAsynchronousRequest.md +30 -0
- data/docs/GenerateDocumentBatchRequest.md +28 -0
- data/docs/GenerateDocumentRequest.md +30 -0
- data/docs/GenerateQRCode201Response.md +20 -0
- data/docs/GenerateQRCode201ResponseMeta.md +20 -0
- data/docs/GenerateQRCodeRequest.md +26 -0
- data/docs/GetStatus200Response.md +28 -0
- data/docs/GetTemplateLibrary200Response.md +18 -0
- data/docs/GetTemplateVersion422Response.md +18 -0
- data/docs/ImportFormBase64.md +20 -0
- data/docs/ImportFormRequest.md +49 -0
- data/docs/ImportFormUrl.md +20 -0
- data/docs/ImportTemplateBase64.md +20 -0
- data/docs/ImportTemplateRequest.md +49 -0
- data/docs/ImportTemplateUrl.md +20 -0
- data/docs/ImportTemplateUrlTemplate.md +18 -0
- data/docs/InlineObject.md +20 -0
- data/docs/InlineObject1.md +18 -0
- data/docs/InlineObject10.md +20 -0
- data/docs/InlineObject10Meta.md +24 -0
- data/docs/InlineObject11.md +20 -0
- data/docs/InlineObject11Meta.md +26 -0
- data/docs/InlineObject12.md +20 -0
- data/docs/InlineObject12Meta.md +28 -0
- data/docs/InlineObject12MetaStats.md +20 -0
- data/docs/InlineObject13.md +20 -0
- data/docs/InlineObject14.md +18 -0
- data/docs/InlineObject14ResponseValue.md +46 -0
- data/docs/InlineObject14ResponseValueDefault.md +51 -0
- data/docs/InlineObject14ResponseValueValue.md +51 -0
- data/docs/InlineObject15.md +20 -0
- data/docs/InlineObject16.md +20 -0
- data/docs/InlineObject17.md +18 -0
- data/docs/InlineObject18.md +20 -0
- data/docs/InlineObject18Meta.md +18 -0
- data/docs/InlineObject19.md +18 -0
- data/docs/InlineObject1Response.md +18 -0
- data/docs/InlineObject2.md +18 -0
- data/docs/InlineObject20.md +18 -0
- data/docs/InlineObject20Response.md +18 -0
- data/docs/InlineObject21.md +18 -0
- data/docs/InlineObject22.md +18 -0
- data/docs/InlineObject23.md +18 -0
- data/docs/InlineObject24.md +18 -0
- data/docs/InlineObject25.md +20 -0
- data/docs/InlineObject26.md +18 -0
- data/docs/InlineObject27.md +18 -0
- data/docs/InlineObject3.md +18 -0
- data/docs/InlineObject4.md +20 -0
- data/docs/InlineObject5.md +20 -0
- data/docs/InlineObject6.md +20 -0
- data/docs/InlineObject7.md +18 -0
- data/docs/InlineObject7Response.md +18 -0
- data/docs/InlineObject8.md +18 -0
- data/docs/InlineObject9.md +20 -0
- data/docs/InlineObject9Meta.md +26 -0
- data/docs/InlineObjectMeta.md +20 -0
- data/docs/KeyFieldParam.md +15 -0
- data/docs/MakeAccessibleBase64.md +26 -0
- data/docs/MakeAccessibleRequest.md +49 -0
- data/docs/MakeAccessibleUrl.md +26 -0
- data/docs/MetadataParam.md +20 -0
- data/docs/MiscApi.md +74 -0
- data/docs/OpenEditorRequest.md +20 -0
- data/docs/OpenEditorRequestData.md +49 -0
- data/docs/OptimizeBase64.md +22 -0
- data/docs/OptimizeDocumentRequest.md +49 -0
- data/docs/OptimizeUrl.md +22 -0
- data/docs/OutputParam.md +15 -0
- data/docs/PaginationMeta.md +22 -0
- data/docs/PromoteTemplateVersion200Response.md +18 -0
- data/docs/PublicTemplateLibraryItem.md +26 -0
- data/docs/ServicesApi.md +497 -0
- data/docs/StatusParam.md +15 -0
- data/docs/StoreDocumentRequest.md +24 -0
- data/docs/Template.md +28 -0
- data/docs/TemplateDefinition.md +32 -0
- data/docs/TemplateDefinitionDataSettings.md +20 -0
- data/docs/TemplateDefinitionEditor.md +18 -0
- data/docs/TemplateDefinitionNew.md +34 -0
- data/docs/TemplateDefinitionNewDataSettings.md +22 -0
- data/docs/TemplateDefinitionNewEditor.md +18 -0
- data/docs/TemplateDefinitionNewLayout.md +34 -0
- data/docs/TemplateDefinitionNewLayoutMargins.md +24 -0
- data/docs/TemplateDefinitionNewLayoutRepeatLayout.md +22 -0
- data/docs/TemplateDefinitionNewPagesInner.md +32 -0
- data/docs/TemplateDefinitionNewPagesInnerMargins.md +20 -0
- data/docs/TemplateDefinitionPagesInner.md +24 -0
- data/docs/TemplateLibraryApi.md +139 -0
- data/docs/TemplateParam.md +22 -0
- data/docs/TemplateParamData.md +49 -0
- data/docs/TemplateParamId.md +49 -0
- data/docs/TemplateVersion.md +36 -0
- data/docs/TemplateVersionCollection.md +20 -0
- data/docs/TemplateVersionCollectionMeta.md +22 -0
- data/docs/TemplateVersionsApi.md +298 -0
- data/docs/TemplatesApi.md +791 -0
- data/docs/WatermarkBase64.md +24 -0
- data/docs/WatermarkFileUrlWatermark.md +20 -0
- data/docs/WatermarkImage.md +26 -0
- data/docs/WatermarkImageContentBase64.md +24 -0
- data/docs/WatermarkImageContentUrl.md +24 -0
- data/docs/WatermarkPosition.md +15 -0
- data/docs/WatermarkText.md +28 -0
- data/docs/Workspace.md +24 -0
- data/docs/WorkspacesApi.md +292 -0
- data/git_push.sh +57 -0
- data/lib/pdf_generator_api_client/api/assets_api.rb +90 -0
- data/lib/pdf_generator_api_client/api/conversion_api.rb +226 -0
- data/lib/pdf_generator_api_client/api/documents_api.rb +623 -0
- data/lib/pdf_generator_api_client/api/e_invoices_api.rb +283 -0
- data/lib/pdf_generator_api_client/api/forms_api.rb +604 -0
- data/lib/pdf_generator_api_client/api/misc_api.rb +79 -0
- data/lib/pdf_generator_api_client/api/services_api.rb +498 -0
- data/lib/pdf_generator_api_client/api/template_library_api.rb +145 -0
- data/lib/pdf_generator_api_client/api/template_versions_api.rb +298 -0
- data/lib/pdf_generator_api_client/api/templates_api.rb +766 -0
- data/lib/pdf_generator_api_client/api/workspaces_api.rb +275 -0
- data/lib/pdf_generator_api_client/api_client.rb +393 -0
- data/lib/pdf_generator_api_client/api_error.rb +58 -0
- data/lib/pdf_generator_api_client/configuration.rb +309 -0
- data/lib/pdf_generator_api_client/models/accessibility_option.rb +47 -0
- data/lib/pdf_generator_api_client/models/add_watermark_request.rb +105 -0
- data/lib/pdf_generator_api_client/models/async_output_param.rb +41 -0
- data/lib/pdf_generator_api_client/models/callback_param.rb +232 -0
- data/lib/pdf_generator_api_client/models/component.rb +336 -0
- data/lib/pdf_generator_api_client/models/convert_html2_pdf_request.rb +324 -0
- data/lib/pdf_generator_api_client/models/convert_pdf2_image_request.rb +422 -0
- data/lib/pdf_generator_api_client/models/convert_url2_pdf_request.rb +324 -0
- data/lib/pdf_generator_api_client/models/copy_template_request.rb +221 -0
- data/lib/pdf_generator_api_client/models/create_e_invoice_request.rb +308 -0
- data/lib/pdf_generator_api_client/models/create_factur_xe_invoice_request.rb +315 -0
- data/lib/pdf_generator_api_client/models/create_factur_xe_invoice_request_template.rb +242 -0
- data/lib/pdf_generator_api_client/models/create_workspace_request.rb +221 -0
- data/lib/pdf_generator_api_client/models/data_batch_inner.rb +231 -0
- data/lib/pdf_generator_api_client/models/document.rb +261 -0
- data/lib/pdf_generator_api_client/models/encrypt_and_decrypt_base64.rb +331 -0
- data/lib/pdf_generator_api_client/models/encrypt_and_decrypt_url.rb +331 -0
- data/lib/pdf_generator_api_client/models/encrypt_document_request.rb +105 -0
- data/lib/pdf_generator_api_client/models/extract_form_fields_request.rb +105 -0
- data/lib/pdf_generator_api_client/models/fill_form_fields_request.rb +105 -0
- data/lib/pdf_generator_api_client/models/form_action_download.rb +221 -0
- data/lib/pdf_generator_api_client/models/form_action_send.rb +221 -0
- data/lib/pdf_generator_api_client/models/form_action_send_send_document.rb +250 -0
- data/lib/pdf_generator_api_client/models/form_action_send_send_document_headers_inner.rb +283 -0
- data/lib/pdf_generator_api_client/models/form_action_store.rb +221 -0
- data/lib/pdf_generator_api_client/models/form_configuration.rb +290 -0
- data/lib/pdf_generator_api_client/models/form_configuration_new.rb +264 -0
- data/lib/pdf_generator_api_client/models/form_configuration_new_actions_inner.rb +105 -0
- data/lib/pdf_generator_api_client/models/form_fields_base64.rb +271 -0
- data/lib/pdf_generator_api_client/models/form_fields_inner.rb +286 -0
- data/lib/pdf_generator_api_client/models/form_fields_url.rb +271 -0
- data/lib/pdf_generator_api_client/models/form_fill_base64.rb +321 -0
- data/lib/pdf_generator_api_client/models/form_fill_url.rb +321 -0
- data/lib/pdf_generator_api_client/models/format_param.rb +40 -0
- data/lib/pdf_generator_api_client/models/generate_document_asynchronous_request.rb +318 -0
- data/lib/pdf_generator_api_client/models/generate_document_batch_asynchronous_request.rb +308 -0
- data/lib/pdf_generator_api_client/models/generate_document_batch_request.rb +299 -0
- data/lib/pdf_generator_api_client/models/generate_document_request.rb +309 -0
- data/lib/pdf_generator_api_client/models/generate_qr_code201_response.rb +230 -0
- data/lib/pdf_generator_api_client/models/generate_qr_code201_response_meta.rb +231 -0
- data/lib/pdf_generator_api_client/models/generate_qr_code_request.rb +316 -0
- data/lib/pdf_generator_api_client/models/get_status200_response.rb +299 -0
- data/lib/pdf_generator_api_client/models/get_template_library200_response.rb +222 -0
- data/lib/pdf_generator_api_client/models/get_template_version422_response.rb +220 -0
- data/lib/pdf_generator_api_client/models/import_form_base64.rb +247 -0
- data/lib/pdf_generator_api_client/models/import_form_request.rb +105 -0
- data/lib/pdf_generator_api_client/models/import_form_url.rb +247 -0
- data/lib/pdf_generator_api_client/models/import_template_base64.rb +264 -0
- data/lib/pdf_generator_api_client/models/import_template_request.rb +105 -0
- data/lib/pdf_generator_api_client/models/import_template_url.rb +264 -0
- data/lib/pdf_generator_api_client/models/import_template_url_template.rb +238 -0
- data/lib/pdf_generator_api_client/models/inline_object.rb +230 -0
- data/lib/pdf_generator_api_client/models/inline_object1.rb +220 -0
- data/lib/pdf_generator_api_client/models/inline_object10.rb +232 -0
- data/lib/pdf_generator_api_client/models/inline_object10_meta.rb +251 -0
- data/lib/pdf_generator_api_client/models/inline_object11.rb +230 -0
- data/lib/pdf_generator_api_client/models/inline_object11_meta.rb +261 -0
- data/lib/pdf_generator_api_client/models/inline_object12.rb +230 -0
- data/lib/pdf_generator_api_client/models/inline_object12_meta.rb +270 -0
- data/lib/pdf_generator_api_client/models/inline_object12_meta_stats.rb +231 -0
- data/lib/pdf_generator_api_client/models/inline_object13.rb +265 -0
- data/lib/pdf_generator_api_client/models/inline_object14.rb +223 -0
- data/lib/pdf_generator_api_client/models/inline_object14_response_value.rb +401 -0
- data/lib/pdf_generator_api_client/models/inline_object14_response_value_default.rb +107 -0
- data/lib/pdf_generator_api_client/models/inline_object14_response_value_value.rb +107 -0
- data/lib/pdf_generator_api_client/models/inline_object15.rb +231 -0
- data/lib/pdf_generator_api_client/models/inline_object16.rb +229 -0
- data/lib/pdf_generator_api_client/models/inline_object17.rb +220 -0
- data/lib/pdf_generator_api_client/models/inline_object18.rb +230 -0
- data/lib/pdf_generator_api_client/models/inline_object18_meta.rb +221 -0
- data/lib/pdf_generator_api_client/models/inline_object19.rb +221 -0
- data/lib/pdf_generator_api_client/models/inline_object1_response.rb +223 -0
- data/lib/pdf_generator_api_client/models/inline_object2.rb +220 -0
- data/lib/pdf_generator_api_client/models/inline_object20.rb +220 -0
- data/lib/pdf_generator_api_client/models/inline_object20_response.rb +221 -0
- data/lib/pdf_generator_api_client/models/inline_object21.rb +255 -0
- data/lib/pdf_generator_api_client/models/inline_object22.rb +255 -0
- data/lib/pdf_generator_api_client/models/inline_object23.rb +255 -0
- data/lib/pdf_generator_api_client/models/inline_object24.rb +255 -0
- data/lib/pdf_generator_api_client/models/inline_object25.rb +231 -0
- data/lib/pdf_generator_api_client/models/inline_object26.rb +221 -0
- data/lib/pdf_generator_api_client/models/inline_object27.rb +221 -0
- data/lib/pdf_generator_api_client/models/inline_object3.rb +220 -0
- data/lib/pdf_generator_api_client/models/inline_object4.rb +231 -0
- data/lib/pdf_generator_api_client/models/inline_object5.rb +231 -0
- data/lib/pdf_generator_api_client/models/inline_object6.rb +231 -0
- data/lib/pdf_generator_api_client/models/inline_object7.rb +220 -0
- data/lib/pdf_generator_api_client/models/inline_object7_response.rb +220 -0
- data/lib/pdf_generator_api_client/models/inline_object8.rb +220 -0
- data/lib/pdf_generator_api_client/models/inline_object9.rb +230 -0
- data/lib/pdf_generator_api_client/models/inline_object9_meta.rb +261 -0
- data/lib/pdf_generator_api_client/models/inline_object_meta.rb +231 -0
- data/lib/pdf_generator_api_client/models/key_field_param.rb +40 -0
- data/lib/pdf_generator_api_client/models/make_accessible_base64.rb +315 -0
- data/lib/pdf_generator_api_client/models/make_accessible_request.rb +105 -0
- data/lib/pdf_generator_api_client/models/make_accessible_url.rb +315 -0
- data/lib/pdf_generator_api_client/models/metadata_param.rb +236 -0
- data/lib/pdf_generator_api_client/models/open_editor_request.rb +264 -0
- data/lib/pdf_generator_api_client/models/open_editor_request_data.rb +106 -0
- data/lib/pdf_generator_api_client/models/optimize_base64.rb +294 -0
- data/lib/pdf_generator_api_client/models/optimize_document_request.rb +105 -0
- data/lib/pdf_generator_api_client/models/optimize_url.rb +294 -0
- data/lib/pdf_generator_api_client/models/output_param.rb +42 -0
- data/lib/pdf_generator_api_client/models/pagination_meta.rb +239 -0
- data/lib/pdf_generator_api_client/models/promote_template_version200_response.rb +220 -0
- data/lib/pdf_generator_api_client/models/public_template_library_item.rb +265 -0
- data/lib/pdf_generator_api_client/models/status_param.rb +40 -0
- data/lib/pdf_generator_api_client/models/store_document_request.rb +289 -0
- data/lib/pdf_generator_api_client/models/template.rb +274 -0
- data/lib/pdf_generator_api_client/models/template_definition.rb +292 -0
- data/lib/pdf_generator_api_client/models/template_definition_data_settings.rb +234 -0
- data/lib/pdf_generator_api_client/models/template_definition_editor.rb +221 -0
- data/lib/pdf_generator_api_client/models/template_definition_new.rb +324 -0
- data/lib/pdf_generator_api_client/models/template_definition_new_data_settings.rb +245 -0
- data/lib/pdf_generator_api_client/models/template_definition_new_editor.rb +221 -0
- data/lib/pdf_generator_api_client/models/template_definition_new_layout.rb +377 -0
- data/lib/pdf_generator_api_client/models/template_definition_new_layout_margins.rb +248 -0
- data/lib/pdf_generator_api_client/models/template_definition_new_layout_repeat_layout.rb +276 -0
- data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner.rb +295 -0
- data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner_margins.rb +231 -0
- data/lib/pdf_generator_api_client/models/template_definition_pages_inner.rb +251 -0
- data/lib/pdf_generator_api_client/models/template_param.rb +240 -0
- data/lib/pdf_generator_api_client/models/template_param_data.rb +105 -0
- data/lib/pdf_generator_api_client/models/template_param_id.rb +106 -0
- data/lib/pdf_generator_api_client/models/template_version.rb +301 -0
- data/lib/pdf_generator_api_client/models/template_version_collection.rb +231 -0
- data/lib/pdf_generator_api_client/models/template_version_collection_meta.rb +238 -0
- data/lib/pdf_generator_api_client/models/watermark_base64.rb +320 -0
- data/lib/pdf_generator_api_client/models/watermark_file_url_watermark.rb +229 -0
- data/lib/pdf_generator_api_client/models/watermark_image.rb +104 -0
- data/lib/pdf_generator_api_client/models/watermark_image_content_base64.rb +351 -0
- data/lib/pdf_generator_api_client/models/watermark_image_content_url.rb +351 -0
- data/lib/pdf_generator_api_client/models/watermark_position.rb +47 -0
- data/lib/pdf_generator_api_client/models/watermark_text.rb +403 -0
- data/lib/pdf_generator_api_client/models/workspace.rb +250 -0
- data/lib/pdf_generator_api_client/version.rb +15 -0
- data/lib/pdf_generator_api_client.rb +185 -0
- data/pdf_generator_api_client.gemspec +39 -0
- data/spec/api/assets_api_spec.rb +47 -0
- data/spec/api/conversion_api_spec.rb +71 -0
- data/spec/api/documents_api_spec.rb +147 -0
- data/spec/api/e_invoices_api_spec.rb +82 -0
- data/spec/api/forms_api_spec.rb +144 -0
- data/spec/api/misc_api_spec.rb +46 -0
- data/spec/api/services_api_spec.rb +119 -0
- data/spec/api/template_library_api_spec.rb +59 -0
- data/spec/api/template_versions_api_spec.rb +88 -0
- data/spec/api/templates_api_spec.rb +173 -0
- data/spec/api/workspaces_api_spec.rb +84 -0
- data/spec/models/accessibility_option_spec.rb +30 -0
- data/spec/models/add_watermark_request_spec.rb +32 -0
- data/spec/models/async_output_param_spec.rb +30 -0
- data/spec/models/callback_param_spec.rb +42 -0
- data/spec/models/component_spec.rb +88 -0
- data/spec/models/convert_html2_pdf_request_spec.rb +72 -0
- data/spec/models/convert_pdf2_image_request_spec.rb +86 -0
- data/spec/models/convert_url2_pdf_request_spec.rb +72 -0
- data/spec/models/copy_template_request_spec.rb +36 -0
- data/spec/models/create_e_invoice_request_spec.rb +56 -0
- data/spec/models/create_factur_xe_invoice_request_spec.rb +64 -0
- data/spec/models/create_factur_xe_invoice_request_template_spec.rb +48 -0
- data/spec/models/create_workspace_request_spec.rb +36 -0
- data/spec/models/data_batch_inner_spec.rb +42 -0
- data/spec/models/document_spec.rb +60 -0
- data/spec/models/encrypt_and_decrypt_base64_spec.rb +64 -0
- data/spec/models/encrypt_and_decrypt_url_spec.rb +64 -0
- data/spec/models/encrypt_document_request_spec.rb +32 -0
- data/spec/models/extract_form_fields_request_spec.rb +32 -0
- data/spec/models/fill_form_fields_request_spec.rb +32 -0
- data/spec/models/form_action_download_spec.rb +36 -0
- data/spec/models/form_action_send_send_document_headers_inner_spec.rb +42 -0
- data/spec/models/form_action_send_send_document_spec.rb +42 -0
- data/spec/models/form_action_send_spec.rb +36 -0
- data/spec/models/form_action_store_spec.rb +36 -0
- data/spec/models/form_configuration_new_actions_inner_spec.rb +21 -0
- data/spec/models/form_configuration_new_spec.rb +60 -0
- data/spec/models/form_configuration_spec.rb +48 -0
- data/spec/models/form_fields_base64_spec.rb +42 -0
- data/spec/models/form_fields_inner_spec.rb +58 -0
- data/spec/models/form_fields_url_spec.rb +42 -0
- data/spec/models/form_fill_base64_spec.rb +58 -0
- data/spec/models/form_fill_url_spec.rb +58 -0
- data/spec/models/format_param_spec.rb +30 -0
- data/spec/models/generate_document_asynchronous_request_spec.rb +78 -0
- data/spec/models/generate_document_batch_asynchronous_request_spec.rb +72 -0
- data/spec/models/generate_document_batch_request_spec.rb +66 -0
- data/spec/models/generate_document_request_spec.rb +72 -0
- data/spec/models/generate_qr_code201_response_meta_spec.rb +42 -0
- data/spec/models/generate_qr_code201_response_spec.rb +42 -0
- data/spec/models/generate_qr_code_request_spec.rb +64 -0
- data/spec/models/get_status200_response_spec.rb +66 -0
- data/spec/models/get_template_library200_response_spec.rb +36 -0
- data/spec/models/get_template_version422_response_spec.rb +36 -0
- data/spec/models/import_form_base64_spec.rb +42 -0
- data/spec/models/import_form_request_spec.rb +32 -0
- data/spec/models/import_form_url_spec.rb +42 -0
- data/spec/models/import_template_base64_spec.rb +42 -0
- data/spec/models/import_template_request_spec.rb +32 -0
- data/spec/models/import_template_url_spec.rb +42 -0
- data/spec/models/import_template_url_template_spec.rb +36 -0
- data/spec/models/inline_object10_meta_spec.rb +54 -0
- data/spec/models/inline_object10_spec.rb +42 -0
- data/spec/models/inline_object11_meta_spec.rb +60 -0
- data/spec/models/inline_object11_spec.rb +42 -0
- data/spec/models/inline_object12_meta_spec.rb +66 -0
- data/spec/models/inline_object12_meta_stats_spec.rb +42 -0
- data/spec/models/inline_object12_spec.rb +42 -0
- data/spec/models/inline_object13_spec.rb +46 -0
- data/spec/models/inline_object14_response_value_default_spec.rb +32 -0
- data/spec/models/inline_object14_response_value_spec.rb +124 -0
- data/spec/models/inline_object14_response_value_value_spec.rb +32 -0
- data/spec/models/inline_object14_spec.rb +36 -0
- data/spec/models/inline_object15_spec.rb +42 -0
- data/spec/models/inline_object16_spec.rb +42 -0
- data/spec/models/inline_object17_spec.rb +36 -0
- data/spec/models/inline_object18_meta_spec.rb +36 -0
- data/spec/models/inline_object18_spec.rb +42 -0
- data/spec/models/inline_object19_spec.rb +36 -0
- data/spec/models/inline_object1_response_spec.rb +36 -0
- data/spec/models/inline_object1_spec.rb +36 -0
- data/spec/models/inline_object20_response_spec.rb +36 -0
- data/spec/models/inline_object20_spec.rb +36 -0
- data/spec/models/inline_object21_spec.rb +40 -0
- data/spec/models/inline_object22_spec.rb +40 -0
- data/spec/models/inline_object23_spec.rb +40 -0
- data/spec/models/inline_object24_spec.rb +40 -0
- data/spec/models/inline_object25_spec.rb +42 -0
- data/spec/models/inline_object26_spec.rb +36 -0
- data/spec/models/inline_object27_spec.rb +36 -0
- data/spec/models/inline_object2_spec.rb +36 -0
- data/spec/models/inline_object3_spec.rb +36 -0
- data/spec/models/inline_object4_spec.rb +42 -0
- data/spec/models/inline_object5_spec.rb +42 -0
- data/spec/models/inline_object6_spec.rb +42 -0
- data/spec/models/inline_object7_response_spec.rb +36 -0
- data/spec/models/inline_object7_spec.rb +36 -0
- data/spec/models/inline_object8_spec.rb +36 -0
- data/spec/models/inline_object9_meta_spec.rb +60 -0
- data/spec/models/inline_object9_spec.rb +42 -0
- data/spec/models/inline_object_meta_spec.rb +42 -0
- data/spec/models/inline_object_spec.rb +42 -0
- data/spec/models/key_field_param_spec.rb +30 -0
- data/spec/models/make_accessible_base64_spec.rb +64 -0
- data/spec/models/make_accessible_request_spec.rb +32 -0
- data/spec/models/make_accessible_url_spec.rb +64 -0
- data/spec/models/metadata_param_spec.rb +42 -0
- data/spec/models/open_editor_request_data_spec.rb +32 -0
- data/spec/models/open_editor_request_spec.rb +46 -0
- data/spec/models/optimize_base64_spec.rb +52 -0
- data/spec/models/optimize_document_request_spec.rb +32 -0
- data/spec/models/optimize_url_spec.rb +52 -0
- data/spec/models/output_param_spec.rb +30 -0
- data/spec/models/pagination_meta_spec.rb +48 -0
- data/spec/models/promote_template_version200_response_spec.rb +36 -0
- data/spec/models/public_template_library_item_spec.rb +60 -0
- data/spec/models/status_param_spec.rb +30 -0
- data/spec/models/store_document_request_spec.rb +58 -0
- data/spec/models/template_definition_data_settings_spec.rb +42 -0
- data/spec/models/template_definition_editor_spec.rb +36 -0
- data/spec/models/template_definition_new_data_settings_spec.rb +48 -0
- data/spec/models/template_definition_new_editor_spec.rb +36 -0
- data/spec/models/template_definition_new_layout_margins_spec.rb +54 -0
- data/spec/models/template_definition_new_layout_repeat_layout_spec.rb +52 -0
- data/spec/models/template_definition_new_layout_spec.rb +100 -0
- data/spec/models/template_definition_new_pages_inner_margins_spec.rb +42 -0
- data/spec/models/template_definition_new_pages_inner_spec.rb +78 -0
- data/spec/models/template_definition_new_spec.rb +84 -0
- data/spec/models/template_definition_pages_inner_spec.rb +54 -0
- data/spec/models/template_definition_spec.rb +78 -0
- data/spec/models/template_param_data_spec.rb +32 -0
- data/spec/models/template_param_id_spec.rb +32 -0
- data/spec/models/template_param_spec.rb +48 -0
- data/spec/models/template_spec.rb +66 -0
- data/spec/models/template_version_collection_meta_spec.rb +48 -0
- data/spec/models/template_version_collection_spec.rb +42 -0
- data/spec/models/template_version_spec.rb +90 -0
- data/spec/models/watermark_base64_spec.rb +58 -0
- data/spec/models/watermark_file_url_watermark_spec.rb +42 -0
- data/spec/models/watermark_image_content_base64_spec.rb +54 -0
- data/spec/models/watermark_image_content_url_spec.rb +54 -0
- data/spec/models/watermark_image_spec.rb +21 -0
- data/spec/models/watermark_position_spec.rb +30 -0
- data/spec/models/watermark_text_spec.rb +66 -0
- data/spec/models/workspace_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +679 -0
|
@@ -0,0 +1,766 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PDF Generator API
|
|
3
|
+
|
|
4
|
+
## Introduction [PDF Generator API](https://pdfgeneratorapi.com) allows you easily generate transactional PDF documents and reduce the development and support costs by enabling your users to create and manage their document templates using a browser-based drag-and-drop document editor. The PDF Generator API features a web API architecture, allowing you to code in the language of your choice. This API supports the JSON media type, and uses UTF-8 character encoding. ## Base URL The base URL for all the API endpoints is `https://us1.pdfgeneratorapi.com/api/v4` For example * `https://us1.pdfgeneratorapi.com/api/v4/templates` * `https://us1.pdfgeneratorapi.com/api/v4/workspaces` * `https://us1.pdfgeneratorapi.com/api/v4/templates/123123` ## Editor PDF Generator API comes with a powerful drag & drop editor that allows to create any kind of document templates, from barcode labels to invoices, quotes and reports. You can find tutorials and videos from our [Support Portal](https://support.pdfgeneratorapi.com). * [Component specification](https://support.pdfgeneratorapi.com/en/category/components-1ffseaj/) * [Expression Language documentation](https://support.pdfgeneratorapi.com/en/category/expression-language-q203pa/) * [Frequently asked questions and answers](https://support.pdfgeneratorapi.com/en/category/qanda-1ov519d/) ## Definitions ### Organization Organization is a group of workspaces owned by your account. ### Workspace Workspace contains templates. Each workspace has access to their own templates and organization default templates. ### Master Workspace Master Workspace is the main/default workspace of your Organization. The Master Workspace identifier is the email you signed up with. ### Default Template Default template is a template that is available for all workspaces by default. You can set the template access type under Page Setup. If template has \"Organization\" access then your users can use them from the \"New\" menu in the Editor. ### Data Field Data Field is a placeholder for the specific data in your JSON data set. In this example JSON you can access the buyer name using Data Field `{paymentDetails::buyerName}`. The separator between depth levels is :: (two colons). When designing the template you don’t have to know every Data Field, our editor automatically extracts all the available fields from your data set and provides an easy way to insert them into the template. ``` { \"documentNumber\": 1, \"paymentDetails\": { \"method\": \"Credit Card\", \"buyerName\": \"John Smith\" }, \"items\": [ { \"id\": 1, \"name\": \"Item one\" } ] } ``` ## Rate limiting Our API endpoints use IP-based rate limiting and allow you to make up to 2 requests per second and 60 requests per minute. If you make more requests, you will receive a response with HTTP code 429. Response headers contain additional values: | Header | Description | |--------|--------------------------------| | X-RateLimit-Limit | Maximum requests per minute | | X-RateLimit-Remaining | The requests remaining in the current minute | | Retry-After | How many seconds you need to wait until you are allowed to make requests | * * * * * # Libraries and SDKs ## Postman Collection We have created a [Postman Collection](https://www.postman.com/pdfgeneratorapi/workspace/pdf-generator-api-public-workspace/overview) so you can easily test all the API endpoints without developing and code. ## Client Libraries All our Client Libraries are auto-generated using [OpenAPI Generator](https://openapi-generator.tech/) which uses the OpenAPI v3 specification to automatically generate a client library in specific programming language. * [PHP Client](https://github.com/pdfgeneratorapi/php-client) * [Java Client](https://github.com/pdfgeneratorapi/java-client) * [Ruby Client](https://github.com/pdfgeneratorapi/ruby-client) * [Python Client](https://github.com/pdfgeneratorapi/python-client) * [Javascript Client](https://github.com/pdfgeneratorapi/javascript-client) We have validated the generated libraries, but let us know if you find any anomalies in the client code. ## Model Context Protocol (MCP) Server Integrate document generation directly into your AI agents and LLM applications using our official Model Context Protocol (MCP) Server. The MCP server provides a standardized interface that allows AI assistants (like Claude Desktop and other MCP-compatible clients) to securely interact with the PDF Generator API. With it, your AI applications can automatically fetch workspaces, retrieve templates, merge data, and generate PDF documents on the fly. [Get PDF Generator API MCP Server](https://github.com/pdfgeneratorapi/mcp-server) * * * * * # Authentication The PDF Generator API uses __JSON Web Tokens (JWT)__ to authenticate all API requests. These tokens offer a method to establish secure server-to-server authentication by transferring a compact JSON object with a signed payload of your account’s API Key and Secret. When authenticating to the PDF Generator API, a JWT should be generated uniquely by a __server-side application__ and included as a __Bearer Token__ in the header of each request. <SecurityDefinitions /> ## Accessing your API Key and Secret You can find your __API Key__ and __API Secret__ from the __Account Settings__ page after you login to PDF Generator API [here](https://pdfgeneratorapi.com/login). ## Creating a JWT JSON Web Tokens are composed of three sections: a header, a payload (containing a claim set), and a signature. The header and payload are JSON objects, which are serialized to UTF-8 bytes, then encoded using base64url encoding. The JWT's header, payload, and signature are concatenated with periods (.). As a result, a JWT typically takes the following form: ``` {Base64url encoded header}.{Base64url encoded payload}.{Base64url encoded signature} ``` We recommend and support libraries provided on [jwt.io](https://jwt.io/). While other libraries can create JWT, these recommended libraries are the most robust. ### Header Property `alg` defines which signing algorithm is being used. PDF Generator API users HS256. Property `typ` defines the type of token and it is always JWT. ``` { \"alg\": \"HS256\", \"typ\": \"JWT\" } ``` ### Payload The second part of the token is the payload, which contains the claims or the pieces of information being passed about the user and any metadata required. It is mandatory to specify the following claims: * issuer (`iss`): Your API key * subject (`sub`): Workspace identifier * expiration time (`exp`): Timestamp (unix epoch time) until the token is valid. It is highly recommended to set the exp timestamp for a short period, i.e. a matter of seconds. This way, if a token is intercepted or shared, the token will only be valid for a short period of time. ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"exp\": 1586112639 } ``` ### Payload for Partners Our partners can send their unique identifier (provided by us) in JWT's partner_id claim. If the `partner_id` value is specified in the JWT, the organization making the request is automatically connected to the partner account. * Partner ID (`partner_id`): Unique identifier provide by PDF Generator API team ``` { \"iss\": \"ad54aaff89ffdfeff178bb8a8f359b29fcb20edb56250b9f584aa2cb0162ed4a\", \"sub\": \"demo.example@actualreports.com\", \"partner_id\": \"my-partner-identifier\", \"exp\": 1586112639 } ``` ### Signature To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that. The signature is used to verify the message wasn't changed along the way, and, in the case of tokens signed with a private key, it can also verify that the sender of the JWT is who it says it is. ``` HMACSHA256( base64UrlEncode(header) + \".\" + base64UrlEncode(payload), API_SECRET) ``` ### Putting all together The output is three Base64-URL strings separated by dots. The following shows a JWT that has the previous header and payload encoded, and it is signed with a secret. ``` eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0.SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q // Base64 encoded header: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 // Base64 encoded payload: eyJpc3MiOiJhZDU0YWFmZjg5ZmZkZmVmZjE3OGJiOGE4ZjM1OWIyOWZjYjIwZWRiNTYyNTBiOWY1ODRhYTJjYjAxNjJlZDRhIiwic3ViIjoiZGVtby5leGFtcGxlQGFjdHVhbHJlcG9ydHMuY29tIn0 // Signature: SxO-H7UYYYsclS8RGWO1qf0z1cB1m73wF9FLl9RCc1Q ``` ## Temporary JWTs You can create a temporary token in [Account Settings](https://pdfgeneratorapi.com/account/organization) page after you login to PDF Generator API. The generated token uses your email address as the subject (`sub`) value and is valid for __15 minutes__. You can also use [jwt.io](https://jwt.io/) to generate test tokens for your API calls. These test tokens should never be used in production applications. * * * * * # Error codes | Code | Description | |--------|--------------------------------| | 401 | Unauthorized | | 402 | Payment Required | | 403 | Forbidden | | 404 | Not Found | | 422 | Unprocessable Entity | | 429 | Too Many Requests | | 500 | Internal Server Error | ## 401 Unauthorized | Description | |-------------------------------------------------------------------------| | Authentication failed: request expired | | Authentication failed: workspace missing | | Authentication failed: key missing | | Authentication failed: property 'iss' (issuer) missing in JWT | | Authentication failed: property 'sub' (subject) missing in JWT | | Authentication failed: property 'exp' (expiration time) missing in JWT | | Authentication failed: incorrect signature | ## 402 Payment Required | Description | |-------------------------------------------------------------------------| | Your account is suspended, please upgrade your account | ## 403 Forbidden | Description | |-------------------------------------------------------------------------| | Your account has exceeded the monthly document generation limit. | | Access not granted: You cannot delete master workspace via API | | Access not granted: Template is not accessible by this organization | | Your session has expired, please close and reopen the editor. | ## 404 Entity not found | Description | |-------------------------------------------------------------------------| | Entity not found | | Resource not found | | None of the templates is available for the workspace. | ## 422 Unprocessable Entity | Description | |-------------------------------------------------------------------------| | Unable to parse JSON, please check formatting | | Required parameter missing | | Required parameter missing: template definition not defined | | Required parameter missing: template not defined | ## 429 Too Many Requests | Description | |-------------------------------------------------------------------------| | You can make up to 2 requests per second and 60 requests per minute. | * * * * *
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 4.0.25
|
|
7
|
+
Contact: support@pdfgeneratorapi.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PDFGeneratorAPI
|
|
16
|
+
class TemplatesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Copy template
|
|
23
|
+
# Creates a copy of a template to the workspace specified in authentication parameters.
|
|
24
|
+
# @param template_id [Integer] Template unique identifier
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [CopyTemplateRequest] :copy_template_request
|
|
27
|
+
# @return [InlineObject16]
|
|
28
|
+
def copy_template(template_id, opts = {})
|
|
29
|
+
data, _status_code, _headers = copy_template_with_http_info(template_id, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Copy template
|
|
34
|
+
# Creates a copy of a template to the workspace specified in authentication parameters.
|
|
35
|
+
# @param template_id [Integer] Template unique identifier
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [CopyTemplateRequest] :copy_template_request
|
|
38
|
+
# @return [Array<(InlineObject16, Integer, Hash)>] InlineObject16 data, response status code and response headers
|
|
39
|
+
def copy_template_with_http_info(template_id, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.copy_template ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'template_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.copy_template"
|
|
46
|
+
end
|
|
47
|
+
# resource path
|
|
48
|
+
local_var_path = '/templates/{templateId}/copy'.sub('{' + 'templateId' + '}', CGI.escape(template_id.to_s))
|
|
49
|
+
|
|
50
|
+
# query parameters
|
|
51
|
+
query_params = opts[:query_params] || {}
|
|
52
|
+
|
|
53
|
+
# header parameters
|
|
54
|
+
header_params = opts[:header_params] || {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
57
|
+
# HTTP header 'Content-Type'
|
|
58
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
59
|
+
if !content_type.nil?
|
|
60
|
+
header_params['Content-Type'] = content_type
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# form parameters
|
|
64
|
+
form_params = opts[:form_params] || {}
|
|
65
|
+
|
|
66
|
+
# http body (model)
|
|
67
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'copy_template_request'])
|
|
68
|
+
|
|
69
|
+
# return_type
|
|
70
|
+
return_type = opts[:debug_return_type] || 'InlineObject16'
|
|
71
|
+
|
|
72
|
+
# auth_names
|
|
73
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
74
|
+
|
|
75
|
+
new_options = opts.merge(
|
|
76
|
+
:operation => :"TemplatesApi.copy_template",
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names,
|
|
82
|
+
:return_type => return_type
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
86
|
+
if @api_client.config.debugging
|
|
87
|
+
@api_client.config.logger.debug "API called: TemplatesApi#copy_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
88
|
+
end
|
|
89
|
+
return data, status_code, headers
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Create template
|
|
93
|
+
# Creates a new template. If template configuration is not specified in the request body then an empty template is created. Template is placed to the workspace specified in authentication params. Template configuration must be sent in the request body.
|
|
94
|
+
# @param template_definition_new [TemplateDefinitionNew] Template configuration
|
|
95
|
+
# @param [Hash] opts the optional parameters
|
|
96
|
+
# @return [InlineObject16]
|
|
97
|
+
def create_template(template_definition_new, opts = {})
|
|
98
|
+
data, _status_code, _headers = create_template_with_http_info(template_definition_new, opts)
|
|
99
|
+
data
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Create template
|
|
103
|
+
# Creates a new template. If template configuration is not specified in the request body then an empty template is created. Template is placed to the workspace specified in authentication params. Template configuration must be sent in the request body.
|
|
104
|
+
# @param template_definition_new [TemplateDefinitionNew] Template configuration
|
|
105
|
+
# @param [Hash] opts the optional parameters
|
|
106
|
+
# @return [Array<(InlineObject16, Integer, Hash)>] InlineObject16 data, response status code and response headers
|
|
107
|
+
def create_template_with_http_info(template_definition_new, opts = {})
|
|
108
|
+
if @api_client.config.debugging
|
|
109
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.create_template ...'
|
|
110
|
+
end
|
|
111
|
+
# verify the required parameter 'template_definition_new' is set
|
|
112
|
+
if @api_client.config.client_side_validation && template_definition_new.nil?
|
|
113
|
+
fail ArgumentError, "Missing the required parameter 'template_definition_new' when calling TemplatesApi.create_template"
|
|
114
|
+
end
|
|
115
|
+
# resource path
|
|
116
|
+
local_var_path = '/templates'
|
|
117
|
+
|
|
118
|
+
# query parameters
|
|
119
|
+
query_params = opts[:query_params] || {}
|
|
120
|
+
|
|
121
|
+
# header parameters
|
|
122
|
+
header_params = opts[:header_params] || {}
|
|
123
|
+
# HTTP header 'Accept' (if needed)
|
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
125
|
+
# HTTP header 'Content-Type'
|
|
126
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
127
|
+
if !content_type.nil?
|
|
128
|
+
header_params['Content-Type'] = content_type
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# form parameters
|
|
132
|
+
form_params = opts[:form_params] || {}
|
|
133
|
+
|
|
134
|
+
# http body (model)
|
|
135
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(template_definition_new)
|
|
136
|
+
|
|
137
|
+
# return_type
|
|
138
|
+
return_type = opts[:debug_return_type] || 'InlineObject16'
|
|
139
|
+
|
|
140
|
+
# auth_names
|
|
141
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
142
|
+
|
|
143
|
+
new_options = opts.merge(
|
|
144
|
+
:operation => :"TemplatesApi.create_template",
|
|
145
|
+
:header_params => header_params,
|
|
146
|
+
:query_params => query_params,
|
|
147
|
+
:form_params => form_params,
|
|
148
|
+
:body => post_body,
|
|
149
|
+
:auth_names => auth_names,
|
|
150
|
+
:return_type => return_type
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
154
|
+
if @api_client.config.debugging
|
|
155
|
+
@api_client.config.logger.debug "API called: TemplatesApi#create_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
156
|
+
end
|
|
157
|
+
return data, status_code, headers
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Delete template
|
|
161
|
+
# Deletes the template from workspace
|
|
162
|
+
# @param template_id [Integer] Template unique identifier
|
|
163
|
+
# @param [Hash] opts the optional parameters
|
|
164
|
+
# @return [nil]
|
|
165
|
+
def delete_template(template_id, opts = {})
|
|
166
|
+
delete_template_with_http_info(template_id, opts)
|
|
167
|
+
nil
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Delete template
|
|
171
|
+
# Deletes the template from workspace
|
|
172
|
+
# @param template_id [Integer] Template unique identifier
|
|
173
|
+
# @param [Hash] opts the optional parameters
|
|
174
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
175
|
+
def delete_template_with_http_info(template_id, opts = {})
|
|
176
|
+
if @api_client.config.debugging
|
|
177
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.delete_template ...'
|
|
178
|
+
end
|
|
179
|
+
# verify the required parameter 'template_id' is set
|
|
180
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
181
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.delete_template"
|
|
182
|
+
end
|
|
183
|
+
# resource path
|
|
184
|
+
local_var_path = '/templates/{templateId}'.sub('{' + 'templateId' + '}', CGI.escape(template_id.to_s))
|
|
185
|
+
|
|
186
|
+
# query parameters
|
|
187
|
+
query_params = opts[:query_params] || {}
|
|
188
|
+
|
|
189
|
+
# header parameters
|
|
190
|
+
header_params = opts[:header_params] || {}
|
|
191
|
+
# HTTP header 'Accept' (if needed)
|
|
192
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
193
|
+
|
|
194
|
+
# form parameters
|
|
195
|
+
form_params = opts[:form_params] || {}
|
|
196
|
+
|
|
197
|
+
# http body (model)
|
|
198
|
+
post_body = opts[:debug_body]
|
|
199
|
+
|
|
200
|
+
# return_type
|
|
201
|
+
return_type = opts[:debug_return_type]
|
|
202
|
+
|
|
203
|
+
# auth_names
|
|
204
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
205
|
+
|
|
206
|
+
new_options = opts.merge(
|
|
207
|
+
:operation => :"TemplatesApi.delete_template",
|
|
208
|
+
:header_params => header_params,
|
|
209
|
+
:query_params => query_params,
|
|
210
|
+
:form_params => form_params,
|
|
211
|
+
:body => post_body,
|
|
212
|
+
:auth_names => auth_names,
|
|
213
|
+
:return_type => return_type
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug "API called: TemplatesApi#delete_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
219
|
+
end
|
|
220
|
+
return data, status_code, headers
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Get template
|
|
224
|
+
# Returns template configuration
|
|
225
|
+
# @param template_id [Integer] Template unique identifier
|
|
226
|
+
# @param [Hash] opts the optional parameters
|
|
227
|
+
# @return [InlineObject16]
|
|
228
|
+
def get_template(template_id, opts = {})
|
|
229
|
+
data, _status_code, _headers = get_template_with_http_info(template_id, opts)
|
|
230
|
+
data
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Get template
|
|
234
|
+
# Returns template configuration
|
|
235
|
+
# @param template_id [Integer] Template unique identifier
|
|
236
|
+
# @param [Hash] opts the optional parameters
|
|
237
|
+
# @return [Array<(InlineObject16, Integer, Hash)>] InlineObject16 data, response status code and response headers
|
|
238
|
+
def get_template_with_http_info(template_id, opts = {})
|
|
239
|
+
if @api_client.config.debugging
|
|
240
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.get_template ...'
|
|
241
|
+
end
|
|
242
|
+
# verify the required parameter 'template_id' is set
|
|
243
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
244
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get_template"
|
|
245
|
+
end
|
|
246
|
+
# resource path
|
|
247
|
+
local_var_path = '/templates/{templateId}'.sub('{' + 'templateId' + '}', CGI.escape(template_id.to_s))
|
|
248
|
+
|
|
249
|
+
# query parameters
|
|
250
|
+
query_params = opts[:query_params] || {}
|
|
251
|
+
|
|
252
|
+
# header parameters
|
|
253
|
+
header_params = opts[:header_params] || {}
|
|
254
|
+
# HTTP header 'Accept' (if needed)
|
|
255
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
256
|
+
|
|
257
|
+
# form parameters
|
|
258
|
+
form_params = opts[:form_params] || {}
|
|
259
|
+
|
|
260
|
+
# http body (model)
|
|
261
|
+
post_body = opts[:debug_body]
|
|
262
|
+
|
|
263
|
+
# return_type
|
|
264
|
+
return_type = opts[:debug_return_type] || 'InlineObject16'
|
|
265
|
+
|
|
266
|
+
# auth_names
|
|
267
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
268
|
+
|
|
269
|
+
new_options = opts.merge(
|
|
270
|
+
:operation => :"TemplatesApi.get_template",
|
|
271
|
+
:header_params => header_params,
|
|
272
|
+
:query_params => query_params,
|
|
273
|
+
:form_params => form_params,
|
|
274
|
+
:body => post_body,
|
|
275
|
+
:auth_names => auth_names,
|
|
276
|
+
:return_type => return_type
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
280
|
+
if @api_client.config.debugging
|
|
281
|
+
@api_client.config.logger.debug "API called: TemplatesApi#get_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
282
|
+
end
|
|
283
|
+
return data, status_code, headers
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Get template data fields
|
|
287
|
+
# Returns all data fields used in the template. Returns structured JSON data that can be used to check which data fields are used in template or autogenerate sample data.
|
|
288
|
+
# @param template_id [Integer] Template unique identifier
|
|
289
|
+
# @param [Hash] opts the optional parameters
|
|
290
|
+
# @return [InlineObject2]
|
|
291
|
+
def get_template_data(template_id, opts = {})
|
|
292
|
+
data, _status_code, _headers = get_template_data_with_http_info(template_id, opts)
|
|
293
|
+
data
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Get template data fields
|
|
297
|
+
# Returns all data fields used in the template. Returns structured JSON data that can be used to check which data fields are used in template or autogenerate sample data.
|
|
298
|
+
# @param template_id [Integer] Template unique identifier
|
|
299
|
+
# @param [Hash] opts the optional parameters
|
|
300
|
+
# @return [Array<(InlineObject2, Integer, Hash)>] InlineObject2 data, response status code and response headers
|
|
301
|
+
def get_template_data_with_http_info(template_id, opts = {})
|
|
302
|
+
if @api_client.config.debugging
|
|
303
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.get_template_data ...'
|
|
304
|
+
end
|
|
305
|
+
# verify the required parameter 'template_id' is set
|
|
306
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
307
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get_template_data"
|
|
308
|
+
end
|
|
309
|
+
# resource path
|
|
310
|
+
local_var_path = '/templates/{templateId}/data'.sub('{' + 'templateId' + '}', CGI.escape(template_id.to_s))
|
|
311
|
+
|
|
312
|
+
# query parameters
|
|
313
|
+
query_params = opts[:query_params] || {}
|
|
314
|
+
|
|
315
|
+
# header parameters
|
|
316
|
+
header_params = opts[:header_params] || {}
|
|
317
|
+
# HTTP header 'Accept' (if needed)
|
|
318
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
319
|
+
|
|
320
|
+
# form parameters
|
|
321
|
+
form_params = opts[:form_params] || {}
|
|
322
|
+
|
|
323
|
+
# http body (model)
|
|
324
|
+
post_body = opts[:debug_body]
|
|
325
|
+
|
|
326
|
+
# return_type
|
|
327
|
+
return_type = opts[:debug_return_type] || 'InlineObject2'
|
|
328
|
+
|
|
329
|
+
# auth_names
|
|
330
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
331
|
+
|
|
332
|
+
new_options = opts.merge(
|
|
333
|
+
:operation => :"TemplatesApi.get_template_data",
|
|
334
|
+
:header_params => header_params,
|
|
335
|
+
:query_params => query_params,
|
|
336
|
+
:form_params => form_params,
|
|
337
|
+
:body => post_body,
|
|
338
|
+
:auth_names => auth_names,
|
|
339
|
+
:return_type => return_type
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
343
|
+
if @api_client.config.debugging
|
|
344
|
+
@api_client.config.logger.debug "API called: TemplatesApi#get_template_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
345
|
+
end
|
|
346
|
+
return data, status_code, headers
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
# Get schema
|
|
350
|
+
# Returns Template JSON Schema which defines the structure of the Template Definition.
|
|
351
|
+
# @param [Hash] opts the optional parameters
|
|
352
|
+
# @return [Object]
|
|
353
|
+
def get_template_schema(opts = {})
|
|
354
|
+
data, _status_code, _headers = get_template_schema_with_http_info(opts)
|
|
355
|
+
data
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Get schema
|
|
359
|
+
# Returns Template JSON Schema which defines the structure of the Template Definition.
|
|
360
|
+
# @param [Hash] opts the optional parameters
|
|
361
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
362
|
+
def get_template_schema_with_http_info(opts = {})
|
|
363
|
+
if @api_client.config.debugging
|
|
364
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.get_template_schema ...'
|
|
365
|
+
end
|
|
366
|
+
# resource path
|
|
367
|
+
local_var_path = '/templates/schema'
|
|
368
|
+
|
|
369
|
+
# query parameters
|
|
370
|
+
query_params = opts[:query_params] || {}
|
|
371
|
+
|
|
372
|
+
# header parameters
|
|
373
|
+
header_params = opts[:header_params] || {}
|
|
374
|
+
# HTTP header 'Accept' (if needed)
|
|
375
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
376
|
+
|
|
377
|
+
# form parameters
|
|
378
|
+
form_params = opts[:form_params] || {}
|
|
379
|
+
|
|
380
|
+
# http body (model)
|
|
381
|
+
post_body = opts[:debug_body]
|
|
382
|
+
|
|
383
|
+
# return_type
|
|
384
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
385
|
+
|
|
386
|
+
# auth_names
|
|
387
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
388
|
+
|
|
389
|
+
new_options = opts.merge(
|
|
390
|
+
:operation => :"TemplatesApi.get_template_schema",
|
|
391
|
+
:header_params => header_params,
|
|
392
|
+
:query_params => query_params,
|
|
393
|
+
:form_params => form_params,
|
|
394
|
+
:body => post_body,
|
|
395
|
+
:auth_names => auth_names,
|
|
396
|
+
:return_type => return_type
|
|
397
|
+
)
|
|
398
|
+
|
|
399
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
400
|
+
if @api_client.config.debugging
|
|
401
|
+
@api_client.config.logger.debug "API called: TemplatesApi#get_template_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
402
|
+
end
|
|
403
|
+
return data, status_code, headers
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
# Get templates
|
|
407
|
+
# Returns a list of templates available for the authenticated workspace
|
|
408
|
+
# @param [Hash] opts the optional parameters
|
|
409
|
+
# @option opts [String] :name Filter template by name
|
|
410
|
+
# @option opts [String] :tags Filter template by tags
|
|
411
|
+
# @option opts [String] :access Filter template by access type. No values returns all templates. private - returns only private templates, organization - returns only organization templates. (default to '')
|
|
412
|
+
# @option opts [Integer] :page Pagination: page to return (default to 1)
|
|
413
|
+
# @option opts [Integer] :per_page Pagination: How many records to return per page (default to 15)
|
|
414
|
+
# @return [InlineObject4]
|
|
415
|
+
def get_templates(opts = {})
|
|
416
|
+
data, _status_code, _headers = get_templates_with_http_info(opts)
|
|
417
|
+
data
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
# Get templates
|
|
421
|
+
# Returns a list of templates available for the authenticated workspace
|
|
422
|
+
# @param [Hash] opts the optional parameters
|
|
423
|
+
# @option opts [String] :name Filter template by name
|
|
424
|
+
# @option opts [String] :tags Filter template by tags
|
|
425
|
+
# @option opts [String] :access Filter template by access type. No values returns all templates. private - returns only private templates, organization - returns only organization templates. (default to '')
|
|
426
|
+
# @option opts [Integer] :page Pagination: page to return (default to 1)
|
|
427
|
+
# @option opts [Integer] :per_page Pagination: How many records to return per page (default to 15)
|
|
428
|
+
# @return [Array<(InlineObject4, Integer, Hash)>] InlineObject4 data, response status code and response headers
|
|
429
|
+
def get_templates_with_http_info(opts = {})
|
|
430
|
+
if @api_client.config.debugging
|
|
431
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.get_templates ...'
|
|
432
|
+
end
|
|
433
|
+
allowable_values = ["private", "organization", ""]
|
|
434
|
+
if @api_client.config.client_side_validation && opts[:'access'] && !allowable_values.include?(opts[:'access'])
|
|
435
|
+
fail ArgumentError, "invalid value for \"access\", must be one of #{allowable_values}"
|
|
436
|
+
end
|
|
437
|
+
# resource path
|
|
438
|
+
local_var_path = '/templates'
|
|
439
|
+
|
|
440
|
+
# query parameters
|
|
441
|
+
query_params = opts[:query_params] || {}
|
|
442
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
443
|
+
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
|
|
444
|
+
query_params[:'access'] = opts[:'access'] if !opts[:'access'].nil?
|
|
445
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
446
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
447
|
+
|
|
448
|
+
# header parameters
|
|
449
|
+
header_params = opts[:header_params] || {}
|
|
450
|
+
# HTTP header 'Accept' (if needed)
|
|
451
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
452
|
+
|
|
453
|
+
# form parameters
|
|
454
|
+
form_params = opts[:form_params] || {}
|
|
455
|
+
|
|
456
|
+
# http body (model)
|
|
457
|
+
post_body = opts[:debug_body]
|
|
458
|
+
|
|
459
|
+
# return_type
|
|
460
|
+
return_type = opts[:debug_return_type] || 'InlineObject4'
|
|
461
|
+
|
|
462
|
+
# auth_names
|
|
463
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
464
|
+
|
|
465
|
+
new_options = opts.merge(
|
|
466
|
+
:operation => :"TemplatesApi.get_templates",
|
|
467
|
+
:header_params => header_params,
|
|
468
|
+
:query_params => query_params,
|
|
469
|
+
:form_params => form_params,
|
|
470
|
+
:body => post_body,
|
|
471
|
+
:auth_names => auth_names,
|
|
472
|
+
:return_type => return_type
|
|
473
|
+
)
|
|
474
|
+
|
|
475
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
476
|
+
if @api_client.config.debugging
|
|
477
|
+
@api_client.config.logger.debug "API called: TemplatesApi#get_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
478
|
+
end
|
|
479
|
+
return data, status_code, headers
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
# Import template
|
|
483
|
+
# Creates a template from existing PDF
|
|
484
|
+
# @param import_template_request [ImportTemplateRequest] Import a PDF via URL or base64 string as template
|
|
485
|
+
# @param [Hash] opts the optional parameters
|
|
486
|
+
# @return [InlineObject16]
|
|
487
|
+
def import_template(import_template_request, opts = {})
|
|
488
|
+
data, _status_code, _headers = import_template_with_http_info(import_template_request, opts)
|
|
489
|
+
data
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
# Import template
|
|
493
|
+
# Creates a template from existing PDF
|
|
494
|
+
# @param import_template_request [ImportTemplateRequest] Import a PDF via URL or base64 string as template
|
|
495
|
+
# @param [Hash] opts the optional parameters
|
|
496
|
+
# @return [Array<(InlineObject16, Integer, Hash)>] InlineObject16 data, response status code and response headers
|
|
497
|
+
def import_template_with_http_info(import_template_request, opts = {})
|
|
498
|
+
if @api_client.config.debugging
|
|
499
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.import_template ...'
|
|
500
|
+
end
|
|
501
|
+
# verify the required parameter 'import_template_request' is set
|
|
502
|
+
if @api_client.config.client_side_validation && import_template_request.nil?
|
|
503
|
+
fail ArgumentError, "Missing the required parameter 'import_template_request' when calling TemplatesApi.import_template"
|
|
504
|
+
end
|
|
505
|
+
# resource path
|
|
506
|
+
local_var_path = '/templates/import'
|
|
507
|
+
|
|
508
|
+
# query parameters
|
|
509
|
+
query_params = opts[:query_params] || {}
|
|
510
|
+
|
|
511
|
+
# header parameters
|
|
512
|
+
header_params = opts[:header_params] || {}
|
|
513
|
+
# HTTP header 'Accept' (if needed)
|
|
514
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
515
|
+
# HTTP header 'Content-Type'
|
|
516
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
517
|
+
if !content_type.nil?
|
|
518
|
+
header_params['Content-Type'] = content_type
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
# form parameters
|
|
522
|
+
form_params = opts[:form_params] || {}
|
|
523
|
+
|
|
524
|
+
# http body (model)
|
|
525
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(import_template_request)
|
|
526
|
+
|
|
527
|
+
# return_type
|
|
528
|
+
return_type = opts[:debug_return_type] || 'InlineObject16'
|
|
529
|
+
|
|
530
|
+
# auth_names
|
|
531
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
532
|
+
|
|
533
|
+
new_options = opts.merge(
|
|
534
|
+
:operation => :"TemplatesApi.import_template",
|
|
535
|
+
:header_params => header_params,
|
|
536
|
+
:query_params => query_params,
|
|
537
|
+
:form_params => form_params,
|
|
538
|
+
:body => post_body,
|
|
539
|
+
:auth_names => auth_names,
|
|
540
|
+
:return_type => return_type
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
544
|
+
if @api_client.config.debugging
|
|
545
|
+
@api_client.config.logger.debug "API called: TemplatesApi#import_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
546
|
+
end
|
|
547
|
+
return data, status_code, headers
|
|
548
|
+
end
|
|
549
|
+
|
|
550
|
+
# Open editor
|
|
551
|
+
# Returns an unique URL which you can use to redirect your user to the editor from your application or use the generated URL as iframe source to show the editor within your application. When using iframe, make sure that your browser allows third-party cookies.
|
|
552
|
+
# @param template_id [Integer] Template unique identifier
|
|
553
|
+
# @param open_editor_request [OpenEditorRequest]
|
|
554
|
+
# @param [Hash] opts the optional parameters
|
|
555
|
+
# @return [InlineObject3]
|
|
556
|
+
def open_editor(template_id, open_editor_request, opts = {})
|
|
557
|
+
data, _status_code, _headers = open_editor_with_http_info(template_id, open_editor_request, opts)
|
|
558
|
+
data
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
# Open editor
|
|
562
|
+
# Returns an unique URL which you can use to redirect your user to the editor from your application or use the generated URL as iframe source to show the editor within your application. When using iframe, make sure that your browser allows third-party cookies.
|
|
563
|
+
# @param template_id [Integer] Template unique identifier
|
|
564
|
+
# @param open_editor_request [OpenEditorRequest]
|
|
565
|
+
# @param [Hash] opts the optional parameters
|
|
566
|
+
# @return [Array<(InlineObject3, Integer, Hash)>] InlineObject3 data, response status code and response headers
|
|
567
|
+
def open_editor_with_http_info(template_id, open_editor_request, opts = {})
|
|
568
|
+
if @api_client.config.debugging
|
|
569
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.open_editor ...'
|
|
570
|
+
end
|
|
571
|
+
# verify the required parameter 'template_id' is set
|
|
572
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
573
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.open_editor"
|
|
574
|
+
end
|
|
575
|
+
# verify the required parameter 'open_editor_request' is set
|
|
576
|
+
if @api_client.config.client_side_validation && open_editor_request.nil?
|
|
577
|
+
fail ArgumentError, "Missing the required parameter 'open_editor_request' when calling TemplatesApi.open_editor"
|
|
578
|
+
end
|
|
579
|
+
# resource path
|
|
580
|
+
local_var_path = '/templates/{templateId}/editor'.sub('{' + 'templateId' + '}', CGI.escape(template_id.to_s))
|
|
581
|
+
|
|
582
|
+
# query parameters
|
|
583
|
+
query_params = opts[:query_params] || {}
|
|
584
|
+
|
|
585
|
+
# header parameters
|
|
586
|
+
header_params = opts[:header_params] || {}
|
|
587
|
+
# HTTP header 'Accept' (if needed)
|
|
588
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
589
|
+
# HTTP header 'Content-Type'
|
|
590
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
591
|
+
if !content_type.nil?
|
|
592
|
+
header_params['Content-Type'] = content_type
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
# form parameters
|
|
596
|
+
form_params = opts[:form_params] || {}
|
|
597
|
+
|
|
598
|
+
# http body (model)
|
|
599
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(open_editor_request)
|
|
600
|
+
|
|
601
|
+
# return_type
|
|
602
|
+
return_type = opts[:debug_return_type] || 'InlineObject3'
|
|
603
|
+
|
|
604
|
+
# auth_names
|
|
605
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
606
|
+
|
|
607
|
+
new_options = opts.merge(
|
|
608
|
+
:operation => :"TemplatesApi.open_editor",
|
|
609
|
+
:header_params => header_params,
|
|
610
|
+
:query_params => query_params,
|
|
611
|
+
:form_params => form_params,
|
|
612
|
+
:body => post_body,
|
|
613
|
+
:auth_names => auth_names,
|
|
614
|
+
:return_type => return_type
|
|
615
|
+
)
|
|
616
|
+
|
|
617
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
618
|
+
if @api_client.config.debugging
|
|
619
|
+
@api_client.config.logger.debug "API called: TemplatesApi#open_editor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
620
|
+
end
|
|
621
|
+
return data, status_code, headers
|
|
622
|
+
end
|
|
623
|
+
|
|
624
|
+
# Update template
|
|
625
|
+
# Updates template configuration. The template configuration for pages and layout must be complete as the entire configuration is replaced and not merged.
|
|
626
|
+
# @param template_id [Integer] Template unique identifier
|
|
627
|
+
# @param template_definition_new [TemplateDefinitionNew] Template configuration
|
|
628
|
+
# @param [Hash] opts the optional parameters
|
|
629
|
+
# @return [InlineObject16]
|
|
630
|
+
def update_template(template_id, template_definition_new, opts = {})
|
|
631
|
+
data, _status_code, _headers = update_template_with_http_info(template_id, template_definition_new, opts)
|
|
632
|
+
data
|
|
633
|
+
end
|
|
634
|
+
|
|
635
|
+
# Update template
|
|
636
|
+
# Updates template configuration. The template configuration for pages and layout must be complete as the entire configuration is replaced and not merged.
|
|
637
|
+
# @param template_id [Integer] Template unique identifier
|
|
638
|
+
# @param template_definition_new [TemplateDefinitionNew] Template configuration
|
|
639
|
+
# @param [Hash] opts the optional parameters
|
|
640
|
+
# @return [Array<(InlineObject16, Integer, Hash)>] InlineObject16 data, response status code and response headers
|
|
641
|
+
def update_template_with_http_info(template_id, template_definition_new, opts = {})
|
|
642
|
+
if @api_client.config.debugging
|
|
643
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.update_template ...'
|
|
644
|
+
end
|
|
645
|
+
# verify the required parameter 'template_id' is set
|
|
646
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
647
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update_template"
|
|
648
|
+
end
|
|
649
|
+
# verify the required parameter 'template_definition_new' is set
|
|
650
|
+
if @api_client.config.client_side_validation && template_definition_new.nil?
|
|
651
|
+
fail ArgumentError, "Missing the required parameter 'template_definition_new' when calling TemplatesApi.update_template"
|
|
652
|
+
end
|
|
653
|
+
# resource path
|
|
654
|
+
local_var_path = '/templates/{templateId}'.sub('{' + 'templateId' + '}', CGI.escape(template_id.to_s))
|
|
655
|
+
|
|
656
|
+
# query parameters
|
|
657
|
+
query_params = opts[:query_params] || {}
|
|
658
|
+
|
|
659
|
+
# header parameters
|
|
660
|
+
header_params = opts[:header_params] || {}
|
|
661
|
+
# HTTP header 'Accept' (if needed)
|
|
662
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
663
|
+
# HTTP header 'Content-Type'
|
|
664
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
665
|
+
if !content_type.nil?
|
|
666
|
+
header_params['Content-Type'] = content_type
|
|
667
|
+
end
|
|
668
|
+
|
|
669
|
+
# form parameters
|
|
670
|
+
form_params = opts[:form_params] || {}
|
|
671
|
+
|
|
672
|
+
# http body (model)
|
|
673
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(template_definition_new)
|
|
674
|
+
|
|
675
|
+
# return_type
|
|
676
|
+
return_type = opts[:debug_return_type] || 'InlineObject16'
|
|
677
|
+
|
|
678
|
+
# auth_names
|
|
679
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
680
|
+
|
|
681
|
+
new_options = opts.merge(
|
|
682
|
+
:operation => :"TemplatesApi.update_template",
|
|
683
|
+
:header_params => header_params,
|
|
684
|
+
:query_params => query_params,
|
|
685
|
+
:form_params => form_params,
|
|
686
|
+
:body => post_body,
|
|
687
|
+
:auth_names => auth_names,
|
|
688
|
+
:return_type => return_type
|
|
689
|
+
)
|
|
690
|
+
|
|
691
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
692
|
+
if @api_client.config.debugging
|
|
693
|
+
@api_client.config.logger.debug "API called: TemplatesApi#update_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
694
|
+
end
|
|
695
|
+
return data, status_code, headers
|
|
696
|
+
end
|
|
697
|
+
|
|
698
|
+
# Validate template
|
|
699
|
+
# Validates if the provided template configuration matches the template JSON schema.
|
|
700
|
+
# @param template_definition_new [TemplateDefinitionNew] Template configuration
|
|
701
|
+
# @param [Hash] opts the optional parameters
|
|
702
|
+
# @return [InlineObject1]
|
|
703
|
+
def validate_template(template_definition_new, opts = {})
|
|
704
|
+
data, _status_code, _headers = validate_template_with_http_info(template_definition_new, opts)
|
|
705
|
+
data
|
|
706
|
+
end
|
|
707
|
+
|
|
708
|
+
# Validate template
|
|
709
|
+
# Validates if the provided template configuration matches the template JSON schema.
|
|
710
|
+
# @param template_definition_new [TemplateDefinitionNew] Template configuration
|
|
711
|
+
# @param [Hash] opts the optional parameters
|
|
712
|
+
# @return [Array<(InlineObject1, Integer, Hash)>] InlineObject1 data, response status code and response headers
|
|
713
|
+
def validate_template_with_http_info(template_definition_new, opts = {})
|
|
714
|
+
if @api_client.config.debugging
|
|
715
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.validate_template ...'
|
|
716
|
+
end
|
|
717
|
+
# verify the required parameter 'template_definition_new' is set
|
|
718
|
+
if @api_client.config.client_side_validation && template_definition_new.nil?
|
|
719
|
+
fail ArgumentError, "Missing the required parameter 'template_definition_new' when calling TemplatesApi.validate_template"
|
|
720
|
+
end
|
|
721
|
+
# resource path
|
|
722
|
+
local_var_path = '/templates/validate'
|
|
723
|
+
|
|
724
|
+
# query parameters
|
|
725
|
+
query_params = opts[:query_params] || {}
|
|
726
|
+
|
|
727
|
+
# header parameters
|
|
728
|
+
header_params = opts[:header_params] || {}
|
|
729
|
+
# HTTP header 'Accept' (if needed)
|
|
730
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
731
|
+
# HTTP header 'Content-Type'
|
|
732
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
733
|
+
if !content_type.nil?
|
|
734
|
+
header_params['Content-Type'] = content_type
|
|
735
|
+
end
|
|
736
|
+
|
|
737
|
+
# form parameters
|
|
738
|
+
form_params = opts[:form_params] || {}
|
|
739
|
+
|
|
740
|
+
# http body (model)
|
|
741
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(template_definition_new)
|
|
742
|
+
|
|
743
|
+
# return_type
|
|
744
|
+
return_type = opts[:debug_return_type] || 'InlineObject1'
|
|
745
|
+
|
|
746
|
+
# auth_names
|
|
747
|
+
auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth']
|
|
748
|
+
|
|
749
|
+
new_options = opts.merge(
|
|
750
|
+
:operation => :"TemplatesApi.validate_template",
|
|
751
|
+
:header_params => header_params,
|
|
752
|
+
:query_params => query_params,
|
|
753
|
+
:form_params => form_params,
|
|
754
|
+
:body => post_body,
|
|
755
|
+
:auth_names => auth_names,
|
|
756
|
+
:return_type => return_type
|
|
757
|
+
)
|
|
758
|
+
|
|
759
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
760
|
+
if @api_client.config.debugging
|
|
761
|
+
@api_client.config.logger.debug "API called: TemplatesApi#validate_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
762
|
+
end
|
|
763
|
+
return data, status_code, headers
|
|
764
|
+
end
|
|
765
|
+
end
|
|
766
|
+
end
|