pdf_generator_api_client 8.0.29 → 8.0.34

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 (464) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +89 -66
  3. data/docs/AssetsApi.md +5 -5
  4. data/docs/AttachmentsParamInner.md +20 -0
  5. data/docs/CallbackParam.md +1 -1
  6. data/docs/ConversionApi.md +16 -16
  7. data/docs/ConvertHTML2PDFRequest.md +2 -2
  8. data/docs/ConvertURL2PDFRequest.md +13 -3
  9. data/docs/CreateEInvoiceRequest.md +2 -2
  10. data/docs/CreateFacturXEInvoiceRequestTemplate.md +2 -2
  11. data/docs/{TemplateParamId.md → CreateFacturXEInvoiceRequestTemplateId.md} +4 -4
  12. data/docs/CreateWorkspaceRequest.md +1 -1
  13. data/docs/CreateXRechnungEInvoiceRequest.md +22 -0
  14. data/docs/DocumentsApi.md +52 -48
  15. data/docs/EInvoiceType.md +15 -0
  16. data/docs/EInvoicesApi.md +17 -22
  17. data/docs/EncryptAndDecryptUrl.md +1 -1
  18. data/docs/Error.md +18 -0
  19. data/docs/Font.md +26 -0
  20. data/docs/FontsApi.md +79 -0
  21. data/docs/FormActionSendSendDocument.md +1 -1
  22. data/docs/FormActionSign.md +18 -0
  23. data/docs/FormConfigurationImport.md +24 -0
  24. data/docs/FormConfigurationNew.md +3 -3
  25. data/docs/FormConfigurationNewActionsInner.md +3 -1
  26. data/docs/FormField.md +30 -0
  27. data/docs/FormFieldOptions.md +18 -0
  28. data/docs/FormFieldSubRowsInner.md +30 -0
  29. data/docs/FormFieldsUrl.md +1 -1
  30. data/docs/FormFillUrl.md +1 -1
  31. data/docs/FormTableColumn.md +28 -0
  32. data/docs/FormsApi.md +100 -32
  33. data/docs/GenerateDocumentAsynchronousRequest.md +7 -1
  34. data/docs/GenerateDocumentBatchAsynchronousRequest.md +8 -2
  35. data/docs/GenerateDocumentBatchRequest.md +7 -1
  36. data/docs/GenerateDocumentRequest.md +6 -0
  37. data/docs/GenerateQRCode200Response.md +20 -0
  38. data/docs/{GenerateQRCode201ResponseMeta.md → GenerateQRCode200ResponseMeta.md} +2 -2
  39. data/docs/GenerateQRCodeRequest.md +3 -3
  40. data/docs/{InlineObject23.md → GetEInvoiceSchema200Response.md} +3 -3
  41. data/docs/GetFonts200Response.md +18 -0
  42. data/docs/GetFormSchema200Response.md +18 -0
  43. data/docs/GetStatus200Response.md +2 -0
  44. data/docs/GetTemplateSchema200Response.md +18 -0
  45. data/docs/ImportFormBase64.md +1 -1
  46. data/docs/ImportFormUrl.md +1 -1
  47. data/docs/InlineObject10.md +2 -2
  48. data/docs/InlineObject10Meta.md +10 -8
  49. data/docs/InlineObject11.md +2 -2
  50. data/docs/InlineObject11Meta.md +5 -3
  51. data/docs/InlineObject11MetaStats.md +22 -0
  52. data/docs/InlineObject12.md +2 -4
  53. data/docs/InlineObject12Response.md +20 -0
  54. data/docs/InlineObject13.md +2 -4
  55. data/docs/{InlineObject14ResponseValue.md → InlineObject13ResponseValue.md} +4 -4
  56. data/docs/{InlineObject14ResponseValueDefault.md → InlineObject13ResponseValueDefault.md} +4 -4
  57. data/docs/{InlineObject14ResponseValueValue.md → InlineObject13ResponseValueValue.md} +4 -4
  58. data/docs/InlineObject14.md +4 -2
  59. data/docs/InlineObject15.md +2 -4
  60. data/docs/InlineObject16.md +1 -1
  61. data/docs/InlineObject17.md +1 -1
  62. data/docs/InlineObject18.md +4 -2
  63. data/docs/InlineObject19.md +2 -4
  64. data/docs/InlineObject20.md +4 -2
  65. data/docs/{InlineObject21Meta.md → InlineObject20Meta.md} +2 -2
  66. data/docs/InlineObject21.md +2 -4
  67. data/docs/InlineObject22.md +2 -2
  68. data/docs/{InlineObject23Response.md → InlineObject22Response.md} +3 -3
  69. data/docs/InlineObject7.md +1 -1
  70. data/docs/InlineObject8.md +4 -2
  71. data/docs/{InlineObject12Meta.md → InlineObject8Meta.md} +3 -5
  72. data/docs/InlineObject9.md +2 -2
  73. data/docs/InlineObject9Meta.md +7 -9
  74. data/docs/MakeAccessibleUrl.md +1 -1
  75. data/docs/MetadataParam.md +1 -1
  76. data/docs/MiscApi.md +1 -6
  77. data/docs/OpenEditorRequestData.md +7 -5
  78. data/docs/OptimizeUrl.md +1 -1
  79. data/docs/ServicesApi.md +28 -28
  80. data/docs/StoreDocumentRequest.md +1 -1
  81. data/docs/Template.md +3 -1
  82. data/docs/TemplateDefinition.md +14 -6
  83. data/docs/TemplateDefinitionNewLayout.md +5 -5
  84. data/docs/TemplateDefinitionNewLayoutMargins.md +4 -4
  85. data/docs/TemplateDefinitionNewPagesInner.md +3 -3
  86. data/docs/TemplateDefinitionNewPagesInnerLayout.md +49 -0
  87. data/docs/TemplateDefinitionUpdate.md +34 -0
  88. data/docs/TemplateLibraryApi.md +4 -4
  89. data/docs/TemplateParam.md +1 -1
  90. data/docs/TemplateParamData.md +7 -5
  91. data/docs/TemplateVersion.md +4 -2
  92. data/docs/TemplateVersionsApi.md +4 -4
  93. data/docs/TemplatesApi.md +38 -42
  94. data/docs/ValidationError.md +20 -0
  95. data/docs/WatermarkFileUrl.md +24 -0
  96. data/docs/Workspace.md +4 -0
  97. data/docs/WorkspacesApi.md +21 -15
  98. data/lib/pdf_generator_api_client/api/assets_api.rb +6 -6
  99. data/lib/pdf_generator_api_client/api/conversion_api.rb +14 -14
  100. data/lib/pdf_generator_api_client/api/documents_api.rb +45 -35
  101. data/lib/pdf_generator_api_client/api/e_invoices_api.rb +20 -20
  102. data/lib/pdf_generator_api_client/api/fonts_api.rb +86 -0
  103. data/lib/pdf_generator_api_client/api/forms_api.rb +99 -25
  104. data/lib/pdf_generator_api_client/api/misc_api.rb +3 -3
  105. data/lib/pdf_generator_api_client/api/services_api.rb +23 -23
  106. data/lib/pdf_generator_api_client/api/template_library_api.rb +5 -5
  107. data/lib/pdf_generator_api_client/api/template_versions_api.rb +5 -5
  108. data/lib/pdf_generator_api_client/api/templates_api.rb +50 -33
  109. data/lib/pdf_generator_api_client/api/workspaces_api.rb +42 -14
  110. data/lib/pdf_generator_api_client/api_client.rb +2 -2
  111. data/lib/pdf_generator_api_client/api_error.rb +2 -2
  112. data/lib/pdf_generator_api_client/configuration.rb +2 -2
  113. data/lib/pdf_generator_api_client/models/accessibility_option.rb +2 -2
  114. data/lib/pdf_generator_api_client/models/add_watermark_request.rb +2 -2
  115. data/lib/pdf_generator_api_client/models/async_output_param.rb +2 -2
  116. data/lib/pdf_generator_api_client/models/{form_fields_inner.rb → attachments_param_inner.rb} +54 -66
  117. data/lib/pdf_generator_api_client/models/callback_param.rb +31 -3
  118. data/lib/pdf_generator_api_client/models/convert_html2_pdf_request.rb +39 -3
  119. data/lib/pdf_generator_api_client/models/convert_pdf2_image_request.rb +2 -2
  120. data/lib/pdf_generator_api_client/models/convert_url2_pdf_request.rb +201 -8
  121. data/lib/pdf_generator_api_client/models/copy_template_request.rb +21 -2
  122. data/lib/pdf_generator_api_client/models/create_e_invoice_request.rb +3 -16
  123. data/lib/pdf_generator_api_client/models/create_factur_xe_invoice_request.rb +21 -2
  124. data/lib/pdf_generator_api_client/models/create_factur_xe_invoice_request_template.rb +38 -5
  125. data/lib/pdf_generator_api_client/models/{template_param_id.rb → create_factur_xe_invoice_request_template_id.rb} +3 -3
  126. data/lib/pdf_generator_api_client/models/create_workspace_request.rb +28 -2
  127. data/lib/pdf_generator_api_client/models/create_x_rechnung_e_invoice_request.rb +308 -0
  128. data/lib/pdf_generator_api_client/models/document.rb +2 -2
  129. data/lib/pdf_generator_api_client/models/document_action.rb +4 -4
  130. data/lib/pdf_generator_api_client/models/document_signature.rb +2 -2
  131. data/lib/pdf_generator_api_client/models/document_signatures.rb +2 -2
  132. data/lib/pdf_generator_api_client/models/document_user.rb +2 -2
  133. data/lib/pdf_generator_api_client/models/document_version.rb +2 -2
  134. data/lib/pdf_generator_api_client/models/e_invoice_type.rb +48 -0
  135. data/lib/pdf_generator_api_client/models/encrypt_and_decrypt_base64.rb +49 -2
  136. data/lib/pdf_generator_api_client/models/encrypt_and_decrypt_url.rb +49 -2
  137. data/lib/pdf_generator_api_client/models/encrypt_document_request.rb +2 -2
  138. data/lib/pdf_generator_api_client/models/{inline_object26.rb → error.rb} +17 -34
  139. data/lib/pdf_generator_api_client/models/extract_form_fields_request.rb +2 -2
  140. data/lib/pdf_generator_api_client/models/fill_form_fields_request.rb +2 -2
  141. data/lib/pdf_generator_api_client/models/font.rb +348 -0
  142. data/lib/pdf_generator_api_client/models/form_action_download.rb +3 -3
  143. data/lib/pdf_generator_api_client/models/form_action_send.rb +3 -3
  144. data/lib/pdf_generator_api_client/models/form_action_send_send_document.rb +3 -3
  145. data/lib/pdf_generator_api_client/models/form_action_send_send_document_headers_inner.rb +20 -2
  146. data/lib/pdf_generator_api_client/models/{data_batch_inner.rb → form_action_sign.rb} +13 -23
  147. data/lib/pdf_generator_api_client/models/form_action_store.rb +3 -3
  148. data/lib/pdf_generator_api_client/models/form_configuration.rb +29 -2
  149. data/lib/pdf_generator_api_client/models/form_configuration_import.rb +315 -0
  150. data/lib/pdf_generator_api_client/models/form_configuration_new.rb +93 -5
  151. data/lib/pdf_generator_api_client/models/form_configuration_new_actions_inner.rb +3 -2
  152. data/lib/pdf_generator_api_client/models/form_field.rb +462 -0
  153. data/lib/pdf_generator_api_client/models/{inline_object24.rb → form_field_options.rb} +46 -44
  154. data/{spec/models/inline_object27_spec.rb → lib/pdf_generator_api_client/models/form_field_sub_rows_inner.rb} +86 -22
  155. data/lib/pdf_generator_api_client/models/form_fields_base64.rb +2 -2
  156. data/lib/pdf_generator_api_client/models/form_fields_url.rb +2 -2
  157. data/lib/pdf_generator_api_client/models/form_fill_base64.rb +2 -2
  158. data/lib/pdf_generator_api_client/models/form_fill_url.rb +2 -2
  159. data/lib/pdf_generator_api_client/models/form_table_column.rb +446 -0
  160. data/lib/pdf_generator_api_client/models/format_param.rb +2 -2
  161. data/lib/pdf_generator_api_client/models/generate_document_asynchronous_request.rb +94 -3
  162. data/lib/pdf_generator_api_client/models/generate_document_batch_asynchronous_request.rb +111 -3
  163. data/lib/pdf_generator_api_client/models/generate_document_batch_request.rb +94 -3
  164. data/lib/pdf_generator_api_client/models/generate_document_request.rb +77 -3
  165. data/lib/pdf_generator_api_client/models/{generate_qr_code201_response.rb → generate_qr_code200_response.rb} +7 -7
  166. data/lib/pdf_generator_api_client/models/{generate_qr_code201_response_meta.rb → generate_qr_code200_response_meta.rb} +5 -5
  167. data/lib/pdf_generator_api_client/models/generate_qr_code_request.rb +65 -5
  168. data/lib/pdf_generator_api_client/models/generate_viewer_url200_response.rb +2 -2
  169. data/lib/pdf_generator_api_client/models/generate_viewer_url200_response_meta.rb +2 -2
  170. data/lib/pdf_generator_api_client/models/generate_viewer_url_request.rb +2 -2
  171. data/lib/pdf_generator_api_client/models/get_e_invoice_schema200_response.rb +238 -0
  172. data/lib/pdf_generator_api_client/models/{inline_object23.rb → get_fonts200_response.rb} +9 -7
  173. data/lib/pdf_generator_api_client/models/{template_definition_editor.rb → get_form_schema200_response.rb} +30 -13
  174. data/lib/pdf_generator_api_client/models/get_status200_response.rb +14 -3
  175. data/lib/pdf_generator_api_client/models/get_template_library200_response.rb +2 -2
  176. data/lib/pdf_generator_api_client/models/{template_definition_pages_inner.rb → get_template_schema200_response.rb} +30 -43
  177. data/lib/pdf_generator_api_client/models/import_form_base64.rb +3 -3
  178. data/lib/pdf_generator_api_client/models/import_form_request.rb +2 -2
  179. data/lib/pdf_generator_api_client/models/import_form_url.rb +3 -3
  180. data/lib/pdf_generator_api_client/models/import_template_base64.rb +2 -2
  181. data/lib/pdf_generator_api_client/models/import_template_request.rb +2 -2
  182. data/lib/pdf_generator_api_client/models/import_template_url.rb +2 -2
  183. data/lib/pdf_generator_api_client/models/import_template_url_template.rb +2 -2
  184. data/lib/pdf_generator_api_client/models/inline_object.rb +2 -2
  185. data/lib/pdf_generator_api_client/models/inline_object1.rb +2 -2
  186. data/lib/pdf_generator_api_client/models/inline_object10.rb +5 -7
  187. data/lib/pdf_generator_api_client/models/inline_object10_meta.rb +20 -10
  188. data/lib/pdf_generator_api_client/models/inline_object11.rb +3 -3
  189. data/lib/pdf_generator_api_client/models/inline_object11_meta.rb +13 -4
  190. data/lib/pdf_generator_api_client/models/{inline_object12_meta_stats.rb → inline_object11_meta_stats.rb} +21 -11
  191. data/lib/pdf_generator_api_client/models/inline_object12.rb +23 -16
  192. data/lib/pdf_generator_api_client/models/{inline_object25.rb → inline_object12_response.rb} +55 -21
  193. data/lib/pdf_generator_api_client/models/inline_object13.rb +12 -54
  194. data/lib/pdf_generator_api_client/models/{inline_object14_response_value.rb → inline_object13_response_value.rb} +7 -7
  195. data/lib/pdf_generator_api_client/models/{inline_object14_response_value_default.rb → inline_object13_response_value_default.rb} +3 -3
  196. data/lib/pdf_generator_api_client/models/{inline_object14_response_value_value.rb → inline_object13_response_value_value.rb} +3 -3
  197. data/lib/pdf_generator_api_client/models/inline_object14.rb +16 -8
  198. data/lib/pdf_generator_api_client/models/inline_object15.rb +6 -15
  199. data/lib/pdf_generator_api_client/models/inline_object16.rb +4 -6
  200. data/lib/pdf_generator_api_client/models/inline_object17.rb +6 -4
  201. data/lib/pdf_generator_api_client/models/inline_object18.rb +16 -9
  202. data/lib/pdf_generator_api_client/models/inline_object19.rb +6 -15
  203. data/lib/pdf_generator_api_client/models/inline_object1_response.rb +2 -2
  204. data/lib/pdf_generator_api_client/models/inline_object2.rb +2 -2
  205. data/lib/pdf_generator_api_client/models/inline_object20.rb +16 -6
  206. data/lib/pdf_generator_api_client/models/{inline_object21_meta.rb → inline_object20_meta.rb} +5 -5
  207. data/lib/pdf_generator_api_client/models/inline_object21.rb +7 -16
  208. data/lib/pdf_generator_api_client/models/inline_object22.rb +3 -4
  209. data/lib/pdf_generator_api_client/models/{inline_object23_response.rb → inline_object22_response.rb} +5 -5
  210. data/lib/pdf_generator_api_client/models/inline_object3.rb +2 -2
  211. data/lib/pdf_generator_api_client/models/inline_object4.rb +2 -2
  212. data/lib/pdf_generator_api_client/models/inline_object5.rb +2 -2
  213. data/lib/pdf_generator_api_client/models/inline_object6.rb +2 -2
  214. data/lib/pdf_generator_api_client/models/inline_object7.rb +3 -3
  215. data/lib/pdf_generator_api_client/models/inline_object8.rb +16 -6
  216. data/lib/pdf_generator_api_client/models/{inline_object12_meta.rb → inline_object8_meta.rb} +7 -16
  217. data/lib/pdf_generator_api_client/models/inline_object9.rb +7 -5
  218. data/lib/pdf_generator_api_client/models/inline_object9_meta.rb +10 -20
  219. data/lib/pdf_generator_api_client/models/inline_object_meta.rb +2 -2
  220. data/lib/pdf_generator_api_client/models/key_field_param.rb +2 -2
  221. data/lib/pdf_generator_api_client/models/make_accessible_base64.rb +2 -2
  222. data/lib/pdf_generator_api_client/models/make_accessible_request.rb +2 -2
  223. data/lib/pdf_generator_api_client/models/make_accessible_url.rb +2 -2
  224. data/lib/pdf_generator_api_client/models/metadata_param.rb +22 -3
  225. data/lib/pdf_generator_api_client/models/open_editor_request.rb +4 -4
  226. data/lib/pdf_generator_api_client/models/open_editor_request_data.rb +6 -5
  227. data/lib/pdf_generator_api_client/models/optimize_base64.rb +2 -2
  228. data/lib/pdf_generator_api_client/models/optimize_document_request.rb +2 -2
  229. data/lib/pdf_generator_api_client/models/optimize_url.rb +2 -2
  230. data/lib/pdf_generator_api_client/models/output_param.rb +2 -2
  231. data/lib/pdf_generator_api_client/models/pagination_meta.rb +2 -2
  232. data/lib/pdf_generator_api_client/models/prefill_param.rb +2 -2
  233. data/lib/pdf_generator_api_client/models/promote_template_version200_response.rb +2 -2
  234. data/lib/pdf_generator_api_client/models/public_template_library_item.rb +2 -2
  235. data/lib/pdf_generator_api_client/models/status_param.rb +2 -2
  236. data/lib/pdf_generator_api_client/models/store_document_request.rb +22 -5
  237. data/lib/pdf_generator_api_client/models/template.rb +16 -6
  238. data/lib/pdf_generator_api_client/models/template_definition.rb +93 -18
  239. data/lib/pdf_generator_api_client/models/template_definition_new.rb +20 -2
  240. data/lib/pdf_generator_api_client/models/template_definition_new_data_settings.rb +2 -2
  241. data/lib/pdf_generator_api_client/models/template_definition_new_editor.rb +2 -2
  242. data/lib/pdf_generator_api_client/models/template_definition_new_layout.rb +38 -9
  243. data/lib/pdf_generator_api_client/models/template_definition_new_layout_margins.rb +75 -3
  244. data/lib/pdf_generator_api_client/models/template_definition_new_layout_repeat_layout.rb +4 -4
  245. data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner.rb +5 -5
  246. data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner_layout.rb +106 -0
  247. data/lib/pdf_generator_api_client/models/template_definition_new_pages_inner_margins.rb +3 -2
  248. data/lib/pdf_generator_api_client/models/template_definition_update.rb +335 -0
  249. data/lib/pdf_generator_api_client/models/template_param.rb +3 -3
  250. data/lib/pdf_generator_api_client/models/template_param_data.rb +6 -4
  251. data/lib/pdf_generator_api_client/models/template_version.rb +13 -3
  252. data/lib/pdf_generator_api_client/models/template_version_collection.rb +2 -2
  253. data/lib/pdf_generator_api_client/models/template_version_collection_meta.rb +2 -2
  254. data/lib/pdf_generator_api_client/models/{inline_object29.rb → validation_error.rb} +28 -9
  255. data/lib/pdf_generator_api_client/models/watermark_base64.rb +2 -2
  256. data/lib/pdf_generator_api_client/models/{component.rb → watermark_file_url.rb} +77 -93
  257. data/lib/pdf_generator_api_client/models/watermark_file_url_watermark.rb +2 -2
  258. data/lib/pdf_generator_api_client/models/watermark_image.rb +2 -2
  259. data/lib/pdf_generator_api_client/models/watermark_image_content_base64.rb +2 -2
  260. data/lib/pdf_generator_api_client/models/watermark_image_content_url.rb +2 -2
  261. data/lib/pdf_generator_api_client/models/watermark_position.rb +2 -2
  262. data/lib/pdf_generator_api_client/models/watermark_text.rb +2 -2
  263. data/lib/pdf_generator_api_client/models/workspace.rb +23 -3
  264. data/lib/pdf_generator_api_client/version.rb +3 -3
  265. data/lib/pdf_generator_api_client.rb +33 -29
  266. data/pdf_generator_api_client.gemspec +2 -2
  267. data/spec/api/assets_api_spec.rb +3 -3
  268. data/spec/api/conversion_api_spec.rb +6 -6
  269. data/spec/api/documents_api_spec.rb +15 -13
  270. data/spec/api/e_invoices_api_spec.rb +6 -6
  271. data/spec/api/fonts_api_spec.rb +47 -0
  272. data/spec/api/forms_api_spec.rb +24 -10
  273. data/spec/api/misc_api_spec.rb +2 -2
  274. data/spec/api/services_api_spec.rb +9 -9
  275. data/spec/api/template_library_api_spec.rb +3 -3
  276. data/spec/api/template_versions_api_spec.rb +3 -3
  277. data/spec/api/templates_api_spec.rb +13 -10
  278. data/spec/api/workspaces_api_spec.rb +9 -5
  279. data/spec/models/accessibility_option_spec.rb +2 -2
  280. data/spec/models/add_watermark_request_spec.rb +2 -2
  281. data/spec/models/async_output_param_spec.rb +2 -2
  282. data/spec/models/attachments_param_inner_spec.rb +42 -0
  283. data/spec/models/callback_param_spec.rb +2 -2
  284. data/spec/models/convert_html2_pdf_request_spec.rb +2 -2
  285. data/spec/models/convert_pdf2_image_request_spec.rb +2 -2
  286. data/spec/models/convert_url2_pdf_request_spec.rb +40 -2
  287. data/spec/models/copy_template_request_spec.rb +2 -2
  288. data/spec/models/create_e_invoice_request_spec.rb +2 -6
  289. data/spec/models/create_factur_xe_invoice_request_spec.rb +2 -2
  290. data/spec/models/create_factur_xe_invoice_request_template_id_spec.rb +32 -0
  291. data/spec/models/create_factur_xe_invoice_request_template_spec.rb +2 -2
  292. data/spec/models/create_workspace_request_spec.rb +2 -2
  293. data/spec/models/create_x_rechnung_e_invoice_request_spec.rb +56 -0
  294. data/spec/models/document_action_spec.rb +3 -3
  295. data/spec/models/document_signature_spec.rb +2 -2
  296. data/spec/models/document_signatures_spec.rb +2 -2
  297. data/spec/models/document_spec.rb +2 -2
  298. data/spec/models/document_user_spec.rb +2 -2
  299. data/spec/models/document_version_spec.rb +2 -2
  300. data/spec/models/e_invoice_type_spec.rb +30 -0
  301. data/spec/models/encrypt_and_decrypt_base64_spec.rb +2 -2
  302. data/spec/models/encrypt_and_decrypt_url_spec.rb +2 -2
  303. data/spec/models/encrypt_document_request_spec.rb +2 -2
  304. data/spec/models/{get_template_version422_response_spec.rb → error_spec.rb} +8 -8
  305. data/spec/models/extract_form_fields_request_spec.rb +2 -2
  306. data/spec/models/fill_form_fields_request_spec.rb +2 -2
  307. data/spec/models/{component_spec.rb → font_spec.rb} +16 -40
  308. data/spec/models/form_action_download_spec.rb +2 -2
  309. data/spec/models/form_action_send_send_document_headers_inner_spec.rb +2 -2
  310. data/spec/models/form_action_send_send_document_spec.rb +2 -2
  311. data/spec/models/form_action_send_spec.rb +2 -2
  312. data/spec/models/form_action_sign_spec.rb +36 -0
  313. data/spec/models/form_action_store_spec.rb +2 -2
  314. data/spec/models/{template_definition_pages_inner_spec.rb → form_configuration_import_spec.rb} +12 -12
  315. data/spec/models/form_configuration_new_actions_inner_spec.rb +2 -2
  316. data/spec/models/form_configuration_new_spec.rb +2 -2
  317. data/spec/models/form_configuration_spec.rb +2 -2
  318. data/spec/models/{form_fields_inner_spec.rb → form_field_options_spec.rb} +9 -31
  319. data/spec/models/form_field_spec.rb +76 -0
  320. data/spec/models/{data_batch_inner_spec.rb → form_field_sub_rows_inner_spec.rb} +4 -25
  321. data/spec/models/form_fields_base64_spec.rb +2 -2
  322. data/spec/models/form_fields_url_spec.rb +2 -2
  323. data/spec/models/form_fill_base64_spec.rb +2 -2
  324. data/spec/models/form_fill_url_spec.rb +2 -2
  325. data/spec/models/form_table_column_spec.rb +70 -0
  326. data/spec/models/format_param_spec.rb +2 -2
  327. data/spec/models/generate_document_asynchronous_request_spec.rb +20 -2
  328. data/spec/models/generate_document_batch_asynchronous_request_spec.rb +20 -2
  329. data/spec/models/generate_document_batch_request_spec.rb +20 -2
  330. data/spec/models/generate_document_request_spec.rb +20 -2
  331. data/spec/models/{generate_qr_code201_response_meta_spec.rb → generate_qr_code200_response_meta_spec.rb} +8 -8
  332. data/spec/models/{generate_qr_code201_response_spec.rb → generate_qr_code200_response_spec.rb} +8 -8
  333. data/spec/models/generate_qr_code_request_spec.rb +2 -2
  334. data/spec/models/generate_viewer_url200_response_meta_spec.rb +2 -2
  335. data/spec/models/generate_viewer_url200_response_spec.rb +2 -2
  336. data/spec/models/generate_viewer_url_request_spec.rb +2 -2
  337. data/spec/models/get_e_invoice_schema200_response_spec.rb +36 -0
  338. data/spec/models/{inline_object23_spec.rb → get_fonts200_response_spec.rb} +8 -8
  339. data/spec/models/{template_definition_editor_spec.rb → get_form_schema200_response_spec.rb} +9 -9
  340. data/spec/models/get_status200_response_spec.rb +8 -2
  341. data/spec/models/get_template_library200_response_spec.rb +2 -2
  342. data/spec/models/get_template_schema200_response_spec.rb +36 -0
  343. data/spec/models/import_form_base64_spec.rb +2 -2
  344. data/spec/models/import_form_request_spec.rb +2 -2
  345. data/spec/models/import_form_url_spec.rb +2 -2
  346. data/spec/models/import_template_base64_spec.rb +2 -2
  347. data/spec/models/import_template_request_spec.rb +2 -2
  348. data/spec/models/import_template_url_spec.rb +2 -2
  349. data/spec/models/import_template_url_template_spec.rb +2 -2
  350. data/spec/models/inline_object10_meta_spec.rb +8 -2
  351. data/spec/models/inline_object10_spec.rb +2 -2
  352. data/spec/models/inline_object11_meta_spec.rb +8 -2
  353. data/spec/models/{inline_object12_meta_stats_spec.rb → inline_object11_meta_stats_spec.rb} +14 -8
  354. data/spec/models/inline_object11_spec.rb +2 -2
  355. data/spec/models/inline_object12_response_spec.rb +46 -0
  356. data/spec/models/inline_object12_spec.rb +2 -8
  357. data/spec/models/{inline_object14_response_value_default_spec.rb → inline_object13_response_value_default_spec.rb} +4 -4
  358. data/spec/models/{inline_object14_response_value_spec.rb → inline_object13_response_value_spec.rb} +8 -8
  359. data/spec/models/{inline_object14_response_value_value_spec.rb → inline_object13_response_value_value_spec.rb} +4 -4
  360. data/spec/models/inline_object13_spec.rb +3 -13
  361. data/spec/models/inline_object14_spec.rb +8 -2
  362. data/spec/models/inline_object15_spec.rb +2 -8
  363. data/spec/models/inline_object16_spec.rb +2 -2
  364. data/spec/models/inline_object17_spec.rb +2 -2
  365. data/spec/models/inline_object18_spec.rb +8 -2
  366. data/spec/models/inline_object19_spec.rb +2 -8
  367. data/spec/models/inline_object1_response_spec.rb +2 -2
  368. data/spec/models/inline_object1_spec.rb +2 -2
  369. data/spec/models/{inline_object21_meta_spec.rb → inline_object20_meta_spec.rb} +8 -8
  370. data/spec/models/inline_object20_spec.rb +8 -2
  371. data/spec/models/inline_object21_spec.rb +2 -8
  372. data/spec/models/{inline_object23_response_spec.rb → inline_object22_response_spec.rb} +8 -8
  373. data/spec/models/inline_object22_spec.rb +2 -2
  374. data/spec/models/inline_object2_spec.rb +2 -2
  375. data/spec/models/inline_object3_spec.rb +2 -2
  376. data/spec/models/inline_object4_spec.rb +2 -2
  377. data/spec/models/inline_object5_spec.rb +2 -2
  378. data/spec/models/inline_object6_spec.rb +2 -2
  379. data/spec/models/inline_object7_spec.rb +2 -2
  380. data/spec/models/{inline_object12_meta_spec.rb → inline_object8_meta_spec.rb} +8 -14
  381. data/spec/models/inline_object8_spec.rb +8 -2
  382. data/spec/models/inline_object9_meta_spec.rb +2 -8
  383. data/spec/models/inline_object9_spec.rb +2 -2
  384. data/spec/models/inline_object_meta_spec.rb +2 -2
  385. data/spec/models/inline_object_spec.rb +2 -2
  386. data/spec/models/key_field_param_spec.rb +2 -2
  387. data/spec/models/make_accessible_base64_spec.rb +2 -2
  388. data/spec/models/make_accessible_request_spec.rb +2 -2
  389. data/spec/models/make_accessible_url_spec.rb +2 -2
  390. data/spec/models/metadata_param_spec.rb +2 -2
  391. data/spec/models/open_editor_request_data_spec.rb +2 -2
  392. data/spec/models/open_editor_request_spec.rb +3 -3
  393. data/spec/models/optimize_base64_spec.rb +2 -2
  394. data/spec/models/optimize_document_request_spec.rb +2 -2
  395. data/spec/models/optimize_url_spec.rb +2 -2
  396. data/spec/models/output_param_spec.rb +2 -2
  397. data/spec/models/pagination_meta_spec.rb +2 -2
  398. data/spec/models/prefill_param_spec.rb +2 -2
  399. data/spec/models/promote_template_version200_response_spec.rb +2 -2
  400. data/spec/models/public_template_library_item_spec.rb +2 -2
  401. data/spec/models/status_param_spec.rb +2 -2
  402. data/spec/models/store_document_request_spec.rb +2 -2
  403. data/spec/models/template_definition_new_data_settings_spec.rb +2 -2
  404. data/spec/models/template_definition_new_editor_spec.rb +2 -2
  405. data/spec/models/template_definition_new_layout_margins_spec.rb +2 -2
  406. data/spec/models/template_definition_new_layout_repeat_layout_spec.rb +3 -3
  407. data/spec/models/template_definition_new_layout_spec.rb +3 -3
  408. data/spec/models/{template_param_id_spec.rb → template_definition_new_pages_inner_layout_spec.rb} +4 -4
  409. data/spec/models/template_definition_new_pages_inner_margins_spec.rb +2 -2
  410. data/spec/models/template_definition_new_pages_inner_spec.rb +2 -2
  411. data/spec/models/template_definition_new_spec.rb +2 -2
  412. data/spec/models/template_definition_spec.rb +32 -8
  413. data/spec/models/template_definition_update_spec.rb +84 -0
  414. data/spec/models/template_param_data_spec.rb +2 -2
  415. data/spec/models/template_param_spec.rb +2 -2
  416. data/spec/models/template_spec.rb +8 -2
  417. data/spec/models/template_version_collection_meta_spec.rb +2 -2
  418. data/spec/models/template_version_collection_spec.rb +2 -2
  419. data/spec/models/template_version_spec.rb +8 -2
  420. data/spec/models/{inline_object29_spec.rb → validation_error_spec.rb} +8 -8
  421. data/spec/models/watermark_base64_spec.rb +2 -2
  422. data/spec/models/watermark_file_url_spec.rb +58 -0
  423. data/spec/models/watermark_file_url_watermark_spec.rb +2 -2
  424. data/spec/models/watermark_image_content_base64_spec.rb +2 -2
  425. data/spec/models/watermark_image_content_url_spec.rb +2 -2
  426. data/spec/models/watermark_image_spec.rb +2 -2
  427. data/spec/models/watermark_position_spec.rb +2 -2
  428. data/spec/models/watermark_text_spec.rb +2 -2
  429. data/spec/models/workspace_spec.rb +14 -2
  430. data/spec/spec_helper.rb +2 -2
  431. metadata +234 -218
  432. data/docs/Component.md +0 -34
  433. data/docs/DataBatchInner.md +0 -20
  434. data/docs/FormFieldsInner.md +0 -24
  435. data/docs/GenerateQRCode201Response.md +0 -20
  436. data/docs/GetTemplateVersion422Response.md +0 -18
  437. data/docs/InlineObject12MetaStats.md +0 -20
  438. data/docs/InlineObject24.md +0 -18
  439. data/docs/InlineObject25.md +0 -18
  440. data/docs/InlineObject26.md +0 -18
  441. data/docs/InlineObject27.md +0 -18
  442. data/docs/InlineObject28.md +0 -18
  443. data/docs/InlineObject29.md +0 -20
  444. data/docs/InlineObject30.md +0 -18
  445. data/docs/InlineObject31.md +0 -18
  446. data/docs/InlineObject7Response.md +0 -18
  447. data/docs/TemplateDefinitionDataSettings.md +0 -20
  448. data/docs/TemplateDefinitionEditor.md +0 -18
  449. data/docs/TemplateDefinitionPagesInner.md +0 -24
  450. data/lib/pdf_generator_api_client/models/get_template_version422_response.rb +0 -220
  451. data/lib/pdf_generator_api_client/models/inline_object27.rb +0 -255
  452. data/lib/pdf_generator_api_client/models/inline_object28.rb +0 -221
  453. data/lib/pdf_generator_api_client/models/inline_object30.rb +0 -221
  454. data/lib/pdf_generator_api_client/models/inline_object31.rb +0 -221
  455. data/lib/pdf_generator_api_client/models/inline_object7_response.rb +0 -220
  456. data/lib/pdf_generator_api_client/models/template_definition_data_settings.rb +0 -234
  457. data/spec/models/inline_object24_spec.rb +0 -40
  458. data/spec/models/inline_object25_spec.rb +0 -40
  459. data/spec/models/inline_object26_spec.rb +0 -40
  460. data/spec/models/inline_object28_spec.rb +0 -36
  461. data/spec/models/inline_object30_spec.rb +0 -36
  462. data/spec/models/inline_object31_spec.rb +0 -36
  463. data/spec/models/inline_object7_response_spec.rb +0 -36
  464. data/spec/models/template_definition_data_settings_spec.rb +0 -42
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #PDF Generator API
3
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. | * * * * *
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 Every error response is a JSON object with a `message` string. Request validation failures (422) also include an `errors` object keyed by the field that failed. ```json { \"message\": \"The identifier field is required.\", \"errors\": { \"identifier\": [\"The identifier field is required.\"] } } ``` | Code | Description | |--------|--------------------------------| | 400 | Bad Request | | 401 | Unauthorized | | 402 | Payment Required | | 403 | Forbidden | | 404 | Not Found | | 405 | Method Not Allowed | | 409 | Conflict | | 410 | Gone | | 422 | Unprocessable Entity | | 429 | Too Many Requests | | 500 | Internal Server Error | | 503 | Service Unavailable | ## 401 Unauthorized | Description | |-----------------------------------------------------------------------------------| | Authentication failed: JWT Token missing. | | Authentication failed: Malformed JWT Token. | | Authentication failed: Expired JWT Token. | | Authentication failed: Invalid workspace. | | Authentication failed: Invalid organization. | | Authentication failed: This application no longer has access to the workspace. | | Authentication failed: The sub field is required. (also `iss` and `exp`) | ## 402 Payment Required | Description | |-----------------------------------------------------------------------------------| | Your account is suspended, please upgrade your account or contact support@pdfgeneratorapi.com. | ## 403 Forbidden | Description | |-----------------------------------------------------------------------------------| | You don't have permission to access this content. Please get in touch with your organization administrator to update your access permissions. | | This application was not granted permission for this request. | | Deleting own user is not allowed. | | Deleting organization owner is not allowed. | ## 404 Not Found | Description | |-----------------------------------------------------------------------------------| | Entity not found. | | Route not found. | | Workspace doesn’t have access to read the template. | ## 422 Unprocessable Entity | Description | |-----------------------------------------------------------------------------------| | Unable to parse JSON, please check formatting. | | Template id should be a numeric value. | | The per page must be at least 1. (with `errors.per_page`) | ## 429 Too Many Requests | Description | |-----------------------------------------------------------------------------------| | Per-second rate limit exceeded. Please slow down your requests. | | Per-minute rate limit exceeded. Please try again in a minute. | | Global per-second rate limit exceeded. Please slow down your requests. | | Global per-minute rate limit exceeded. Please try again in a minute. | * * * * *
5
5
 
6
- The version of the OpenAPI document: 4.0.29
6
+ The version of the OpenAPI document: 4.0.34
7
7
  Contact: support@pdfgeneratorapi.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module PDFGeneratorAPI
17
17
  class InlineObject10
18
- # Array of base64 encoded images, one per converted page.
18
+ # Public URL to the document.
19
19
  attr_accessor :response
20
20
 
21
21
  attr_accessor :meta
@@ -41,7 +41,7 @@ module PDFGeneratorAPI
41
41
  # Attribute type mapping.
42
42
  def self.openapi_types
43
43
  {
44
- :'response' => :'Array<String>',
44
+ :'response' => :'String',
45
45
  :'meta' => :'InlineObject10Meta'
46
46
  }
47
47
  end
@@ -69,9 +69,7 @@ module PDFGeneratorAPI
69
69
  }
70
70
 
71
71
  if attributes.key?(:'response')
72
- if (value = attributes[:'response']).is_a?(Array)
73
- self.response = value
74
- end
72
+ self.response = attributes[:'response']
75
73
  end
76
74
 
77
75
  if attributes.key?(:'meta')
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #PDF Generator API
3
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. | * * * * *
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 Every error response is a JSON object with a `message` string. Request validation failures (422) also include an `errors` object keyed by the field that failed. ```json { \"message\": \"The identifier field is required.\", \"errors\": { \"identifier\": [\"The identifier field is required.\"] } } ``` | Code | Description | |--------|--------------------------------| | 400 | Bad Request | | 401 | Unauthorized | | 402 | Payment Required | | 403 | Forbidden | | 404 | Not Found | | 405 | Method Not Allowed | | 409 | Conflict | | 410 | Gone | | 422 | Unprocessable Entity | | 429 | Too Many Requests | | 500 | Internal Server Error | | 503 | Service Unavailable | ## 401 Unauthorized | Description | |-----------------------------------------------------------------------------------| | Authentication failed: JWT Token missing. | | Authentication failed: Malformed JWT Token. | | Authentication failed: Expired JWT Token. | | Authentication failed: Invalid workspace. | | Authentication failed: Invalid organization. | | Authentication failed: This application no longer has access to the workspace. | | Authentication failed: The sub field is required. (also `iss` and `exp`) | ## 402 Payment Required | Description | |-----------------------------------------------------------------------------------| | Your account is suspended, please upgrade your account or contact support@pdfgeneratorapi.com. | ## 403 Forbidden | Description | |-----------------------------------------------------------------------------------| | You don't have permission to access this content. Please get in touch with your organization administrator to update your access permissions. | | This application was not granted permission for this request. | | Deleting own user is not allowed. | | Deleting organization owner is not allowed. | ## 404 Not Found | Description | |-----------------------------------------------------------------------------------| | Entity not found. | | Route not found. | | Workspace doesn’t have access to read the template. | ## 422 Unprocessable Entity | Description | |-----------------------------------------------------------------------------------| | Unable to parse JSON, please check formatting. | | Template id should be a numeric value. | | The per page must be at least 1. (with `errors.per_page`) | ## 429 Too Many Requests | Description | |-----------------------------------------------------------------------------------| | Per-second rate limit exceeded. Please slow down your requests. | | Per-minute rate limit exceeded. Please try again in a minute. | | Global per-second rate limit exceeded. Please slow down your requests. | | Global per-minute rate limit exceeded. Please try again in a minute. | * * * * *
5
5
 
6
- The version of the OpenAPI document: 4.0.29
6
+ The version of the OpenAPI document: 4.0.34
7
7
  Contact: support@pdfgeneratorapi.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -15,25 +15,29 @@ require 'time'
15
15
 
16
16
  module PDFGeneratorAPI
17
17
  class InlineObject10Meta
18
- # File name with extension. Auto-generated if not provided in request.
18
+ # Document name. This value is automatically generated if name attribute is not defined in request.
19
19
  attr_accessor :name
20
20
 
21
- # File name without extension.
21
+ # Document name without the file extension.
22
22
  attr_accessor :display_name
23
23
 
24
- # Encoding of the response data.
24
+ # Document encoding
25
25
  attr_accessor :encoding
26
26
 
27
- # Image content type.
27
+ # Document content type.
28
28
  attr_accessor :content_type
29
29
 
30
+ # Document public id
31
+ attr_accessor :public_id
32
+
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
31
34
  def self.attribute_map
32
35
  {
33
36
  :'name' => :'name',
34
37
  :'display_name' => :'display_name',
35
38
  :'encoding' => :'encoding',
36
- :'content_type' => :'content-type'
39
+ :'content_type' => :'content-type',
40
+ :'public_id' => :'public_id'
37
41
  }
38
42
  end
39
43
 
@@ -53,7 +57,8 @@ module PDFGeneratorAPI
53
57
  :'name' => :'String',
54
58
  :'display_name' => :'String',
55
59
  :'encoding' => :'String',
56
- :'content_type' => :'String'
60
+ :'content_type' => :'String',
61
+ :'public_id' => :'String'
57
62
  }
58
63
  end
59
64
 
@@ -94,6 +99,10 @@ module PDFGeneratorAPI
94
99
  if attributes.key?(:'content_type')
95
100
  self.content_type = attributes[:'content_type']
96
101
  end
102
+
103
+ if attributes.key?(:'public_id')
104
+ self.public_id = attributes[:'public_id']
105
+ end
97
106
  end
98
107
 
99
108
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -119,7 +128,8 @@ module PDFGeneratorAPI
119
128
  name == o.name &&
120
129
  display_name == o.display_name &&
121
130
  encoding == o.encoding &&
122
- content_type == o.content_type
131
+ content_type == o.content_type &&
132
+ public_id == o.public_id
123
133
  end
124
134
 
125
135
  # @see the `==` method
@@ -131,7 +141,7 @@ module PDFGeneratorAPI
131
141
  # Calculates hash code according to all attributes.
132
142
  # @return [Integer] Hash code
133
143
  def hash
134
- [name, display_name, encoding, content_type].hash
144
+ [name, display_name, encoding, content_type, public_id].hash
135
145
  end
136
146
 
137
147
  # Builds the object from hash
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #PDF Generator API
3
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. | * * * * *
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 Every error response is a JSON object with a `message` string. Request validation failures (422) also include an `errors` object keyed by the field that failed. ```json { \"message\": \"The identifier field is required.\", \"errors\": { \"identifier\": [\"The identifier field is required.\"] } } ``` | Code | Description | |--------|--------------------------------| | 400 | Bad Request | | 401 | Unauthorized | | 402 | Payment Required | | 403 | Forbidden | | 404 | Not Found | | 405 | Method Not Allowed | | 409 | Conflict | | 410 | Gone | | 422 | Unprocessable Entity | | 429 | Too Many Requests | | 500 | Internal Server Error | | 503 | Service Unavailable | ## 401 Unauthorized | Description | |-----------------------------------------------------------------------------------| | Authentication failed: JWT Token missing. | | Authentication failed: Malformed JWT Token. | | Authentication failed: Expired JWT Token. | | Authentication failed: Invalid workspace. | | Authentication failed: Invalid organization. | | Authentication failed: This application no longer has access to the workspace. | | Authentication failed: The sub field is required. (also `iss` and `exp`) | ## 402 Payment Required | Description | |-----------------------------------------------------------------------------------| | Your account is suspended, please upgrade your account or contact support@pdfgeneratorapi.com. | ## 403 Forbidden | Description | |-----------------------------------------------------------------------------------| | You don't have permission to access this content. Please get in touch with your organization administrator to update your access permissions. | | This application was not granted permission for this request. | | Deleting own user is not allowed. | | Deleting organization owner is not allowed. | ## 404 Not Found | Description | |-----------------------------------------------------------------------------------| | Entity not found. | | Route not found. | | Workspace doesn’t have access to read the template. | ## 422 Unprocessable Entity | Description | |-----------------------------------------------------------------------------------| | Unable to parse JSON, please check formatting. | | Template id should be a numeric value. | | The per page must be at least 1. (with `errors.per_page`) | ## 429 Too Many Requests | Description | |-----------------------------------------------------------------------------------| | Per-second rate limit exceeded. Please slow down your requests. | | Per-minute rate limit exceeded. Please try again in a minute. | | Global per-second rate limit exceeded. Please slow down your requests. | | Global per-minute rate limit exceeded. Please try again in a minute. | * * * * *
5
5
 
6
- The version of the OpenAPI document: 4.0.29
6
+ The version of the OpenAPI document: 4.0.34
7
7
  Contact: support@pdfgeneratorapi.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module PDFGeneratorAPI
17
17
  class InlineObject11
18
- # Public URL to the document.
18
+ # Base64 encoded document if the output=base64 is used or URL to the document when the output=url is used.
19
19
  attr_accessor :response
20
20
 
21
21
  attr_accessor :meta
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #PDF Generator API
3
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. | * * * * *
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 Every error response is a JSON object with a `message` string. Request validation failures (422) also include an `errors` object keyed by the field that failed. ```json { \"message\": \"The identifier field is required.\", \"errors\": { \"identifier\": [\"The identifier field is required.\"] } } ``` | Code | Description | |--------|--------------------------------| | 400 | Bad Request | | 401 | Unauthorized | | 402 | Payment Required | | 403 | Forbidden | | 404 | Not Found | | 405 | Method Not Allowed | | 409 | Conflict | | 410 | Gone | | 422 | Unprocessable Entity | | 429 | Too Many Requests | | 500 | Internal Server Error | | 503 | Service Unavailable | ## 401 Unauthorized | Description | |-----------------------------------------------------------------------------------| | Authentication failed: JWT Token missing. | | Authentication failed: Malformed JWT Token. | | Authentication failed: Expired JWT Token. | | Authentication failed: Invalid workspace. | | Authentication failed: Invalid organization. | | Authentication failed: This application no longer has access to the workspace. | | Authentication failed: The sub field is required. (also `iss` and `exp`) | ## 402 Payment Required | Description | |-----------------------------------------------------------------------------------| | Your account is suspended, please upgrade your account or contact support@pdfgeneratorapi.com. | ## 403 Forbidden | Description | |-----------------------------------------------------------------------------------| | You don't have permission to access this content. Please get in touch with your organization administrator to update your access permissions. | | This application was not granted permission for this request. | | Deleting own user is not allowed. | | Deleting organization owner is not allowed. | ## 404 Not Found | Description | |-----------------------------------------------------------------------------------| | Entity not found. | | Route not found. | | Workspace doesn’t have access to read the template. | ## 422 Unprocessable Entity | Description | |-----------------------------------------------------------------------------------| | Unable to parse JSON, please check formatting. | | Template id should be a numeric value. | | The per page must be at least 1. (with `errors.per_page`) | ## 429 Too Many Requests | Description | |-----------------------------------------------------------------------------------| | Per-second rate limit exceeded. Please slow down your requests. | | Per-minute rate limit exceeded. Please try again in a minute. | | Global per-second rate limit exceeded. Please slow down your requests. | | Global per-minute rate limit exceeded. Please try again in a minute. | * * * * *
5
5
 
6
- The version of the OpenAPI document: 4.0.29
6
+ The version of the OpenAPI document: 4.0.34
7
7
  Contact: support@pdfgeneratorapi.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -27,7 +27,9 @@ module PDFGeneratorAPI
27
27
  # Document content type.
28
28
  attr_accessor :content_type
29
29
 
30
- # Document public id
30
+ attr_accessor :stats
31
+
32
+ # Document public id, if output=url was used for document storage
31
33
  attr_accessor :public_id
32
34
 
33
35
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -37,6 +39,7 @@ module PDFGeneratorAPI
37
39
  :'display_name' => :'display_name',
38
40
  :'encoding' => :'encoding',
39
41
  :'content_type' => :'content-type',
42
+ :'stats' => :'stats',
40
43
  :'public_id' => :'public_id'
41
44
  }
42
45
  end
@@ -58,6 +61,7 @@ module PDFGeneratorAPI
58
61
  :'display_name' => :'String',
59
62
  :'encoding' => :'String',
60
63
  :'content_type' => :'String',
64
+ :'stats' => :'InlineObject11MetaStats',
61
65
  :'public_id' => :'String'
62
66
  }
63
67
  end
@@ -100,6 +104,10 @@ module PDFGeneratorAPI
100
104
  self.content_type = attributes[:'content_type']
101
105
  end
102
106
 
107
+ if attributes.key?(:'stats')
108
+ self.stats = attributes[:'stats']
109
+ end
110
+
103
111
  if attributes.key?(:'public_id')
104
112
  self.public_id = attributes[:'public_id']
105
113
  end
@@ -129,6 +137,7 @@ module PDFGeneratorAPI
129
137
  display_name == o.display_name &&
130
138
  encoding == o.encoding &&
131
139
  content_type == o.content_type &&
140
+ stats == o.stats &&
132
141
  public_id == o.public_id
133
142
  end
134
143
 
@@ -141,7 +150,7 @@ module PDFGeneratorAPI
141
150
  # Calculates hash code according to all attributes.
142
151
  # @return [Integer] Hash code
143
152
  def hash
144
- [name, display_name, encoding, content_type, public_id].hash
153
+ [name, display_name, encoding, content_type, stats, public_id].hash
145
154
  end
146
155
 
147
156
  # Builds the object from hash
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #PDF Generator API
3
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. | * * * * *
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 Every error response is a JSON object with a `message` string. Request validation failures (422) also include an `errors` object keyed by the field that failed. ```json { \"message\": \"The identifier field is required.\", \"errors\": { \"identifier\": [\"The identifier field is required.\"] } } ``` | Code | Description | |--------|--------------------------------| | 400 | Bad Request | | 401 | Unauthorized | | 402 | Payment Required | | 403 | Forbidden | | 404 | Not Found | | 405 | Method Not Allowed | | 409 | Conflict | | 410 | Gone | | 422 | Unprocessable Entity | | 429 | Too Many Requests | | 500 | Internal Server Error | | 503 | Service Unavailable | ## 401 Unauthorized | Description | |-----------------------------------------------------------------------------------| | Authentication failed: JWT Token missing. | | Authentication failed: Malformed JWT Token. | | Authentication failed: Expired JWT Token. | | Authentication failed: Invalid workspace. | | Authentication failed: Invalid organization. | | Authentication failed: This application no longer has access to the workspace. | | Authentication failed: The sub field is required. (also `iss` and `exp`) | ## 402 Payment Required | Description | |-----------------------------------------------------------------------------------| | Your account is suspended, please upgrade your account or contact support@pdfgeneratorapi.com. | ## 403 Forbidden | Description | |-----------------------------------------------------------------------------------| | You don't have permission to access this content. Please get in touch with your organization administrator to update your access permissions. | | This application was not granted permission for this request. | | Deleting own user is not allowed. | | Deleting organization owner is not allowed. | ## 404 Not Found | Description | |-----------------------------------------------------------------------------------| | Entity not found. | | Route not found. | | Workspace doesn’t have access to read the template. | ## 422 Unprocessable Entity | Description | |-----------------------------------------------------------------------------------| | Unable to parse JSON, please check formatting. | | Template id should be a numeric value. | | The per page must be at least 1. (with `errors.per_page`) | ## 429 Too Many Requests | Description | |-----------------------------------------------------------------------------------| | Per-second rate limit exceeded. Please slow down your requests. | | Per-minute rate limit exceeded. Please try again in a minute. | | Global per-second rate limit exceeded. Please slow down your requests. | | Global per-minute rate limit exceeded. Please try again in a minute. | * * * * *
5
5
 
6
- The version of the OpenAPI document: 4.0.29
6
+ The version of the OpenAPI document: 4.0.34
7
7
  Contact: support@pdfgeneratorapi.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.14.0
@@ -14,18 +14,22 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module PDFGeneratorAPI
17
- class InlineObject12MetaStats
18
- # Document original size
17
+ class InlineObject11MetaStats
18
+ # Document original size in kilobytes
19
19
  attr_accessor :original_size
20
20
 
21
- # Document size after optimization
21
+ # Document size after optimization in kilobytes
22
22
  attr_accessor :optimized_size
23
23
 
24
+ # Unit of the sizes
25
+ attr_accessor :unit
26
+
24
27
  # Attribute mapping from ruby-style variable name to JSON key.
25
28
  def self.attribute_map
26
29
  {
27
30
  :'original_size' => :'original_size',
28
- :'optimized_size' => :'optimized_size'
31
+ :'optimized_size' => :'optimized_size',
32
+ :'unit' => :'unit'
29
33
  }
30
34
  end
31
35
 
@@ -43,7 +47,8 @@ module PDFGeneratorAPI
43
47
  def self.openapi_types
44
48
  {
45
49
  :'original_size' => :'Float',
46
- :'optimized_size' => :'Float'
50
+ :'optimized_size' => :'Float',
51
+ :'unit' => :'String'
47
52
  }
48
53
  end
49
54
 
@@ -57,14 +62,14 @@ module PDFGeneratorAPI
57
62
  # @param [Hash] attributes Model attributes in the form of hash
58
63
  def initialize(attributes = {})
59
64
  if (!attributes.is_a?(Hash))
60
- fail ArgumentError, "The input argument (attributes) must be a hash in `PDFGeneratorAPI::InlineObject12MetaStats` initialize method"
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PDFGeneratorAPI::InlineObject11MetaStats` initialize method"
61
66
  end
62
67
 
63
68
  # check to see if the attribute exists and convert string to symbol for hash key
64
69
  acceptable_attribute_map = self.class.acceptable_attribute_map
65
70
  attributes = attributes.each_with_object({}) { |(k, v), h|
66
71
  if (!acceptable_attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `PDFGeneratorAPI::InlineObject12MetaStats`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PDFGeneratorAPI::InlineObject11MetaStats`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
73
  end
69
74
  h[k.to_sym] = v
70
75
  }
@@ -76,6 +81,10 @@ module PDFGeneratorAPI
76
81
  if attributes.key?(:'optimized_size')
77
82
  self.optimized_size = attributes[:'optimized_size']
78
83
  end
84
+
85
+ if attributes.key?(:'unit')
86
+ self.unit = attributes[:'unit']
87
+ end
79
88
  end
80
89
 
81
90
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -99,7 +108,8 @@ module PDFGeneratorAPI
99
108
  return true if self.equal?(o)
100
109
  self.class == o.class &&
101
110
  original_size == o.original_size &&
102
- optimized_size == o.optimized_size
111
+ optimized_size == o.optimized_size &&
112
+ unit == o.unit
103
113
  end
104
114
 
105
115
  # @see the `==` method
@@ -111,7 +121,7 @@ module PDFGeneratorAPI
111
121
  # Calculates hash code according to all attributes.
112
122
  # @return [Integer] Hash code
113
123
  def hash
114
- [original_size, optimized_size].hash
124
+ [original_size, optimized_size, unit].hash
115
125
  end
116
126
 
117
127
  # Builds the object from hash