factpulse 4.3.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (470) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -5
  3. data/Gemfile.lock +15 -13
  4. data/README.md +7 -1
  5. data/docs/AFNORContainsOrStartWithOperator.md +15 -0
  6. data/docs/AFNORContainsOrStrictOrStartWithOperator.md +15 -0
  7. data/docs/AFNORDirectoryLinePayloadLegalUnitFacilityRoutingCode.md +4 -0
  8. data/docs/AFNORDirectoryLinePayloadStatusLegalUnitFacilityRoutingCode.md +2 -0
  9. data/docs/AFNORDirectoryLineSearchPost200Response.md +1 -1
  10. data/docs/AFNORFacilityPayloadIncluded.md +2 -0
  11. data/docs/AFNORFlow.md +2 -2
  12. data/docs/AFNORLegalUnitPayloadIncluded.md +3 -1
  13. data/docs/AFNORPDPPAFlowServiceApi.md +3 -133
  14. data/docs/AFNORRoutingCodeSearch.md +2 -2
  15. data/docs/AFNORRoutingCodeSearchPost200Response.md +1 -1
  16. data/docs/AFNORSearchDirectoryLine.md +4 -2
  17. data/docs/AFNORSearchDirectoryLineSortingInner.md +2 -2
  18. data/docs/AFNORSearchFlowContent.md +3 -1
  19. data/docs/AFNORSearchFlowParams.md +3 -1
  20. data/docs/AFNORSearchSiren.md +1 -1
  21. data/docs/AFNORSearchSirenFiltersBusinessName.md +1 -1
  22. data/docs/AFNORSearchSirenSortingInner.md +2 -2
  23. data/docs/AFNORSearchSiret.md +1 -1
  24. data/docs/AFNORSearchSiretFiltersAddressLines.md +1 -1
  25. data/docs/AFNORSearchSiretFiltersLocality.md +1 -1
  26. data/docs/AFNORSearchSiretFiltersName.md +1 -1
  27. data/docs/AFNORSearchSiretSortingInner.md +2 -2
  28. data/docs/AFNORSirenSearchPost200Response.md +1 -1
  29. data/docs/AFNORSiretSearchPost200Response.md +1 -1
  30. data/docs/AFNORUniqueDirectoryLineStatus.md +15 -0
  31. data/docs/AFNORWebhook.md +12 -4
  32. data/docs/AFNORWebhookIdParam.md +5 -1
  33. data/docs/AFNORWebhookParams.md +8 -4
  34. data/docs/AllowanceCharge.md +1 -1
  35. data/docs/{AFNORAlgorithm.md → Amount3.md} +2 -2
  36. data/docs/{AFNORContainsOperator.md → Amounteur.md} +2 -2
  37. data/docs/ClientManagementApi.md +383 -0
  38. data/docs/CreateCDARRequest.md +7 -1
  39. data/docs/DeliveryParty.md +2 -2
  40. data/docs/ElectronicAddressInput.md +20 -0
  41. data/docs/ElectronicAddressOutput.md +20 -0
  42. data/docs/ElectronicSignatureApi.md +6 -6
  43. data/docs/EncaisseAmountByRate.md +20 -0
  44. data/docs/EncaisseeRequest.md +8 -2
  45. data/docs/FacturXConversionApi.md +2 -2
  46. data/docs/FacturXPDFXMLVerificationApi.md +4 -4
  47. data/docs/FacturXValidationApi.md +4 -4
  48. data/docs/FactureElectroniqueModelsInvoiceTypeCode.md +15 -0
  49. data/docs/{ChorusProCredentials.md → FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md} +2 -2
  50. data/docs/{ValidationErrorResponse.md → FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md} +2 -2
  51. data/docs/Flux10EReportingApi.md +22 -12
  52. data/docs/Flux6InvoiceLifecycleCDARApi.md +45 -21
  53. data/docs/GetChorusProIdRequest.md +1 -1
  54. data/docs/GetInvoiceRequest.md +1 -1
  55. data/docs/GetStructureRequest.md +1 -1
  56. data/docs/IncomingSupplier.md +4 -2
  57. data/docs/InvoiceGenerationApi.md +16 -10
  58. data/docs/InvoiceInput.md +4 -0
  59. data/docs/{AFNORCallbackAuthentication.md → Invoicedata.md} +9 -9
  60. data/docs/LifecycleEvent.md +2 -0
  61. data/docs/LifecycleResponse.md +9 -1
  62. data/docs/ParseApi.md +4 -4
  63. data/docs/Payee.md +2 -2
  64. data/docs/PaymentAmountByRate.md +4 -2
  65. data/docs/PostalAddressInput.md +30 -0
  66. data/docs/PostalAddressOutput.md +30 -0
  67. data/docs/ProcessingOptions.md +1 -1
  68. data/docs/Recipient.md +3 -3
  69. data/docs/ReportSender.md +2 -0
  70. data/docs/SearchStructureRequest.md +1 -1
  71. data/docs/SimplifiedInvoiceData.md +3 -3
  72. data/docs/SubmitCDARRequest.md +6 -0
  73. data/docs/SubmitCompleteInvoiceRequest.md +1 -1
  74. data/docs/SubmitInvoiceRequest.md +1 -1
  75. data/docs/SuperPDPConnectURLResponse.md +18 -0
  76. data/docs/SuperPDPDisconnectResponse.md +20 -0
  77. data/docs/SuperPDPStatusResponse.md +26 -0
  78. data/docs/SuperPDPVatRegimeResponse.md +20 -0
  79. data/docs/SuperPDPVatRegimeUpdateRequest.md +20 -0
  80. data/docs/Supplier.md +5 -3
  81. data/docs/TaxBreakdownInput.md +7 -1
  82. data/docs/TaxRepresentative.md +1 -1
  83. data/docs/Taxamounteur.md +15 -0
  84. data/docs/ValidateCDARRequest.md +3 -1
  85. data/docs/ValidationApi.md +3 -3
  86. data/docs/ValidationError.md +5 -1
  87. data/factpulse.gemspec +1 -1
  88. data/lib/factpulse/api/afnorpdppa_api.rb +1 -1
  89. data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +1 -1
  90. data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +7 -133
  91. data/lib/factpulse/api/async_tasks_api.rb +1 -1
  92. data/lib/factpulse/api/chorus_pro_api.rb +1 -1
  93. data/lib/factpulse/api/client_management_api.rb +333 -1
  94. data/lib/factpulse/api/downloads_api.rb +1 -1
  95. data/lib/factpulse/api/electronic_signature_api.rb +7 -7
  96. data/lib/factpulse/api/factur_x_conversion_api.rb +3 -3
  97. data/lib/factpulse/api/factur_x_validation_api.rb +5 -5
  98. data/lib/factpulse/api/factur_xpdfxml_verification_api.rb +5 -5
  99. data/lib/factpulse/api/flux10_e_reporting_api.rb +14 -5
  100. data/lib/factpulse/api/flux6_invoice_lifecycle_cdar_api.rb +33 -5
  101. data/lib/factpulse/api/health_api.rb +1 -1
  102. data/lib/factpulse/api/invoice_generation_api.rb +11 -5
  103. data/lib/factpulse/api/parse_api.rb +5 -5
  104. data/lib/factpulse/api/references_api.rb +1 -1
  105. data/lib/factpulse/api/validation_api.rb +5 -5
  106. data/lib/factpulse/api_client.rb +1 -1
  107. data/lib/factpulse/api_error.rb +1 -1
  108. data/lib/factpulse/api_model_base.rb +1 -1
  109. data/lib/factpulse/configuration.rb +1 -1
  110. data/lib/factpulse/helpers/client.rb +42 -5
  111. data/lib/factpulse/models/acknowledgment_status.rb +1 -1
  112. data/lib/factpulse/models/action_code_info.rb +1 -1
  113. data/lib/factpulse/models/action_codes_response.rb +1 -1
  114. data/lib/factpulse/models/additional_document.rb +1 -1
  115. data/lib/factpulse/models/afnor_acknowledgement.rb +1 -1
  116. data/lib/factpulse/models/afnor_acknowledgement_detail.rb +1 -1
  117. data/lib/factpulse/models/afnor_address_read.rb +1 -1
  118. data/lib/factpulse/models/{afnor_contains_operator.rb → afnor_contains_or_start_with_operator.rb} +6 -5
  119. data/lib/factpulse/models/afnor_contains_or_strict_operator.rb +1 -1
  120. data/lib/factpulse/models/{afnor_algorithm.rb → afnor_contains_or_strict_or_start_with_operator.rb} +8 -11
  121. data/lib/factpulse/models/afnor_core_flow_info.rb +6 -6
  122. data/lib/factpulse/models/afnor_credentials.rb +1 -1
  123. data/lib/factpulse/models/afnor_destination.rb +1 -1
  124. data/lib/factpulse/models/afnor_directory_line_field.rb +1 -1
  125. data/lib/factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_routing_code.rb +1 -1
  126. data/lib/factpulse/models/afnor_directory_line_payload_legal_unit_facility_routing_code.rb +51 -2
  127. data/lib/factpulse/models/afnor_directory_line_payload_status_legal_unit_facility_routing_code.rb +42 -2
  128. data/lib/factpulse/models/afnor_directory_line_search_post200_response.rb +4 -2
  129. data/lib/factpulse/models/afnor_directory_line_status.rb +1 -1
  130. data/lib/factpulse/models/afnor_entity_type.rb +1 -1
  131. data/lib/factpulse/models/afnor_error.rb +1 -1
  132. data/lib/factpulse/models/afnor_error_detail.rb +1 -1
  133. data/lib/factpulse/models/afnor_facility_administrative_status.rb +1 -1
  134. data/lib/factpulse/models/afnor_facility_payload_history.rb +1 -1
  135. data/lib/factpulse/models/afnor_facility_payload_history_ule_b2g_additional_data.rb +1 -1
  136. data/lib/factpulse/models/afnor_facility_payload_included.rb +11 -2
  137. data/lib/factpulse/models/afnor_facility_type.rb +1 -1
  138. data/lib/factpulse/models/afnor_flow.rb +45 -11
  139. data/lib/factpulse/models/afnor_flow_ack_status.rb +1 -1
  140. data/lib/factpulse/models/afnor_flow_direction.rb +1 -1
  141. data/lib/factpulse/models/afnor_flow_extension.rb +1 -1
  142. data/lib/factpulse/models/afnor_flow_info.rb +6 -6
  143. data/lib/factpulse/models/afnor_flow_info_extension.rb +1 -1
  144. data/lib/factpulse/models/afnor_flow_profile.rb +3 -2
  145. data/lib/factpulse/models/afnor_flow_syntax.rb +1 -1
  146. data/lib/factpulse/models/afnor_flow_type.rb +9 -3
  147. data/lib/factpulse/models/afnor_full_flow_info.rb +11 -11
  148. data/lib/factpulse/models/afnor_full_flow_info_extension.rb +7 -7
  149. data/lib/factpulse/models/afnor_health_check_response.rb +1 -1
  150. data/lib/factpulse/models/afnor_legal_unit_administrative_status.rb +1 -1
  151. data/lib/factpulse/models/afnor_legal_unit_payload_history.rb +1 -1
  152. data/lib/factpulse/models/afnor_legal_unit_payload_included.rb +14 -5
  153. data/lib/factpulse/models/afnor_processing_rule.rb +3 -2
  154. data/lib/factpulse/models/afnor_reason_code.rb +1 -1
  155. data/lib/factpulse/models/afnor_reason_code_enum.rb +1 -1
  156. data/lib/factpulse/models/afnor_recipient_platform_type.rb +1 -1
  157. data/lib/factpulse/models/afnor_result.rb +1 -1
  158. data/lib/factpulse/models/afnor_routing_code_administrative_status.rb +1 -1
  159. data/lib/factpulse/models/afnor_routing_code_field.rb +1 -1
  160. data/lib/factpulse/models/afnor_routing_code_payload_history_legal_unit_facility.rb +1 -1
  161. data/lib/factpulse/models/afnor_routing_code_search.rb +1 -1
  162. data/lib/factpulse/models/afnor_routing_code_search_filters.rb +1 -1
  163. data/lib/factpulse/models/afnor_routing_code_search_filters_administrative_status.rb +1 -1
  164. data/lib/factpulse/models/afnor_routing_code_search_filters_routing_code_name.rb +1 -1
  165. data/lib/factpulse/models/afnor_routing_code_search_filters_routing_identifier.rb +1 -1
  166. data/lib/factpulse/models/afnor_routing_code_search_post200_response.rb +4 -2
  167. data/lib/factpulse/models/afnor_routing_code_search_sorting_inner.rb +1 -1
  168. data/lib/factpulse/models/afnor_search_directory_line.rb +35 -2
  169. data/lib/factpulse/models/afnor_search_directory_line_filters.rb +1 -1
  170. data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_identifier.rb +1 -1
  171. data/lib/factpulse/models/afnor_search_directory_line_filters_addressing_suffix.rb +1 -1
  172. data/lib/factpulse/models/afnor_search_directory_line_sorting_inner.rb +8 -8
  173. data/lib/factpulse/models/afnor_search_flow_content.rb +34 -2
  174. data/lib/factpulse/models/afnor_search_flow_filters.rb +6 -6
  175. data/lib/factpulse/models/afnor_search_flow_params.rb +13 -3
  176. data/lib/factpulse/models/afnor_search_siren.rb +1 -1
  177. data/lib/factpulse/models/afnor_search_siren_filters.rb +1 -1
  178. data/lib/factpulse/models/afnor_search_siren_filters_administrative_status.rb +1 -1
  179. data/lib/factpulse/models/afnor_search_siren_filters_business_name.rb +2 -2
  180. data/lib/factpulse/models/afnor_search_siren_filters_entity_type.rb +1 -1
  181. data/lib/factpulse/models/afnor_search_siren_filters_siren.rb +1 -1
  182. data/lib/factpulse/models/afnor_search_siren_sorting_inner.rb +8 -8
  183. data/lib/factpulse/models/afnor_search_siret.rb +1 -1
  184. data/lib/factpulse/models/afnor_search_siret_filters.rb +1 -1
  185. data/lib/factpulse/models/afnor_search_siret_filters_address_lines.rb +2 -2
  186. data/lib/factpulse/models/afnor_search_siret_filters_administrative_status.rb +1 -1
  187. data/lib/factpulse/models/afnor_search_siret_filters_country_subdivision.rb +1 -1
  188. data/lib/factpulse/models/afnor_search_siret_filters_facility_type.rb +1 -1
  189. data/lib/factpulse/models/afnor_search_siret_filters_locality.rb +2 -2
  190. data/lib/factpulse/models/afnor_search_siret_filters_name.rb +2 -2
  191. data/lib/factpulse/models/afnor_search_siret_filters_postal_code.rb +1 -1
  192. data/lib/factpulse/models/afnor_search_siret_filters_siret.rb +1 -1
  193. data/lib/factpulse/models/afnor_search_siret_sorting_inner.rb +8 -8
  194. data/lib/factpulse/models/afnor_siren_field.rb +1 -1
  195. data/lib/factpulse/models/afnor_siren_instructions.rb +1 -1
  196. data/lib/factpulse/models/afnor_siren_search_post200_response.rb +4 -2
  197. data/lib/factpulse/models/afnor_siret_field.rb +1 -1
  198. data/lib/factpulse/models/afnor_siret_instructions.rb +1 -1
  199. data/lib/factpulse/models/afnor_siret_search_post200_response.rb +4 -2
  200. data/lib/factpulse/models/afnor_sorting_order.rb +1 -1
  201. data/lib/factpulse/models/afnor_strict_operator.rb +1 -1
  202. data/lib/factpulse/models/afnor_strict_or_start_with_operator.rb +1 -1
  203. data/lib/factpulse/models/afnor_unique_directory_line_status.rb +40 -0
  204. data/lib/factpulse/models/afnor_webhook.rb +83 -40
  205. data/lib/factpulse/models/afnor_webhook_id_param.rb +23 -5
  206. data/lib/factpulse/models/afnor_webhook_params.rb +65 -40
  207. data/lib/factpulse/models/aggregated_payment_input.rb +1 -1
  208. data/lib/factpulse/models/aggregated_transaction_input.rb +1 -1
  209. data/lib/factpulse/models/allowance_charge.rb +2 -2
  210. data/lib/factpulse/models/allowance_charge_reason_code.rb +1 -1
  211. data/lib/factpulse/models/allowance_reason_code.rb +1 -1
  212. data/lib/factpulse/models/allowance_total_amount.rb +1 -1
  213. data/lib/factpulse/models/amount.rb +2 -2
  214. data/lib/factpulse/models/amount1.rb +2 -2
  215. data/lib/factpulse/models/amount2.rb +2 -2
  216. data/lib/factpulse/models/amount3.rb +104 -0
  217. data/lib/factpulse/models/amount_due.rb +1 -1
  218. data/lib/factpulse/models/amounteur.rb +104 -0
  219. data/lib/factpulse/models/api_error.rb +1 -1
  220. data/lib/factpulse/models/api_profile.rb +1 -1
  221. data/lib/factpulse/models/async_task_status.rb +1 -1
  222. data/lib/factpulse/models/base_amount.rb +1 -1
  223. data/lib/factpulse/models/bounding_box_schema.rb +1 -1
  224. data/lib/factpulse/models/buyercountry.rb +1 -1
  225. data/lib/factpulse/models/celery_status.rb +1 -1
  226. data/lib/factpulse/models/certificate_info_response.rb +1 -1
  227. data/lib/factpulse/models/charge_total_amount.rb +1 -1
  228. data/lib/factpulse/models/chorus_pro_destination.rb +1 -1
  229. data/lib/factpulse/models/chorus_pro_result.rb +1 -1
  230. data/lib/factpulse/models/client_activate_response.rb +1 -1
  231. data/lib/factpulse/models/client_create_request.rb +1 -1
  232. data/lib/factpulse/models/client_detail.rb +1 -1
  233. data/lib/factpulse/models/client_list_response.rb +1 -1
  234. data/lib/factpulse/models/client_summary.rb +1 -1
  235. data/lib/factpulse/models/client_update_request.rb +1 -1
  236. data/lib/factpulse/models/contact.rb +1 -1
  237. data/lib/factpulse/models/conversion_error_result.rb +1 -1
  238. data/lib/factpulse/models/conversion_extraction_info.rb +1 -1
  239. data/lib/factpulse/models/conversion_pending_input_result.rb +1 -1
  240. data/lib/factpulse/models/conversion_success_task_result.rb +1 -1
  241. data/lib/factpulse/models/conversion_task_status.rb +1 -1
  242. data/lib/factpulse/models/conversion_task_status_result.rb +1 -1
  243. data/lib/factpulse/models/conversion_validation_failed_result.rb +1 -1
  244. data/lib/factpulse/models/convert_resume_request.rb +1 -1
  245. data/lib/factpulse/models/convert_success_response.rb +1 -1
  246. data/lib/factpulse/models/convert_validation_failed_response.rb +1 -1
  247. data/lib/factpulse/models/country_code.rb +1 -1
  248. data/lib/factpulse/models/create_aggregated_report_request.rb +1 -1
  249. data/lib/factpulse/models/create_cdar_request.rb +70 -6
  250. data/lib/factpulse/models/create_e_reporting_request.rb +1 -1
  251. data/lib/factpulse/models/currency.rb +1 -1
  252. data/lib/factpulse/models/currency_code.rb +1 -1
  253. data/lib/factpulse/models/delivery_party.rb +3 -3
  254. data/lib/factpulse/models/destination.rb +1 -1
  255. data/lib/factpulse/models/doc_type.rb +1 -1
  256. data/lib/factpulse/models/document_type_info.rb +1 -1
  257. data/lib/factpulse/models/e_reporting_flow_type.rb +1 -1
  258. data/lib/factpulse/models/e_reporting_validation_error.rb +1 -1
  259. data/lib/factpulse/models/electronic_address.rb +2 -2
  260. data/lib/factpulse/models/{afnor_callback_signature.rb → electronic_address_input.rb} +29 -44
  261. data/lib/factpulse/models/{afnor_callback_parameters.rb → electronic_address_output.rb} +51 -46
  262. data/lib/factpulse/models/{afnor_basic_authentication.rb → encaisse_amount_by_rate.rb} +37 -35
  263. data/lib/factpulse/models/encaisseamount.rb +2 -2
  264. data/lib/factpulse/models/encaisseamount1.rb +1 -1
  265. data/lib/factpulse/models/encaissee_request.rb +54 -23
  266. data/lib/factpulse/models/enriched_invoice_info.rb +1 -1
  267. data/lib/factpulse/models/error_level.rb +1 -1
  268. data/lib/factpulse/models/error_source.rb +1 -1
  269. data/lib/factpulse/models/extraction_info.rb +1 -1
  270. data/lib/factpulse/models/factur_x_invoice.rb +1 -1
  271. data/lib/factpulse/models/factur_xpdf_info.rb +1 -1
  272. data/lib/factpulse/models/facture_electronique_models_invoice_type_code.rb +54 -0
  273. data/lib/factpulse/models/facture_electronique_rest_api_schemas_cdar_validation_error_response.rb +1 -1
  274. data/lib/factpulse/models/{chorus_pro_credentials.rb → facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb} +4 -4
  275. data/lib/factpulse/models/facture_electronique_rest_api_schemas_ereporting_invoice_type_code.rb +1 -1
  276. data/lib/factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.rb +1 -1
  277. data/lib/factpulse/models/{validation_error_response.rb → facture_electronique_rest_api_schemas_validation_validation_error_response.rb} +4 -4
  278. data/lib/factpulse/models/field_status.rb +1 -1
  279. data/lib/factpulse/models/file_info.rb +1 -1
  280. data/lib/factpulse/models/files_info.rb +1 -1
  281. data/lib/factpulse/models/flow_direction.rb +1 -1
  282. data/lib/factpulse/models/flow_profile.rb +3 -2
  283. data/lib/factpulse/models/flow_summary.rb +1 -1
  284. data/lib/factpulse/models/flow_syntax.rb +1 -1
  285. data/lib/factpulse/models/flow_type.rb +9 -3
  286. data/lib/factpulse/models/generate_aggregated_report_response.rb +1 -1
  287. data/lib/factpulse/models/generate_cdar_response.rb +1 -1
  288. data/lib/factpulse/models/generate_certificate_request.rb +1 -1
  289. data/lib/factpulse/models/generate_certificate_response.rb +1 -1
  290. data/lib/factpulse/models/generate_e_reporting_response.rb +1 -1
  291. data/lib/factpulse/models/generation_success_result.rb +1 -1
  292. data/lib/factpulse/models/generation_task_status.rb +1 -1
  293. data/lib/factpulse/models/generation_task_status_result.rb +1 -1
  294. data/lib/factpulse/models/get_chorus_pro_id_request.rb +2 -2
  295. data/lib/factpulse/models/get_chorus_pro_id_response.rb +1 -1
  296. data/lib/factpulse/models/get_invoice_request.rb +2 -2
  297. data/lib/factpulse/models/get_invoice_response.rb +1 -1
  298. data/lib/factpulse/models/get_structure_request.rb +2 -2
  299. data/lib/factpulse/models/get_structure_response.rb +1 -1
  300. data/lib/factpulse/models/global_allowance_amount.rb +1 -1
  301. data/lib/factpulse/models/gross_unit_price.rb +1 -1
  302. data/lib/factpulse/models/http_validation_error.rb +1 -1
  303. data/lib/factpulse/models/incoming_invoice.rb +1 -1
  304. data/lib/factpulse/models/incoming_supplier.rb +14 -4
  305. data/lib/factpulse/models/invoice_format.rb +1 -1
  306. data/lib/factpulse/models/invoice_input.rb +22 -2
  307. data/lib/factpulse/models/invoice_lifecycle.rb +1 -1
  308. data/lib/factpulse/models/invoice_line.rb +1 -1
  309. data/lib/factpulse/models/invoice_line_allowance_amount.rb +1 -1
  310. data/lib/factpulse/models/invoice_note.rb +1 -1
  311. data/lib/factpulse/models/invoice_payment_input.rb +1 -1
  312. data/lib/factpulse/models/invoice_references.rb +1 -1
  313. data/lib/factpulse/models/invoice_status.rb +1 -1
  314. data/lib/factpulse/models/invoice_totals.rb +1 -1
  315. data/lib/factpulse/models/invoice_totals_prepayment.rb +1 -1
  316. data/lib/factpulse/models/invoice_type_code.rb +1 -1
  317. data/lib/factpulse/models/invoice_type_code_output.rb +1 -1
  318. data/lib/factpulse/models/{afnor_callback_authentication.rb → invoicedata.rb} +5 -5
  319. data/lib/factpulse/models/invoicing_framework.rb +1 -1
  320. data/lib/factpulse/models/invoicing_framework_code.rb +1 -1
  321. data/lib/factpulse/models/issuer_role_code.rb +1 -1
  322. data/lib/factpulse/models/key_rotation_request.rb +1 -1
  323. data/lib/factpulse/models/key_rotation_response.rb +1 -1
  324. data/lib/factpulse/models/lifecycle_event.rb +12 -2
  325. data/lib/factpulse/models/lifecycle_response.rb +49 -5
  326. data/lib/factpulse/models/line_net_amount.rb +1 -1
  327. data/lib/factpulse/models/line_sub_type.rb +1 -1
  328. data/lib/factpulse/models/line_total_amount.rb +1 -1
  329. data/lib/factpulse/models/location_inner.rb +1 -1
  330. data/lib/factpulse/models/mandatory_note_schema.rb +1 -1
  331. data/lib/factpulse/models/manual_rate.rb +1 -1
  332. data/lib/factpulse/models/manual_vat_rate.rb +1 -1
  333. data/lib/factpulse/models/missing_field.rb +1 -1
  334. data/lib/factpulse/models/operation_nature.rb +1 -1
  335. data/lib/factpulse/models/output_format.rb +1 -1
  336. data/lib/factpulse/models/page_dimensions_schema.rb +1 -1
  337. data/lib/factpulse/models/parse_factur_x_response.rb +1 -1
  338. data/lib/factpulse/models/payee.rb +3 -3
  339. data/lib/factpulse/models/payment_amount_by_rate.rb +15 -5
  340. data/lib/factpulse/models/payment_card.rb +1 -1
  341. data/lib/factpulse/models/payment_means.rb +3 -2
  342. data/lib/factpulse/models/pdf_validation_result_api.rb +1 -1
  343. data/lib/factpulse/models/pdp_config_response.rb +1 -1
  344. data/lib/factpulse/models/pdp_config_update_request.rb +1 -1
  345. data/lib/factpulse/models/pdp_credentials.rb +1 -1
  346. data/lib/factpulse/models/percentage.rb +1 -1
  347. data/lib/factpulse/models/postal_address.rb +7 -7
  348. data/lib/factpulse/models/postal_address_input.rb +209 -0
  349. data/lib/factpulse/models/postal_address_output.rb +209 -0
  350. data/lib/factpulse/models/price_allowance_amount.rb +1 -1
  351. data/lib/factpulse/models/price_basis_quantity.rb +1 -1
  352. data/lib/factpulse/models/processing_options.rb +2 -2
  353. data/lib/factpulse/models/processing_rule.rb +3 -2
  354. data/lib/factpulse/models/product_characteristic.rb +1 -1
  355. data/lib/factpulse/models/product_classification.rb +1 -1
  356. data/lib/factpulse/models/quantity.rb +1 -1
  357. data/lib/factpulse/models/rate.rb +1 -1
  358. data/lib/factpulse/models/rate1.rb +1 -1
  359. data/lib/factpulse/models/reason_code_info.rb +1 -1
  360. data/lib/factpulse/models/reason_codes_response.rb +1 -1
  361. data/lib/factpulse/models/recipient.rb +4 -4
  362. data/lib/factpulse/models/recipient_input.rb +1 -1
  363. data/lib/factpulse/models/refusee_request.rb +1 -1
  364. data/lib/factpulse/models/report_issuer.rb +1 -1
  365. data/lib/factpulse/models/report_period.rb +1 -1
  366. data/lib/factpulse/models/report_sender.rb +12 -2
  367. data/lib/factpulse/models/rounding_amount.rb +1 -1
  368. data/lib/factpulse/models/schematron_validation_error.rb +1 -1
  369. data/lib/factpulse/models/scheme_id.rb +1 -1
  370. data/lib/factpulse/models/search_flow_request.rb +1 -1
  371. data/lib/factpulse/models/search_flow_response.rb +1 -1
  372. data/lib/factpulse/models/search_services_response.rb +1 -1
  373. data/lib/factpulse/models/search_structure_request.rb +2 -2
  374. data/lib/factpulse/models/search_structure_response.rb +1 -1
  375. data/lib/factpulse/models/secret_status.rb +1 -1
  376. data/lib/factpulse/models/sellercountry.rb +1 -1
  377. data/lib/factpulse/models/signature_info.rb +1 -1
  378. data/lib/factpulse/models/signature_info_api.rb +1 -1
  379. data/lib/factpulse/models/signature_parameters.rb +1 -1
  380. data/lib/factpulse/models/signature_success_result.rb +1 -1
  381. data/lib/factpulse/models/signature_task_status.rb +1 -1
  382. data/lib/factpulse/models/signature_task_status_result.rb +1 -1
  383. data/lib/factpulse/models/simplified_cdar_response.rb +1 -1
  384. data/lib/factpulse/models/simplified_invoice_data.rb +5 -5
  385. data/lib/factpulse/models/status_code_info.rb +1 -1
  386. data/lib/factpulse/models/status_codes_response.rb +1 -1
  387. data/lib/factpulse/models/structure_info.rb +1 -1
  388. data/lib/factpulse/models/structure_parameters.rb +1 -1
  389. data/lib/factpulse/models/structure_service.rb +1 -1
  390. data/lib/factpulse/models/submission_mode.rb +1 -1
  391. data/lib/factpulse/models/submit_aggregated_report_request.rb +1 -1
  392. data/lib/factpulse/models/submit_cdar_request.rb +66 -2
  393. data/lib/factpulse/models/submit_cdar_response.rb +1 -1
  394. data/lib/factpulse/models/submit_cdarxml_request.rb +1 -1
  395. data/lib/factpulse/models/submit_complete_invoice_request.rb +2 -3
  396. data/lib/factpulse/models/submit_complete_invoice_response.rb +1 -1
  397. data/lib/factpulse/models/submit_e_reporting_request.rb +1 -1
  398. data/lib/factpulse/models/submit_e_reporting_response.rb +1 -1
  399. data/lib/factpulse/models/submit_flow_request.rb +1 -1
  400. data/lib/factpulse/models/submit_flow_response.rb +1 -1
  401. data/lib/factpulse/models/submit_gross_amount.rb +1 -1
  402. data/lib/factpulse/models/submit_invoice_request.rb +2 -2
  403. data/lib/factpulse/models/submit_invoice_response.rb +1 -1
  404. data/lib/factpulse/models/submit_net_amount.rb +1 -1
  405. data/lib/factpulse/models/submit_vat_amount.rb +1 -1
  406. data/lib/factpulse/models/{afnor_webhook_patch_payload.rb → super_pdp_connect_url_response.rb} +30 -31
  407. data/lib/factpulse/models/{afnor_callback_header.rb → super_pdp_disconnect_response.rb} +38 -35
  408. data/lib/factpulse/models/super_pdp_status_response.rb +208 -0
  409. data/lib/factpulse/models/super_pdp_vat_regime_response.rb +195 -0
  410. data/lib/factpulse/models/{afnor_webhook_metadata.rb → super_pdp_vat_regime_update_request.rb} +33 -63
  411. data/lib/factpulse/models/supplementary_attachment.rb +1 -1
  412. data/lib/factpulse/models/supplier.rb +15 -5
  413. data/lib/factpulse/models/task_error_result.rb +1 -1
  414. data/lib/factpulse/models/task_response.rb +1 -1
  415. data/lib/factpulse/models/tax_breakdown_input.rb +35 -5
  416. data/lib/factpulse/models/tax_due_date_type.rb +1 -1
  417. data/lib/factpulse/models/tax_representative.rb +2 -2
  418. data/lib/factpulse/models/taxable_amount.rb +1 -1
  419. data/lib/factpulse/models/taxableamount.rb +1 -1
  420. data/lib/factpulse/models/taxamount.rb +1 -1
  421. data/lib/factpulse/models/taxamount1.rb +1 -1
  422. data/lib/factpulse/models/taxamount2.rb +1 -1
  423. data/lib/factpulse/models/taxamounteur.rb +104 -0
  424. data/lib/factpulse/models/taxexclusiveamount.rb +1 -1
  425. data/lib/factpulse/models/taxexclusiveamount1.rb +1 -1
  426. data/lib/factpulse/models/total_gross_amount.rb +1 -1
  427. data/lib/factpulse/models/total_net_amount.rb +1 -1
  428. data/lib/factpulse/models/total_vat_amount.rb +1 -1
  429. data/lib/factpulse/models/transaction_category.rb +1 -1
  430. data/lib/factpulse/models/transmission_type_code.rb +1 -1
  431. data/lib/factpulse/models/unit_net_price.rb +1 -1
  432. data/lib/factpulse/models/unit_of_measure.rb +1 -1
  433. data/lib/factpulse/models/validate_cdar_request.rb +18 -6
  434. data/lib/factpulse/models/validate_cdar_response.rb +1 -1
  435. data/lib/factpulse/models/validate_e_reporting_request.rb +1 -1
  436. data/lib/factpulse/models/validate_e_reporting_response.rb +1 -1
  437. data/lib/factpulse/models/validation_error.rb +24 -5
  438. data/lib/factpulse/models/validation_error_detail.rb +1 -1
  439. data/lib/factpulse/models/validation_info.rb +1 -1
  440. data/lib/factpulse/models/validation_success_response.rb +1 -1
  441. data/lib/factpulse/models/validation_success_task_result.rb +1 -1
  442. data/lib/factpulse/models/validation_task_status.rb +1 -1
  443. data/lib/factpulse/models/validation_task_status_result.rb +1 -1
  444. data/lib/factpulse/models/vat_accounting_code.rb +1 -1
  445. data/lib/factpulse/models/vat_amount.rb +1 -1
  446. data/lib/factpulse/models/vat_category.rb +1 -1
  447. data/lib/factpulse/models/vat_line.rb +1 -1
  448. data/lib/factpulse/models/vat_point_date_code.rb +1 -1
  449. data/lib/factpulse/models/vat_rate.rb +1 -1
  450. data/lib/factpulse/models/vatex_code_info.rb +1 -1
  451. data/lib/factpulse/models/vatex_codes_response.rb +1 -1
  452. data/lib/factpulse/models/verification_success_response.rb +1 -1
  453. data/lib/factpulse/models/verification_success_task_result.rb +1 -1
  454. data/lib/factpulse/models/verification_typed_task_status.rb +1 -1
  455. data/lib/factpulse/models/verification_typed_task_status_result.rb +1 -1
  456. data/lib/factpulse/models/verified_field_schema.rb +1 -1
  457. data/lib/factpulse/models/webhook_secret_delete_response.rb +1 -1
  458. data/lib/factpulse/models/webhook_secret_generate_response.rb +1 -1
  459. data/lib/factpulse/models/webhook_secret_status_response.rb +1 -1
  460. data/lib/factpulse/version.rb +2 -2
  461. data/lib/factpulse.rb +21 -13
  462. metadata +42 -26
  463. data/docs/AFNORBasicAuthentication.md +0 -20
  464. data/docs/AFNORCallbackHeader.md +0 -20
  465. data/docs/AFNORCallbackParameters.md +0 -24
  466. data/docs/AFNORCallbackSignature.md +0 -20
  467. data/docs/AFNOROAuth2Authentication.md +0 -22
  468. data/docs/AFNORWebhookMetadata.md +0 -24
  469. data/docs/AFNORWebhookPatchPayload.md +0 -22
  470. data/lib/factpulse/models/afnoro_auth2_authentication.rb +0 -216
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: contact@factpulse.fr
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0-SNAPSHOT
9
+ Generator version: 7.21.0
10
10
 
11
11
  =end
12
12
 
@@ -344,6 +344,7 @@ module FactPulse
344
344
  # Generate and submit a PPF-compliant aggregated e-reporting to a PA/PDP. Combines generation and submission in a single call. Automatically determines the AFNOR FlowType based on content.
345
345
  # @param submit_aggregated_report_request [SubmitAggregatedReportRequest]
346
346
  # @param [Hash] opts the optional parameters
347
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
347
348
  # @return [SubmitEReportingResponse]
348
349
  def submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post(submit_aggregated_report_request, opts = {})
349
350
  data, _status_code, _headers = submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post_with_http_info(submit_aggregated_report_request, opts)
@@ -354,6 +355,7 @@ module FactPulse
354
355
  # Generate and submit a PPF-compliant aggregated e-reporting to a PA/PDP. Combines generation and submission in a single call. Automatically determines the AFNOR FlowType based on content.
355
356
  # @param submit_aggregated_report_request [SubmitAggregatedReportRequest]
356
357
  # @param [Hash] opts the optional parameters
358
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
357
359
  # @return [Array<(SubmitEReportingResponse, Integer, Hash)>] SubmitEReportingResponse data, response status code and response headers
358
360
  def submit_aggregated_ereporting_api_v1_ereporting_submit_aggregated_post_with_http_info(submit_aggregated_report_request, opts = {})
359
361
  if @api_client.config.debugging
@@ -378,6 +380,7 @@ module FactPulse
378
380
  if !content_type.nil?
379
381
  header_params['Content-Type'] = content_type
380
382
  end
383
+ header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
381
384
 
382
385
  # form parameters
383
386
  form_params = opts[:form_params] || {}
@@ -412,6 +415,7 @@ module FactPulse
412
415
  # Generate and submit e-reporting to a PA (Plateforme Agréée). Authentication strategies (same as invoices): 1. **JWT with client_uid** (recommended): PDP credentials fetched from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in request The e-reporting is submitted using the AFNOR Flow Service API with syntax=FRR (FRench Reporting).
413
416
  # @param submit_e_reporting_request [SubmitEReportingRequest]
414
417
  # @param [Hash] opts the optional parameters
418
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
415
419
  # @return [SubmitEReportingResponse]
416
420
  def submit_ereporting_api_v1_ereporting_submit_post(submit_e_reporting_request, opts = {})
417
421
  data, _status_code, _headers = submit_ereporting_api_v1_ereporting_submit_post_with_http_info(submit_e_reporting_request, opts)
@@ -422,6 +426,7 @@ module FactPulse
422
426
  # Generate and submit e-reporting to a PA (Plateforme Agréée). Authentication strategies (same as invoices): 1. **JWT with client_uid** (recommended): PDP credentials fetched from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in request The e-reporting is submitted using the AFNOR Flow Service API with syntax&#x3D;FRR (FRench Reporting).
423
427
  # @param submit_e_reporting_request [SubmitEReportingRequest]
424
428
  # @param [Hash] opts the optional parameters
429
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
425
430
  # @return [Array<(SubmitEReportingResponse, Integer, Hash)>] SubmitEReportingResponse data, response status code and response headers
426
431
  def submit_ereporting_api_v1_ereporting_submit_post_with_http_info(submit_e_reporting_request, opts = {})
427
432
  if @api_client.config.debugging
@@ -446,6 +451,7 @@ module FactPulse
446
451
  if !content_type.nil?
447
452
  header_params['Content-Type'] = content_type
448
453
  end
454
+ header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
449
455
 
450
456
  # form parameters
451
457
  form_params = opts[:form_params] || {}
@@ -478,8 +484,9 @@ module FactPulse
478
484
 
479
485
  # Submit pre-generated e-reporting XML
480
486
  # Submit a pre-generated e-reporting XML file directly to a PA/PDP. This endpoint is designed for clients who generate their own PPF-compliant XML and only need FactPulse for the PDP submission. **Process:** 1. Validates the XML against PPF XSD schemas 2. Determines the appropriate AFNOR FlowType 3. Submits to the configured PDP/PA 4. Returns the flowId for tracking **Authentication:** Same strategies as /submit endpoint (JWT or zero-storage credentials).
481
- # @param xml_file [File] E-reporting XML file
487
+ # @param xml_file [String] E-reporting XML file
482
488
  # @param [Hash] opts the optional parameters
489
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
483
490
  # @option opts [String] :tracking_id
484
491
  # @option opts [Boolean] :skip_validation Skip XSD validation (default to false)
485
492
  # @option opts [String] :pdp_flow_service_url
@@ -494,8 +501,9 @@ module FactPulse
494
501
 
495
502
  # Submit pre-generated e-reporting XML
496
503
  # Submit a pre-generated e-reporting XML file directly to a PA/PDP. This endpoint is designed for clients who generate their own PPF-compliant XML and only need FactPulse for the PDP submission. **Process:** 1. Validates the XML against PPF XSD schemas 2. Determines the appropriate AFNOR FlowType 3. Submits to the configured PDP/PA 4. Returns the flowId for tracking **Authentication:** Same strategies as /submit endpoint (JWT or zero-storage credentials).
497
- # @param xml_file [File] E-reporting XML file
504
+ # @param xml_file [String] E-reporting XML file
498
505
  # @param [Hash] opts the optional parameters
506
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
499
507
  # @option opts [String] :tracking_id
500
508
  # @option opts [Boolean] :skip_validation Skip XSD validation (default to false)
501
509
  # @option opts [String] :pdp_flow_service_url
@@ -526,6 +534,7 @@ module FactPulse
526
534
  if !content_type.nil?
527
535
  header_params['Content-Type'] = content_type
528
536
  end
537
+ header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
529
538
 
530
539
  # form parameters
531
540
  form_params = opts[:form_params] || {}
@@ -701,7 +710,7 @@ module FactPulse
701
710
 
702
711
  # Validate e-reporting XML (PPF Annexe 6 v1.9 compliant)
703
712
  # Validates an e-reporting XML file against PPF specifications (Annexe 6 v1.9): **Validation levels:** 1. **XSD (REJ_SEMAN)**: Structure, types, cardinality 2. **Semantic (REJ_SEMAN)**: Authorized values from codelists 3. **Coherence (REJ_COH)**: Data consistency (totals = sum of breakdowns) 4. **Period (REJ_PER)**: Transaction dates within declared period **Validated codes:** - SchemeID (ISO 6523): 0002=SIREN, 0009=SIRET, 0224=RoutingCode, etc. - RoleCode (UNCL 3035): SE=Seller, BY=Buyer, WK=Working party - CategoryCode (TT-81): TLB1, TPS1, TNT1, TMA1 - TaxCategoryCode (UNTDID 5305): S, Z, E, AE, K, G, O - Currency (ISO 4217), Country (ISO 3166-1) Returns structured validation errors with PPF rejection codes.
704
- # @param xml_file [File] E-reporting XML file to validate
713
+ # @param xml_file [String] E-reporting XML file to validate
705
714
  # @param [Hash] opts the optional parameters
706
715
  # @option opts [Boolean] :validate_coherence Validate data coherence (REJ_COH) (default to true)
707
716
  # @option opts [Boolean] :validate_period Validate period coherence (REJ_PER) (default to true)
@@ -713,7 +722,7 @@ module FactPulse
713
722
 
714
723
  # Validate e-reporting XML (PPF Annexe 6 v1.9 compliant)
715
724
  # Validates an e-reporting XML file against PPF specifications (Annexe 6 v1.9): **Validation levels:** 1. **XSD (REJ_SEMAN)**: Structure, types, cardinality 2. **Semantic (REJ_SEMAN)**: Authorized values from codelists 3. **Coherence (REJ_COH)**: Data consistency (totals &#x3D; sum of breakdowns) 4. **Period (REJ_PER)**: Transaction dates within declared period **Validated codes:** - SchemeID (ISO 6523): 0002&#x3D;SIREN, 0009&#x3D;SIRET, 0224&#x3D;RoutingCode, etc. - RoleCode (UNCL 3035): SE&#x3D;Seller, BY&#x3D;Buyer, WK&#x3D;Working party - CategoryCode (TT-81): TLB1, TPS1, TNT1, TMA1 - TaxCategoryCode (UNTDID 5305): S, Z, E, AE, K, G, O - Currency (ISO 4217), Country (ISO 3166-1) Returns structured validation errors with PPF rejection codes.
716
- # @param xml_file [File] E-reporting XML file to validate
725
+ # @param xml_file [String] E-reporting XML file to validate
717
726
  # @param [Hash] opts the optional parameters
718
727
  # @option opts [Boolean] :validate_coherence Validate data coherence (REJ_COH) (default to true)
719
728
  # @option opts [Boolean] :validate_period Validate period coherence (REJ_PER) (default to true)
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: contact@factpulse.fr
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0-SNAPSHOT
9
+ Generator version: 7.21.0
10
10
 
11
11
  =end
12
12
 
@@ -145,14 +145,18 @@ module FactPulse
145
145
  end
146
146
 
147
147
  # [Simplified] Get lifecycle events for invoices
148
- # Returns lifecycle events (CDAR) grouped by invoice reference. **How it works (AFNOR XP Z12-013 compliant):** 1. Searches lifecycle flows on the PDP by flowType + flowDirection + date range 2. Downloads and parses each CDAR XML to extract the invoice reference 3. Groups events by invoice, sorted chronologically **Parameters:** - `days`: Number of days to look back (default: 7) - `invoiceId`: Optional filter on a specific invoice reference **Authentication:** JWT Bearer (recommended) or PDP credentials as query parameters.
148
+ # Returns lifecycle events (CDAR) grouped by invoice reference. **How it works (AFNOR XP Z12-013 compliant):** 1. Searches lifecycle flows on the PDP by flowType + flowDirection + date range, following the cursor pagination (all pages are read) 2. Downloads and parses each CDAR XML to extract the invoice reference 3. Groups events by invoice, sorted chronologically **Parameters:** - `days`: Number of days to look back (default: 7). Ignored when `dateFrom` is set. - `dateFrom` / `dateTo`: Explicit time window (ISO 8601, UTC if no offset). `dateTo` defaults to now. - `invoiceId`: Optional filter on a specific invoice reference. The filter is applied after reading the window: prefer one call per synchronisation over one call per invoice. **Limits:** at most 1000 status flows are read per call. When the limit is reached, `truncated` is `true` and the response is incomplete: split the window with `dateFrom` / `dateTo`. For incremental synchronisation, request the period since your last successful sync (plus a small margin). - `flowDirection`: `All` (default), `In` (statuses received from the counterparty) or `Out` (statuses issued by you or your PA, e.g. 202/203) **Authentication:** JWT Bearer (recommended) or PDP credentials as query parameters.
149
149
  # @param [Hash] opts the optional parameters
150
150
  # @option opts [Integer] :days Number of days to look back (default to 7)
151
+ # @option opts [Time] :date_from Window start (ISO 8601, UTC if no offset). Overrides days.
152
+ # @option opts [Time] :date_to Window end (ISO 8601, UTC if no offset). Default: now
151
153
  # @option opts [String] :invoice_id Filter by invoice reference
154
+ # @option opts [String] :flow_direction All (default), In (received statuses) or Out (issued statuses) (default to 'All')
152
155
  # @option opts [String] :pdp_flow_service_url PDP Flow Service URL
153
156
  # @option opts [String] :pdp_token_url PDP OAuth token URL
154
157
  # @option opts [String] :pdp_client_id PDP Client ID
155
158
  # @option opts [String] :pdp_client_secret PDP Client Secret
159
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
156
160
  # @return [LifecycleResponse]
157
161
  def get_lifecycle_api_v1_cdar_lifecycle_get(opts = {})
158
162
  data, _status_code, _headers = get_lifecycle_api_v1_cdar_lifecycle_get_with_http_info(opts)
@@ -160,14 +164,18 @@ module FactPulse
160
164
  end
161
165
 
162
166
  # [Simplified] Get lifecycle events for invoices
163
- # Returns lifecycle events (CDAR) grouped by invoice reference. **How it works (AFNOR XP Z12-013 compliant):** 1. Searches lifecycle flows on the PDP by flowType + flowDirection + date range 2. Downloads and parses each CDAR XML to extract the invoice reference 3. Groups events by invoice, sorted chronologically **Parameters:** - &#x60;days&#x60;: Number of days to look back (default: 7) - &#x60;invoiceId&#x60;: Optional filter on a specific invoice reference **Authentication:** JWT Bearer (recommended) or PDP credentials as query parameters.
167
+ # Returns lifecycle events (CDAR) grouped by invoice reference. **How it works (AFNOR XP Z12-013 compliant):** 1. Searches lifecycle flows on the PDP by flowType + flowDirection + date range, following the cursor pagination (all pages are read) 2. Downloads and parses each CDAR XML to extract the invoice reference 3. Groups events by invoice, sorted chronologically **Parameters:** - &#x60;days&#x60;: Number of days to look back (default: 7). Ignored when &#x60;dateFrom&#x60; is set. - &#x60;dateFrom&#x60; / &#x60;dateTo&#x60;: Explicit time window (ISO 8601, UTC if no offset). &#x60;dateTo&#x60; defaults to now. - &#x60;invoiceId&#x60;: Optional filter on a specific invoice reference. The filter is applied after reading the window: prefer one call per synchronisation over one call per invoice. **Limits:** at most 1000 status flows are read per call. When the limit is reached, &#x60;truncated&#x60; is &#x60;true&#x60; and the response is incomplete: split the window with &#x60;dateFrom&#x60; / &#x60;dateTo&#x60;. For incremental synchronisation, request the period since your last successful sync (plus a small margin). - &#x60;flowDirection&#x60;: &#x60;All&#x60; (default), &#x60;In&#x60; (statuses received from the counterparty) or &#x60;Out&#x60; (statuses issued by you or your PA, e.g. 202/203) **Authentication:** JWT Bearer (recommended) or PDP credentials as query parameters.
164
168
  # @param [Hash] opts the optional parameters
165
169
  # @option opts [Integer] :days Number of days to look back (default to 7)
170
+ # @option opts [Time] :date_from Window start (ISO 8601, UTC if no offset). Overrides days.
171
+ # @option opts [Time] :date_to Window end (ISO 8601, UTC if no offset). Default: now
166
172
  # @option opts [String] :invoice_id Filter by invoice reference
173
+ # @option opts [String] :flow_direction All (default), In (received statuses) or Out (issued statuses) (default to 'All')
167
174
  # @option opts [String] :pdp_flow_service_url PDP Flow Service URL
168
175
  # @option opts [String] :pdp_token_url PDP OAuth token URL
169
176
  # @option opts [String] :pdp_client_id PDP Client ID
170
177
  # @option opts [String] :pdp_client_secret PDP Client Secret
178
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
171
179
  # @return [Array<(LifecycleResponse, Integer, Hash)>] LifecycleResponse data, response status code and response headers
172
180
  def get_lifecycle_api_v1_cdar_lifecycle_get_with_http_info(opts = {})
173
181
  if @api_client.config.debugging
@@ -181,13 +189,20 @@ module FactPulse
181
189
  fail ArgumentError, 'invalid value for "opts[:"days"]" when calling Flux6InvoiceLifecycleCDARApi.get_lifecycle_api_v1_cdar_lifecycle_get, must be greater than or equal to 1.'
182
190
  end
183
191
 
192
+ allowable_values = ["In", "Out", "All"]
193
+ if @api_client.config.client_side_validation && opts[:'flow_direction'] && !allowable_values.include?(opts[:'flow_direction'])
194
+ fail ArgumentError, "invalid value for \"flow_direction\", must be one of #{allowable_values}"
195
+ end
184
196
  # resource path
185
197
  local_var_path = '/api/v1/cdar/lifecycle'
186
198
 
187
199
  # query parameters
188
200
  query_params = opts[:query_params] || {}
189
201
  query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil?
202
+ query_params[:'dateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil?
203
+ query_params[:'dateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil?
190
204
  query_params[:'invoiceId'] = opts[:'invoice_id'] if !opts[:'invoice_id'].nil?
205
+ query_params[:'flowDirection'] = opts[:'flow_direction'] if !opts[:'flow_direction'].nil?
191
206
  query_params[:'pdpFlowServiceUrl'] = opts[:'pdp_flow_service_url'] if !opts[:'pdp_flow_service_url'].nil?
192
207
  query_params[:'pdpTokenUrl'] = opts[:'pdp_token_url'] if !opts[:'pdp_token_url'].nil?
193
208
  query_params[:'pdpClientId'] = opts[:'pdp_client_id'] if !opts[:'pdp_client_id'].nil?
@@ -197,6 +212,7 @@ module FactPulse
197
212
  header_params = opts[:header_params] || {}
198
213
  # HTTP header 'Accept' (if needed)
199
214
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
215
+ header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
200
216
 
201
217
  # form parameters
202
218
  form_params = opts[:form_params] || {}
@@ -345,6 +361,7 @@ module FactPulse
345
361
  # Generate a CDAR message and submit it to the PA/PDP platform. **Authentication strategies:** 1. **JWT with client_uid** (recommended): PDP credentials retrieved from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in the request **Flow types (flowType):** - `CustomerInvoiceLC`: Client-side lifecycle (buyer) - `SupplierInvoiceLC`: Supplier-side lifecycle (seller)
346
362
  # @param submit_cdar_request [SubmitCDARRequest]
347
363
  # @param [Hash] opts the optional parameters
364
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
348
365
  # @return [SubmitCDARResponse]
349
366
  def submit_cdar_api_v1_cdar_submit_post(submit_cdar_request, opts = {})
350
367
  data, _status_code, _headers = submit_cdar_api_v1_cdar_submit_post_with_http_info(submit_cdar_request, opts)
@@ -355,6 +372,7 @@ module FactPulse
355
372
  # Generate a CDAR message and submit it to the PA/PDP platform. **Authentication strategies:** 1. **JWT with client_uid** (recommended): PDP credentials retrieved from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in the request **Flow types (flowType):** - &#x60;CustomerInvoiceLC&#x60;: Client-side lifecycle (buyer) - &#x60;SupplierInvoiceLC&#x60;: Supplier-side lifecycle (seller)
356
373
  # @param submit_cdar_request [SubmitCDARRequest]
357
374
  # @param [Hash] opts the optional parameters
375
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
358
376
  # @return [Array<(SubmitCDARResponse, Integer, Hash)>] SubmitCDARResponse data, response status code and response headers
359
377
  def submit_cdar_api_v1_cdar_submit_post_with_http_info(submit_cdar_request, opts = {})
360
378
  if @api_client.config.debugging
@@ -379,6 +397,7 @@ module FactPulse
379
397
  if !content_type.nil?
380
398
  header_params['Content-Type'] = content_type
381
399
  end
400
+ header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
382
401
 
383
402
  # form parameters
384
403
  form_params = opts[:form_params] || {}
@@ -413,6 +432,7 @@ module FactPulse
413
432
  # Submit a pre-generated CDAR XML message to the PA/PDP platform. Useful for submitting XML generated by other systems. **Validation:** The XML is validated against XSD and Schematron BR-FR-CDV rules BEFORE submission. Invalid XML will be rejected with detailed error messages. **Authentication strategies:** 1. **JWT with client_uid** (recommended): PDP credentials retrieved from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in the request
414
433
  # @param submit_cdarxml_request [SubmitCDARXMLRequest]
415
434
  # @param [Hash] opts the optional parameters
435
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
416
436
  # @return [SubmitCDARResponse]
417
437
  def submit_cdar_xml_api_v1_cdar_submit_xml_post(submit_cdarxml_request, opts = {})
418
438
  data, _status_code, _headers = submit_cdar_xml_api_v1_cdar_submit_xml_post_with_http_info(submit_cdarxml_request, opts)
@@ -423,6 +443,7 @@ module FactPulse
423
443
  # Submit a pre-generated CDAR XML message to the PA/PDP platform. Useful for submitting XML generated by other systems. **Validation:** The XML is validated against XSD and Schematron BR-FR-CDV rules BEFORE submission. Invalid XML will be rejected with detailed error messages. **Authentication strategies:** 1. **JWT with client_uid** (recommended): PDP credentials retrieved from backend 2. **Zero-storage**: Provide pdpFlowServiceUrl, pdpClientId, pdpClientSecret in the request
424
444
  # @param submit_cdarxml_request [SubmitCDARXMLRequest]
425
445
  # @param [Hash] opts the optional parameters
446
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
426
447
  # @return [Array<(SubmitCDARResponse, Integer, Hash)>] SubmitCDARResponse data, response status code and response headers
427
448
  def submit_cdar_xml_api_v1_cdar_submit_xml_post_with_http_info(submit_cdarxml_request, opts = {})
428
449
  if @api_client.config.debugging
@@ -447,6 +468,7 @@ module FactPulse
447
468
  if !content_type.nil?
448
469
  header_params['Content-Type'] = content_type
449
470
  end
471
+ header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
450
472
 
451
473
  # form parameters
452
474
  form_params = opts[:form_params] || {}
@@ -481,6 +503,7 @@ module FactPulse
481
503
  # **Simplified endpoint for OD** - Submit a PAID status (212) for an **ISSUED** invoice. This status is **mandatory for PPF** (BR-FR-CDV-14 requires the paid amount). **Use case:** The **seller** confirms payment receipt for an invoice they issued. **Who issues this status?** - **Issuer (IssuerTradeParty):** The seller (SE = Seller) who received payment - **Recipient (RecipientTradeParty):** The buyer (BY = Buyer) who paid **Reference:** XP Z12-014 Annex B, example UC1_F202500003_07-CDV-212_Encaissee.xml **Authentication:** JWT Bearer (recommended) or PDP credentials in request.
482
504
  # @param encaissee_request [EncaisseeRequest]
483
505
  # @param [Hash] opts the optional parameters
506
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
484
507
  # @return [SimplifiedCDARResponse]
485
508
  def submit_encaissee_api_v1_cdar_encaissee_post(encaissee_request, opts = {})
486
509
  data, _status_code, _headers = submit_encaissee_api_v1_cdar_encaissee_post_with_http_info(encaissee_request, opts)
@@ -491,6 +514,7 @@ module FactPulse
491
514
  # **Simplified endpoint for OD** - Submit a PAID status (212) for an **ISSUED** invoice. This status is **mandatory for PPF** (BR-FR-CDV-14 requires the paid amount). **Use case:** The **seller** confirms payment receipt for an invoice they issued. **Who issues this status?** - **Issuer (IssuerTradeParty):** The seller (SE &#x3D; Seller) who received payment - **Recipient (RecipientTradeParty):** The buyer (BY &#x3D; Buyer) who paid **Reference:** XP Z12-014 Annex B, example UC1_F202500003_07-CDV-212_Encaissee.xml **Authentication:** JWT Bearer (recommended) or PDP credentials in request.
492
515
  # @param encaissee_request [EncaisseeRequest]
493
516
  # @param [Hash] opts the optional parameters
517
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
494
518
  # @return [Array<(SimplifiedCDARResponse, Integer, Hash)>] SimplifiedCDARResponse data, response status code and response headers
495
519
  def submit_encaissee_api_v1_cdar_encaissee_post_with_http_info(encaissee_request, opts = {})
496
520
  if @api_client.config.debugging
@@ -515,6 +539,7 @@ module FactPulse
515
539
  if !content_type.nil?
516
540
  header_params['Content-Type'] = content_type
517
541
  end
542
+ header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
518
543
 
519
544
  # form parameters
520
545
  form_params = opts[:form_params] || {}
@@ -549,6 +574,7 @@ module FactPulse
549
574
  # **Simplified endpoint for OD** - Submit a REFUSED status (210) for a **RECEIVED** invoice. This status is **mandatory for PPF** (BR-FR-CDV-15 requires a reason code). **Use case:** The **buyer** refuses an invoice they received. **Who issues this status?** - **Issuer (IssuerTradeParty):** The buyer (BY = Buyer) refusing the invoice - **Recipient (RecipientTradeParty):** The seller (SE = Seller) who issued the invoice **Reference:** XP Z12-014 Annex B, example UC3_F202500005_04-CDV-210_Refusee.xml **Allowed reason codes (BR-FR-CDV-CL-09):** - `TX_TVA_ERR`: Incorrect VAT rate - `MONTANTTOTAL_ERR`: Incorrect total amount - `CALCUL_ERR`: Calculation error - `NON_CONFORME`: Non-compliant - `DOUBLON`: Duplicate - `DEST_ERR`: Wrong recipient - `TRANSAC_INC`: Incomplete transaction - `EMMET_INC`: Unknown issuer - `CONTRAT_TERM`: Contract terminated - `DOUBLE_FACT`: Double billing - `CMD_ERR`: Order error - `ADR_ERR`: Address error - `REF_CT_ABSENT`: Missing contract reference **Authentication:** JWT Bearer (recommended) or PDP credentials in request.
550
575
  # @param refusee_request [RefuseeRequest]
551
576
  # @param [Hash] opts the optional parameters
577
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
552
578
  # @return [SimplifiedCDARResponse]
553
579
  def submit_refusee_api_v1_cdar_refusee_post(refusee_request, opts = {})
554
580
  data, _status_code, _headers = submit_refusee_api_v1_cdar_refusee_post_with_http_info(refusee_request, opts)
@@ -559,6 +585,7 @@ module FactPulse
559
585
  # **Simplified endpoint for OD** - Submit a REFUSED status (210) for a **RECEIVED** invoice. This status is **mandatory for PPF** (BR-FR-CDV-15 requires a reason code). **Use case:** The **buyer** refuses an invoice they received. **Who issues this status?** - **Issuer (IssuerTradeParty):** The buyer (BY &#x3D; Buyer) refusing the invoice - **Recipient (RecipientTradeParty):** The seller (SE &#x3D; Seller) who issued the invoice **Reference:** XP Z12-014 Annex B, example UC3_F202500005_04-CDV-210_Refusee.xml **Allowed reason codes (BR-FR-CDV-CL-09):** - &#x60;TX_TVA_ERR&#x60;: Incorrect VAT rate - &#x60;MONTANTTOTAL_ERR&#x60;: Incorrect total amount - &#x60;CALCUL_ERR&#x60;: Calculation error - &#x60;NON_CONFORME&#x60;: Non-compliant - &#x60;DOUBLON&#x60;: Duplicate - &#x60;DEST_ERR&#x60;: Wrong recipient - &#x60;TRANSAC_INC&#x60;: Incomplete transaction - &#x60;EMMET_INC&#x60;: Unknown issuer - &#x60;CONTRAT_TERM&#x60;: Contract terminated - &#x60;DOUBLE_FACT&#x60;: Double billing - &#x60;CMD_ERR&#x60;: Order error - &#x60;ADR_ERR&#x60;: Address error - &#x60;REF_CT_ABSENT&#x60;: Missing contract reference **Authentication:** JWT Bearer (recommended) or PDP credentials in request.
560
586
  # @param refusee_request [RefuseeRequest]
561
587
  # @param [Hash] opts the optional parameters
588
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
562
589
  # @return [Array<(SimplifiedCDARResponse, Integer, Hash)>] SimplifiedCDARResponse data, response status code and response headers
563
590
  def submit_refusee_api_v1_cdar_refusee_post_with_http_info(refusee_request, opts = {})
564
591
  if @api_client.config.debugging
@@ -583,6 +610,7 @@ module FactPulse
583
610
  if !content_type.nil?
584
611
  header_params['Content-Type'] = content_type
585
612
  end
613
+ header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
586
614
 
587
615
  # form parameters
588
616
  form_params = opts[:form_params] || {}
@@ -683,7 +711,7 @@ module FactPulse
683
711
 
684
712
  # Validate CDAR XML against XSD and Schematron BR-FR-CDV
685
713
  # Validates a CDAR XML file against: 1. **XSD schema**: UN/CEFACT D22B CrossDomainAcknowledgementAndResponse 2. **Schematron BR-FR-CDV**: French business rules for invoice lifecycle Returns validation status and detailed error messages if invalid. **Note:** Use `/validate` to validate structured data fields (JSON).
686
- # @param xml_file [File] CDAR XML file to validate
714
+ # @param xml_file [String] CDAR XML file to validate
687
715
  # @param [Hash] opts the optional parameters
688
716
  # @return [Hash<String, Object>]
689
717
  def validate_xml_cdar_api_v1_cdar_validate_xml_post(xml_file, opts = {})
@@ -693,7 +721,7 @@ module FactPulse
693
721
 
694
722
  # Validate CDAR XML against XSD and Schematron BR-FR-CDV
695
723
  # Validates a CDAR XML file against: 1. **XSD schema**: UN/CEFACT D22B CrossDomainAcknowledgementAndResponse 2. **Schematron BR-FR-CDV**: French business rules for invoice lifecycle Returns validation status and detailed error messages if invalid. **Note:** Use &#x60;/validate&#x60; to validate structured data fields (JSON).
696
- # @param xml_file [File] CDAR XML file to validate
724
+ # @param xml_file [String] CDAR XML file to validate
697
725
  # @param [Hash] opts the optional parameters
698
726
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
699
727
  def validate_xml_cdar_api_v1_cdar_validate_xml_post_with_http_info(xml_file, opts = {})
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: contact@factpulse.fr
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0-SNAPSHOT
9
+ Generator version: 7.21.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: contact@factpulse.fr
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0-SNAPSHOT
9
+ Generator version: 7.21.0
10
10
 
11
11
  =end
12
12
 
@@ -26,7 +26,7 @@ module FactPulse
26
26
  # @option opts [APIProfile] :profile Factur-X/CII profile: MINIMUM, BASIC, EN16931 or EXTENDED. Ignored when output_format&#x3D;&#39;ubl&#39; (always EN16931).
27
27
  # @option opts [OutputFormat] :output_format Output format: &#39;xml&#39; or &#39;cii&#39; (CII/Factur-X XML), &#39;ubl&#39; (UBL 2.1 XML), &#39;pdf&#39; (Factur-X PDF/A-3).
28
28
  # @option opts [Boolean] :auto_enrich 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only) (default to true)
29
- # @option opts [File] :source_pdf
29
+ # @option opts [String] :source_pdf
30
30
  # @option opts [String] :callback_url
31
31
  # @option opts [String] :webhook_mode Webhook content delivery: &#39;inline&#39; (base64 in payload) or &#39;download_url&#39; (temporary URL, 1h TTL) (default to 'inline')
32
32
  # @option opts [Boolean] :skip_br_fr
@@ -43,7 +43,7 @@ module FactPulse
43
43
  # @option opts [APIProfile] :profile Factur-X/CII profile: MINIMUM, BASIC, EN16931 or EXTENDED. Ignored when output_format&#x3D;&#39;ubl&#39; (always EN16931).
44
44
  # @option opts [OutputFormat] :output_format Output format: &#39;xml&#39; or &#39;cii&#39; (CII/Factur-X XML), &#39;ubl&#39; (UBL 2.1 XML), &#39;pdf&#39; (Factur-X PDF/A-3).
45
45
  # @option opts [Boolean] :auto_enrich 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only) (default to true)
46
- # @option opts [File] :source_pdf
46
+ # @option opts [String] :source_pdf
47
47
  # @option opts [String] :callback_url
48
48
  # @option opts [String] :webhook_mode Webhook content delivery: &#39;inline&#39; (base64 in payload) or &#39;download_url&#39; (temporary URL, 1h TTL) (default to 'inline')
49
49
  # @option opts [Boolean] :skip_br_fr
@@ -110,9 +110,10 @@ module FactPulse
110
110
  end
111
111
 
112
112
  # Submit a complete invoice (generation + signature + submission)
113
- # 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`)
113
+ # 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) **Two accepted `invoiceData` formats, detected automatically** (same rule as `/generate-invoice`): - **Simplified format** (`number` + `lines`): totals, VAT and dates are computed. Any field of the complete model may be added on top (`deliveryDate` BT-72, `deliveryParty` BG-15, `paymentReference` BT-83, `supplier.bic` BT-86, ...). - **Complete format** (`invoiceLines` present): full `FacturXInvoice` structure, used as provided. A non-compliant invoice is **not submitted**: the Schematron errors are returned as a 400 `SCHEMATRON_VALIDATION_FAILED`, rather than a 200 followed by an asynchronous rejection by the PA. This includes the empty-element rule (PEPPOL-EN16931-R008), which the PAs apply as blocking. **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`)
114
114
  # @param submit_complete_invoice_request [SubmitCompleteInvoiceRequest]
115
115
  # @param [Hash] opts the optional parameters
116
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
116
117
  # @return [SubmitCompleteInvoiceResponse]
117
118
  def submit_complete_invoice_api_v1_processing_invoices_submit_complete_post(submit_complete_invoice_request, opts = {})
118
119
  data, _status_code, _headers = submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info(submit_complete_invoice_request, opts)
@@ -120,9 +121,10 @@ module FactPulse
120
121
  end
121
122
 
122
123
  # Submit a complete invoice (generation + signature + submission)
123
- # 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 &#x60;client_uid&#x60; - Do not provide the &#x60;credentials&#x60; field in &#x60;destination&#x60; - Zero-trust architecture: no secrets in the payload - Example: &#x60;\&quot;destination\&quot;: {\&quot;type\&quot;: \&quot;chorus_pro\&quot;}&#x60; **Mode 2 - Credentials in the payload:** - Provide credentials directly in the payload - Useful for tests or third-party integrations - Example: &#x60;\&quot;destination\&quot;: {\&quot;type\&quot;: \&quot;chorus_pro\&quot;, \&quot;credentials\&quot;: {...}}&#x60; **Electronic signature (optional) - 2 modes available:** **Mode 1 - Stored certificate (recommended):** - Certificate is retrieved automatically via the JWT &#x60;client_uid&#x60; - No key to provide in the payload - PAdES-B-LT signature with timestamp (eIDAS compliant) - Example: &#x60;\&quot;signature\&quot;: {\&quot;reason\&quot;: \&quot;Factur-X compliance\&quot;}&#x60; **Mode 2 - Keys in the payload (for tests):** - Provide &#x60;key_pem&#x60; and &#x60;cert_pem&#x60; directly - PEM format accepted: raw or base64 - Useful for tests or special cases without stored certificate - Example: &#x60;\&quot;signature\&quot;: {\&quot;key_pem\&quot;: \&quot;-----BEGIN...\&quot;, \&quot;cert_pem\&quot;: \&quot;-----BEGIN...\&quot;}&#x60; If &#x60;key_pem&#x60; and &#x60;cert_pem&#x60; are provided → Mode 2 Otherwise → Mode 1 (certificate retrieved via &#x60;client_uid&#x60;)
124
+ # 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) **Two accepted &#x60;invoiceData&#x60; formats, detected automatically** (same rule as &#x60;/generate-invoice&#x60;): - **Simplified format** (&#x60;number&#x60; + &#x60;lines&#x60;): totals, VAT and dates are computed. Any field of the complete model may be added on top (&#x60;deliveryDate&#x60; BT-72, &#x60;deliveryParty&#x60; BG-15, &#x60;paymentReference&#x60; BT-83, &#x60;supplier.bic&#x60; BT-86, ...). - **Complete format** (&#x60;invoiceLines&#x60; present): full &#x60;FacturXInvoice&#x60; structure, used as provided. A non-compliant invoice is **not submitted**: the Schematron errors are returned as a 400 &#x60;SCHEMATRON_VALIDATION_FAILED&#x60;, rather than a 200 followed by an asynchronous rejection by the PA. This includes the empty-element rule (PEPPOL-EN16931-R008), which the PAs apply as blocking. **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 &#x60;client_uid&#x60; - Do not provide the &#x60;credentials&#x60; field in &#x60;destination&#x60; - Zero-trust architecture: no secrets in the payload - Example: &#x60;\&quot;destination\&quot;: {\&quot;type\&quot;: \&quot;chorus_pro\&quot;}&#x60; **Mode 2 - Credentials in the payload:** - Provide credentials directly in the payload - Useful for tests or third-party integrations - Example: &#x60;\&quot;destination\&quot;: {\&quot;type\&quot;: \&quot;chorus_pro\&quot;, \&quot;credentials\&quot;: {...}}&#x60; **Electronic signature (optional) - 2 modes available:** **Mode 1 - Stored certificate (recommended):** - Certificate is retrieved automatically via the JWT &#x60;client_uid&#x60; - No key to provide in the payload - PAdES-B-LT signature with timestamp (eIDAS compliant) - Example: &#x60;\&quot;signature\&quot;: {\&quot;reason\&quot;: \&quot;Factur-X compliance\&quot;}&#x60; **Mode 2 - Keys in the payload (for tests):** - Provide &#x60;key_pem&#x60; and &#x60;cert_pem&#x60; directly - PEM format accepted: raw or base64 - Useful for tests or special cases without stored certificate - Example: &#x60;\&quot;signature\&quot;: {\&quot;key_pem\&quot;: \&quot;-----BEGIN...\&quot;, \&quot;cert_pem\&quot;: \&quot;-----BEGIN...\&quot;}&#x60; If &#x60;key_pem&#x60; and &#x60;cert_pem&#x60; are provided → Mode 2 Otherwise → Mode 1 (certificate retrieved via &#x60;client_uid&#x60;)
124
125
  # @param submit_complete_invoice_request [SubmitCompleteInvoiceRequest]
125
126
  # @param [Hash] opts the optional parameters
127
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
126
128
  # @return [Array<(SubmitCompleteInvoiceResponse, Integer, Hash)>] SubmitCompleteInvoiceResponse data, response status code and response headers
127
129
  def submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info(submit_complete_invoice_request, opts = {})
128
130
  if @api_client.config.debugging
@@ -147,6 +149,7 @@ module FactPulse
147
149
  if !content_type.nil?
148
150
  header_params['Content-Type'] = content_type
149
151
  end
152
+ header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
150
153
 
151
154
  # form parameters
152
155
  form_params = opts[:form_params] || {}
@@ -183,6 +186,7 @@ module FactPulse
183
186
  # @param [Hash] opts the optional parameters
184
187
  # @option opts [String] :callback_url Webhook URL for async notification when submission completes.
185
188
  # @option opts [String] :webhook_mode Webhook content delivery: &#39;inline&#39; (base64 in payload) or &#39;download_url&#39; (temporary URL, 1h TTL) (default to 'inline')
189
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
186
190
  # @return [TaskResponse]
187
191
  def submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post(submit_complete_invoice_request, opts = {})
188
192
  data, _status_code, _headers = submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info(submit_complete_invoice_request, opts)
@@ -195,6 +199,7 @@ module FactPulse
195
199
  # @param [Hash] opts the optional parameters
196
200
  # @option opts [String] :callback_url Webhook URL for async notification when submission completes.
197
201
  # @option opts [String] :webhook_mode Webhook content delivery: &#39;inline&#39; (base64 in payload) or &#39;download_url&#39; (temporary URL, 1h TTL) (default to 'inline')
202
+ # @option opts [String] :organization_id Organization ID relayed to the PDP (AFNOR XP Z12-013 delegation / multi-tenancy). Required by some PDPs to select the client space.
198
203
  # @return [Array<(TaskResponse, Integer, Hash)>] TaskResponse data, response status code and response headers
199
204
  def submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info(submit_complete_invoice_request, opts = {})
200
205
  if @api_client.config.debugging
@@ -221,6 +226,7 @@ module FactPulse
221
226
  if !content_type.nil?
222
227
  header_params['Content-Type'] = content_type
223
228
  end
229
+ header_params[:'Organization-Id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
224
230
 
225
231
  # form parameters
226
232
  form_params = opts[:form_params] || {}
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: contact@factpulse.fr
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0-SNAPSHOT
9
+ Generator version: 7.21.0
10
10
 
11
11
  =end
12
12
 
@@ -21,7 +21,7 @@ module FactPulse
21
21
  end
22
22
  # Parse Factur-X XML or PDF (async)
23
23
  # Parse a Factur-X file asynchronously using a Celery task. **Use case:** For large files or when you want non-blocking processing. **Workflow:** 1. Submit file with this endpoint -> receive `task_id` 2. Poll `/tasks/{task_id}/status` for result 3. Result contains `invoice` and `detected_profile` **Optional:** Provide `callback_url` to receive a webhook when parsing completes.
24
- # @param file [File] Factur-X PDF or XML file to parse
24
+ # @param file [String] Factur-X PDF or XML file to parse
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [String] :callback_url
27
27
  # @return [TaskResponse]
@@ -32,7 +32,7 @@ module FactPulse
32
32
 
33
33
  # Parse Factur-X XML or PDF (async)
34
34
  # Parse a Factur-X file asynchronously using a Celery task. **Use case:** For large files or when you want non-blocking processing. **Workflow:** 1. Submit file with this endpoint -&gt; receive &#x60;task_id&#x60; 2. Poll &#x60;/tasks/{task_id}/status&#x60; for result 3. Result contains &#x60;invoice&#x60; and &#x60;detected_profile&#x60; **Optional:** Provide &#x60;callback_url&#x60; to receive a webhook when parsing completes.
35
- # @param file [File] Factur-X PDF or XML file to parse
35
+ # @param file [String] Factur-X PDF or XML file to parse
36
36
  # @param [Hash] opts the optional parameters
37
37
  # @option opts [String] :callback_url
38
38
  # @return [Array<(TaskResponse, Integer, Hash)>] TaskResponse data, response status code and response headers
@@ -93,7 +93,7 @@ module FactPulse
93
93
 
94
94
  # Parse CII, UBL or Factur-X PDF (sync)
95
95
  # Parse a CII XML, UBL XML, or Factur-X PDF and extract the invoice data as a FacturXInvoice model. **Use cases:** - Extract invoice data from received invoices (any format) - Round-trip: parse an existing invoice, modify it, and regenerate in another format - Convert between CII and UBL via the FacturXInvoice pivot model **Supported formats:** - Factur-X PDF (PDF/A-3 with embedded CII XML) - CII XML (UN/CEFACT Cross-Industry Invoice) - UBL 2.1 XML (OASIS Invoice or CreditNote) **Returns:** - `invoice`: Complete FacturXInvoice data (can be used with /generate-invoice) - `detected_profile`: Factur-X profile (MINIMUM, BASIC, EN16931, EXTENDED)
96
- # @param file [File] Factur-X PDF or XML file to parse
96
+ # @param file [String] Factur-X PDF or XML file to parse
97
97
  # @param [Hash] opts the optional parameters
98
98
  # @return [ParseFacturXResponse]
99
99
  def parse_facturx_sync_api_v1_processing_parse_facturx_post(file, opts = {})
@@ -103,7 +103,7 @@ module FactPulse
103
103
 
104
104
  # Parse CII, UBL or Factur-X PDF (sync)
105
105
  # Parse a CII XML, UBL XML, or Factur-X PDF and extract the invoice data as a FacturXInvoice model. **Use cases:** - Extract invoice data from received invoices (any format) - Round-trip: parse an existing invoice, modify it, and regenerate in another format - Convert between CII and UBL via the FacturXInvoice pivot model **Supported formats:** - Factur-X PDF (PDF/A-3 with embedded CII XML) - CII XML (UN/CEFACT Cross-Industry Invoice) - UBL 2.1 XML (OASIS Invoice or CreditNote) **Returns:** - &#x60;invoice&#x60;: Complete FacturXInvoice data (can be used with /generate-invoice) - &#x60;detected_profile&#x60;: Factur-X profile (MINIMUM, BASIC, EN16931, EXTENDED)
106
- # @param file [File] Factur-X PDF or XML file to parse
106
+ # @param file [String] Factur-X PDF or XML file to parse
107
107
  # @param [Hash] opts the optional parameters
108
108
  # @return [Array<(ParseFacturXResponse, Integer, Hash)>] ParseFacturXResponse data, response status code and response headers
109
109
  def parse_facturx_sync_api_v1_processing_parse_facturx_post_with_http_info(file, opts = {})
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: contact@factpulse.fr
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0-SNAPSHOT
9
+ Generator version: 7.21.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: contact@factpulse.fr
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0-SNAPSHOT
9
+ Generator version: 7.21.0
10
10
 
11
11
  =end
12
12
 
@@ -20,8 +20,8 @@ module FactPulse
20
20
  @api_client = api_client
21
21
  end
22
22
  # Validate a CII or UBL XML against Schematron rules
23
- # Validates a CII (Factur-X) or UBL XML file against Schematron business rules. The XML format is **auto-detected** from namespace: - CII XML → validated with EN16931-CII + profile-specific + BR-FR-CII Schematrons - UBL XML → validated with EN16931-UBL + BR-FR-UBL Schematrons ## Applied Standard **Schematron ISO/IEC 19757-3**: Business rules validation language for XML - Semantic validation (beyond XSD syntax) - European EN 16931 business rules - French-specific rules (BR-FR-CII or BR-FR-UBL) - Arithmetic calculations and data consistency ## Profiles and validated rules (CII only) ### MINIMUM (45 rules) - Unique invoice identifier - Dates (issue, due date) - Party identifiers (SIRET/SIREN) - Total gross amount ### BASIC (102 rules) - All MINIMUM rules - Detailed invoice lines - Basic VAT calculations - Payment methods - References (order, contract) ### EN16931 (178 rules) - All BASIC rules - **European rules (BR-xx)**: 81 business rules - **French rules (FR-xx)**: 12 France-specific rules - **Advanced calculations (CR-xx)**: 32 calculation rules - **Standardized codes (CL-xx)**: 52 code lists ### EXTENDED (210+ rules) - All EN16931 rules - Logistics information - Advanced accounting data - Multiple external references ## Checks performed ### 1. Syntax validation - Correct XML parsing (UTF-8, well-formed) - UN/CEFACT namespaces present - Hierarchical structure respected ### 2. Business rules (BR-xx) Examples: - `BR-1`: Invoice total must equal sum of line totals + document-level amounts - `BR-CO-10`: Sum of VAT base amounts must equal invoice net total - `BR-16`: Invoice currency code must be in ISO 4217 list ### 3. French rules (FR-xx) Examples: - `FR-1`: Supplier SIRET must have 14 digits - `FR-2`: Customer SIRET must have 14 digits (if present) - `FR-5`: Intra-EU VAT number must be in format FRxx999999999 ### 4. Calculation rules (CR-xx) - Net + VAT = Gross amounts - Sum of lines = Document total - Discounts and surcharges correctly applied - Compliant rounding (2 decimals for amounts) ### 5. Standardized codes (CL-xx) - ISO 3166-1 alpha-2 country codes - ISO 4217 currency codes - UN/ECE Rec 20 measurement units - VAT codes (types, categories, exemptions) - SchemeID for identifiers (0002=SIREN, 0009=SIRET, etc.) ## Validation process 1. **XSLT loading**: Schematron file converted to XSLT (Saxon-HE) 2. **Transformation**: Rules applied to XML 3. **Results analysis**: Extraction of errors (`failed-assert`) and warnings (`successful-report`) 4. **Report**: Structured list of non-conformities ## Responses **200 OK**: Compliant XML ```json { \"message\": \"XML is compliant with EN16931 profile\" } ``` **400 Bad Request**: Non-compliant XML ```json { \"detail\": [ \"[BR-1] Invoice total (120.00) does not match calculated sum (100.00 + 20.00)\", \"[FR-1] Supplier SIRET must contain exactly 14 digits\" ] } ``` ## Use cases - **Pre-validation**: Verify XML before PDF/A integration - **Debugging**: Precisely identify generation errors - **Testing**: Validate test or example XMLs - **Compliance**: Ensure European and French rules are met - **Development**: Quick testing without PDF generation ## Processing time - MINIMUM profile: ~0.5 second - EN16931 profile: ~1-2 seconds - EXTENDED profile: ~2-3 seconds
24
- # @param xml_file [File] CII (Factur-X) or UBL XML file to validate (.xml format). Format is auto-detected.
23
+ # Validates a CII (Factur-X) or UBL XML file against Schematron business rules. The XML format is **auto-detected** from namespace: - CII XML → validated with EN16931-CII + profile-specific + BR-FR-CII Schematrons - UBL XML → validated with EN16931-UBL + BR-FR-UBL Schematrons ## Applied Standard **Schematron ISO/IEC 19757-3**: Business rules validation language for XML - Semantic validation (beyond XSD syntax) - European EN 16931 business rules - French-specific rules (BR-FR-CII or BR-FR-UBL) - Arithmetic calculations and data consistency ## Profiles and validated rules (CII only) ### MINIMUM (45 rules) - Unique invoice identifier - Dates (issue, due date) - Party identifiers (SIRET/SIREN) - Total gross amount ### BASIC (102 rules) - All MINIMUM rules - Detailed invoice lines - Basic VAT calculations - Payment methods - References (order, contract) ### EN16931 (178 rules) - All BASIC rules - **European rules (BR-xx)**: 81 business rules - **French rules (FR-xx)**: 12 France-specific rules - **Advanced calculations (CR-xx)**: 32 calculation rules - **Standardized codes (CL-xx)**: 52 code lists ### EXTENDED (210+ rules) - All EN16931 rules - Logistics information - Advanced accounting data - Multiple external references ## Checks performed ### 1. Syntax validation - Correct XML parsing (UTF-8, well-formed) - UN/CEFACT namespaces present - Hierarchical structure respected ### 2. Business rules (BR-xx) Examples: - `BR-1`: Invoice total must equal sum of line totals + document-level amounts - `BR-CO-10`: Sum of VAT base amounts must equal invoice net total - `BR-16`: Invoice currency code must be in ISO 4217 list ### 3. French rules (FR-xx) Examples: - `FR-1`: Supplier SIRET must have 14 digits - `FR-2`: Customer SIRET must have 14 digits (if present) - `FR-5`: Intra-EU VAT number must be in format FRxx999999999 ### 4. Calculation rules (CR-xx) - Net + VAT = Gross amounts - Sum of lines = Document total - Discounts and surcharges correctly applied - Compliant rounding (2 decimals for amounts) ### 5. Standardized codes (CL-xx) - ISO 3166-1 alpha-2 country codes - ISO 4217 currency codes - UN/ECE Rec 20 measurement units - VAT codes (types, categories, exemptions) - SchemeID for identifiers (0002=SIREN, 0009=SIRET, etc.) ## Validation process 1. **XSLT loading**: Schematron file converted to XSLT (Saxon-HE) 2. **Transformation**: Rules applied to XML 3. **Results analysis**: Extraction of `failed-assert` and `successful-report`; an unflagged rule is fatal, flagged `warning`/`info` rules are non-blocking 4. **Report**: Structured list of non-conformities ## Responses **200 OK**: Compliant XML ```json { \"message\": \"XML is compliant with EN16931 profile\" } ``` **400 Bad Request**: Non-compliant XML ```json { \"detail\": [ \"[BR-1] Invoice total (120.00) does not match calculated sum (100.00 + 20.00)\", \"[FR-1] Supplier SIRET must contain exactly 14 digits\" ] } ``` ## Use cases - **Pre-validation**: Verify XML before PDF/A integration - **Debugging**: Precisely identify generation errors - **Testing**: Validate test or example XMLs - **Compliance**: Ensure European and French rules are met - **Development**: Quick testing without PDF generation ## Processing time - MINIMUM profile: ~0.5 second - EN16931 profile: ~1-2 seconds - EXTENDED profile: ~2-3 seconds
24
+ # @param xml_file [String] CII (Factur-X) or UBL XML file to validate (.xml format). Format is auto-detected.
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [APIProfile] :profile Validation profile (MINIMUM, BASIC, EN16931, EXTENDED). Used for CII only; ignored for UBL (always EN16931).
27
27
  # @option opts [Boolean] :skip_br_fr
@@ -32,8 +32,8 @@ module FactPulse
32
32
  end
33
33
 
34
34
  # Validate a CII or UBL XML against Schematron rules
35
- # Validates a CII (Factur-X) or UBL XML file against Schematron business rules. The XML format is **auto-detected** from namespace: - CII XML → validated with EN16931-CII + profile-specific + BR-FR-CII Schematrons - UBL XML → validated with EN16931-UBL + BR-FR-UBL Schematrons ## Applied Standard **Schematron ISO/IEC 19757-3**: Business rules validation language for XML - Semantic validation (beyond XSD syntax) - European EN 16931 business rules - French-specific rules (BR-FR-CII or BR-FR-UBL) - Arithmetic calculations and data consistency ## Profiles and validated rules (CII only) ### MINIMUM (45 rules) - Unique invoice identifier - Dates (issue, due date) - Party identifiers (SIRET/SIREN) - Total gross amount ### BASIC (102 rules) - All MINIMUM rules - Detailed invoice lines - Basic VAT calculations - Payment methods - References (order, contract) ### EN16931 (178 rules) - All BASIC rules - **European rules (BR-xx)**: 81 business rules - **French rules (FR-xx)**: 12 France-specific rules - **Advanced calculations (CR-xx)**: 32 calculation rules - **Standardized codes (CL-xx)**: 52 code lists ### EXTENDED (210+ rules) - All EN16931 rules - Logistics information - Advanced accounting data - Multiple external references ## Checks performed ### 1. Syntax validation - Correct XML parsing (UTF-8, well-formed) - UN/CEFACT namespaces present - Hierarchical structure respected ### 2. Business rules (BR-xx) Examples: - &#x60;BR-1&#x60;: Invoice total must equal sum of line totals + document-level amounts - &#x60;BR-CO-10&#x60;: Sum of VAT base amounts must equal invoice net total - &#x60;BR-16&#x60;: Invoice currency code must be in ISO 4217 list ### 3. French rules (FR-xx) Examples: - &#x60;FR-1&#x60;: Supplier SIRET must have 14 digits - &#x60;FR-2&#x60;: Customer SIRET must have 14 digits (if present) - &#x60;FR-5&#x60;: Intra-EU VAT number must be in format FRxx999999999 ### 4. Calculation rules (CR-xx) - Net + VAT &#x3D; Gross amounts - Sum of lines &#x3D; Document total - Discounts and surcharges correctly applied - Compliant rounding (2 decimals for amounts) ### 5. Standardized codes (CL-xx) - ISO 3166-1 alpha-2 country codes - ISO 4217 currency codes - UN/ECE Rec 20 measurement units - VAT codes (types, categories, exemptions) - SchemeID for identifiers (0002&#x3D;SIREN, 0009&#x3D;SIRET, etc.) ## Validation process 1. **XSLT loading**: Schematron file converted to XSLT (Saxon-HE) 2. **Transformation**: Rules applied to XML 3. **Results analysis**: Extraction of errors (&#x60;failed-assert&#x60;) and warnings (&#x60;successful-report&#x60;) 4. **Report**: Structured list of non-conformities ## Responses **200 OK**: Compliant XML &#x60;&#x60;&#x60;json { \&quot;message\&quot;: \&quot;XML is compliant with EN16931 profile\&quot; } &#x60;&#x60;&#x60; **400 Bad Request**: Non-compliant XML &#x60;&#x60;&#x60;json { \&quot;detail\&quot;: [ \&quot;[BR-1] Invoice total (120.00) does not match calculated sum (100.00 + 20.00)\&quot;, \&quot;[FR-1] Supplier SIRET must contain exactly 14 digits\&quot; ] } &#x60;&#x60;&#x60; ## Use cases - **Pre-validation**: Verify XML before PDF/A integration - **Debugging**: Precisely identify generation errors - **Testing**: Validate test or example XMLs - **Compliance**: Ensure European and French rules are met - **Development**: Quick testing without PDF generation ## Processing time - MINIMUM profile: ~0.5 second - EN16931 profile: ~1-2 seconds - EXTENDED profile: ~2-3 seconds
36
- # @param xml_file [File] CII (Factur-X) or UBL XML file to validate (.xml format). Format is auto-detected.
35
+ # Validates a CII (Factur-X) or UBL XML file against Schematron business rules. The XML format is **auto-detected** from namespace: - CII XML → validated with EN16931-CII + profile-specific + BR-FR-CII Schematrons - UBL XML → validated with EN16931-UBL + BR-FR-UBL Schematrons ## Applied Standard **Schematron ISO/IEC 19757-3**: Business rules validation language for XML - Semantic validation (beyond XSD syntax) - European EN 16931 business rules - French-specific rules (BR-FR-CII or BR-FR-UBL) - Arithmetic calculations and data consistency ## Profiles and validated rules (CII only) ### MINIMUM (45 rules) - Unique invoice identifier - Dates (issue, due date) - Party identifiers (SIRET/SIREN) - Total gross amount ### BASIC (102 rules) - All MINIMUM rules - Detailed invoice lines - Basic VAT calculations - Payment methods - References (order, contract) ### EN16931 (178 rules) - All BASIC rules - **European rules (BR-xx)**: 81 business rules - **French rules (FR-xx)**: 12 France-specific rules - **Advanced calculations (CR-xx)**: 32 calculation rules - **Standardized codes (CL-xx)**: 52 code lists ### EXTENDED (210+ rules) - All EN16931 rules - Logistics information - Advanced accounting data - Multiple external references ## Checks performed ### 1. Syntax validation - Correct XML parsing (UTF-8, well-formed) - UN/CEFACT namespaces present - Hierarchical structure respected ### 2. Business rules (BR-xx) Examples: - &#x60;BR-1&#x60;: Invoice total must equal sum of line totals + document-level amounts - &#x60;BR-CO-10&#x60;: Sum of VAT base amounts must equal invoice net total - &#x60;BR-16&#x60;: Invoice currency code must be in ISO 4217 list ### 3. French rules (FR-xx) Examples: - &#x60;FR-1&#x60;: Supplier SIRET must have 14 digits - &#x60;FR-2&#x60;: Customer SIRET must have 14 digits (if present) - &#x60;FR-5&#x60;: Intra-EU VAT number must be in format FRxx999999999 ### 4. Calculation rules (CR-xx) - Net + VAT &#x3D; Gross amounts - Sum of lines &#x3D; Document total - Discounts and surcharges correctly applied - Compliant rounding (2 decimals for amounts) ### 5. Standardized codes (CL-xx) - ISO 3166-1 alpha-2 country codes - ISO 4217 currency codes - UN/ECE Rec 20 measurement units - VAT codes (types, categories, exemptions) - SchemeID for identifiers (0002&#x3D;SIREN, 0009&#x3D;SIRET, etc.) ## Validation process 1. **XSLT loading**: Schematron file converted to XSLT (Saxon-HE) 2. **Transformation**: Rules applied to XML 3. **Results analysis**: Extraction of &#x60;failed-assert&#x60; and &#x60;successful-report&#x60;; an unflagged rule is fatal, flagged &#x60;warning&#x60;/&#x60;info&#x60; rules are non-blocking 4. **Report**: Structured list of non-conformities ## Responses **200 OK**: Compliant XML &#x60;&#x60;&#x60;json { \&quot;message\&quot;: \&quot;XML is compliant with EN16931 profile\&quot; } &#x60;&#x60;&#x60; **400 Bad Request**: Non-compliant XML &#x60;&#x60;&#x60;json { \&quot;detail\&quot;: [ \&quot;[BR-1] Invoice total (120.00) does not match calculated sum (100.00 + 20.00)\&quot;, \&quot;[FR-1] Supplier SIRET must contain exactly 14 digits\&quot; ] } &#x60;&#x60;&#x60; ## Use cases - **Pre-validation**: Verify XML before PDF/A integration - **Debugging**: Precisely identify generation errors - **Testing**: Validate test or example XMLs - **Compliance**: Ensure European and French rules are met - **Development**: Quick testing without PDF generation ## Processing time - MINIMUM profile: ~0.5 second - EN16931 profile: ~1-2 seconds - EXTENDED profile: ~2-3 seconds
36
+ # @param xml_file [String] CII (Factur-X) or UBL XML file to validate (.xml format). Format is auto-detected.
37
37
  # @param [Hash] opts the optional parameters
38
38
  # @option opts [APIProfile] :profile Validation profile (MINIMUM, BASIC, EN16931, EXTENDED). Used for CII only; ignored for UBL (always EN16931).
39
39
  # @option opts [Boolean] :skip_br_fr
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: contact@factpulse.fr
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0-SNAPSHOT
9
+ Generator version: 7.21.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: contact@factpulse.fr
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0-SNAPSHOT
9
+ Generator version: 7.21.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: contact@factpulse.fr
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0-SNAPSHOT
9
+ Generator version: 7.21.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: contact@factpulse.fr
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.21.0-SNAPSHOT
9
+ Generator version: 7.21.0
10
10
 
11
11
  =end
12
12