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.
Files changed (451) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +519 -0
  4. data/Rakefile +10 -0
  5. data/docs/AccessibilityOption.md +15 -0
  6. data/docs/AddWatermarkRequest.md +49 -0
  7. data/docs/AssetsApi.md +77 -0
  8. data/docs/AsyncOutputParam.md +15 -0
  9. data/docs/CallbackParam.md +20 -0
  10. data/docs/Component.md +34 -0
  11. data/docs/ConversionApi.md +217 -0
  12. data/docs/ConvertHTML2PDFRequest.md +26 -0
  13. data/docs/ConvertPDF2ImageRequest.md +32 -0
  14. data/docs/ConvertURL2PDFRequest.md +26 -0
  15. data/docs/CopyTemplateRequest.md +18 -0
  16. data/docs/CreateEInvoiceRequest.md +22 -0
  17. data/docs/CreateFacturXEInvoiceRequest.md +26 -0
  18. data/docs/CreateFacturXEInvoiceRequestTemplate.md +22 -0
  19. data/docs/CreateWorkspaceRequest.md +18 -0
  20. data/docs/DataBatchInner.md +20 -0
  21. data/docs/Document.md +26 -0
  22. data/docs/DocumentsApi.md +646 -0
  23. data/docs/EInvoicesApi.md +284 -0
  24. data/docs/EncryptAndDecryptBase64.md +26 -0
  25. data/docs/EncryptAndDecryptUrl.md +26 -0
  26. data/docs/EncryptDocumentRequest.md +49 -0
  27. data/docs/ExtractFormFieldsRequest.md +49 -0
  28. data/docs/FillFormFieldsRequest.md +49 -0
  29. data/docs/FormActionDownload.md +18 -0
  30. data/docs/FormActionSend.md +18 -0
  31. data/docs/FormActionSendSendDocument.md +20 -0
  32. data/docs/FormActionSendSendDocumentHeadersInner.md +20 -0
  33. data/docs/FormActionStore.md +18 -0
  34. data/docs/FormConfiguration.md +22 -0
  35. data/docs/FormConfigurationNew.md +26 -0
  36. data/docs/FormConfigurationNewActionsInner.md +22 -0
  37. data/docs/FormFieldsBase64.md +20 -0
  38. data/docs/FormFieldsInner.md +24 -0
  39. data/docs/FormFieldsUrl.md +20 -0
  40. data/docs/FormFillBase64.md +24 -0
  41. data/docs/FormFillUrl.md +24 -0
  42. data/docs/FormatParam.md +15 -0
  43. data/docs/FormsApi.md +639 -0
  44. data/docs/GenerateDocumentAsynchronousRequest.md +32 -0
  45. data/docs/GenerateDocumentBatchAsynchronousRequest.md +30 -0
  46. data/docs/GenerateDocumentBatchRequest.md +28 -0
  47. data/docs/GenerateDocumentRequest.md +30 -0
  48. data/docs/GenerateQRCode201Response.md +20 -0
  49. data/docs/GenerateQRCode201ResponseMeta.md +20 -0
  50. data/docs/GenerateQRCodeRequest.md +26 -0
  51. data/docs/GetStatus200Response.md +28 -0
  52. data/docs/GetTemplateLibrary200Response.md +18 -0
  53. data/docs/GetTemplateVersion422Response.md +18 -0
  54. data/docs/ImportFormBase64.md +20 -0
  55. data/docs/ImportFormRequest.md +49 -0
  56. data/docs/ImportFormUrl.md +20 -0
  57. data/docs/ImportTemplateBase64.md +20 -0
  58. data/docs/ImportTemplateRequest.md +49 -0
  59. data/docs/ImportTemplateUrl.md +20 -0
  60. data/docs/ImportTemplateUrlTemplate.md +18 -0
  61. data/docs/InlineObject.md +20 -0
  62. data/docs/InlineObject1.md +18 -0
  63. data/docs/InlineObject10.md +20 -0
  64. data/docs/InlineObject10Meta.md +24 -0
  65. data/docs/InlineObject11.md +20 -0
  66. data/docs/InlineObject11Meta.md +26 -0
  67. data/docs/InlineObject12.md +20 -0
  68. data/docs/InlineObject12Meta.md +28 -0
  69. data/docs/InlineObject12MetaStats.md +20 -0
  70. data/docs/InlineObject13.md +20 -0
  71. data/docs/InlineObject14.md +18 -0
  72. data/docs/InlineObject14ResponseValue.md +46 -0
  73. data/docs/InlineObject14ResponseValueDefault.md +51 -0
  74. data/docs/InlineObject14ResponseValueValue.md +51 -0
  75. data/docs/InlineObject15.md +20 -0
  76. data/docs/InlineObject16.md +20 -0
  77. data/docs/InlineObject17.md +18 -0
  78. data/docs/InlineObject18.md +20 -0
  79. data/docs/InlineObject18Meta.md +18 -0
  80. data/docs/InlineObject19.md +18 -0
  81. data/docs/InlineObject1Response.md +18 -0
  82. data/docs/InlineObject2.md +18 -0
  83. data/docs/InlineObject20.md +18 -0
  84. data/docs/InlineObject20Response.md +18 -0
  85. data/docs/InlineObject21.md +18 -0
  86. data/docs/InlineObject22.md +18 -0
  87. data/docs/InlineObject23.md +18 -0
  88. data/docs/InlineObject24.md +18 -0
  89. data/docs/InlineObject25.md +20 -0
  90. data/docs/InlineObject26.md +18 -0
  91. data/docs/InlineObject27.md +18 -0
  92. data/docs/InlineObject3.md +18 -0
  93. data/docs/InlineObject4.md +20 -0
  94. data/docs/InlineObject5.md +20 -0
  95. data/docs/InlineObject6.md +20 -0
  96. data/docs/InlineObject7.md +18 -0
  97. data/docs/InlineObject7Response.md +18 -0
  98. data/docs/InlineObject8.md +18 -0
  99. data/docs/InlineObject9.md +20 -0
  100. data/docs/InlineObject9Meta.md +26 -0
  101. data/docs/InlineObjectMeta.md +20 -0
  102. data/docs/KeyFieldParam.md +15 -0
  103. data/docs/MakeAccessibleBase64.md +26 -0
  104. data/docs/MakeAccessibleRequest.md +49 -0
  105. data/docs/MakeAccessibleUrl.md +26 -0
  106. data/docs/MetadataParam.md +20 -0
  107. data/docs/MiscApi.md +74 -0
  108. data/docs/OpenEditorRequest.md +20 -0
  109. data/docs/OpenEditorRequestData.md +49 -0
  110. data/docs/OptimizeBase64.md +22 -0
  111. data/docs/OptimizeDocumentRequest.md +49 -0
  112. data/docs/OptimizeUrl.md +22 -0
  113. data/docs/OutputParam.md +15 -0
  114. data/docs/PaginationMeta.md +22 -0
  115. data/docs/PromoteTemplateVersion200Response.md +18 -0
  116. data/docs/PublicTemplateLibraryItem.md +26 -0
  117. data/docs/ServicesApi.md +497 -0
  118. data/docs/StatusParam.md +15 -0
  119. data/docs/StoreDocumentRequest.md +24 -0
  120. data/docs/Template.md +28 -0
  121. data/docs/TemplateDefinition.md +32 -0
  122. data/docs/TemplateDefinitionDataSettings.md +20 -0
  123. data/docs/TemplateDefinitionEditor.md +18 -0
  124. data/docs/TemplateDefinitionNew.md +34 -0
  125. data/docs/TemplateDefinitionNewDataSettings.md +22 -0
  126. data/docs/TemplateDefinitionNewEditor.md +18 -0
  127. data/docs/TemplateDefinitionNewLayout.md +34 -0
  128. data/docs/TemplateDefinitionNewLayoutMargins.md +24 -0
  129. data/docs/TemplateDefinitionNewLayoutRepeatLayout.md +22 -0
  130. data/docs/TemplateDefinitionNewPagesInner.md +32 -0
  131. data/docs/TemplateDefinitionNewPagesInnerMargins.md +20 -0
  132. data/docs/TemplateDefinitionPagesInner.md +24 -0
  133. data/docs/TemplateLibraryApi.md +139 -0
  134. data/docs/TemplateParam.md +22 -0
  135. data/docs/TemplateParamData.md +49 -0
  136. data/docs/TemplateParamId.md +49 -0
  137. data/docs/TemplateVersion.md +36 -0
  138. data/docs/TemplateVersionCollection.md +20 -0
  139. data/docs/TemplateVersionCollectionMeta.md +22 -0
  140. data/docs/TemplateVersionsApi.md +298 -0
  141. data/docs/TemplatesApi.md +791 -0
  142. data/docs/WatermarkBase64.md +24 -0
  143. data/docs/WatermarkFileUrlWatermark.md +20 -0
  144. data/docs/WatermarkImage.md +26 -0
  145. data/docs/WatermarkImageContentBase64.md +24 -0
  146. data/docs/WatermarkImageContentUrl.md +24 -0
  147. data/docs/WatermarkPosition.md +15 -0
  148. data/docs/WatermarkText.md +28 -0
  149. data/docs/Workspace.md +24 -0
  150. data/docs/WorkspacesApi.md +292 -0
  151. data/git_push.sh +57 -0
  152. data/lib/pdf_generator_api_client/api/assets_api.rb +90 -0
  153. data/lib/pdf_generator_api_client/api/conversion_api.rb +226 -0
  154. data/lib/pdf_generator_api_client/api/documents_api.rb +623 -0
  155. data/lib/pdf_generator_api_client/api/e_invoices_api.rb +283 -0
  156. data/lib/pdf_generator_api_client/api/forms_api.rb +604 -0
  157. data/lib/pdf_generator_api_client/api/misc_api.rb +79 -0
  158. data/lib/pdf_generator_api_client/api/services_api.rb +498 -0
  159. data/lib/pdf_generator_api_client/api/template_library_api.rb +145 -0
  160. data/lib/pdf_generator_api_client/api/template_versions_api.rb +298 -0
  161. data/lib/pdf_generator_api_client/api/templates_api.rb +766 -0
  162. data/lib/pdf_generator_api_client/api/workspaces_api.rb +275 -0
  163. data/lib/pdf_generator_api_client/api_client.rb +393 -0
  164. data/lib/pdf_generator_api_client/api_error.rb +58 -0
  165. data/lib/pdf_generator_api_client/configuration.rb +309 -0
  166. data/lib/pdf_generator_api_client/models/accessibility_option.rb +47 -0
  167. data/lib/pdf_generator_api_client/models/add_watermark_request.rb +105 -0
  168. data/lib/pdf_generator_api_client/models/async_output_param.rb +41 -0
  169. data/lib/pdf_generator_api_client/models/callback_param.rb +232 -0
  170. data/lib/pdf_generator_api_client/models/component.rb +336 -0
  171. data/lib/pdf_generator_api_client/models/convert_html2_pdf_request.rb +324 -0
  172. data/lib/pdf_generator_api_client/models/convert_pdf2_image_request.rb +422 -0
  173. data/lib/pdf_generator_api_client/models/convert_url2_pdf_request.rb +324 -0
  174. data/lib/pdf_generator_api_client/models/copy_template_request.rb +221 -0
  175. data/lib/pdf_generator_api_client/models/create_e_invoice_request.rb +308 -0
  176. data/lib/pdf_generator_api_client/models/create_factur_xe_invoice_request.rb +315 -0
  177. data/lib/pdf_generator_api_client/models/create_factur_xe_invoice_request_template.rb +242 -0
  178. data/lib/pdf_generator_api_client/models/create_workspace_request.rb +221 -0
  179. data/lib/pdf_generator_api_client/models/data_batch_inner.rb +231 -0
  180. data/lib/pdf_generator_api_client/models/document.rb +261 -0
  181. data/lib/pdf_generator_api_client/models/encrypt_and_decrypt_base64.rb +331 -0
  182. data/lib/pdf_generator_api_client/models/encrypt_and_decrypt_url.rb +331 -0
  183. data/lib/pdf_generator_api_client/models/encrypt_document_request.rb +105 -0
  184. data/lib/pdf_generator_api_client/models/extract_form_fields_request.rb +105 -0
  185. data/lib/pdf_generator_api_client/models/fill_form_fields_request.rb +105 -0
  186. data/lib/pdf_generator_api_client/models/form_action_download.rb +221 -0
  187. data/lib/pdf_generator_api_client/models/form_action_send.rb +221 -0
  188. data/lib/pdf_generator_api_client/models/form_action_send_send_document.rb +250 -0
  189. data/lib/pdf_generator_api_client/models/form_action_send_send_document_headers_inner.rb +283 -0
  190. data/lib/pdf_generator_api_client/models/form_action_store.rb +221 -0
  191. data/lib/pdf_generator_api_client/models/form_configuration.rb +290 -0
  192. data/lib/pdf_generator_api_client/models/form_configuration_new.rb +264 -0
  193. data/lib/pdf_generator_api_client/models/form_configuration_new_actions_inner.rb +105 -0
  194. data/lib/pdf_generator_api_client/models/form_fields_base64.rb +271 -0
  195. data/lib/pdf_generator_api_client/models/form_fields_inner.rb +286 -0
  196. data/lib/pdf_generator_api_client/models/form_fields_url.rb +271 -0
  197. data/lib/pdf_generator_api_client/models/form_fill_base64.rb +321 -0
  198. data/lib/pdf_generator_api_client/models/form_fill_url.rb +321 -0
  199. data/lib/pdf_generator_api_client/models/format_param.rb +40 -0
  200. data/lib/pdf_generator_api_client/models/generate_document_asynchronous_request.rb +318 -0
  201. data/lib/pdf_generator_api_client/models/generate_document_batch_asynchronous_request.rb +308 -0
  202. data/lib/pdf_generator_api_client/models/generate_document_batch_request.rb +299 -0
  203. data/lib/pdf_generator_api_client/models/generate_document_request.rb +309 -0
  204. data/lib/pdf_generator_api_client/models/generate_qr_code201_response.rb +230 -0
  205. data/lib/pdf_generator_api_client/models/generate_qr_code201_response_meta.rb +231 -0
  206. data/lib/pdf_generator_api_client/models/generate_qr_code_request.rb +316 -0
  207. data/lib/pdf_generator_api_client/models/get_status200_response.rb +299 -0
  208. data/lib/pdf_generator_api_client/models/get_template_library200_response.rb +222 -0
  209. data/lib/pdf_generator_api_client/models/get_template_version422_response.rb +220 -0
  210. data/lib/pdf_generator_api_client/models/import_form_base64.rb +247 -0
  211. data/lib/pdf_generator_api_client/models/import_form_request.rb +105 -0
  212. data/lib/pdf_generator_api_client/models/import_form_url.rb +247 -0
  213. data/lib/pdf_generator_api_client/models/import_template_base64.rb +264 -0
  214. data/lib/pdf_generator_api_client/models/import_template_request.rb +105 -0
  215. data/lib/pdf_generator_api_client/models/import_template_url.rb +264 -0
  216. data/lib/pdf_generator_api_client/models/import_template_url_template.rb +238 -0
  217. data/lib/pdf_generator_api_client/models/inline_object.rb +230 -0
  218. data/lib/pdf_generator_api_client/models/inline_object1.rb +220 -0
  219. data/lib/pdf_generator_api_client/models/inline_object10.rb +232 -0
  220. data/lib/pdf_generator_api_client/models/inline_object10_meta.rb +251 -0
  221. data/lib/pdf_generator_api_client/models/inline_object11.rb +230 -0
  222. data/lib/pdf_generator_api_client/models/inline_object11_meta.rb +261 -0
  223. data/lib/pdf_generator_api_client/models/inline_object12.rb +230 -0
  224. data/lib/pdf_generator_api_client/models/inline_object12_meta.rb +270 -0
  225. data/lib/pdf_generator_api_client/models/inline_object12_meta_stats.rb +231 -0
  226. data/lib/pdf_generator_api_client/models/inline_object13.rb +265 -0
  227. data/lib/pdf_generator_api_client/models/inline_object14.rb +223 -0
  228. data/lib/pdf_generator_api_client/models/inline_object14_response_value.rb +401 -0
  229. data/lib/pdf_generator_api_client/models/inline_object14_response_value_default.rb +107 -0
  230. data/lib/pdf_generator_api_client/models/inline_object14_response_value_value.rb +107 -0
  231. data/lib/pdf_generator_api_client/models/inline_object15.rb +231 -0
  232. data/lib/pdf_generator_api_client/models/inline_object16.rb +229 -0
  233. data/lib/pdf_generator_api_client/models/inline_object17.rb +220 -0
  234. data/lib/pdf_generator_api_client/models/inline_object18.rb +230 -0
  235. data/lib/pdf_generator_api_client/models/inline_object18_meta.rb +221 -0
  236. data/lib/pdf_generator_api_client/models/inline_object19.rb +221 -0
  237. data/lib/pdf_generator_api_client/models/inline_object1_response.rb +223 -0
  238. data/lib/pdf_generator_api_client/models/inline_object2.rb +220 -0
  239. data/lib/pdf_generator_api_client/models/inline_object20.rb +220 -0
  240. data/lib/pdf_generator_api_client/models/inline_object20_response.rb +221 -0
  241. data/lib/pdf_generator_api_client/models/inline_object21.rb +255 -0
  242. data/lib/pdf_generator_api_client/models/inline_object22.rb +255 -0
  243. data/lib/pdf_generator_api_client/models/inline_object23.rb +255 -0
  244. data/lib/pdf_generator_api_client/models/inline_object24.rb +255 -0
  245. data/lib/pdf_generator_api_client/models/inline_object25.rb +231 -0
  246. data/lib/pdf_generator_api_client/models/inline_object26.rb +221 -0
  247. data/lib/pdf_generator_api_client/models/inline_object27.rb +221 -0
  248. data/lib/pdf_generator_api_client/models/inline_object3.rb +220 -0
  249. data/lib/pdf_generator_api_client/models/inline_object4.rb +231 -0
  250. data/lib/pdf_generator_api_client/models/inline_object5.rb +231 -0
  251. data/lib/pdf_generator_api_client/models/inline_object6.rb +231 -0
  252. data/lib/pdf_generator_api_client/models/inline_object7.rb +220 -0
  253. data/lib/pdf_generator_api_client/models/inline_object7_response.rb +220 -0
  254. data/lib/pdf_generator_api_client/models/inline_object8.rb +220 -0
  255. data/lib/pdf_generator_api_client/models/inline_object9.rb +230 -0
  256. data/lib/pdf_generator_api_client/models/inline_object9_meta.rb +261 -0
  257. data/lib/pdf_generator_api_client/models/inline_object_meta.rb +231 -0
  258. data/lib/pdf_generator_api_client/models/key_field_param.rb +40 -0
  259. data/lib/pdf_generator_api_client/models/make_accessible_base64.rb +315 -0
  260. data/lib/pdf_generator_api_client/models/make_accessible_request.rb +105 -0
  261. data/lib/pdf_generator_api_client/models/make_accessible_url.rb +315 -0
  262. data/lib/pdf_generator_api_client/models/metadata_param.rb +236 -0
  263. data/lib/pdf_generator_api_client/models/open_editor_request.rb +264 -0
  264. data/lib/pdf_generator_api_client/models/open_editor_request_data.rb +106 -0
  265. data/lib/pdf_generator_api_client/models/optimize_base64.rb +294 -0
  266. data/lib/pdf_generator_api_client/models/optimize_document_request.rb +105 -0
  267. data/lib/pdf_generator_api_client/models/optimize_url.rb +294 -0
  268. data/lib/pdf_generator_api_client/models/output_param.rb +42 -0
  269. data/lib/pdf_generator_api_client/models/pagination_meta.rb +239 -0
  270. data/lib/pdf_generator_api_client/models/promote_template_version200_response.rb +220 -0
  271. data/lib/pdf_generator_api_client/models/public_template_library_item.rb +265 -0
  272. data/lib/pdf_generator_api_client/models/status_param.rb +40 -0
  273. data/lib/pdf_generator_api_client/models/store_document_request.rb +289 -0
  274. data/lib/pdf_generator_api_client/models/template.rb +274 -0
  275. data/lib/pdf_generator_api_client/models/template_definition.rb +292 -0
  276. data/lib/pdf_generator_api_client/models/template_definition_data_settings.rb +234 -0
  277. data/lib/pdf_generator_api_client/models/template_definition_editor.rb +221 -0
  278. data/lib/pdf_generator_api_client/models/template_definition_new.rb +324 -0
  279. data/lib/pdf_generator_api_client/models/template_definition_new_data_settings.rb +245 -0
  280. data/lib/pdf_generator_api_client/models/template_definition_new_editor.rb +221 -0
  281. data/lib/pdf_generator_api_client/models/template_definition_new_layout.rb +377 -0
  282. data/lib/pdf_generator_api_client/models/template_definition_new_layout_margins.rb +248 -0
  283. data/lib/pdf_generator_api_client/models/template_definition_new_layout_repeat_layout.rb +276 -0
  284. data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner.rb +295 -0
  285. data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner_margins.rb +231 -0
  286. data/lib/pdf_generator_api_client/models/template_definition_pages_inner.rb +251 -0
  287. data/lib/pdf_generator_api_client/models/template_param.rb +240 -0
  288. data/lib/pdf_generator_api_client/models/template_param_data.rb +105 -0
  289. data/lib/pdf_generator_api_client/models/template_param_id.rb +106 -0
  290. data/lib/pdf_generator_api_client/models/template_version.rb +301 -0
  291. data/lib/pdf_generator_api_client/models/template_version_collection.rb +231 -0
  292. data/lib/pdf_generator_api_client/models/template_version_collection_meta.rb +238 -0
  293. data/lib/pdf_generator_api_client/models/watermark_base64.rb +320 -0
  294. data/lib/pdf_generator_api_client/models/watermark_file_url_watermark.rb +229 -0
  295. data/lib/pdf_generator_api_client/models/watermark_image.rb +104 -0
  296. data/lib/pdf_generator_api_client/models/watermark_image_content_base64.rb +351 -0
  297. data/lib/pdf_generator_api_client/models/watermark_image_content_url.rb +351 -0
  298. data/lib/pdf_generator_api_client/models/watermark_position.rb +47 -0
  299. data/lib/pdf_generator_api_client/models/watermark_text.rb +403 -0
  300. data/lib/pdf_generator_api_client/models/workspace.rb +250 -0
  301. data/lib/pdf_generator_api_client/version.rb +15 -0
  302. data/lib/pdf_generator_api_client.rb +185 -0
  303. data/pdf_generator_api_client.gemspec +39 -0
  304. data/spec/api/assets_api_spec.rb +47 -0
  305. data/spec/api/conversion_api_spec.rb +71 -0
  306. data/spec/api/documents_api_spec.rb +147 -0
  307. data/spec/api/e_invoices_api_spec.rb +82 -0
  308. data/spec/api/forms_api_spec.rb +144 -0
  309. data/spec/api/misc_api_spec.rb +46 -0
  310. data/spec/api/services_api_spec.rb +119 -0
  311. data/spec/api/template_library_api_spec.rb +59 -0
  312. data/spec/api/template_versions_api_spec.rb +88 -0
  313. data/spec/api/templates_api_spec.rb +173 -0
  314. data/spec/api/workspaces_api_spec.rb +84 -0
  315. data/spec/models/accessibility_option_spec.rb +30 -0
  316. data/spec/models/add_watermark_request_spec.rb +32 -0
  317. data/spec/models/async_output_param_spec.rb +30 -0
  318. data/spec/models/callback_param_spec.rb +42 -0
  319. data/spec/models/component_spec.rb +88 -0
  320. data/spec/models/convert_html2_pdf_request_spec.rb +72 -0
  321. data/spec/models/convert_pdf2_image_request_spec.rb +86 -0
  322. data/spec/models/convert_url2_pdf_request_spec.rb +72 -0
  323. data/spec/models/copy_template_request_spec.rb +36 -0
  324. data/spec/models/create_e_invoice_request_spec.rb +56 -0
  325. data/spec/models/create_factur_xe_invoice_request_spec.rb +64 -0
  326. data/spec/models/create_factur_xe_invoice_request_template_spec.rb +48 -0
  327. data/spec/models/create_workspace_request_spec.rb +36 -0
  328. data/spec/models/data_batch_inner_spec.rb +42 -0
  329. data/spec/models/document_spec.rb +60 -0
  330. data/spec/models/encrypt_and_decrypt_base64_spec.rb +64 -0
  331. data/spec/models/encrypt_and_decrypt_url_spec.rb +64 -0
  332. data/spec/models/encrypt_document_request_spec.rb +32 -0
  333. data/spec/models/extract_form_fields_request_spec.rb +32 -0
  334. data/spec/models/fill_form_fields_request_spec.rb +32 -0
  335. data/spec/models/form_action_download_spec.rb +36 -0
  336. data/spec/models/form_action_send_send_document_headers_inner_spec.rb +42 -0
  337. data/spec/models/form_action_send_send_document_spec.rb +42 -0
  338. data/spec/models/form_action_send_spec.rb +36 -0
  339. data/spec/models/form_action_store_spec.rb +36 -0
  340. data/spec/models/form_configuration_new_actions_inner_spec.rb +21 -0
  341. data/spec/models/form_configuration_new_spec.rb +60 -0
  342. data/spec/models/form_configuration_spec.rb +48 -0
  343. data/spec/models/form_fields_base64_spec.rb +42 -0
  344. data/spec/models/form_fields_inner_spec.rb +58 -0
  345. data/spec/models/form_fields_url_spec.rb +42 -0
  346. data/spec/models/form_fill_base64_spec.rb +58 -0
  347. data/spec/models/form_fill_url_spec.rb +58 -0
  348. data/spec/models/format_param_spec.rb +30 -0
  349. data/spec/models/generate_document_asynchronous_request_spec.rb +78 -0
  350. data/spec/models/generate_document_batch_asynchronous_request_spec.rb +72 -0
  351. data/spec/models/generate_document_batch_request_spec.rb +66 -0
  352. data/spec/models/generate_document_request_spec.rb +72 -0
  353. data/spec/models/generate_qr_code201_response_meta_spec.rb +42 -0
  354. data/spec/models/generate_qr_code201_response_spec.rb +42 -0
  355. data/spec/models/generate_qr_code_request_spec.rb +64 -0
  356. data/spec/models/get_status200_response_spec.rb +66 -0
  357. data/spec/models/get_template_library200_response_spec.rb +36 -0
  358. data/spec/models/get_template_version422_response_spec.rb +36 -0
  359. data/spec/models/import_form_base64_spec.rb +42 -0
  360. data/spec/models/import_form_request_spec.rb +32 -0
  361. data/spec/models/import_form_url_spec.rb +42 -0
  362. data/spec/models/import_template_base64_spec.rb +42 -0
  363. data/spec/models/import_template_request_spec.rb +32 -0
  364. data/spec/models/import_template_url_spec.rb +42 -0
  365. data/spec/models/import_template_url_template_spec.rb +36 -0
  366. data/spec/models/inline_object10_meta_spec.rb +54 -0
  367. data/spec/models/inline_object10_spec.rb +42 -0
  368. data/spec/models/inline_object11_meta_spec.rb +60 -0
  369. data/spec/models/inline_object11_spec.rb +42 -0
  370. data/spec/models/inline_object12_meta_spec.rb +66 -0
  371. data/spec/models/inline_object12_meta_stats_spec.rb +42 -0
  372. data/spec/models/inline_object12_spec.rb +42 -0
  373. data/spec/models/inline_object13_spec.rb +46 -0
  374. data/spec/models/inline_object14_response_value_default_spec.rb +32 -0
  375. data/spec/models/inline_object14_response_value_spec.rb +124 -0
  376. data/spec/models/inline_object14_response_value_value_spec.rb +32 -0
  377. data/spec/models/inline_object14_spec.rb +36 -0
  378. data/spec/models/inline_object15_spec.rb +42 -0
  379. data/spec/models/inline_object16_spec.rb +42 -0
  380. data/spec/models/inline_object17_spec.rb +36 -0
  381. data/spec/models/inline_object18_meta_spec.rb +36 -0
  382. data/spec/models/inline_object18_spec.rb +42 -0
  383. data/spec/models/inline_object19_spec.rb +36 -0
  384. data/spec/models/inline_object1_response_spec.rb +36 -0
  385. data/spec/models/inline_object1_spec.rb +36 -0
  386. data/spec/models/inline_object20_response_spec.rb +36 -0
  387. data/spec/models/inline_object20_spec.rb +36 -0
  388. data/spec/models/inline_object21_spec.rb +40 -0
  389. data/spec/models/inline_object22_spec.rb +40 -0
  390. data/spec/models/inline_object23_spec.rb +40 -0
  391. data/spec/models/inline_object24_spec.rb +40 -0
  392. data/spec/models/inline_object25_spec.rb +42 -0
  393. data/spec/models/inline_object26_spec.rb +36 -0
  394. data/spec/models/inline_object27_spec.rb +36 -0
  395. data/spec/models/inline_object2_spec.rb +36 -0
  396. data/spec/models/inline_object3_spec.rb +36 -0
  397. data/spec/models/inline_object4_spec.rb +42 -0
  398. data/spec/models/inline_object5_spec.rb +42 -0
  399. data/spec/models/inline_object6_spec.rb +42 -0
  400. data/spec/models/inline_object7_response_spec.rb +36 -0
  401. data/spec/models/inline_object7_spec.rb +36 -0
  402. data/spec/models/inline_object8_spec.rb +36 -0
  403. data/spec/models/inline_object9_meta_spec.rb +60 -0
  404. data/spec/models/inline_object9_spec.rb +42 -0
  405. data/spec/models/inline_object_meta_spec.rb +42 -0
  406. data/spec/models/inline_object_spec.rb +42 -0
  407. data/spec/models/key_field_param_spec.rb +30 -0
  408. data/spec/models/make_accessible_base64_spec.rb +64 -0
  409. data/spec/models/make_accessible_request_spec.rb +32 -0
  410. data/spec/models/make_accessible_url_spec.rb +64 -0
  411. data/spec/models/metadata_param_spec.rb +42 -0
  412. data/spec/models/open_editor_request_data_spec.rb +32 -0
  413. data/spec/models/open_editor_request_spec.rb +46 -0
  414. data/spec/models/optimize_base64_spec.rb +52 -0
  415. data/spec/models/optimize_document_request_spec.rb +32 -0
  416. data/spec/models/optimize_url_spec.rb +52 -0
  417. data/spec/models/output_param_spec.rb +30 -0
  418. data/spec/models/pagination_meta_spec.rb +48 -0
  419. data/spec/models/promote_template_version200_response_spec.rb +36 -0
  420. data/spec/models/public_template_library_item_spec.rb +60 -0
  421. data/spec/models/status_param_spec.rb +30 -0
  422. data/spec/models/store_document_request_spec.rb +58 -0
  423. data/spec/models/template_definition_data_settings_spec.rb +42 -0
  424. data/spec/models/template_definition_editor_spec.rb +36 -0
  425. data/spec/models/template_definition_new_data_settings_spec.rb +48 -0
  426. data/spec/models/template_definition_new_editor_spec.rb +36 -0
  427. data/spec/models/template_definition_new_layout_margins_spec.rb +54 -0
  428. data/spec/models/template_definition_new_layout_repeat_layout_spec.rb +52 -0
  429. data/spec/models/template_definition_new_layout_spec.rb +100 -0
  430. data/spec/models/template_definition_new_pages_inner_margins_spec.rb +42 -0
  431. data/spec/models/template_definition_new_pages_inner_spec.rb +78 -0
  432. data/spec/models/template_definition_new_spec.rb +84 -0
  433. data/spec/models/template_definition_pages_inner_spec.rb +54 -0
  434. data/spec/models/template_definition_spec.rb +78 -0
  435. data/spec/models/template_param_data_spec.rb +32 -0
  436. data/spec/models/template_param_id_spec.rb +32 -0
  437. data/spec/models/template_param_spec.rb +48 -0
  438. data/spec/models/template_spec.rb +66 -0
  439. data/spec/models/template_version_collection_meta_spec.rb +48 -0
  440. data/spec/models/template_version_collection_spec.rb +42 -0
  441. data/spec/models/template_version_spec.rb +90 -0
  442. data/spec/models/watermark_base64_spec.rb +58 -0
  443. data/spec/models/watermark_file_url_watermark_spec.rb +42 -0
  444. data/spec/models/watermark_image_content_base64_spec.rb +54 -0
  445. data/spec/models/watermark_image_content_url_spec.rb +54 -0
  446. data/spec/models/watermark_image_spec.rb +21 -0
  447. data/spec/models/watermark_position_spec.rb +30 -0
  448. data/spec/models/watermark_text_spec.rb +66 -0
  449. data/spec/models/workspace_spec.rb +54 -0
  450. data/spec/spec_helper.rb +111 -0
  451. metadata +679 -0
@@ -0,0 +1,318 @@
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 'date'
14
+ require 'time'
15
+
16
+ module PDFGeneratorAPI
17
+ class GenerateDocumentAsynchronousRequest
18
+ attr_accessor :template
19
+
20
+ attr_accessor :callback
21
+
22
+ attr_accessor :format
23
+
24
+ attr_accessor :output
25
+
26
+ # Generated document name (optional)
27
+ attr_accessor :name
28
+
29
+ # When set to true the generation is not counted as merge (monthly usage), but a large PREVIEW stamp is added.
30
+ attr_accessor :testing
31
+
32
+ # Enables semantic document tagging. When enabled, a separate Make Accessible action is executed, which consumes additional credits.
33
+ attr_accessor :make_accessible
34
+
35
+ attr_accessor :metadata
36
+
37
+ class EnumAttributeValidator
38
+ attr_reader :datatype
39
+ attr_reader :allowable_values
40
+
41
+ def initialize(datatype, allowable_values)
42
+ @allowable_values = allowable_values.map do |value|
43
+ case datatype.to_s
44
+ when /Integer/i
45
+ value.to_i
46
+ when /Float/i
47
+ value.to_f
48
+ else
49
+ value
50
+ end
51
+ end
52
+ end
53
+
54
+ def valid?(value)
55
+ !value || allowable_values.include?(value)
56
+ end
57
+ end
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ :'template' => :'template',
63
+ :'callback' => :'callback',
64
+ :'format' => :'format',
65
+ :'output' => :'output',
66
+ :'name' => :'name',
67
+ :'testing' => :'testing',
68
+ :'make_accessible' => :'make_accessible',
69
+ :'metadata' => :'metadata'
70
+ }
71
+ end
72
+
73
+ # Returns attribute mapping this model knows about
74
+ def self.acceptable_attribute_map
75
+ attribute_map
76
+ end
77
+
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ acceptable_attribute_map.values
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'template' => :'TemplateParam',
87
+ :'callback' => :'CallbackParam',
88
+ :'format' => :'FormatParam',
89
+ :'output' => :'AsyncOutputParam',
90
+ :'name' => :'String',
91
+ :'testing' => :'Boolean',
92
+ :'make_accessible' => :'Boolean',
93
+ :'metadata' => :'MetadataParam'
94
+ }
95
+ end
96
+
97
+ # List of attributes with nullable: true
98
+ def self.openapi_nullable
99
+ Set.new([
100
+ ])
101
+ end
102
+
103
+ # Initializes the object
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ def initialize(attributes = {})
106
+ if (!attributes.is_a?(Hash))
107
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PDFGeneratorAPI::GenerateDocumentAsynchronousRequest` initialize method"
108
+ end
109
+
110
+ # check to see if the attribute exists and convert string to symbol for hash key
111
+ acceptable_attribute_map = self.class.acceptable_attribute_map
112
+ attributes = attributes.each_with_object({}) { |(k, v), h|
113
+ if (!acceptable_attribute_map.key?(k.to_sym))
114
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PDFGeneratorAPI::GenerateDocumentAsynchronousRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
115
+ end
116
+ h[k.to_sym] = v
117
+ }
118
+
119
+ if attributes.key?(:'template')
120
+ self.template = attributes[:'template']
121
+ end
122
+
123
+ if attributes.key?(:'callback')
124
+ self.callback = attributes[:'callback']
125
+ end
126
+
127
+ if attributes.key?(:'format')
128
+ self.format = attributes[:'format']
129
+ else
130
+ self.format = 'pdf'
131
+ end
132
+
133
+ if attributes.key?(:'output')
134
+ self.output = attributes[:'output']
135
+ else
136
+ self.output = 'base64'
137
+ end
138
+
139
+ if attributes.key?(:'name')
140
+ self.name = attributes[:'name']
141
+ else
142
+ self.name = ''
143
+ end
144
+
145
+ if attributes.key?(:'testing')
146
+ self.testing = attributes[:'testing']
147
+ else
148
+ self.testing = false
149
+ end
150
+
151
+ if attributes.key?(:'make_accessible')
152
+ self.make_accessible = attributes[:'make_accessible']
153
+ else
154
+ self.make_accessible = false
155
+ end
156
+
157
+ if attributes.key?(:'metadata')
158
+ self.metadata = attributes[:'metadata']
159
+ end
160
+ end
161
+
162
+ # Show invalid properties with the reasons. Usually used together with valid?
163
+ # @return Array for valid properties with the reasons
164
+ def list_invalid_properties
165
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
166
+ invalid_properties = Array.new
167
+ invalid_properties
168
+ end
169
+
170
+ # Check to see if the all the properties in the model are valid
171
+ # @return true if the model is valid
172
+ def valid?
173
+ warn '[DEPRECATED] the `valid?` method is obsolete'
174
+ true
175
+ end
176
+
177
+ # Checks equality by comparing each attribute.
178
+ # @param [Object] Object to be compared
179
+ def ==(o)
180
+ return true if self.equal?(o)
181
+ self.class == o.class &&
182
+ template == o.template &&
183
+ callback == o.callback &&
184
+ format == o.format &&
185
+ output == o.output &&
186
+ name == o.name &&
187
+ testing == o.testing &&
188
+ make_accessible == o.make_accessible &&
189
+ metadata == o.metadata
190
+ end
191
+
192
+ # @see the `==` method
193
+ # @param [Object] Object to be compared
194
+ def eql?(o)
195
+ self == o
196
+ end
197
+
198
+ # Calculates hash code according to all attributes.
199
+ # @return [Integer] Hash code
200
+ def hash
201
+ [template, callback, format, output, name, testing, make_accessible, metadata].hash
202
+ end
203
+
204
+ # Builds the object from hash
205
+ # @param [Hash] attributes Model attributes in the form of hash
206
+ # @return [Object] Returns the model itself
207
+ def self.build_from_hash(attributes)
208
+ return nil unless attributes.is_a?(Hash)
209
+ attributes = attributes.transform_keys(&:to_sym)
210
+ transformed_hash = {}
211
+ openapi_types.each_pair do |key, type|
212
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
213
+ transformed_hash["#{key}"] = nil
214
+ elsif type =~ /\AArray<(.*)>/i
215
+ # check to ensure the input is an array given that the attribute
216
+ # is documented as an array but the input is not
217
+ if attributes[attribute_map[key]].is_a?(Array)
218
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
219
+ end
220
+ elsif !attributes[attribute_map[key]].nil?
221
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
222
+ end
223
+ end
224
+ new(transformed_hash)
225
+ end
226
+
227
+ # Deserializes the data based on type
228
+ # @param string type Data type
229
+ # @param string value Value to be deserialized
230
+ # @return [Object] Deserialized data
231
+ def self._deserialize(type, value)
232
+ case type.to_sym
233
+ when :Time
234
+ Time.parse(value)
235
+ when :Date
236
+ Date.parse(value)
237
+ when :String
238
+ value.to_s
239
+ when :Integer
240
+ value.to_i
241
+ when :Float
242
+ value.to_f
243
+ when :Boolean
244
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
245
+ true
246
+ else
247
+ false
248
+ end
249
+ when :Object
250
+ # generic object (usually a Hash), return directly
251
+ value
252
+ when /\AArray<(?<inner_type>.+)>\z/
253
+ inner_type = Regexp.last_match[:inner_type]
254
+ value.map { |v| _deserialize(inner_type, v) }
255
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
256
+ k_type = Regexp.last_match[:k_type]
257
+ v_type = Regexp.last_match[:v_type]
258
+ {}.tap do |hash|
259
+ value.each do |k, v|
260
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
261
+ end
262
+ end
263
+ else # model
264
+ # models (e.g. Pet) or oneOf
265
+ klass = PDFGeneratorAPI.const_get(type)
266
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
267
+ end
268
+ end
269
+
270
+ # Returns the string representation of the object
271
+ # @return [String] String presentation of the object
272
+ def to_s
273
+ to_hash.to_s
274
+ end
275
+
276
+ # to_body is an alias to to_hash (backward compatibility)
277
+ # @return [Hash] Returns the object in the form of hash
278
+ def to_body
279
+ to_hash
280
+ end
281
+
282
+ # Returns the object in the form of hash
283
+ # @return [Hash] Returns the object in the form of hash
284
+ def to_hash
285
+ hash = {}
286
+ self.class.attribute_map.each_pair do |attr, param|
287
+ value = self.send(attr)
288
+ if value.nil?
289
+ is_nullable = self.class.openapi_nullable.include?(attr)
290
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
291
+ end
292
+
293
+ hash[param] = _to_hash(value)
294
+ end
295
+ hash
296
+ end
297
+
298
+ # Outputs non-array value in the form of hash
299
+ # For object, use to_hash. Otherwise, just return the value
300
+ # @param [Object] value Any valid value
301
+ # @return [Hash] Returns the value in the form of hash
302
+ def _to_hash(value)
303
+ if value.is_a?(Array)
304
+ value.compact.map { |v| _to_hash(v) }
305
+ elsif value.is_a?(Hash)
306
+ {}.tap do |hash|
307
+ value.each { |k, v| hash[k] = _to_hash(v) }
308
+ end
309
+ elsif value.respond_to? :to_hash
310
+ value.to_hash
311
+ else
312
+ value
313
+ end
314
+ end
315
+
316
+ end
317
+
318
+ end
@@ -0,0 +1,308 @@
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 'date'
14
+ require 'time'
15
+
16
+ module PDFGeneratorAPI
17
+ class GenerateDocumentBatchAsynchronousRequest
18
+ attr_accessor :template
19
+
20
+ attr_accessor :callback
21
+
22
+ attr_accessor :format
23
+
24
+ attr_accessor :output
25
+
26
+ # Generated document name (optional)
27
+ attr_accessor :name
28
+
29
+ # When set to true the generation is not counted as merge (monthly usage), but a large PREVIEW stamp is added.
30
+ attr_accessor :testing
31
+
32
+ attr_accessor :metadata
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'template' => :'template',
60
+ :'callback' => :'callback',
61
+ :'format' => :'format',
62
+ :'output' => :'output',
63
+ :'name' => :'name',
64
+ :'testing' => :'testing',
65
+ :'metadata' => :'metadata'
66
+ }
67
+ end
68
+
69
+ # Returns attribute mapping this model knows about
70
+ def self.acceptable_attribute_map
71
+ attribute_map
72
+ end
73
+
74
+ # Returns all the JSON keys this model knows about
75
+ def self.acceptable_attributes
76
+ acceptable_attribute_map.values
77
+ end
78
+
79
+ # Attribute type mapping.
80
+ def self.openapi_types
81
+ {
82
+ :'template' => :'Array<TemplateParam>',
83
+ :'callback' => :'CallbackParam',
84
+ :'format' => :'FormatParam',
85
+ :'output' => :'AsyncOutputParam',
86
+ :'name' => :'String',
87
+ :'testing' => :'Boolean',
88
+ :'metadata' => :'MetadataParam'
89
+ }
90
+ end
91
+
92
+ # List of attributes with nullable: true
93
+ def self.openapi_nullable
94
+ Set.new([
95
+ ])
96
+ end
97
+
98
+ # Initializes the object
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ def initialize(attributes = {})
101
+ if (!attributes.is_a?(Hash))
102
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PDFGeneratorAPI::GenerateDocumentBatchAsynchronousRequest` initialize method"
103
+ end
104
+
105
+ # check to see if the attribute exists and convert string to symbol for hash key
106
+ acceptable_attribute_map = self.class.acceptable_attribute_map
107
+ attributes = attributes.each_with_object({}) { |(k, v), h|
108
+ if (!acceptable_attribute_map.key?(k.to_sym))
109
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PDFGeneratorAPI::GenerateDocumentBatchAsynchronousRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
110
+ end
111
+ h[k.to_sym] = v
112
+ }
113
+
114
+ if attributes.key?(:'template')
115
+ if (value = attributes[:'template']).is_a?(Array)
116
+ self.template = value
117
+ end
118
+ end
119
+
120
+ if attributes.key?(:'callback')
121
+ self.callback = attributes[:'callback']
122
+ end
123
+
124
+ if attributes.key?(:'format')
125
+ self.format = attributes[:'format']
126
+ else
127
+ self.format = 'pdf'
128
+ end
129
+
130
+ if attributes.key?(:'output')
131
+ self.output = attributes[:'output']
132
+ else
133
+ self.output = 'base64'
134
+ end
135
+
136
+ if attributes.key?(:'name')
137
+ self.name = attributes[:'name']
138
+ else
139
+ self.name = ''
140
+ end
141
+
142
+ if attributes.key?(:'testing')
143
+ self.testing = attributes[:'testing']
144
+ else
145
+ self.testing = false
146
+ end
147
+
148
+ if attributes.key?(:'metadata')
149
+ self.metadata = attributes[:'metadata']
150
+ end
151
+ end
152
+
153
+ # Show invalid properties with the reasons. Usually used together with valid?
154
+ # @return Array for valid properties with the reasons
155
+ def list_invalid_properties
156
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
157
+ invalid_properties = Array.new
158
+ invalid_properties
159
+ end
160
+
161
+ # Check to see if the all the properties in the model are valid
162
+ # @return true if the model is valid
163
+ def valid?
164
+ warn '[DEPRECATED] the `valid?` method is obsolete'
165
+ true
166
+ end
167
+
168
+ # Checks equality by comparing each attribute.
169
+ # @param [Object] Object to be compared
170
+ def ==(o)
171
+ return true if self.equal?(o)
172
+ self.class == o.class &&
173
+ template == o.template &&
174
+ callback == o.callback &&
175
+ format == o.format &&
176
+ output == o.output &&
177
+ name == o.name &&
178
+ testing == o.testing &&
179
+ metadata == o.metadata
180
+ end
181
+
182
+ # @see the `==` method
183
+ # @param [Object] Object to be compared
184
+ def eql?(o)
185
+ self == o
186
+ end
187
+
188
+ # Calculates hash code according to all attributes.
189
+ # @return [Integer] Hash code
190
+ def hash
191
+ [template, callback, format, output, name, testing, metadata].hash
192
+ end
193
+
194
+ # Builds the object from hash
195
+ # @param [Hash] attributes Model attributes in the form of hash
196
+ # @return [Object] Returns the model itself
197
+ def self.build_from_hash(attributes)
198
+ return nil unless attributes.is_a?(Hash)
199
+ attributes = attributes.transform_keys(&:to_sym)
200
+ transformed_hash = {}
201
+ openapi_types.each_pair do |key, type|
202
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
203
+ transformed_hash["#{key}"] = nil
204
+ elsif type =~ /\AArray<(.*)>/i
205
+ # check to ensure the input is an array given that the attribute
206
+ # is documented as an array but the input is not
207
+ if attributes[attribute_map[key]].is_a?(Array)
208
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
209
+ end
210
+ elsif !attributes[attribute_map[key]].nil?
211
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
212
+ end
213
+ end
214
+ new(transformed_hash)
215
+ end
216
+
217
+ # Deserializes the data based on type
218
+ # @param string type Data type
219
+ # @param string value Value to be deserialized
220
+ # @return [Object] Deserialized data
221
+ def self._deserialize(type, value)
222
+ case type.to_sym
223
+ when :Time
224
+ Time.parse(value)
225
+ when :Date
226
+ Date.parse(value)
227
+ when :String
228
+ value.to_s
229
+ when :Integer
230
+ value.to_i
231
+ when :Float
232
+ value.to_f
233
+ when :Boolean
234
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
235
+ true
236
+ else
237
+ false
238
+ end
239
+ when :Object
240
+ # generic object (usually a Hash), return directly
241
+ value
242
+ when /\AArray<(?<inner_type>.+)>\z/
243
+ inner_type = Regexp.last_match[:inner_type]
244
+ value.map { |v| _deserialize(inner_type, v) }
245
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
246
+ k_type = Regexp.last_match[:k_type]
247
+ v_type = Regexp.last_match[:v_type]
248
+ {}.tap do |hash|
249
+ value.each do |k, v|
250
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
251
+ end
252
+ end
253
+ else # model
254
+ # models (e.g. Pet) or oneOf
255
+ klass = PDFGeneratorAPI.const_get(type)
256
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
257
+ end
258
+ end
259
+
260
+ # Returns the string representation of the object
261
+ # @return [String] String presentation of the object
262
+ def to_s
263
+ to_hash.to_s
264
+ end
265
+
266
+ # to_body is an alias to to_hash (backward compatibility)
267
+ # @return [Hash] Returns the object in the form of hash
268
+ def to_body
269
+ to_hash
270
+ end
271
+
272
+ # Returns the object in the form of hash
273
+ # @return [Hash] Returns the object in the form of hash
274
+ def to_hash
275
+ hash = {}
276
+ self.class.attribute_map.each_pair do |attr, param|
277
+ value = self.send(attr)
278
+ if value.nil?
279
+ is_nullable = self.class.openapi_nullable.include?(attr)
280
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
281
+ end
282
+
283
+ hash[param] = _to_hash(value)
284
+ end
285
+ hash
286
+ end
287
+
288
+ # Outputs non-array value in the form of hash
289
+ # For object, use to_hash. Otherwise, just return the value
290
+ # @param [Object] value Any valid value
291
+ # @return [Hash] Returns the value in the form of hash
292
+ def _to_hash(value)
293
+ if value.is_a?(Array)
294
+ value.compact.map { |v| _to_hash(v) }
295
+ elsif value.is_a?(Hash)
296
+ {}.tap do |hash|
297
+ value.each { |k, v| hash[k] = _to_hash(v) }
298
+ end
299
+ elsif value.respond_to? :to_hash
300
+ value.to_hash
301
+ else
302
+ value
303
+ end
304
+ end
305
+
306
+ end
307
+
308
+ end