factpulse 4.0.1 → 4.0.2

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 (368) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -4
  3. data/Gemfile.lock +1 -1
  4. data/docs/AFNORPDPPAApi.md +5 -72
  5. data/docs/AsyncTasksApi.md +77 -0
  6. data/docs/ChorusProCredentials.md +8 -8
  7. data/docs/ChorusProDestination.md +1 -1
  8. data/docs/CreateAggregatedReportRequest.md +3 -1
  9. data/docs/CreateEReportingRequest.md +3 -1
  10. data/docs/ElectronicSignatureApi.md +319 -0
  11. data/docs/EncaisseeRequest.md +10 -6
  12. data/docs/{DocumentConversionApi.md → FacturXConversionApi.md} +39 -39
  13. data/docs/FacturXGenerationApi.md +239 -0
  14. data/docs/FacturXInvoice.md +1 -1
  15. data/docs/FacturXPDFXMLVerificationApi.md +225 -0
  16. data/docs/FacturXValidationApi.md +241 -0
  17. data/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +26 -0
  18. data/docs/{EReportingApi.md → Flux10EReportingApi.md} +53 -51
  19. data/docs/{CDARCycleDeVieApi.md → Flux6InvoiceLifecycleCDARApi.md} +145 -75
  20. data/docs/GetChorusProIdRequest.md +1 -1
  21. data/docs/GetInvoiceRequest.md +1 -1
  22. data/docs/GetStructureRequest.md +1 -1
  23. data/docs/HealthApi.md +67 -0
  24. data/docs/InvoiceInput.md +4 -2
  25. data/docs/IssuerRoleCode.md +15 -0
  26. data/docs/RefuseeRequest.md +10 -6
  27. data/docs/ReportIssuer.md +24 -0
  28. data/docs/ReportSender.md +1 -1
  29. data/docs/SearchStructureRequest.md +1 -1
  30. data/docs/SubmitInvoiceRequest.md +1 -1
  31. data/factpulse.gemspec +2 -2
  32. data/lib/factpulse/api/afnorpdppa_api.rb +5 -62
  33. data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +1 -1
  34. data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +1 -1
  35. data/lib/factpulse/api/async_tasks_api.rb +85 -0
  36. data/lib/factpulse/api/chorus_pro_api.rb +1 -1
  37. data/lib/factpulse/api/client_management_api.rb +1 -1
  38. data/lib/factpulse/api/downloads_api.rb +1 -1
  39. data/lib/factpulse/api/electronic_signature_api.rb +339 -0
  40. data/lib/factpulse/api/{document_conversion_api.rb → factur_x_conversion_api.rb} +42 -42
  41. data/lib/factpulse/api/factur_x_generation_api.rb +254 -0
  42. data/lib/factpulse/api/factur_x_validation_api.rb +256 -0
  43. data/lib/factpulse/api/factur_xpdfxml_verification_api.rb +232 -0
  44. data/lib/factpulse/api/{e_reporting_api.rb → flux10_e_reporting_api.rb} +54 -51
  45. data/lib/factpulse/api/flux6_invoice_lifecycle_cdar_api.rb +670 -0
  46. data/lib/factpulse/api/health_api.rb +58 -1
  47. data/lib/factpulse/api_client.rb +1 -1
  48. data/lib/factpulse/api_error.rb +1 -1
  49. data/lib/factpulse/api_model_base.rb +1 -1
  50. data/lib/factpulse/configuration.rb +1 -1
  51. data/lib/factpulse/models/acknowledgment_status.rb +1 -1
  52. data/lib/factpulse/models/action_code_info.rb +1 -1
  53. data/lib/factpulse/models/action_codes_response.rb +1 -1
  54. data/lib/factpulse/models/additional_document.rb +1 -1
  55. data/lib/factpulse/models/afnor_acknowledgement.rb +1 -1
  56. data/lib/factpulse/models/afnor_acknowledgement_detail.rb +1 -1
  57. data/lib/factpulse/models/afnor_address_edit.rb +1 -1
  58. data/lib/factpulse/models/afnor_address_patch.rb +1 -1
  59. data/lib/factpulse/models/afnor_address_put.rb +1 -1
  60. data/lib/factpulse/models/afnor_address_read.rb +1 -1
  61. data/lib/factpulse/models/afnor_algorithm.rb +1 -1
  62. data/lib/factpulse/models/afnor_contains_operator.rb +1 -1
  63. data/lib/factpulse/models/afnor_create_directory_line_body.rb +1 -1
  64. data/lib/factpulse/models/afnor_create_directory_line_body_addressing_information.rb +1 -1
  65. data/lib/factpulse/models/afnor_create_directory_line_body_period.rb +1 -1
  66. data/lib/factpulse/models/afnor_create_routing_code_body.rb +1 -1
  67. data/lib/factpulse/models/afnor_credentials.rb +1 -1
  68. data/lib/factpulse/models/afnor_destination.rb +1 -1
  69. data/lib/factpulse/models/afnor_diffusion_status.rb +1 -1
  70. data/lib/factpulse/models/afnor_directory_line_field.rb +1 -1
  71. data/lib/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code.rb +1 -1
  72. data/lib/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_platform.rb +1 -1
  73. data/lib/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_routing_code.rb +1 -1
  74. data/lib/factpulse/models/afnor_directory_line_post201_response.rb +1 -1
  75. data/lib/factpulse/models/afnor_directory_line_search_post200_response.rb +1 -1
  76. data/lib/factpulse/models/afnor_entity_type.rb +1 -1
  77. data/lib/factpulse/models/afnor_error.rb +1 -1
  78. data/lib/factpulse/models/afnor_facility_administrative_status.rb +1 -1
  79. data/lib/factpulse/models/afnor_facility_nature.rb +1 -1
  80. data/lib/factpulse/models/afnor_facility_payload_history.rb +1 -1
  81. data/lib/factpulse/models/afnor_facility_payload_history_ule_b2g_additional_data.rb +1 -1
  82. data/lib/factpulse/models/afnor_facility_payload_included.rb +1 -1
  83. data/lib/factpulse/models/afnor_facility_type.rb +1 -1
  84. data/lib/factpulse/models/afnor_flow.rb +1 -1
  85. data/lib/factpulse/models/afnor_flow_ack_status.rb +1 -1
  86. data/lib/factpulse/models/afnor_flow_direction.rb +1 -1
  87. data/lib/factpulse/models/afnor_flow_info.rb +1 -1
  88. data/lib/factpulse/models/afnor_flow_profile.rb +1 -1
  89. data/lib/factpulse/models/afnor_flow_syntax.rb +1 -1
  90. data/lib/factpulse/models/afnor_flow_type.rb +1 -1
  91. data/lib/factpulse/models/afnor_full_flow_info.rb +1 -1
  92. data/lib/factpulse/models/afnor_health_check_response.rb +1 -1
  93. data/lib/factpulse/models/afnor_legal_unit_administrative_status.rb +1 -1
  94. data/lib/factpulse/models/afnor_legal_unit_payload_history.rb +1 -1
  95. data/lib/factpulse/models/afnor_legal_unit_payload_included.rb +1 -1
  96. data/lib/factpulse/models/afnor_legal_unit_payload_included_no_siren.rb +1 -1
  97. data/lib/factpulse/models/afnor_platform_status.rb +1 -1
  98. data/lib/factpulse/models/afnor_processing_rule.rb +1 -1
  99. data/lib/factpulse/models/afnor_reason_code.rb +1 -1
  100. data/lib/factpulse/models/afnor_reason_code_enum.rb +1 -1
  101. data/lib/factpulse/models/afnor_recipient_platform_type.rb +1 -1
  102. data/lib/factpulse/models/afnor_result.rb +1 -1
  103. data/lib/factpulse/models/afnor_routing_code_administrative_status.rb +1 -1
  104. data/lib/factpulse/models/afnor_routing_code_field.rb +1 -1
  105. data/lib/factpulse/models/afnor_routing_code_payload_history_legal_unit_facility.rb +1 -1
  106. data/lib/factpulse/models/afnor_routing_code_post201_response.rb +1 -1
  107. data/lib/factpulse/models/afnor_routing_code_search.rb +1 -1
  108. data/lib/factpulse/models/afnor_routing_code_search_filters.rb +1 -1
  109. data/lib/factpulse/models/afnor_routing_code_search_filters_administrative_status.rb +1 -1
  110. data/lib/factpulse/models/afnor_routing_code_search_filters_routing_code_name.rb +1 -1
  111. data/lib/factpulse/models/afnor_routing_code_search_filters_routing_identifier.rb +1 -1
  112. data/lib/factpulse/models/afnor_routing_code_search_post200_response.rb +1 -1
  113. data/lib/factpulse/models/afnor_routing_code_search_sorting_inner.rb +1 -1
  114. data/lib/factpulse/models/afnor_search_directory_line.rb +1 -1
  115. data/lib/factpulse/models/afnor_search_directory_line_filters.rb +1 -1
  116. data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_identifier.rb +1 -1
  117. data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_suffix.rb +1 -1
  118. data/lib/factpulse/models/afnor_search_directory_line_sorting_inner.rb +1 -1
  119. data/lib/factpulse/models/afnor_search_flow_content.rb +1 -1
  120. data/lib/factpulse/models/afnor_search_flow_filters.rb +1 -1
  121. data/lib/factpulse/models/afnor_search_flow_params.rb +1 -1
  122. data/lib/factpulse/models/afnor_search_siren.rb +1 -1
  123. data/lib/factpulse/models/afnor_search_siren_filters.rb +1 -1
  124. data/lib/factpulse/models/afnor_search_siren_filters_administrative_status.rb +1 -1
  125. data/lib/factpulse/models/afnor_search_siren_filters_business_name.rb +1 -1
  126. data/lib/factpulse/models/afnor_search_siren_filters_entity_type.rb +1 -1
  127. data/lib/factpulse/models/afnor_search_siren_filters_siren.rb +1 -1
  128. data/lib/factpulse/models/afnor_search_siren_sorting_inner.rb +1 -1
  129. data/lib/factpulse/models/afnor_search_siret.rb +1 -1
  130. data/lib/factpulse/models/afnor_search_siret_filters.rb +1 -1
  131. data/lib/factpulse/models/afnor_search_siret_filters_address_lines.rb +1 -1
  132. data/lib/factpulse/models/afnor_search_siret_filters_administrative_status.rb +1 -1
  133. data/lib/factpulse/models/afnor_search_siret_filters_country_subdivision.rb +1 -1
  134. data/lib/factpulse/models/afnor_search_siret_filters_facility_type.rb +1 -1
  135. data/lib/factpulse/models/afnor_search_siret_filters_locality.rb +1 -1
  136. data/lib/factpulse/models/afnor_search_siret_filters_name.rb +1 -1
  137. data/lib/factpulse/models/afnor_search_siret_filters_postal_code.rb +1 -1
  138. data/lib/factpulse/models/afnor_search_siret_filters_siret.rb +1 -1
  139. data/lib/factpulse/models/afnor_search_siret_sorting_inner.rb +1 -1
  140. data/lib/factpulse/models/afnor_siren_field.rb +1 -1
  141. data/lib/factpulse/models/afnor_siren_search_post200_response.rb +1 -1
  142. data/lib/factpulse/models/afnor_siret_field.rb +1 -1
  143. data/lib/factpulse/models/afnor_siret_search_post200_response.rb +1 -1
  144. data/lib/factpulse/models/afnor_sorting_order.rb +1 -1
  145. data/lib/factpulse/models/afnor_strict_operator.rb +1 -1
  146. data/lib/factpulse/models/afnor_update_patch_directory_line_body.rb +1 -1
  147. data/lib/factpulse/models/afnor_update_patch_routing_code_body.rb +1 -1
  148. data/lib/factpulse/models/afnor_update_put_routing_code_body.rb +1 -1
  149. data/lib/factpulse/models/afnor_webhook_callback_content.rb +1 -1
  150. data/lib/factpulse/models/aggregated_payment_input.rb +1 -1
  151. data/lib/factpulse/models/aggregated_transaction_input.rb +1 -1
  152. data/lib/factpulse/models/allowance_charge.rb +1 -1
  153. data/lib/factpulse/models/allowance_charge_reason_code.rb +1 -1
  154. data/lib/factpulse/models/allowance_reason_code.rb +1 -1
  155. data/lib/factpulse/models/allowance_total_amount.rb +1 -1
  156. data/lib/factpulse/models/amount.rb +1 -1
  157. data/lib/factpulse/models/amount1.rb +1 -1
  158. data/lib/factpulse/models/amount2.rb +1 -1
  159. data/lib/factpulse/models/amount_due.rb +1 -1
  160. data/lib/factpulse/models/api_error.rb +1 -1
  161. data/lib/factpulse/models/api_profile.rb +1 -1
  162. data/lib/factpulse/models/async_task_status.rb +1 -1
  163. data/lib/factpulse/models/base_amount.rb +1 -1
  164. data/lib/factpulse/models/bounding_box_schema.rb +1 -1
  165. data/lib/factpulse/models/buyercountry.rb +2 -2
  166. data/lib/factpulse/models/celery_status.rb +1 -1
  167. data/lib/factpulse/models/certificate_info_response.rb +1 -1
  168. data/lib/factpulse/models/charge_total_amount.rb +1 -1
  169. data/lib/factpulse/models/chorus_pro_credentials.rb +27 -95
  170. data/lib/factpulse/models/chorus_pro_destination.rb +2 -2
  171. data/lib/factpulse/models/chorus_pro_result.rb +1 -1
  172. data/lib/factpulse/models/client_activate_response.rb +1 -1
  173. data/lib/factpulse/models/client_create_request.rb +1 -1
  174. data/lib/factpulse/models/client_detail.rb +1 -1
  175. data/lib/factpulse/models/client_list_response.rb +1 -1
  176. data/lib/factpulse/models/client_summary.rb +1 -1
  177. data/lib/factpulse/models/client_update_request.rb +1 -1
  178. data/lib/factpulse/models/contact.rb +1 -1
  179. data/lib/factpulse/models/convert_resume_request.rb +1 -1
  180. data/lib/factpulse/models/convert_success_response.rb +1 -1
  181. data/lib/factpulse/models/convert_validation_failed_response.rb +1 -1
  182. data/lib/factpulse/models/country_code.rb +1 -1
  183. data/lib/factpulse/models/create_aggregated_report_request.rb +13 -3
  184. data/lib/factpulse/models/create_cdar_request.rb +1 -1
  185. data/lib/factpulse/models/create_e_reporting_request.rb +13 -3
  186. data/lib/factpulse/models/currency.rb +1 -1
  187. data/lib/factpulse/models/currency_code.rb +1 -1
  188. data/lib/factpulse/models/delivery_party.rb +1 -1
  189. data/lib/factpulse/models/destination.rb +1 -1
  190. data/lib/factpulse/models/doc_type.rb +1 -1
  191. data/lib/factpulse/models/document_type_info.rb +1 -1
  192. data/lib/factpulse/models/e_reporting_flow_type.rb +1 -1
  193. data/lib/factpulse/models/e_reporting_validation_error.rb +1 -1
  194. data/lib/factpulse/models/electronic_address.rb +1 -1
  195. data/lib/factpulse/models/encaisseamount.rb +1 -1
  196. data/lib/factpulse/models/encaisseamount1.rb +1 -1
  197. data/lib/factpulse/models/encaissee_request.rb +86 -32
  198. data/lib/factpulse/models/enriched_invoice_info.rb +1 -1
  199. data/lib/factpulse/models/error_level.rb +1 -1
  200. data/lib/factpulse/models/error_source.rb +3 -2
  201. data/lib/factpulse/models/extraction_info.rb +1 -1
  202. data/lib/factpulse/models/factur_x_invoice.rb +1 -18
  203. data/lib/factpulse/models/factur_xpdf_info.rb +1 -1
  204. data/lib/factpulse/models/facture_electronique_rest_api_schemas_cdar_validation_error_response.rb +1 -1
  205. data/lib/factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb +259 -0
  206. data/lib/factpulse/models/facture_electronique_rest_api_schemas_ereporting_invoice_type_code.rb +1 -1
  207. data/lib/factpulse/models/field_status.rb +1 -1
  208. data/lib/factpulse/models/file_info.rb +1 -1
  209. data/lib/factpulse/models/files_info.rb +1 -1
  210. data/lib/factpulse/models/flow_direction.rb +1 -1
  211. data/lib/factpulse/models/flow_profile.rb +1 -1
  212. data/lib/factpulse/models/flow_summary.rb +1 -1
  213. data/lib/factpulse/models/flow_syntax.rb +1 -1
  214. data/lib/factpulse/models/flow_type.rb +1 -1
  215. data/lib/factpulse/models/generate_aggregated_report_response.rb +1 -1
  216. data/lib/factpulse/models/generate_cdar_response.rb +1 -1
  217. data/lib/factpulse/models/generate_certificate_request.rb +1 -1
  218. data/lib/factpulse/models/generate_certificate_response.rb +1 -1
  219. data/lib/factpulse/models/generate_e_reporting_response.rb +1 -1
  220. data/lib/factpulse/models/get_chorus_pro_id_request.rb +2 -2
  221. data/lib/factpulse/models/get_chorus_pro_id_response.rb +1 -1
  222. data/lib/factpulse/models/get_invoice_request.rb +2 -2
  223. data/lib/factpulse/models/get_invoice_response.rb +1 -1
  224. data/lib/factpulse/models/get_structure_request.rb +2 -2
  225. data/lib/factpulse/models/get_structure_response.rb +1 -1
  226. data/lib/factpulse/models/global_allowance_amount.rb +1 -1
  227. data/lib/factpulse/models/gross_unit_price.rb +1 -1
  228. data/lib/factpulse/models/http_validation_error.rb +1 -1
  229. data/lib/factpulse/models/incoming_invoice.rb +1 -1
  230. data/lib/factpulse/models/incoming_supplier.rb +1 -1
  231. data/lib/factpulse/models/invoice_format.rb +1 -1
  232. data/lib/factpulse/models/invoice_input.rb +14 -21
  233. data/lib/factpulse/models/invoice_line.rb +1 -1
  234. data/lib/factpulse/models/invoice_line_allowance_amount.rb +1 -1
  235. data/lib/factpulse/models/invoice_note.rb +1 -1
  236. data/lib/factpulse/models/invoice_payment_input.rb +1 -1
  237. data/lib/factpulse/models/invoice_references.rb +1 -1
  238. data/lib/factpulse/models/invoice_status.rb +1 -1
  239. data/lib/factpulse/models/invoice_totals.rb +1 -1
  240. data/lib/factpulse/models/invoice_totals_prepayment.rb +1 -1
  241. data/lib/factpulse/models/invoice_type_code.rb +1 -1
  242. data/lib/factpulse/models/invoice_type_code_output.rb +1 -1
  243. data/lib/factpulse/models/invoicing_framework.rb +1 -1
  244. data/lib/factpulse/models/invoicing_framework_code.rb +1 -1
  245. data/lib/factpulse/models/issuer_role_code.rb +40 -0
  246. data/lib/factpulse/models/line_net_amount.rb +1 -1
  247. data/lib/factpulse/models/line_sub_type.rb +1 -1
  248. data/lib/factpulse/models/line_total_amount.rb +1 -1
  249. data/lib/factpulse/models/location_inner.rb +1 -1
  250. data/lib/factpulse/models/mandatory_note_schema.rb +1 -1
  251. data/lib/factpulse/models/manual_rate.rb +1 -1
  252. data/lib/factpulse/models/manual_vat_rate.rb +1 -1
  253. data/lib/factpulse/models/missing_field.rb +1 -1
  254. data/lib/factpulse/models/operation_nature.rb +1 -1
  255. data/lib/factpulse/models/output_format.rb +1 -1
  256. data/lib/factpulse/models/page_dimensions_schema.rb +1 -1
  257. data/lib/factpulse/models/payee.rb +1 -1
  258. data/lib/factpulse/models/payment_amount_by_rate.rb +1 -1
  259. data/lib/factpulse/models/payment_card.rb +1 -1
  260. data/lib/factpulse/models/payment_means.rb +1 -1
  261. data/lib/factpulse/models/pdf_validation_result_api.rb +1 -1
  262. data/lib/factpulse/models/pdp_config_response.rb +1 -1
  263. data/lib/factpulse/models/pdp_config_update_request.rb +1 -1
  264. data/lib/factpulse/models/pdp_credentials.rb +1 -1
  265. data/lib/factpulse/models/percentage.rb +1 -1
  266. data/lib/factpulse/models/postal_address.rb +1 -1
  267. data/lib/factpulse/models/price_allowance_amount.rb +1 -1
  268. data/lib/factpulse/models/price_basis_quantity.rb +1 -1
  269. data/lib/factpulse/models/processing_options.rb +1 -1
  270. data/lib/factpulse/models/processing_rule.rb +1 -1
  271. data/lib/factpulse/models/product_characteristic.rb +1 -1
  272. data/lib/factpulse/models/product_classification.rb +1 -1
  273. data/lib/factpulse/models/quantity.rb +1 -1
  274. data/lib/factpulse/models/rate.rb +1 -1
  275. data/lib/factpulse/models/rate1.rb +1 -1
  276. data/lib/factpulse/models/reason_code_info.rb +1 -1
  277. data/lib/factpulse/models/reason_codes_response.rb +1 -1
  278. data/lib/factpulse/models/recipient.rb +1 -1
  279. data/lib/factpulse/models/recipient_input.rb +1 -1
  280. data/lib/factpulse/models/refusee_request.rb +84 -30
  281. data/lib/factpulse/models/report_issuer.rb +236 -0
  282. data/lib/factpulse/models/report_period.rb +1 -1
  283. data/lib/factpulse/models/report_sender.rb +3 -3
  284. data/lib/factpulse/models/rounding_amount.rb +1 -1
  285. data/lib/factpulse/models/schematron_validation_error.rb +1 -1
  286. data/lib/factpulse/models/scheme_id.rb +1 -1
  287. data/lib/factpulse/models/search_flow_request.rb +1 -1
  288. data/lib/factpulse/models/search_flow_response.rb +1 -1
  289. data/lib/factpulse/models/search_services_response.rb +1 -1
  290. data/lib/factpulse/models/search_structure_request.rb +2 -2
  291. data/lib/factpulse/models/search_structure_response.rb +1 -1
  292. data/lib/factpulse/models/secret_status.rb +1 -1
  293. data/lib/factpulse/models/sellercountry.rb +2 -2
  294. data/lib/factpulse/models/signature_info.rb +1 -1
  295. data/lib/factpulse/models/signature_info_api.rb +1 -1
  296. data/lib/factpulse/models/signature_parameters.rb +1 -1
  297. data/lib/factpulse/models/simplified_cdar_response.rb +1 -1
  298. data/lib/factpulse/models/simplified_invoice_data.rb +1 -1
  299. data/lib/factpulse/models/status_code_info.rb +1 -1
  300. data/lib/factpulse/models/status_codes_response.rb +1 -1
  301. data/lib/factpulse/models/structure_info.rb +1 -1
  302. data/lib/factpulse/models/structure_parameters.rb +1 -1
  303. data/lib/factpulse/models/structure_service.rb +1 -1
  304. data/lib/factpulse/models/submission_mode.rb +1 -1
  305. data/lib/factpulse/models/submit_aggregated_report_request.rb +1 -1
  306. data/lib/factpulse/models/submit_cdar_request.rb +1 -1
  307. data/lib/factpulse/models/submit_cdar_response.rb +1 -1
  308. data/lib/factpulse/models/submit_cdarxml_request.rb +1 -1
  309. data/lib/factpulse/models/submit_complete_invoice_request.rb +1 -1
  310. data/lib/factpulse/models/submit_complete_invoice_response.rb +1 -1
  311. data/lib/factpulse/models/submit_e_reporting_request.rb +1 -1
  312. data/lib/factpulse/models/submit_e_reporting_response.rb +1 -1
  313. data/lib/factpulse/models/submit_flow_request.rb +1 -1
  314. data/lib/factpulse/models/submit_flow_response.rb +1 -1
  315. data/lib/factpulse/models/submit_gross_amount.rb +1 -1
  316. data/lib/factpulse/models/submit_invoice_request.rb +2 -2
  317. data/lib/factpulse/models/submit_invoice_response.rb +1 -1
  318. data/lib/factpulse/models/submit_net_amount.rb +1 -1
  319. data/lib/factpulse/models/submit_vat_amount.rb +1 -1
  320. data/lib/factpulse/models/supplementary_attachment.rb +1 -1
  321. data/lib/factpulse/models/supplier.rb +1 -1
  322. data/lib/factpulse/models/task_response.rb +1 -1
  323. data/lib/factpulse/models/tax_breakdown_input.rb +1 -1
  324. data/lib/factpulse/models/tax_due_date_type.rb +1 -1
  325. data/lib/factpulse/models/tax_representative.rb +1 -1
  326. data/lib/factpulse/models/taxable_amount.rb +1 -1
  327. data/lib/factpulse/models/taxableamount.rb +1 -1
  328. data/lib/factpulse/models/taxamount.rb +1 -1
  329. data/lib/factpulse/models/taxamount1.rb +1 -1
  330. data/lib/factpulse/models/taxamount2.rb +1 -1
  331. data/lib/factpulse/models/taxexclusiveamount.rb +1 -1
  332. data/lib/factpulse/models/taxexclusiveamount1.rb +1 -1
  333. data/lib/factpulse/models/total_gross_amount.rb +1 -1
  334. data/lib/factpulse/models/total_net_amount.rb +1 -1
  335. data/lib/factpulse/models/total_vat_amount.rb +1 -1
  336. data/lib/factpulse/models/transaction_category.rb +1 -1
  337. data/lib/factpulse/models/transmission_type_code.rb +1 -1
  338. data/lib/factpulse/models/unit_net_price.rb +1 -1
  339. data/lib/factpulse/models/unit_of_measure.rb +1 -1
  340. data/lib/factpulse/models/validate_cdar_request.rb +1 -1
  341. data/lib/factpulse/models/validate_cdar_response.rb +1 -1
  342. data/lib/factpulse/models/validate_e_reporting_request.rb +1 -1
  343. data/lib/factpulse/models/validate_e_reporting_response.rb +1 -1
  344. data/lib/factpulse/models/validation_error.rb +1 -1
  345. data/lib/factpulse/models/validation_error_detail.rb +1 -1
  346. data/lib/factpulse/models/validation_error_response.rb +1 -1
  347. data/lib/factpulse/models/validation_info.rb +1 -1
  348. data/lib/factpulse/models/validation_success_response.rb +1 -1
  349. data/lib/factpulse/models/vat_accounting_code.rb +1 -1
  350. data/lib/factpulse/models/vat_amount.rb +1 -1
  351. data/lib/factpulse/models/vat_category.rb +1 -1
  352. data/lib/factpulse/models/vat_line.rb +1 -1
  353. data/lib/factpulse/models/vat_point_date_code.rb +1 -1
  354. data/lib/factpulse/models/vat_rate.rb +1 -1
  355. data/lib/factpulse/models/verification_success_response.rb +1 -1
  356. data/lib/factpulse/models/verified_field_schema.rb +1 -1
  357. data/lib/factpulse/version.rb +2 -2
  358. data/lib/factpulse.rb +12 -8
  359. metadata +46 -37
  360. data/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +0 -26
  361. data/docs/InvoiceProcessingApi.md +0 -855
  362. data/docs/PDFXMLVerificationApi.md +0 -443
  363. data/docs/UserApi.md +0 -74
  364. data/lib/factpulse/api/cdar_cycle_de_vie_api.rb +0 -601
  365. data/lib/factpulse/api/invoice_processing_api.rb +0 -868
  366. data/lib/factpulse/api/pdfxml_verification_api.rb +0 -442
  367. data/lib/factpulse/api/user_api.rb +0 -79
  368. data/lib/factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.rb +0 -191
@@ -1,22 +1,22 @@
1
- # FactPulse::DocumentConversionApi
1
+ # FactPulse::FacturXConversionApi
2
2
 
3
3
  All URIs are relative to *https://factpulse.fr*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**convert_document_async_api_v1_convert_async_post**](DocumentConversionApi.md#convert_document_async_api_v1_convert_async_post) | **POST** /api/v1/convert/async | Convertir un document en Factur-X (mode asynchrone) |
8
- | [**download_file_api_v1_convert_conversion_id_download_filename_get**](DocumentConversionApi.md#download_file_api_v1_convert_conversion_id_download_filename_get) | **GET** /api/v1/convert/{conversion_id}/download/{filename} | Télécharger un fichier généré |
9
- | [**get_conversion_status_api_v1_convert_conversion_id_status_get**](DocumentConversionApi.md#get_conversion_status_api_v1_convert_conversion_id_status_get) | **GET** /api/v1/convert/{conversion_id}/status | Vérifier le statut d'une conversion |
10
- | [**resume_conversion_api_v1_convert_conversion_id_resume_post**](DocumentConversionApi.md#resume_conversion_api_v1_convert_conversion_id_resume_post) | **POST** /api/v1/convert/{conversion_id}/resume | Reprendre une conversion avec corrections |
7
+ | [**convert_document_async_api_v1_convert_async_post**](FacturXConversionApi.md#convert_document_async_api_v1_convert_async_post) | **POST** /api/v1/convert/async | Convert a document to Factur-X (async mode) |
8
+ | [**download_file_api_v1_convert_conversion_id_download_filename_get**](FacturXConversionApi.md#download_file_api_v1_convert_conversion_id_download_filename_get) | **GET** /api/v1/convert/{conversion_id}/download/{filename} | Download a generated file |
9
+ | [**get_conversion_status_api_v1_convert_conversion_id_status_get**](FacturXConversionApi.md#get_conversion_status_api_v1_convert_conversion_id_status_get) | **GET** /api/v1/convert/{conversion_id}/status | Check conversion status |
10
+ | [**resume_conversion_api_v1_convert_conversion_id_resume_post**](FacturXConversionApi.md#resume_conversion_api_v1_convert_conversion_id_resume_post) | **POST** /api/v1/convert/{conversion_id}/resume | Resume a conversion with corrections |
11
11
 
12
12
 
13
13
  ## convert_document_async_api_v1_convert_async_post
14
14
 
15
15
  > Object convert_document_async_api_v1_convert_async_post(file, opts)
16
16
 
17
- Convertir un document en Factur-X (mode asynchrone)
17
+ Convert a document to Factur-X (async mode)
18
18
 
19
- Lance une conversion asynchrone via Celery. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Task Celery** : La tâche est mise en file d'attente 3. **Callback** : Notification par webhook à la fin ## Réponses possibles - **202** : Tâche acceptée, en cours de traitement - **400** : Fichier invalide
19
+ Launch an asynchronous conversion via Celery. ## Workflow 1. **Upload**: Document is sent as multipart/form-data 2. **Celery Task**: Task is queued for processing 3. **Callback**: Webhook notification on completion ## Possible responses - **202**: Task accepted, processing - **400**: Invalid file
20
20
 
21
21
  ### Examples
22
22
 
@@ -29,20 +29,20 @@ FactPulse.configure do |config|
29
29
  config.access_token = 'YOUR_BEARER_TOKEN'
30
30
  end
31
31
 
32
- api_instance = FactPulse::DocumentConversionApi.new
33
- file = File.new('/path/to/some/file') # File | Document à convertir (PDF, DOCX, XLSX, JPG, PNG)
32
+ api_instance = FactPulse::FacturXConversionApi.new
33
+ file = File.new('/path/to/some/file') # File | Document to convert (PDF, DOCX, XLSX, JPG, PNG)
34
34
  opts = {
35
- output: 'output_example', # String | Format de sortie: pdf, xml, both
35
+ output: 'output_example', # String | Output format: pdf, xml, both
36
36
  callback_url: 'callback_url_example', # String |
37
- webhook_mode: 'webhook_mode_example' # String | Mode de livraison du contenu: 'inline' (base64 dans webhook) ou 'download_url' (URL temporaire 1h)
37
+ webhook_mode: 'webhook_mode_example' # String | Content delivery mode: 'inline' (base64 in webhook) or 'download_url' (temporary URL, 1h TTL)
38
38
  }
39
39
 
40
40
  begin
41
- # Convertir un document en Factur-X (mode asynchrone)
41
+ # Convert a document to Factur-X (async mode)
42
42
  result = api_instance.convert_document_async_api_v1_convert_async_post(file, opts)
43
43
  p result
44
44
  rescue FactPulse::ApiError => e
45
- puts "Error when calling DocumentConversionApi->convert_document_async_api_v1_convert_async_post: #{e}"
45
+ puts "Error when calling FacturXConversionApi->convert_document_async_api_v1_convert_async_post: #{e}"
46
46
  end
47
47
  ```
48
48
 
@@ -54,13 +54,13 @@ This returns an Array which contains the response data, status code and headers.
54
54
 
55
55
  ```ruby
56
56
  begin
57
- # Convertir un document en Factur-X (mode asynchrone)
57
+ # Convert a document to Factur-X (async mode)
58
58
  data, status_code, headers = api_instance.convert_document_async_api_v1_convert_async_post_with_http_info(file, opts)
59
59
  p status_code # => 2xx
60
60
  p headers # => { ... }
61
61
  p data # => Object
62
62
  rescue FactPulse::ApiError => e
63
- puts "Error when calling DocumentConversionApi->convert_document_async_api_v1_convert_async_post_with_http_info: #{e}"
63
+ puts "Error when calling FacturXConversionApi->convert_document_async_api_v1_convert_async_post_with_http_info: #{e}"
64
64
  end
65
65
  ```
66
66
 
@@ -68,10 +68,10 @@ end
68
68
 
69
69
  | Name | Type | Description | Notes |
70
70
  | ---- | ---- | ----------- | ----- |
71
- | **file** | **File** | Document à convertir (PDF, DOCX, XLSX, JPG, PNG) | |
72
- | **output** | **String** | Format de sortie: pdf, xml, both | [optional][default to 'pdf'] |
71
+ | **file** | **File** | Document to convert (PDF, DOCX, XLSX, JPG, PNG) | |
72
+ | **output** | **String** | Output format: pdf, xml, both | [optional][default to 'pdf'] |
73
73
  | **callback_url** | **String** | | [optional] |
74
- | **webhook_mode** | **String** | Mode de livraison du contenu: 'inline' (base64 dans webhook) ou 'download_url' (URL temporaire 1h) | [optional][default to 'inline'] |
74
+ | **webhook_mode** | **String** | Content delivery mode: 'inline' (base64 in webhook) or 'download_url' (temporary URL, 1h TTL) | [optional][default to 'inline'] |
75
75
 
76
76
  ### Return type
77
77
 
@@ -91,9 +91,9 @@ end
91
91
 
92
92
  > Object download_file_api_v1_convert_conversion_id_download_filename_get(conversion_id, filename)
93
93
 
94
- Télécharger un fichier généré
94
+ Download a generated file
95
95
 
96
- Télécharge le fichier Factur-X PDF ou XML généré. ## Fichiers disponibles - `facturx.pdf` : PDF/A-3 avec XML embarqué - `facturx.xml` : XML CII seul (Cross Industry Invoice) Les fichiers sont disponibles pendant 24 heures après génération.
96
+ Download the generated Factur-X PDF or XML file. ## Available files - `facturx.pdf`: PDF/A-3 with embedded XML - `facturx.xml`: XML CII only (Cross Industry Invoice) Files are available for 24 hours after generation.
97
97
 
98
98
  ### Examples
99
99
 
@@ -106,16 +106,16 @@ FactPulse.configure do |config|
106
106
  config.access_token = 'YOUR_BEARER_TOKEN'
107
107
  end
108
108
 
109
- api_instance = FactPulse::DocumentConversionApi.new
109
+ api_instance = FactPulse::FacturXConversionApi.new
110
110
  conversion_id = 'conversion_id_example' # String | Conversion ID returned by POST /convert (UUID format)
111
111
  filename = 'filename_example' # String | File to download: 'facturx.pdf' or 'facturx.xml'
112
112
 
113
113
  begin
114
- # Télécharger un fichier généré
114
+ # Download a generated file
115
115
  result = api_instance.download_file_api_v1_convert_conversion_id_download_filename_get(conversion_id, filename)
116
116
  p result
117
117
  rescue FactPulse::ApiError => e
118
- puts "Error when calling DocumentConversionApi->download_file_api_v1_convert_conversion_id_download_filename_get: #{e}"
118
+ puts "Error when calling FacturXConversionApi->download_file_api_v1_convert_conversion_id_download_filename_get: #{e}"
119
119
  end
120
120
  ```
121
121
 
@@ -127,13 +127,13 @@ This returns an Array which contains the response data, status code and headers.
127
127
 
128
128
  ```ruby
129
129
  begin
130
- # Télécharger un fichier généré
130
+ # Download a generated file
131
131
  data, status_code, headers = api_instance.download_file_api_v1_convert_conversion_id_download_filename_get_with_http_info(conversion_id, filename)
132
132
  p status_code # => 2xx
133
133
  p headers # => { ... }
134
134
  p data # => Object
135
135
  rescue FactPulse::ApiError => e
136
- puts "Error when calling DocumentConversionApi->download_file_api_v1_convert_conversion_id_download_filename_get_with_http_info: #{e}"
136
+ puts "Error when calling FacturXConversionApi->download_file_api_v1_convert_conversion_id_download_filename_get_with_http_info: #{e}"
137
137
  end
138
138
  ```
139
139
 
@@ -162,9 +162,9 @@ end
162
162
 
163
163
  > Hash<String, Object> get_conversion_status_api_v1_convert_conversion_id_status_get(conversion_id)
164
164
 
165
- Vérifier le statut d'une conversion
165
+ Check conversion status
166
166
 
167
- Retourne le statut actuel d'une conversion asynchrone.
167
+ Returns the current status of an asynchronous conversion.
168
168
 
169
169
  ### Examples
170
170
 
@@ -177,15 +177,15 @@ FactPulse.configure do |config|
177
177
  config.access_token = 'YOUR_BEARER_TOKEN'
178
178
  end
179
179
 
180
- api_instance = FactPulse::DocumentConversionApi.new
180
+ api_instance = FactPulse::FacturXConversionApi.new
181
181
  conversion_id = 'conversion_id_example' # String | Conversion ID returned by POST /convert (UUID format)
182
182
 
183
183
  begin
184
- # Vérifier le statut d'une conversion
184
+ # Check conversion status
185
185
  result = api_instance.get_conversion_status_api_v1_convert_conversion_id_status_get(conversion_id)
186
186
  p result
187
187
  rescue FactPulse::ApiError => e
188
- puts "Error when calling DocumentConversionApi->get_conversion_status_api_v1_convert_conversion_id_status_get: #{e}"
188
+ puts "Error when calling FacturXConversionApi->get_conversion_status_api_v1_convert_conversion_id_status_get: #{e}"
189
189
  end
190
190
  ```
191
191
 
@@ -197,13 +197,13 @@ This returns an Array which contains the response data, status code and headers.
197
197
 
198
198
  ```ruby
199
199
  begin
200
- # Vérifier le statut d'une conversion
200
+ # Check conversion status
201
201
  data, status_code, headers = api_instance.get_conversion_status_api_v1_convert_conversion_id_status_get_with_http_info(conversion_id)
202
202
  p status_code # => 2xx
203
203
  p headers # => { ... }
204
204
  p data # => Hash<String, Object>
205
205
  rescue FactPulse::ApiError => e
206
- puts "Error when calling DocumentConversionApi->get_conversion_status_api_v1_convert_conversion_id_status_get_with_http_info: #{e}"
206
+ puts "Error when calling FacturXConversionApi->get_conversion_status_api_v1_convert_conversion_id_status_get_with_http_info: #{e}"
207
207
  end
208
208
  ```
209
209
 
@@ -231,9 +231,9 @@ end
231
231
 
232
232
  > <ConvertSuccessResponse> resume_conversion_api_v1_convert_conversion_id_resume_post(conversion_id, convert_resume_request)
233
233
 
234
- Reprendre une conversion avec corrections
234
+ Resume a conversion with corrections
235
235
 
236
- Reprend une conversion après complétion des données manquantes ou correction des erreurs. L'extraction OCR est conservée, les données sont mises à jour avec les corrections, puis une nouvelle validation Schematron est effectuée.
236
+ Resume a conversion after completing missing data or correcting errors. The OCR extraction is preserved, data is updated with corrections, then a new Schematron validation is performed.
237
237
 
238
238
  ### Examples
239
239
 
@@ -246,16 +246,16 @@ FactPulse.configure do |config|
246
246
  config.access_token = 'YOUR_BEARER_TOKEN'
247
247
  end
248
248
 
249
- api_instance = FactPulse::DocumentConversionApi.new
249
+ api_instance = FactPulse::FacturXConversionApi.new
250
250
  conversion_id = 'conversion_id_example' # String | Conversion ID returned by POST /convert (UUID format)
251
251
  convert_resume_request = FactPulse::ConvertResumeRequest.new # ConvertResumeRequest |
252
252
 
253
253
  begin
254
- # Reprendre une conversion avec corrections
254
+ # Resume a conversion with corrections
255
255
  result = api_instance.resume_conversion_api_v1_convert_conversion_id_resume_post(conversion_id, convert_resume_request)
256
256
  p result
257
257
  rescue FactPulse::ApiError => e
258
- puts "Error when calling DocumentConversionApi->resume_conversion_api_v1_convert_conversion_id_resume_post: #{e}"
258
+ puts "Error when calling FacturXConversionApi->resume_conversion_api_v1_convert_conversion_id_resume_post: #{e}"
259
259
  end
260
260
  ```
261
261
 
@@ -267,13 +267,13 @@ This returns an Array which contains the response data, status code and headers.
267
267
 
268
268
  ```ruby
269
269
  begin
270
- # Reprendre une conversion avec corrections
270
+ # Resume a conversion with corrections
271
271
  data, status_code, headers = api_instance.resume_conversion_api_v1_convert_conversion_id_resume_post_with_http_info(conversion_id, convert_resume_request)
272
272
  p status_code # => 2xx
273
273
  p headers # => { ... }
274
274
  p data # => <ConvertSuccessResponse>
275
275
  rescue FactPulse::ApiError => e
276
- puts "Error when calling DocumentConversionApi->resume_conversion_api_v1_convert_conversion_id_resume_post_with_http_info: #{e}"
276
+ puts "Error when calling FacturXConversionApi->resume_conversion_api_v1_convert_conversion_id_resume_post_with_http_info: #{e}"
277
277
  end
278
278
  ```
279
279
 
@@ -0,0 +1,239 @@
1
+ # FactPulse::FacturXGenerationApi
2
+
3
+ All URIs are relative to *https://factpulse.fr*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**generate_invoice_api_v1_processing_generate_invoice_post**](FacturXGenerationApi.md#generate_invoice_api_v1_processing_generate_invoice_post) | **POST** /api/v1/processing/generate-invoice | Generate a Factur-X invoice |
8
+ | [**submit_complete_invoice_api_v1_processing_invoices_submit_complete_post**](FacturXGenerationApi.md#submit_complete_invoice_api_v1_processing_invoices_submit_complete_post) | **POST** /api/v1/processing/invoices/submit-complete | Submit a complete invoice (generation + signature + submission) |
9
+ | [**submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post**](FacturXGenerationApi.md#submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post) | **POST** /api/v1/processing/invoices/submit-complete-async | Submit a complete invoice (asynchronous with Celery) |
10
+
11
+
12
+ ## generate_invoice_api_v1_processing_generate_invoice_post
13
+
14
+ > <TaskResponse> generate_invoice_api_v1_processing_generate_invoice_post(invoice_data, opts)
15
+
16
+ Generate a Factur-X invoice
17
+
18
+ Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A supplier SIRET + **IBAN** (required) - A recipient SIRET - Invoice lines (description, quantity, net price) **Simplified format example**: ```json { \"number\": \"FACT-2025-001\", \"supplier\": { \"siret\": \"92019522900017\", \"iban\": \"FR7630001007941234567890185\" }, \"recipient\": {\"siret\": \"35600000000048\"}, \"lines\": [ {\"description\": \"Service\", \"quantity\": 10, \"unitPrice\": 100.00, \"vatRate\": 20.0} ] } ``` **⚠️ Required fields (simplified format)**: - `number`: Unique invoice number - `supplier.siret`: Supplier's SIRET (14 digits) - `supplier.iban`: Bank account IBAN (no public API to retrieve it) - `recipient.siret`: Recipient's SIRET - `lines[]`: At least one invoice line **What happens automatically with `auto_enrich=True`**: - ✅ Name enrichment from Chorus Pro API - ✅ Address enrichment from Business Search API (free, public) - ✅ Automatic intra-EU VAT calculation (FR + key + SIREN) - ✅ Chorus Pro ID retrieval for electronic invoicing - ✅ Net/VAT/Gross totals calculation - ✅ Date generation (today + 30-day due date) - ✅ Multi-rate VAT handling **Supported identifiers**: - SIRET (14 digits): Specific establishment ⭐ Recommended - SIREN (9 digits): Company (auto-selection of headquarters) - Special types: UE_HORS_FRANCE, RIDET, TAHITI, etc. ## Checks performed during generation ### 1. Data validation (Pydantic) - Data types (amounts as Decimal, ISO 8601 dates) - Formats (14-digit SIRET, 9-digit SIREN, IBAN) - Required fields per profile - Amount consistency (Net + VAT = Gross) ### 2. CII-compliant XML generation - Serialization according to Cross Industry Invoice XSD schema - Correct UN/CEFACT namespaces - Hierarchical structure respected - UTF-8 encoding without BOM ### 3. Schematron validation - Business rules for selected profile (MINIMUM, BASIC, EN16931, EXTENDED) - Element cardinality (required, optional, repeatable) - Calculation rules (totals, VAT, discounts) - European EN 16931 compliance ### 4. PDF/A-3 conversion (if output_format='pdf') - Source PDF conversion to PDF/A-3 via Ghostscript - Factur-X XML embedding in PDF - Compliant XMP metadata - ICC sRGB color profile - Removal of forbidden elements (JavaScript, forms) ## How it works 1. **Submission**: Invoice is queued in Celery for asynchronous processing 2. **Immediate return**: You receive a `task_id` (HTTP 202 Accepted) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when the task completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `generation.completed` or `generation.failed` - `data.task_id`: The Celery task ID - `data.content_b64` or `data.xml_content`: The generated content - `X-Webhook-Signature` header for HMAC verification See `/docs/WEBHOOKS.md` for full documentation. ## Output formats - **xml**: Generates only Factur-X XML (recommended for testing) - **pdf**: Generates PDF/A-3 with embedded XML (requires `source_pdf`) ## Factur-X profiles - **MINIMUM**: Minimal data (simplified invoice) - **BASIC**: Basic information (SMEs) - **EN16931**: European standard (recommended, compliant with directive 2014/55/EU) - **EXTENDED**: All available data (large accounts) ## What you get After successful processing (status `completed`): - **XML only**: Base64-encoded Factur-X compliant XML file - **PDF/A-3**: PDF with embedded XML, ready for sending/archiving - **Metadata**: Profile, Factur-X version, file size - **Validation**: Schematron compliance confirmation ## Validation Data is automatically validated according to detected format. On error, a 422 status is returned with invalid field details.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'factpulse'
25
+ # setup authorization
26
+ FactPulse.configure do |config|
27
+ # Configure Bearer authorization: HTTPBearer
28
+ config.access_token = 'YOUR_BEARER_TOKEN'
29
+ end
30
+
31
+ api_instance = FactPulse::FacturXGenerationApi.new
32
+ invoice_data = 'invoice_data_example' # String | Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FacturXInvoice structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically!
33
+ opts = {
34
+ profile: FactPulse::APIProfile::MINIMUM, # APIProfile | Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.
35
+ output_format: FactPulse::OutputFormat::XML, # OutputFormat | Output format: 'xml' (XML only) or 'pdf' (Factur-X PDF with embedded XML).
36
+ auto_enrich: true, # Boolean | 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)
37
+ source_pdf: File.new('/path/to/some/file'), # File |
38
+ callback_url: 'callback_url_example', # String |
39
+ webhook_mode: 'webhook_mode_example', # String | Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
40
+ skip_br_fr: true # Boolean |
41
+ }
42
+
43
+ begin
44
+ # Generate a Factur-X invoice
45
+ result = api_instance.generate_invoice_api_v1_processing_generate_invoice_post(invoice_data, opts)
46
+ p result
47
+ rescue FactPulse::ApiError => e
48
+ puts "Error when calling FacturXGenerationApi->generate_invoice_api_v1_processing_generate_invoice_post: #{e}"
49
+ end
50
+ ```
51
+
52
+ #### Using the generate_invoice_api_v1_processing_generate_invoice_post_with_http_info variant
53
+
54
+ This returns an Array which contains the response data, status code and headers.
55
+
56
+ > <Array(<TaskResponse>, Integer, Hash)> generate_invoice_api_v1_processing_generate_invoice_post_with_http_info(invoice_data, opts)
57
+
58
+ ```ruby
59
+ begin
60
+ # Generate a Factur-X invoice
61
+ data, status_code, headers = api_instance.generate_invoice_api_v1_processing_generate_invoice_post_with_http_info(invoice_data, opts)
62
+ p status_code # => 2xx
63
+ p headers # => { ... }
64
+ p data # => <TaskResponse>
65
+ rescue FactPulse::ApiError => e
66
+ puts "Error when calling FacturXGenerationApi->generate_invoice_api_v1_processing_generate_invoice_post_with_http_info: #{e}"
67
+ end
68
+ ```
69
+
70
+ ### Parameters
71
+
72
+ | Name | Type | Description | Notes |
73
+ | ---- | ---- | ----------- | ----- |
74
+ | **invoice_data** | **String** | Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FacturXInvoice structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically! | |
75
+ | **profile** | [**APIProfile**](APIProfile.md) | Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED. | [optional] |
76
+ | **output_format** | [**OutputFormat**](OutputFormat.md) | Output format: &#39;xml&#39; (XML only) or &#39;pdf&#39; (Factur-X PDF with embedded XML). | [optional] |
77
+ | **auto_enrich** | **Boolean** | 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only) | [optional][default to true] |
78
+ | **source_pdf** | **File** | | [optional] |
79
+ | **callback_url** | **String** | | [optional] |
80
+ | **webhook_mode** | **String** | Webhook content delivery: &#39;inline&#39; (base64 in payload) or &#39;download_url&#39; (temporary URL, 1h TTL) | [optional][default to &#39;inline&#39;] |
81
+ | **skip_br_fr** | **Boolean** | | [optional] |
82
+
83
+ ### Return type
84
+
85
+ [**TaskResponse**](TaskResponse.md)
86
+
87
+ ### Authorization
88
+
89
+ [HTTPBearer](../README.md#HTTPBearer)
90
+
91
+ ### HTTP request headers
92
+
93
+ - **Content-Type**: multipart/form-data
94
+ - **Accept**: application/json
95
+
96
+
97
+ ## submit_complete_invoice_api_v1_processing_invoices_submit_complete_post
98
+
99
+ > <SubmitCompleteInvoiceResponse> submit_complete_invoice_api_v1_processing_invoices_submit_complete_post(submit_complete_invoice_request)
100
+
101
+ Submit a complete invoice (generation + signature + submission)
102
+
103
+ Unified endpoint to submit a complete invoice to different destinations. **Facture prête pour Flux 2** - Génère une facture Factur-X complète avec signature optionnelle et soumission vers Chorus Pro ou PDP AFNOR. **Automated workflow:** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Destination credentials - 2 modes available:** **Mode 1 - Retrieval via JWT (recommended):** - Credentials are retrieved automatically via the JWT `client_uid` - Do not provide the `credentials` field in `destination` - Zero-trust architecture: no secrets in the payload - Example: `\"destination\": {\"type\": \"chorus_pro\"}` **Mode 2 - Credentials in the payload:** - Provide credentials directly in the payload - Useful for tests or third-party integrations - Example: `\"destination\": {\"type\": \"chorus_pro\", \"credentials\": {...}}` **Electronic signature (optional) - 2 modes available:** **Mode 1 - Stored certificate (recommended):** - Certificate is retrieved automatically via the JWT `client_uid` - No key to provide in the payload - PAdES-B-LT signature with timestamp (eIDAS compliant) - Example: `\"signature\": {\"reason\": \"Factur-X compliance\"}` **Mode 2 - Keys in the payload (for tests):** - Provide `key_pem` and `cert_pem` directly - PEM format accepted: raw or base64 - Useful for tests or special cases without stored certificate - Example: `\"signature\": {\"key_pem\": \"-----BEGIN...\", \"cert_pem\": \"-----BEGIN...\"}` If `key_pem` and `cert_pem` are provided → Mode 2 Otherwise → Mode 1 (certificate retrieved via `client_uid`)
104
+
105
+ ### Examples
106
+
107
+ ```ruby
108
+ require 'time'
109
+ require 'factpulse'
110
+ # setup authorization
111
+ FactPulse.configure do |config|
112
+ # Configure Bearer authorization: HTTPBearer
113
+ config.access_token = 'YOUR_BEARER_TOKEN'
114
+ end
115
+
116
+ api_instance = FactPulse::FacturXGenerationApi.new
117
+ submit_complete_invoice_request = FactPulse::SubmitCompleteInvoiceRequest.new({invoice_data: FactPulse::SimplifiedInvoiceData.new({number: 'number_example', supplier: { key: 3.56}, recipient: { key: 3.56}, lines: [{ key: 3.56}]}), source_pdf: 'source_pdf_example', destination: FactPulse::AFNORDestination.new}) # SubmitCompleteInvoiceRequest |
118
+
119
+ begin
120
+ # Submit a complete invoice (generation + signature + submission)
121
+ result = api_instance.submit_complete_invoice_api_v1_processing_invoices_submit_complete_post(submit_complete_invoice_request)
122
+ p result
123
+ rescue FactPulse::ApiError => e
124
+ puts "Error when calling FacturXGenerationApi->submit_complete_invoice_api_v1_processing_invoices_submit_complete_post: #{e}"
125
+ end
126
+ ```
127
+
128
+ #### Using the submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info variant
129
+
130
+ This returns an Array which contains the response data, status code and headers.
131
+
132
+ > <Array(<SubmitCompleteInvoiceResponse>, Integer, Hash)> submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info(submit_complete_invoice_request)
133
+
134
+ ```ruby
135
+ begin
136
+ # Submit a complete invoice (generation + signature + submission)
137
+ data, status_code, headers = api_instance.submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info(submit_complete_invoice_request)
138
+ p status_code # => 2xx
139
+ p headers # => { ... }
140
+ p data # => <SubmitCompleteInvoiceResponse>
141
+ rescue FactPulse::ApiError => e
142
+ puts "Error when calling FacturXGenerationApi->submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info: #{e}"
143
+ end
144
+ ```
145
+
146
+ ### Parameters
147
+
148
+ | Name | Type | Description | Notes |
149
+ | ---- | ---- | ----------- | ----- |
150
+ | **submit_complete_invoice_request** | [**SubmitCompleteInvoiceRequest**](SubmitCompleteInvoiceRequest.md) | | |
151
+
152
+ ### Return type
153
+
154
+ [**SubmitCompleteInvoiceResponse**](SubmitCompleteInvoiceResponse.md)
155
+
156
+ ### Authorization
157
+
158
+ [HTTPBearer](../README.md#HTTPBearer)
159
+
160
+ ### HTTP request headers
161
+
162
+ - **Content-Type**: application/json
163
+ - **Accept**: application/json
164
+
165
+
166
+ ## submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post
167
+
168
+ > <TaskResponse> submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post(submit_complete_invoice_request, opts)
169
+
170
+ Submit a complete invoice (asynchronous with Celery)
171
+
172
+ Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Facture prête pour Flux 2** - Génère une facture Factur-X complète de manière asynchrone. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Webhook notification (recommended):** Instead of polling, add `?callback_url=https://your-server.com/webhook` to receive automatic notification: - `event_type`: `submission.completed`, `submission.failed`, or `submission.partial` - `data.submission_result`: Complete submission result - `X-Webhook-Signature` header for HMAC verification **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
173
+
174
+ ### Examples
175
+
176
+ ```ruby
177
+ require 'time'
178
+ require 'factpulse'
179
+ # setup authorization
180
+ FactPulse.configure do |config|
181
+ # Configure Bearer authorization: HTTPBearer
182
+ config.access_token = 'YOUR_BEARER_TOKEN'
183
+ end
184
+
185
+ api_instance = FactPulse::FacturXGenerationApi.new
186
+ submit_complete_invoice_request = FactPulse::SubmitCompleteInvoiceRequest.new({invoice_data: FactPulse::SimplifiedInvoiceData.new({number: 'number_example', supplier: { key: 3.56}, recipient: { key: 3.56}, lines: [{ key: 3.56}]}), source_pdf: 'source_pdf_example', destination: FactPulse::AFNORDestination.new}) # SubmitCompleteInvoiceRequest |
187
+ opts = {
188
+ callback_url: 'callback_url_example', # String | Webhook URL for async notification when submission completes.
189
+ webhook_mode: 'webhook_mode_example' # String | Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
190
+ }
191
+
192
+ begin
193
+ # Submit a complete invoice (asynchronous with Celery)
194
+ result = api_instance.submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post(submit_complete_invoice_request, opts)
195
+ p result
196
+ rescue FactPulse::ApiError => e
197
+ puts "Error when calling FacturXGenerationApi->submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post: #{e}"
198
+ end
199
+ ```
200
+
201
+ #### Using the submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info variant
202
+
203
+ This returns an Array which contains the response data, status code and headers.
204
+
205
+ > <Array(<TaskResponse>, Integer, Hash)> submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info(submit_complete_invoice_request, opts)
206
+
207
+ ```ruby
208
+ begin
209
+ # Submit a complete invoice (asynchronous with Celery)
210
+ data, status_code, headers = api_instance.submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info(submit_complete_invoice_request, opts)
211
+ p status_code # => 2xx
212
+ p headers # => { ... }
213
+ p data # => <TaskResponse>
214
+ rescue FactPulse::ApiError => e
215
+ puts "Error when calling FacturXGenerationApi->submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info: #{e}"
216
+ end
217
+ ```
218
+
219
+ ### Parameters
220
+
221
+ | Name | Type | Description | Notes |
222
+ | ---- | ---- | ----------- | ----- |
223
+ | **submit_complete_invoice_request** | [**SubmitCompleteInvoiceRequest**](SubmitCompleteInvoiceRequest.md) | | |
224
+ | **callback_url** | **String** | Webhook URL for async notification when submission completes. | [optional] |
225
+ | **webhook_mode** | **String** | Webhook content delivery: &#39;inline&#39; (base64 in payload) or &#39;download_url&#39; (temporary URL, 1h TTL) | [optional][default to &#39;inline&#39;] |
226
+
227
+ ### Return type
228
+
229
+ [**TaskResponse**](TaskResponse.md)
230
+
231
+ ### Authorization
232
+
233
+ [HTTPBearer](../README.md#HTTPBearer)
234
+
235
+ ### HTTP request headers
236
+
237
+ - **Content-Type**: application/json
238
+ - **Accept**: application/json
239
+
@@ -7,7 +7,7 @@
7
7
  | **invoice_number** | **String** | | |
8
8
  | **payment_due_date** | **String** | | |
9
9
  | **invoice_date** | **String** | | [optional] |
10
- | **submission_mode** | [**SubmissionMode**](SubmissionMode.md) | | |
10
+ | **submission_mode** | [**SubmissionMode**](SubmissionMode.md) | | [optional] |
11
11
  | **recipient** | [**Recipient**](Recipient.md) | | |
12
12
  | **supplier** | [**Supplier**](Supplier.md) | | |
13
13
  | **invoicing_framework** | [**InvoicingFramework**](InvoicingFramework.md) | | |