factpulse 2.0.42 → 3.0.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 (410) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -3
  3. data/Gemfile.lock +3 -3
  4. data/README.md +91 -91
  5. data/docs/{CredentialsAFNOR.md → AFNORCredentials.md} +2 -2
  6. data/docs/{DestinationAFNOR.md → AFNORDestination.md} +4 -4
  7. data/docs/AFNORHealthCheckResponse.md +22 -0
  8. data/docs/AFNORPDPPAApi.md +25 -25
  9. data/docs/AFNORPDPPADirectoryServiceApi.md +19 -19
  10. data/docs/AFNORPDPPAFlowServiceApi.md +16 -16
  11. data/docs/{ResultatAFNOR.md → AFNORResult.md} +5 -5
  12. data/docs/APIError.md +2 -2
  13. data/docs/{MontantTva.md → APIProfile.md} +2 -2
  14. data/docs/{CodeCadreFacturation.md → AcknowledgmentStatus.md} +2 -2
  15. data/docs/{CodeRaisonReduction.md → AllowanceReasonCode.md} +2 -2
  16. data/docs/{ModeDepot.md → AmountDue.md} +2 -2
  17. data/docs/BoundingBoxSchema.md +7 -7
  18. data/docs/{CategorieTVA.md → CeleryStatus.md} +2 -2
  19. data/docs/CertificateInfoResponse.md +20 -20
  20. data/docs/ChorusProApi.md +123 -123
  21. data/docs/ChorusProDestination.md +20 -0
  22. data/docs/ChorusProResult.md +22 -0
  23. data/docs/Destination.md +7 -7
  24. data/docs/{ModePaiement.md → DocumentType.md} +2 -2
  25. data/docs/{AdresseElectronique.md → ElectronicAddress.md} +4 -4
  26. data/docs/EnrichedInvoiceInfo.md +32 -0
  27. data/docs/FacturXPDFInfo.md +22 -0
  28. data/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +26 -0
  29. data/docs/{CredentialsChorusPro.md → FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md} +4 -4
  30. data/docs/FactureFacturX.md +30 -30
  31. data/docs/FieldStatus.md +15 -0
  32. data/docs/{DirectionFlux.md → FlowDirection.md} +2 -2
  33. data/docs/FlowProfile.md +15 -0
  34. data/docs/FlowSummary.md +32 -0
  35. data/docs/{ProfilFlux.md → FlowSyntax.md} +2 -2
  36. data/docs/{TypeTVA.md → FlowType.md} +2 -2
  37. data/docs/GenerateCertificateRequest.md +19 -19
  38. data/docs/GenerateCertificateResponse.md +8 -8
  39. data/docs/GetChorusProIdRequest.md +22 -0
  40. data/docs/GetChorusProIdResponse.md +24 -0
  41. data/docs/GetInvoiceRequest.md +20 -0
  42. data/docs/GetInvoiceResponse.md +34 -0
  43. data/docs/GetStructureRequest.md +22 -0
  44. data/docs/GetStructureResponse.md +34 -0
  45. data/docs/GlobalAllowanceAmount.md +15 -0
  46. data/docs/{SantApi.md → HealthApi.md} +23 -23
  47. data/docs/IncomingInvoice.md +54 -0
  48. data/docs/IncomingSupplier.md +32 -0
  49. data/docs/{FormatFacture.md → InvoiceFormat.md} +2 -2
  50. data/docs/InvoiceLine.md +46 -0
  51. data/docs/InvoiceLineAllowanceAmount.md +15 -0
  52. data/docs/InvoiceNote.md +20 -0
  53. data/docs/InvoiceProcessingApi.md +831 -0
  54. data/docs/InvoiceReferences.md +32 -0
  55. data/docs/{StatutFacture.md → InvoiceStatus.md} +5 -5
  56. data/docs/InvoiceTotals.md +30 -0
  57. data/docs/InvoiceTotalsPrepayment.md +15 -0
  58. data/docs/InvoiceTypeCode.md +15 -0
  59. data/docs/InvoicingFramework.md +24 -0
  60. data/docs/InvoicingFrameworkCode.md +15 -0
  61. data/docs/LineNetAmount.md +15 -0
  62. data/docs/MandatoryNoteSchema.md +30 -0
  63. data/docs/ManualRate.md +15 -0
  64. data/docs/ManualVatRate.md +15 -0
  65. data/docs/OperationNature.md +15 -0
  66. data/docs/{FormatSortie.md → OutputFormat.md} +2 -2
  67. data/docs/PDFValidationResultAPI.md +62 -0
  68. data/docs/PDFXMLVerificationApi.md +435 -0
  69. data/docs/PDPCredentials.md +4 -4
  70. data/docs/PageDimensionsSchema.md +20 -0
  71. data/docs/{Beneficiaire.md → Payee.md} +5 -5
  72. data/docs/PaymentMeans.md +15 -0
  73. data/docs/PostalAddress.md +26 -0
  74. data/docs/ProcessingOptions.md +24 -0
  75. data/docs/{Quantite.md → Quantity.md} +2 -2
  76. data/docs/Recipient.md +28 -0
  77. data/docs/SearchFlowRequest.md +34 -0
  78. data/docs/SearchFlowResponse.md +24 -0
  79. data/docs/SearchServicesResponse.md +24 -0
  80. data/docs/SearchStructureRequest.md +26 -0
  81. data/docs/SearchStructureResponse.md +24 -0
  82. data/docs/SignatureInfo.md +2 -2
  83. data/docs/SignatureInfoAPI.md +28 -0
  84. data/docs/SignatureParameters.md +34 -0
  85. data/docs/SimplifiedInvoiceData.md +34 -0
  86. data/docs/StructureInfo.md +10 -10
  87. data/docs/StructureParameters.md +22 -0
  88. data/docs/StructureService.md +24 -0
  89. data/docs/SubmissionMode.md +15 -0
  90. data/docs/SubmitCompleteInvoiceRequest.md +26 -0
  91. data/docs/SubmitCompleteInvoiceResponse.md +34 -0
  92. data/docs/SubmitFlowRequest.md +28 -0
  93. data/docs/SubmitFlowResponse.md +30 -0
  94. data/docs/SubmitInvoiceRequest.md +46 -0
  95. data/docs/SubmitInvoiceResponse.md +24 -0
  96. data/docs/SupplementaryAttachment.md +26 -0
  97. data/docs/Supplier.md +36 -0
  98. data/docs/TaskResponse.md +18 -0
  99. data/docs/TaskStatus.md +22 -0
  100. data/docs/TaxableAmount.md +15 -0
  101. data/docs/TotalGrossAmount.md +15 -0
  102. data/docs/TotalNetAmount.md +15 -0
  103. data/docs/TotalVATAmount.md +15 -0
  104. data/docs/UnitNetPrice.md +15 -0
  105. data/docs/UnitOfMeasure.md +15 -0
  106. data/docs/UserApi.md +74 -0
  107. data/docs/VATAccountingCode.md +15 -0
  108. data/docs/{ProfilAPI.md → VATAmount.md} +2 -2
  109. data/docs/VATCategory.md +15 -0
  110. data/docs/VATLine.md +30 -0
  111. data/docs/ValidationErrorDetail.md +3 -3
  112. data/docs/ValidationErrorResponse.md +18 -0
  113. data/docs/ValidationSuccessResponse.md +18 -0
  114. data/docs/{TypeFlux.md → VatAmount.md} +2 -2
  115. data/docs/VerificationSuccessResponse.md +36 -0
  116. data/docs/VerifiedFieldSchema.md +34 -0
  117. data/factpulse.gemspec +4 -4
  118. data/lib/factpulse/api/afnorpdppa_api.rb +25 -25
  119. data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +40 -40
  120. data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +16 -16
  121. data/lib/factpulse/api/chorus_pro_api.rb +127 -127
  122. data/lib/factpulse/api/health_api.rb +136 -0
  123. data/lib/factpulse/api/invoice_processing_api.rb +835 -0
  124. data/lib/factpulse/api/pdfxml_verification_api.rb +430 -0
  125. data/lib/factpulse/api/user_api.rb +79 -0
  126. data/lib/factpulse/api_client.rb +2 -2
  127. data/lib/factpulse/api_error.rb +2 -2
  128. data/lib/factpulse/api_model_base.rb +2 -2
  129. data/lib/factpulse/configuration.rb +2 -2
  130. data/lib/factpulse/helpers/client.rb +182 -182
  131. data/lib/factpulse/helpers/exceptions.rb +2 -2
  132. data/lib/factpulse/helpers/helpers.rb +5 -5
  133. data/lib/factpulse/models/acknowledgment_status.rb +41 -0
  134. data/lib/factpulse/models/afnor_credentials.rb +169 -0
  135. data/lib/factpulse/models/{destination_afnor.rb → afnor_destination.rb} +10 -10
  136. data/lib/factpulse/models/{reponse_healthcheck_afnor.rb → afnor_health_check_response.rb} +9 -9
  137. data/lib/factpulse/models/{resultat_afnor.rb → afnor_result.rb} +13 -13
  138. data/lib/factpulse/models/allowance_reason_code.rb +45 -0
  139. data/lib/factpulse/models/amount_due.rb +104 -0
  140. data/lib/factpulse/models/api_error.rb +5 -5
  141. data/lib/factpulse/models/api_profile.rb +42 -0
  142. data/lib/factpulse/models/bounding_box_schema.rb +10 -10
  143. data/lib/factpulse/models/celery_status.rb +43 -0
  144. data/lib/factpulse/models/certificate_info_response.rb +164 -164
  145. data/lib/factpulse/models/{destination_chorus_pro.rb → chorus_pro_destination.rb} +7 -7
  146. data/lib/factpulse/models/chorus_pro_result.rb +186 -0
  147. data/lib/factpulse/models/destination.rb +7 -7
  148. data/lib/factpulse/models/document_type.rb +43 -0
  149. data/lib/factpulse/models/electronic_address.rb +196 -0
  150. data/lib/factpulse/models/enriched_invoice_info.rb +348 -0
  151. data/lib/factpulse/models/error_level.rb +2 -2
  152. data/lib/factpulse/models/error_source.rb +2 -2
  153. data/lib/factpulse/models/factur_xpdf_info.rb +205 -0
  154. data/lib/factpulse/models/{chorus_pro_credentials.rb → facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.rb} +11 -11
  155. data/lib/factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.rb +191 -0
  156. data/lib/factpulse/models/facture_factur_x.rb +160 -160
  157. data/lib/factpulse/models/field_status.rb +43 -0
  158. data/lib/factpulse/models/flow_direction.rb +40 -0
  159. data/lib/factpulse/models/flow_profile.rb +41 -0
  160. data/lib/factpulse/models/flow_summary.rb +251 -0
  161. data/lib/factpulse/models/flow_syntax.rb +43 -0
  162. data/lib/factpulse/models/flow_type.rb +43 -0
  163. data/lib/factpulse/models/generate_certificate_request.rb +106 -106
  164. data/lib/factpulse/models/generate_certificate_response.rb +47 -47
  165. data/lib/factpulse/models/get_chorus_pro_id_request.rb +188 -0
  166. data/lib/factpulse/models/get_chorus_pro_id_response.rb +230 -0
  167. data/lib/factpulse/models/get_invoice_request.rb +176 -0
  168. data/lib/factpulse/models/get_invoice_response.rb +261 -0
  169. data/lib/factpulse/models/get_structure_request.rb +188 -0
  170. data/lib/factpulse/models/get_structure_response.rb +261 -0
  171. data/lib/factpulse/models/global_allowance_amount.rb +104 -0
  172. data/lib/factpulse/models/http_validation_error.rb +2 -2
  173. data/lib/factpulse/models/incoming_invoice.rb +522 -0
  174. data/lib/factpulse/models/incoming_supplier.rb +236 -0
  175. data/lib/factpulse/models/invoice_format.rb +41 -0
  176. data/lib/factpulse/models/invoice_line.rb +389 -0
  177. data/lib/factpulse/models/invoice_line_allowance_amount.rb +104 -0
  178. data/lib/factpulse/models/invoice_note.rb +175 -0
  179. data/lib/factpulse/models/invoice_references.rb +290 -0
  180. data/lib/factpulse/models/invoice_status.rb +203 -0
  181. data/lib/factpulse/models/invoice_totals.rb +272 -0
  182. data/lib/factpulse/models/invoice_totals_prepayment.rb +104 -0
  183. data/lib/factpulse/models/invoice_type_code.rb +70 -0
  184. data/lib/factpulse/models/invoicing_framework.rb +217 -0
  185. data/lib/factpulse/models/invoicing_framework_code.rb +46 -0
  186. data/lib/factpulse/models/line_net_amount.rb +104 -0
  187. data/lib/factpulse/models/mandatory_note_schema.rb +265 -0
  188. data/lib/factpulse/models/manual_rate.rb +104 -0
  189. data/lib/factpulse/models/manual_vat_rate.rb +104 -0
  190. data/lib/factpulse/models/operation_nature.rb +52 -0
  191. data/lib/factpulse/models/output_format.rb +40 -0
  192. data/lib/factpulse/models/page_dimensions_schema.rb +193 -0
  193. data/lib/factpulse/models/{beneficiaire.rb → payee.rb} +15 -15
  194. data/lib/factpulse/models/payment_means.rb +50 -0
  195. data/lib/factpulse/models/pdf_validation_result_api.rb +523 -0
  196. data/lib/factpulse/models/pdp_credentials.rb +7 -7
  197. data/lib/factpulse/models/postal_address.rb +189 -0
  198. data/lib/factpulse/models/processing_options.rb +207 -0
  199. data/lib/factpulse/models/quantity.rb +104 -0
  200. data/lib/factpulse/models/recipient.rb +201 -0
  201. data/lib/factpulse/models/scheme_id.rb +2 -2
  202. data/lib/factpulse/models/search_flow_request.rb +306 -0
  203. data/lib/factpulse/models/search_flow_response.rb +249 -0
  204. data/lib/factpulse/models/search_services_response.rb +214 -0
  205. data/lib/factpulse/models/search_structure_request.rb +191 -0
  206. data/lib/factpulse/models/search_structure_response.rb +216 -0
  207. data/lib/factpulse/models/signature_info.rb +20 -20
  208. data/lib/factpulse/models/signature_info_api.rb +216 -0
  209. data/lib/factpulse/models/signature_parameters.rb +235 -0
  210. data/lib/factpulse/models/simplified_invoice_data.rb +342 -0
  211. data/lib/factpulse/models/structure_info.rb +84 -84
  212. data/lib/factpulse/models/structure_parameters.rb +175 -0
  213. data/lib/factpulse/models/structure_service.rb +247 -0
  214. data/lib/factpulse/models/submission_mode.rb +44 -0
  215. data/lib/factpulse/models/submit_complete_invoice_request.rb +239 -0
  216. data/lib/factpulse/models/submit_complete_invoice_response.rb +355 -0
  217. data/lib/factpulse/models/submit_flow_request.rb +238 -0
  218. data/lib/factpulse/models/submit_flow_response.rb +294 -0
  219. data/lib/factpulse/models/submit_invoice_request.rb +388 -0
  220. data/lib/factpulse/models/submit_invoice_response.rb +213 -0
  221. data/lib/factpulse/models/supplementary_attachment.rb +269 -0
  222. data/lib/factpulse/models/supplier.rb +257 -0
  223. data/lib/factpulse/models/task_response.rb +166 -0
  224. data/lib/factpulse/models/task_status.rb +227 -0
  225. data/lib/factpulse/models/taxable_amount.rb +104 -0
  226. data/lib/factpulse/models/total_gross_amount.rb +104 -0
  227. data/lib/factpulse/models/total_net_amount.rb +104 -0
  228. data/lib/factpulse/models/total_vat_amount.rb +104 -0
  229. data/lib/factpulse/models/unit_net_price.rb +104 -0
  230. data/lib/factpulse/models/unit_of_measure.rb +50 -0
  231. data/lib/factpulse/models/validation_error.rb +2 -2
  232. data/lib/factpulse/models/validation_error_detail.rb +6 -6
  233. data/lib/factpulse/models/validation_error_loc_inner.rb +2 -2
  234. data/lib/factpulse/models/validation_error_response.rb +168 -0
  235. data/lib/factpulse/models/validation_success_response.rb +166 -0
  236. data/lib/factpulse/models/vat_accounting_code.rb +46 -0
  237. data/lib/factpulse/models/vat_amount.rb +104 -0
  238. data/lib/factpulse/models/vat_category.rb +47 -0
  239. data/lib/factpulse/models/vat_line.rb +262 -0
  240. data/lib/factpulse/models/verification_success_response.rb +343 -0
  241. data/lib/factpulse/models/verified_field_schema.rb +334 -0
  242. data/lib/factpulse/version.rb +3 -3
  243. data/lib/factpulse.rb +99 -99
  244. metadata +250 -257
  245. data/docs/AdressePostale.md +0 -26
  246. data/docs/CadreDeFacturation.md +0 -24
  247. data/docs/ChampVerifieSchema.md +0 -34
  248. data/docs/ChorusProCredentials.md +0 -26
  249. data/docs/ConsulterFactureRequest.md +0 -20
  250. data/docs/ConsulterFactureResponse.md +0 -34
  251. data/docs/ConsulterStructureRequest.md +0 -22
  252. data/docs/ConsulterStructureResponse.md +0 -34
  253. data/docs/Destinataire.md +0 -28
  254. data/docs/DestinationChorusPro.md +0 -20
  255. data/docs/DimensionPageSchema.md +0 -20
  256. data/docs/DonneesFactureSimplifiees.md +0 -34
  257. data/docs/FactureEnrichieInfo.md +0 -32
  258. data/docs/FactureEntrante.md +0 -54
  259. data/docs/FluxResume.md +0 -32
  260. data/docs/Fournisseur.md +0 -36
  261. data/docs/FournisseurEntrant.md +0 -32
  262. data/docs/InformationSignatureAPI.md +0 -28
  263. data/docs/LigneDePoste.md +0 -46
  264. data/docs/LigneDePosteMontantRemiseHt.md +0 -15
  265. data/docs/LigneDePosteTauxTvaManuel.md +0 -15
  266. data/docs/LigneDeTVA.md +0 -30
  267. data/docs/MontantAPayer.md +0 -15
  268. data/docs/MontantBaseHt.md +0 -15
  269. data/docs/MontantHtTotal.md +0 -15
  270. data/docs/MontantRemiseGlobaleTtc.md +0 -15
  271. data/docs/MontantTotal.md +0 -30
  272. data/docs/MontantTotalAcompte.md +0 -15
  273. data/docs/MontantTotalLigneHt.md +0 -15
  274. data/docs/MontantTtcTotal.md +0 -15
  275. data/docs/MontantTvaLigne.md +0 -15
  276. data/docs/MontantTvaTotal.md +0 -15
  277. data/docs/MontantUnitaireHt.md +0 -15
  278. data/docs/NatureOperation.md +0 -15
  279. data/docs/Note.md +0 -20
  280. data/docs/NoteObligatoireSchema.md +0 -30
  281. data/docs/ObtenirIdChorusProRequest.md +0 -22
  282. data/docs/ObtenirIdChorusProResponse.md +0 -24
  283. data/docs/OptionsProcessing.md +0 -24
  284. data/docs/PDFFacturXInfo.md +0 -22
  285. data/docs/ParametresSignature.md +0 -34
  286. data/docs/ParametresStructure.md +0 -22
  287. data/docs/PieceJointeComplementaire.md +0 -26
  288. data/docs/RechercherServicesResponse.md +0 -24
  289. data/docs/RechercherStructureRequest.md +0 -26
  290. data/docs/RechercherStructureResponse.md +0 -24
  291. data/docs/References.md +0 -32
  292. data/docs/ReponseHealthcheckAFNOR.md +0 -22
  293. data/docs/ReponseRechercheFlux.md +0 -24
  294. data/docs/ReponseSoumissionFlux.md +0 -30
  295. data/docs/ReponseTache.md +0 -18
  296. data/docs/ReponseValidationErreur.md +0 -18
  297. data/docs/ReponseValidationSucces.md +0 -18
  298. data/docs/ReponseVerificationSucces.md +0 -36
  299. data/docs/RequeteRechercheFlux.md +0 -34
  300. data/docs/RequeteSoumissionFlux.md +0 -28
  301. data/docs/ResultatChorusPro.md +0 -22
  302. data/docs/ResultatValidationPDFAPI.md +0 -62
  303. data/docs/ServiceStructure.md +0 -24
  304. data/docs/SoumettreFactureCompleteRequest.md +0 -26
  305. data/docs/SoumettreFactureCompleteResponse.md +0 -34
  306. data/docs/SoumettreFactureRequest.md +0 -46
  307. data/docs/SoumettreFactureResponse.md +0 -24
  308. data/docs/StatutAcquittement.md +0 -15
  309. data/docs/StatutCelery.md +0 -15
  310. data/docs/StatutChampAPI.md +0 -15
  311. data/docs/StatutTache.md +0 -22
  312. data/docs/SyntaxeFlux.md +0 -15
  313. data/docs/Tauxmanuel.md +0 -15
  314. data/docs/TraitementFactureApi.md +0 -831
  315. data/docs/TypeDocument.md +0 -15
  316. data/docs/TypeFacture.md +0 -15
  317. data/docs/Unite.md +0 -15
  318. data/docs/UtilisateurApi.md +0 -74
  319. data/docs/VrificationPDFXMLApi.md +0 -435
  320. data/lib/factpulse/api/sant_api.rb +0 -136
  321. data/lib/factpulse/api/traitement_facture_api.rb +0 -835
  322. data/lib/factpulse/api/utilisateur_api.rb +0 -79
  323. data/lib/factpulse/api/vrification_pdfxml_api.rb +0 -430
  324. data/lib/factpulse/models/adresse_electronique.rb +0 -196
  325. data/lib/factpulse/models/adresse_postale.rb +0 -189
  326. data/lib/factpulse/models/cadre_de_facturation.rb +0 -217
  327. data/lib/factpulse/models/categorie_tva.rb +0 -47
  328. data/lib/factpulse/models/champ_verifie_schema.rb +0 -334
  329. data/lib/factpulse/models/code_cadre_facturation.rb +0 -42
  330. data/lib/factpulse/models/code_raison_reduction.rb +0 -45
  331. data/lib/factpulse/models/consulter_facture_request.rb +0 -176
  332. data/lib/factpulse/models/consulter_facture_response.rb +0 -261
  333. data/lib/factpulse/models/consulter_structure_request.rb +0 -188
  334. data/lib/factpulse/models/consulter_structure_response.rb +0 -261
  335. data/lib/factpulse/models/credentials_afnor.rb +0 -169
  336. data/lib/factpulse/models/credentials_chorus_pro.rb +0 -191
  337. data/lib/factpulse/models/destinataire.rb +0 -201
  338. data/lib/factpulse/models/dimension_page_schema.rb +0 -193
  339. data/lib/factpulse/models/direction_flux.rb +0 -40
  340. data/lib/factpulse/models/donnees_facture_simplifiees.rb +0 -342
  341. data/lib/factpulse/models/facture_enrichie_info.rb +0 -348
  342. data/lib/factpulse/models/facture_entrante.rb +0 -522
  343. data/lib/factpulse/models/flux_resume.rb +0 -251
  344. data/lib/factpulse/models/format_facture.rb +0 -41
  345. data/lib/factpulse/models/format_sortie.rb +0 -40
  346. data/lib/factpulse/models/fournisseur.rb +0 -257
  347. data/lib/factpulse/models/fournisseur_entrant.rb +0 -236
  348. data/lib/factpulse/models/information_signature_api.rb +0 -216
  349. data/lib/factpulse/models/ligne_de_poste.rb +0 -390
  350. data/lib/factpulse/models/ligne_de_poste_montant_remise_ht.rb +0 -104
  351. data/lib/factpulse/models/ligne_de_poste_taux_tva_manuel.rb +0 -104
  352. data/lib/factpulse/models/ligne_de_tva.rb +0 -262
  353. data/lib/factpulse/models/mode_depot.rb +0 -41
  354. data/lib/factpulse/models/mode_paiement.rb +0 -44
  355. data/lib/factpulse/models/montant_a_payer.rb +0 -104
  356. data/lib/factpulse/models/montant_base_ht.rb +0 -104
  357. data/lib/factpulse/models/montant_ht_total.rb +0 -104
  358. data/lib/factpulse/models/montant_remise_globale_ttc.rb +0 -104
  359. data/lib/factpulse/models/montant_total.rb +0 -272
  360. data/lib/factpulse/models/montant_total_acompte.rb +0 -104
  361. data/lib/factpulse/models/montant_total_ligne_ht.rb +0 -104
  362. data/lib/factpulse/models/montant_ttc_total.rb +0 -104
  363. data/lib/factpulse/models/montant_tva.rb +0 -104
  364. data/lib/factpulse/models/montant_tva_ligne.rb +0 -104
  365. data/lib/factpulse/models/montant_tva_total.rb +0 -104
  366. data/lib/factpulse/models/montant_unitaire_ht.rb +0 -104
  367. data/lib/factpulse/models/nature_operation.rb +0 -52
  368. data/lib/factpulse/models/note.rb +0 -175
  369. data/lib/factpulse/models/note_obligatoire_schema.rb +0 -265
  370. data/lib/factpulse/models/obtenir_id_chorus_pro_request.rb +0 -188
  371. data/lib/factpulse/models/obtenir_id_chorus_pro_response.rb +0 -230
  372. data/lib/factpulse/models/options_processing.rb +0 -207
  373. data/lib/factpulse/models/parametres_signature.rb +0 -235
  374. data/lib/factpulse/models/parametres_structure.rb +0 -175
  375. data/lib/factpulse/models/pdf_factur_x_info.rb +0 -205
  376. data/lib/factpulse/models/piece_jointe_complementaire.rb +0 -269
  377. data/lib/factpulse/models/profil_api.rb +0 -42
  378. data/lib/factpulse/models/profil_flux.rb +0 -41
  379. data/lib/factpulse/models/quantite.rb +0 -104
  380. data/lib/factpulse/models/rechercher_services_response.rb +0 -214
  381. data/lib/factpulse/models/rechercher_structure_request.rb +0 -191
  382. data/lib/factpulse/models/rechercher_structure_response.rb +0 -216
  383. data/lib/factpulse/models/references.rb +0 -290
  384. data/lib/factpulse/models/reponse_recherche_flux.rb +0 -249
  385. data/lib/factpulse/models/reponse_soumission_flux.rb +0 -294
  386. data/lib/factpulse/models/reponse_tache.rb +0 -165
  387. data/lib/factpulse/models/reponse_validation_erreur.rb +0 -167
  388. data/lib/factpulse/models/reponse_validation_succes.rb +0 -165
  389. data/lib/factpulse/models/reponse_verification_succes.rb +0 -343
  390. data/lib/factpulse/models/requete_recherche_flux.rb +0 -306
  391. data/lib/factpulse/models/requete_soumission_flux.rb +0 -238
  392. data/lib/factpulse/models/resultat_chorus_pro.rb +0 -186
  393. data/lib/factpulse/models/resultat_validation_pdfapi.rb +0 -523
  394. data/lib/factpulse/models/service_structure.rb +0 -247
  395. data/lib/factpulse/models/soumettre_facture_complete_request.rb +0 -239
  396. data/lib/factpulse/models/soumettre_facture_complete_response.rb +0 -355
  397. data/lib/factpulse/models/soumettre_facture_request.rb +0 -388
  398. data/lib/factpulse/models/soumettre_facture_response.rb +0 -213
  399. data/lib/factpulse/models/statut_acquittement.rb +0 -41
  400. data/lib/factpulse/models/statut_celery.rb +0 -43
  401. data/lib/factpulse/models/statut_champ_api.rb +0 -43
  402. data/lib/factpulse/models/statut_facture.rb +0 -203
  403. data/lib/factpulse/models/statut_tache.rb +0 -226
  404. data/lib/factpulse/models/syntaxe_flux.rb +0 -43
  405. data/lib/factpulse/models/tauxmanuel.rb +0 -104
  406. data/lib/factpulse/models/type_document.rb +0 -43
  407. data/lib/factpulse/models/type_facture.rb +0 -54
  408. data/lib/factpulse/models/type_flux.rb +0 -43
  409. data/lib/factpulse/models/type_tva.rb +0 -42
  410. data/lib/factpulse/models/unite.rb +0 -44
@@ -0,0 +1,831 @@
1
+ # FactPulse::InvoiceProcessingApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**generate_invoice_api_v1_processing_generate_invoice_post**](InvoiceProcessingApi.md#generate_invoice_api_v1_processing_generate_invoice_post) | **POST** /api/v1/processing/generate-invoice | Generate a Factur-X invoice |
8
+ | [**generate_test_certificate_api_v1_processing_generate_test_certificate_post**](InvoiceProcessingApi.md#generate_test_certificate_api_v1_processing_generate_test_certificate_post) | **POST** /api/v1/processing/generate-test-certificate | Generate a self-signed X.509 test certificate |
9
+ | [**get_task_status_api_v1_processing_tasks_task_id_status_get**](InvoiceProcessingApi.md#get_task_status_api_v1_processing_tasks_task_id_status_get) | **GET** /api/v1/processing/tasks/{task_id}/status | Get task generation status |
10
+ | [**sign_pdf_api_v1_processing_sign_pdf_post**](InvoiceProcessingApi.md#sign_pdf_api_v1_processing_sign_pdf_post) | **POST** /api/v1/processing/sign-pdf | Sign a PDF with client's certificate (PAdES-B-LT) |
11
+ | [**sign_pdf_async_api_v1_processing_sign_pdf_async_post**](InvoiceProcessingApi.md#sign_pdf_async_api_v1_processing_sign_pdf_async_post) | **POST** /api/v1/processing/sign-pdf-async | Sign a PDF asynchronously (Celery) |
12
+ | [**submit_complete_invoice_api_v1_processing_invoices_submit_complete_post**](InvoiceProcessingApi.md#submit_complete_invoice_api_v1_processing_invoices_submit_complete_post) | **POST** /api/v1/processing/invoices/submit-complete | Submit a complete invoice (generation + signature + submission) |
13
+ | [**submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post**](InvoiceProcessingApi.md#submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post) | **POST** /api/v1/processing/invoices/submit-complete-async | Submit a complete invoice (asynchronous with Celery) |
14
+ | [**validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post**](InvoiceProcessingApi.md#validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post) | **POST** /api/v1/processing/validate-facturx-pdf | Validate a complete Factur-X PDF |
15
+ | [**validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post**](InvoiceProcessingApi.md#validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post) | **POST** /api/v1/processing/validate-facturx-async | Validate a Factur-X PDF (asynchronous with polling) |
16
+ | [**validate_pdf_signature_endpoint_api_v1_processing_validate_pdf_signature_post**](InvoiceProcessingApi.md#validate_pdf_signature_endpoint_api_v1_processing_validate_pdf_signature_post) | **POST** /api/v1/processing/validate-pdf-signature | Validate electronic signatures of a PDF |
17
+ | [**validate_xml_api_v1_processing_validate_xml_post**](InvoiceProcessingApi.md#validate_xml_api_v1_processing_validate_xml_post) | **POST** /api/v1/processing/validate-xml | Validate an existing Factur-X XML |
18
+
19
+
20
+ ## generate_invoice_api_v1_processing_generate_invoice_post
21
+
22
+ > <TaskResponse> generate_invoice_api_v1_processing_generate_invoice_post(invoice_data, opts)
23
+
24
+ Generate a Factur-X invoice
25
+
26
+ Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A sender SIRET + **IBAN** (required) - A recipient SIRET - Invoice lines (description, quantity, net price) **Simplified format example**: ```json { \"numero\": \"FACT-2025-001\", \"emetteur\": { \"siret\": \"92019522900017\", \"iban\": \"FR7630001007941234567890185\" }, \"destinataire\": {\"siret\": \"35600000000048\"}, \"lignes\": [ {\"description\": \"Service\", \"quantite\": 10, \"prix_ht\": 100.00, \"tva\": 20.0} ] } ``` **⚠️ Required fields (simplified format)**: - `numero`: Unique invoice number - `emetteur.siret`: Sender's SIRET (14 digits) - `emetteur.iban`: Bank account IBAN (no public API to retrieve it) - `destinataire.siret`: Recipient's SIRET - `lignes[]`: At least one invoice line **What happens automatically with `auto_enrich=True`**: - ✅ Name enrichment from Chorus Pro API - ✅ Address enrichment from Business Search API (free, public) - ✅ Automatic intra-EU VAT calculation (FR + key + SIREN) - ✅ Chorus Pro ID retrieval for electronic invoicing - ✅ Net/VAT/Gross totals calculation - ✅ Date generation (today + 30-day due date) - ✅ Multi-rate VAT handling **Supported identifiers**: - SIRET (14 digits): Specific establishment ⭐ Recommended - SIREN (9 digits): Company (auto-selection of headquarters) - Special types: UE_HORS_FRANCE, RIDET, TAHITI, etc. ## Checks performed during generation ### 1. Data validation (Pydantic) - Data types (amounts as Decimal, ISO 8601 dates) - Formats (14-digit SIRET, 9-digit SIREN, IBAN) - Required fields per profile - Amount consistency (Net + VAT = Gross) ### 2. CII-compliant XML generation - Serialization according to Cross Industry Invoice XSD schema - Correct UN/CEFACT namespaces - Hierarchical structure respected - UTF-8 encoding without BOM ### 3. Schematron validation - Business rules for selected profile (MINIMUM, BASIC, EN16931, EXTENDED) - Element cardinality (required, optional, repeatable) - Calculation rules (totals, VAT, discounts) - European EN 16931 compliance ### 4. PDF/A-3 conversion (if output_format='pdf') - Source PDF conversion to PDF/A-3 via Ghostscript - Factur-X XML embedding in PDF - Compliant XMP metadata - ICC sRGB color profile - Removal of forbidden elements (JavaScript, forms) ## How it works 1. **Submission**: Invoice is queued in Celery for asynchronous processing 2. **Immediate return**: You receive a `task_id` (HTTP 202 Accepted) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Output formats - **xml**: Generates only Factur-X XML (recommended for testing) - **pdf**: Generates PDF/A-3 with embedded XML (requires `source_pdf`) ## Factur-X profiles - **MINIMUM**: Minimal data (simplified invoice) - **BASIC**: Basic information (SMEs) - **EN16931**: European standard (recommended, compliant with directive 2014/55/EU) - **EXTENDED**: All available data (large accounts) ## What you get After successful processing (status `completed`): - **XML only**: Base64-encoded Factur-X compliant XML file - **PDF/A-3**: PDF with embedded XML, ready for sending/archiving - **Metadata**: Profile, Factur-X version, file size - **Validation**: Schematron compliance confirmation ## Validation Data is automatically validated according to detected format. On error, a 422 status is returned with invalid field details.
27
+
28
+ ### Examples
29
+
30
+ ```ruby
31
+ require 'time'
32
+ require 'factpulse'
33
+ # setup authorization
34
+ FactPulse.configure do |config|
35
+ # Configure Bearer authorization: HTTPBearer
36
+ config.access_token = 'YOUR_BEARER_TOKEN'
37
+ end
38
+
39
+ api_instance = FactPulse::InvoiceProcessingApi.new
40
+ invoice_data = 'invoice_data_example' # String | Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FactureFacturX structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically!
41
+ opts = {
42
+ profile: FactPulse::APIProfile::MINIMUM, # APIProfile | Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.
43
+ output_format: FactPulse::OutputFormat::XML, # OutputFormat | Output format: 'xml' (XML only) or 'pdf' (Factur-X PDF with embedded XML).
44
+ auto_enrich: true, # Boolean | 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)
45
+ source_pdf: File.new('/path/to/some/file') # File |
46
+ }
47
+
48
+ begin
49
+ # Generate a Factur-X invoice
50
+ result = api_instance.generate_invoice_api_v1_processing_generate_invoice_post(invoice_data, opts)
51
+ p result
52
+ rescue FactPulse::ApiError => e
53
+ puts "Error when calling InvoiceProcessingApi->generate_invoice_api_v1_processing_generate_invoice_post: #{e}"
54
+ end
55
+ ```
56
+
57
+ #### Using the generate_invoice_api_v1_processing_generate_invoice_post_with_http_info variant
58
+
59
+ This returns an Array which contains the response data, status code and headers.
60
+
61
+ > <Array(<TaskResponse>, Integer, Hash)> generate_invoice_api_v1_processing_generate_invoice_post_with_http_info(invoice_data, opts)
62
+
63
+ ```ruby
64
+ begin
65
+ # Generate a Factur-X invoice
66
+ data, status_code, headers = api_instance.generate_invoice_api_v1_processing_generate_invoice_post_with_http_info(invoice_data, opts)
67
+ p status_code # => 2xx
68
+ p headers # => { ... }
69
+ p data # => <TaskResponse>
70
+ rescue FactPulse::ApiError => e
71
+ puts "Error when calling InvoiceProcessingApi->generate_invoice_api_v1_processing_generate_invoice_post_with_http_info: #{e}"
72
+ end
73
+ ```
74
+
75
+ ### Parameters
76
+
77
+ | Name | Type | Description | Notes |
78
+ | ---- | ---- | ----------- | ----- |
79
+ | **invoice_data** | **String** | Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FactureFacturX structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically! | |
80
+ | **profile** | [**APIProfile**](APIProfile.md) | Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED. | [optional] |
81
+ | **output_format** | [**OutputFormat**](OutputFormat.md) | Output format: &#39;xml&#39; (XML only) or &#39;pdf&#39; (Factur-X PDF with embedded XML). | [optional] |
82
+ | **auto_enrich** | **Boolean** | 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only) | [optional][default to true] |
83
+ | **source_pdf** | **File** | | [optional] |
84
+
85
+ ### Return type
86
+
87
+ [**TaskResponse**](TaskResponse.md)
88
+
89
+ ### Authorization
90
+
91
+ [HTTPBearer](../README.md#HTTPBearer)
92
+
93
+ ### HTTP request headers
94
+
95
+ - **Content-Type**: multipart/form-data
96
+ - **Accept**: application/json
97
+
98
+
99
+ ## generate_test_certificate_api_v1_processing_generate_test_certificate_post
100
+
101
+ > <GenerateCertificateResponse> generate_test_certificate_api_v1_processing_generate_test_certificate_post(generate_certificate_request)
102
+
103
+ Generate a self-signed X.509 test certificate
104
+
105
+ Generates a self-signed X.509 certificate for PDF electronic signature testing. **⚠️ WARNING: TEST certificate only!** This certificate is: - ✅ Suitable for testing and development - ✅ Compatible with PDF signing (PAdES) - ✅ Compliant with eIDAS **SES** level (Simple Electronic Signature) - ❌ **NEVER usable in production** - ❌ **Not recognized** by browsers and PDF readers - ❌ **No legal value** ## eIDAS levels - **SES** (Simple): Self-signed certificate ← Generated by this endpoint - **AdES** (Advanced): Commercial CA certificate (Let's Encrypt, etc.) - **QES** (Qualified): Qualified certificate from QTSP (CertEurope, Universign, etc.) ## Usage Once generated, the certificate can be: 1. **Saved in Django** (recommended): - Django Admin > Signing Certificates - Upload `certificate_pem` and `private_key_pem` 2. **Used directly**: - Sign a PDF with `/sign-pdf` - The certificate will be automatically used ## Example call ```bash curl -X POST \"https://www.factpulse.fr/api/v1/processing/generate-test-certificate\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"cn\": \"Test Client XYZ\", \"organization\": \"Client XYZ Ltd\", \"email\": \"contact@xyz.com\", \"validity_days\": 365 }' ``` ## Use cases - PDF signature testing in development - Electronic signature POC - Training and demos - Automated integration tests ## Technical compliance Certificate generated with: - RSA key 2048 or 4096 bits - SHA-256 algorithm - Key Usage extensions: `digitalSignature`, `contentCommitment` (non-repudiation) - Extended Key Usage extensions: `codeSigning`, `emailProtection` - Validity: 1 day to 10 years (configurable) - Format: PEM (certificate and key) - Optional: PKCS#12 (.p12)
106
+
107
+ ### Examples
108
+
109
+ ```ruby
110
+ require 'time'
111
+ require 'factpulse'
112
+ # setup authorization
113
+ FactPulse.configure do |config|
114
+ # Configure Bearer authorization: HTTPBearer
115
+ config.access_token = 'YOUR_BEARER_TOKEN'
116
+ end
117
+
118
+ api_instance = FactPulse::InvoiceProcessingApi.new
119
+ generate_certificate_request = FactPulse::GenerateCertificateRequest.new # GenerateCertificateRequest |
120
+
121
+ begin
122
+ # Generate a self-signed X.509 test certificate
123
+ result = api_instance.generate_test_certificate_api_v1_processing_generate_test_certificate_post(generate_certificate_request)
124
+ p result
125
+ rescue FactPulse::ApiError => e
126
+ puts "Error when calling InvoiceProcessingApi->generate_test_certificate_api_v1_processing_generate_test_certificate_post: #{e}"
127
+ end
128
+ ```
129
+
130
+ #### Using the generate_test_certificate_api_v1_processing_generate_test_certificate_post_with_http_info variant
131
+
132
+ This returns an Array which contains the response data, status code and headers.
133
+
134
+ > <Array(<GenerateCertificateResponse>, Integer, Hash)> generate_test_certificate_api_v1_processing_generate_test_certificate_post_with_http_info(generate_certificate_request)
135
+
136
+ ```ruby
137
+ begin
138
+ # Generate a self-signed X.509 test certificate
139
+ data, status_code, headers = api_instance.generate_test_certificate_api_v1_processing_generate_test_certificate_post_with_http_info(generate_certificate_request)
140
+ p status_code # => 2xx
141
+ p headers # => { ... }
142
+ p data # => <GenerateCertificateResponse>
143
+ rescue FactPulse::ApiError => e
144
+ puts "Error when calling InvoiceProcessingApi->generate_test_certificate_api_v1_processing_generate_test_certificate_post_with_http_info: #{e}"
145
+ end
146
+ ```
147
+
148
+ ### Parameters
149
+
150
+ | Name | Type | Description | Notes |
151
+ | ---- | ---- | ----------- | ----- |
152
+ | **generate_certificate_request** | [**GenerateCertificateRequest**](GenerateCertificateRequest.md) | | |
153
+
154
+ ### Return type
155
+
156
+ [**GenerateCertificateResponse**](GenerateCertificateResponse.md)
157
+
158
+ ### Authorization
159
+
160
+ [HTTPBearer](../README.md#HTTPBearer)
161
+
162
+ ### HTTP request headers
163
+
164
+ - **Content-Type**: application/json
165
+ - **Accept**: application/json
166
+
167
+
168
+ ## get_task_status_api_v1_processing_tasks_task_id_status_get
169
+
170
+ > <TaskStatus> get_task_status_api_v1_processing_tasks_task_id_status_get(task_id)
171
+
172
+ Get task generation status
173
+
174
+ Retrieves the progress status of an invoice generation task. ## Possible states The `status` field uses the `CeleryStatus` enum with values: - **PENDING, STARTED, SUCCESS, FAILURE, RETRY** See the `CeleryStatus` schema documentation for details. ## Business result When `status=\"SUCCESS\"`, the `result` field contains: - `status`: \"SUCCESS\" or \"ERROR\" (business result) - `content_b64`: Base64 encoded content (if success) - `errorCode`, `errorMessage`, `details`: AFNOR format (if business error) ## Usage Poll this endpoint every 2-3 seconds until `status` is `SUCCESS` or `FAILURE`.
175
+
176
+ ### Examples
177
+
178
+ ```ruby
179
+ require 'time'
180
+ require 'factpulse'
181
+ # setup authorization
182
+ FactPulse.configure do |config|
183
+ # Configure Bearer authorization: HTTPBearer
184
+ config.access_token = 'YOUR_BEARER_TOKEN'
185
+ end
186
+
187
+ api_instance = FactPulse::InvoiceProcessingApi.new
188
+ task_id = 'task_id_example' # String |
189
+
190
+ begin
191
+ # Get task generation status
192
+ result = api_instance.get_task_status_api_v1_processing_tasks_task_id_status_get(task_id)
193
+ p result
194
+ rescue FactPulse::ApiError => e
195
+ puts "Error when calling InvoiceProcessingApi->get_task_status_api_v1_processing_tasks_task_id_status_get: #{e}"
196
+ end
197
+ ```
198
+
199
+ #### Using the get_task_status_api_v1_processing_tasks_task_id_status_get_with_http_info variant
200
+
201
+ This returns an Array which contains the response data, status code and headers.
202
+
203
+ > <Array(<TaskStatus>, Integer, Hash)> get_task_status_api_v1_processing_tasks_task_id_status_get_with_http_info(task_id)
204
+
205
+ ```ruby
206
+ begin
207
+ # Get task generation status
208
+ data, status_code, headers = api_instance.get_task_status_api_v1_processing_tasks_task_id_status_get_with_http_info(task_id)
209
+ p status_code # => 2xx
210
+ p headers # => { ... }
211
+ p data # => <TaskStatus>
212
+ rescue FactPulse::ApiError => e
213
+ puts "Error when calling InvoiceProcessingApi->get_task_status_api_v1_processing_tasks_task_id_status_get_with_http_info: #{e}"
214
+ end
215
+ ```
216
+
217
+ ### Parameters
218
+
219
+ | Name | Type | Description | Notes |
220
+ | ---- | ---- | ----------- | ----- |
221
+ | **task_id** | **String** | | |
222
+
223
+ ### Return type
224
+
225
+ [**TaskStatus**](TaskStatus.md)
226
+
227
+ ### Authorization
228
+
229
+ [HTTPBearer](../README.md#HTTPBearer)
230
+
231
+ ### HTTP request headers
232
+
233
+ - **Content-Type**: Not defined
234
+ - **Accept**: application/json
235
+
236
+
237
+ ## sign_pdf_api_v1_processing_sign_pdf_post
238
+
239
+ > Object sign_pdf_api_v1_processing_sign_pdf_post(pdf_file, opts)
240
+
241
+ Sign a PDF with client's certificate (PAdES-B-LT)
242
+
243
+ Signs an uploaded PDF with the electronic certificate configured for the client (via client_uid from JWT). **Supported standards**: PAdES-B-B, PAdES-B-T (timestamping), PAdES-B-LT (long-term archiving). **eIDAS levels**: SES (self-signed), AdES (commercial CA), QES (PSCO - out of scope). **Security**: Double authentication X-Internal-Secret + JWT Bearer to retrieve the certificate. **⚠️ Legal disclaimer**: Generated signatures are electronic seals as defined by the eIDAS regulation. The level of legal validity depends on the certificate used (SES/AdES/QES). FactPulse does not provide QES qualified certificates - you must obtain a certificate from a PSCO (qualified Trust Service Provider) for maximum legal validity.
244
+
245
+ ### Examples
246
+
247
+ ```ruby
248
+ require 'time'
249
+ require 'factpulse'
250
+ # setup authorization
251
+ FactPulse.configure do |config|
252
+ # Configure Bearer authorization: HTTPBearer
253
+ config.access_token = 'YOUR_BEARER_TOKEN'
254
+ end
255
+
256
+ api_instance = FactPulse::InvoiceProcessingApi.new
257
+ pdf_file = File.new('/path/to/some/file') # File | PDF file to sign (will be processed and returned signed in base64)
258
+ opts = {
259
+ reason: 'reason_example', # String |
260
+ location: 'location_example', # String |
261
+ contact: 'contact_example', # String |
262
+ field_name: 'field_name_example', # String | PDF signature field name
263
+ use_pades_lt: true, # Boolean | Enable PAdES-B-LT (long-term archiving with embedded validation data). REQUIRES a certificate with OCSP/CRL access.
264
+ use_timestamp: true # Boolean | Enable RFC 3161 timestamping with FreeTSA (PAdES-B-T)
265
+ }
266
+
267
+ begin
268
+ # Sign a PDF with client's certificate (PAdES-B-LT)
269
+ result = api_instance.sign_pdf_api_v1_processing_sign_pdf_post(pdf_file, opts)
270
+ p result
271
+ rescue FactPulse::ApiError => e
272
+ puts "Error when calling InvoiceProcessingApi->sign_pdf_api_v1_processing_sign_pdf_post: #{e}"
273
+ end
274
+ ```
275
+
276
+ #### Using the sign_pdf_api_v1_processing_sign_pdf_post_with_http_info variant
277
+
278
+ This returns an Array which contains the response data, status code and headers.
279
+
280
+ > <Array(Object, Integer, Hash)> sign_pdf_api_v1_processing_sign_pdf_post_with_http_info(pdf_file, opts)
281
+
282
+ ```ruby
283
+ begin
284
+ # Sign a PDF with client's certificate (PAdES-B-LT)
285
+ data, status_code, headers = api_instance.sign_pdf_api_v1_processing_sign_pdf_post_with_http_info(pdf_file, opts)
286
+ p status_code # => 2xx
287
+ p headers # => { ... }
288
+ p data # => Object
289
+ rescue FactPulse::ApiError => e
290
+ puts "Error when calling InvoiceProcessingApi->sign_pdf_api_v1_processing_sign_pdf_post_with_http_info: #{e}"
291
+ end
292
+ ```
293
+
294
+ ### Parameters
295
+
296
+ | Name | Type | Description | Notes |
297
+ | ---- | ---- | ----------- | ----- |
298
+ | **pdf_file** | **File** | PDF file to sign (will be processed and returned signed in base64) | |
299
+ | **reason** | **String** | | [optional] |
300
+ | **location** | **String** | | [optional] |
301
+ | **contact** | **String** | | [optional] |
302
+ | **field_name** | **String** | PDF signature field name | [optional][default to &#39;FactPulseSignature&#39;] |
303
+ | **use_pades_lt** | **Boolean** | Enable PAdES-B-LT (long-term archiving with embedded validation data). REQUIRES a certificate with OCSP/CRL access. | [optional][default to false] |
304
+ | **use_timestamp** | **Boolean** | Enable RFC 3161 timestamping with FreeTSA (PAdES-B-T) | [optional][default to true] |
305
+
306
+ ### Return type
307
+
308
+ **Object**
309
+
310
+ ### Authorization
311
+
312
+ [HTTPBearer](../README.md#HTTPBearer)
313
+
314
+ ### HTTP request headers
315
+
316
+ - **Content-Type**: multipart/form-data
317
+ - **Accept**: application/json
318
+
319
+
320
+ ## sign_pdf_async_api_v1_processing_sign_pdf_async_post
321
+
322
+ > Object sign_pdf_async_api_v1_processing_sign_pdf_async_post(pdf_file, opts)
323
+
324
+ Sign a PDF asynchronously (Celery)
325
+
326
+ Signs an uploaded PDF asynchronously via a Celery task. **Difference with /sign-pdf**: - `/sign-pdf`: Synchronous signature (blocking until completion) - `/sign-pdf-async`: Asynchronous signature (returns immediately with task_id) **Async advantages**: - No timeout for large files - No blocking of FastAPI worker - Progress tracking via task_id - Ideal for batch processing **Supported standards**: PAdES-B-B, PAdES-B-T (timestamping), PAdES-B-LT (long-term archiving). **⚠️ Legal disclaimer**: Same as /sign-pdf (see that endpoint's documentation).
327
+
328
+ ### Examples
329
+
330
+ ```ruby
331
+ require 'time'
332
+ require 'factpulse'
333
+ # setup authorization
334
+ FactPulse.configure do |config|
335
+ # Configure Bearer authorization: HTTPBearer
336
+ config.access_token = 'YOUR_BEARER_TOKEN'
337
+ end
338
+
339
+ api_instance = FactPulse::InvoiceProcessingApi.new
340
+ pdf_file = File.new('/path/to/some/file') # File | PDF file to sign (processed asynchronously)
341
+ opts = {
342
+ reason: 'reason_example', # String |
343
+ location: 'location_example', # String |
344
+ contact: 'contact_example', # String |
345
+ field_name: 'field_name_example', # String | PDF signature field name
346
+ use_pades_lt: true, # Boolean | Enable PAdES-B-LT (long-term archiving with embedded validation data). REQUIRES a certificate with OCSP/CRL access.
347
+ use_timestamp: true # Boolean | Enable RFC 3161 timestamping with FreeTSA (PAdES-B-T)
348
+ }
349
+
350
+ begin
351
+ # Sign a PDF asynchronously (Celery)
352
+ result = api_instance.sign_pdf_async_api_v1_processing_sign_pdf_async_post(pdf_file, opts)
353
+ p result
354
+ rescue FactPulse::ApiError => e
355
+ puts "Error when calling InvoiceProcessingApi->sign_pdf_async_api_v1_processing_sign_pdf_async_post: #{e}"
356
+ end
357
+ ```
358
+
359
+ #### Using the sign_pdf_async_api_v1_processing_sign_pdf_async_post_with_http_info variant
360
+
361
+ This returns an Array which contains the response data, status code and headers.
362
+
363
+ > <Array(Object, Integer, Hash)> sign_pdf_async_api_v1_processing_sign_pdf_async_post_with_http_info(pdf_file, opts)
364
+
365
+ ```ruby
366
+ begin
367
+ # Sign a PDF asynchronously (Celery)
368
+ data, status_code, headers = api_instance.sign_pdf_async_api_v1_processing_sign_pdf_async_post_with_http_info(pdf_file, opts)
369
+ p status_code # => 2xx
370
+ p headers # => { ... }
371
+ p data # => Object
372
+ rescue FactPulse::ApiError => e
373
+ puts "Error when calling InvoiceProcessingApi->sign_pdf_async_api_v1_processing_sign_pdf_async_post_with_http_info: #{e}"
374
+ end
375
+ ```
376
+
377
+ ### Parameters
378
+
379
+ | Name | Type | Description | Notes |
380
+ | ---- | ---- | ----------- | ----- |
381
+ | **pdf_file** | **File** | PDF file to sign (processed asynchronously) | |
382
+ | **reason** | **String** | | [optional] |
383
+ | **location** | **String** | | [optional] |
384
+ | **contact** | **String** | | [optional] |
385
+ | **field_name** | **String** | PDF signature field name | [optional][default to &#39;FactPulseSignature&#39;] |
386
+ | **use_pades_lt** | **Boolean** | Enable PAdES-B-LT (long-term archiving with embedded validation data). REQUIRES a certificate with OCSP/CRL access. | [optional][default to false] |
387
+ | **use_timestamp** | **Boolean** | Enable RFC 3161 timestamping with FreeTSA (PAdES-B-T) | [optional][default to true] |
388
+
389
+ ### Return type
390
+
391
+ **Object**
392
+
393
+ ### Authorization
394
+
395
+ [HTTPBearer](../README.md#HTTPBearer)
396
+
397
+ ### HTTP request headers
398
+
399
+ - **Content-Type**: multipart/form-data
400
+ - **Accept**: application/json
401
+
402
+
403
+ ## submit_complete_invoice_api_v1_processing_invoices_submit_complete_post
404
+
405
+ > <SubmitCompleteInvoiceResponse> submit_complete_invoice_api_v1_processing_invoices_submit_complete_post(submit_complete_invoice_request)
406
+
407
+ Submit a complete invoice (generation + signature + submission)
408
+
409
+ Unified endpoint to submit a complete invoice to different destinations. **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`)
410
+
411
+ ### Examples
412
+
413
+ ```ruby
414
+ require 'time'
415
+ require 'factpulse'
416
+ # setup authorization
417
+ FactPulse.configure do |config|
418
+ # Configure Bearer authorization: HTTPBearer
419
+ config.access_token = 'YOUR_BEARER_TOKEN'
420
+ end
421
+
422
+ api_instance = FactPulse::InvoiceProcessingApi.new
423
+ submit_complete_invoice_request = FactPulse::SubmitCompleteInvoiceRequest.new({invoice_data: FactPulse::SimplifiedInvoiceData.new({number: 'number_example', supplier: { key: 3.56}, recipient: { key: 3.56}, lines: [{ key: 3.56}]}), source_pdf: 'source_pdf_example', destination: FactPulse::AFNORDestination.new}) # SubmitCompleteInvoiceRequest |
424
+
425
+ begin
426
+ # Submit a complete invoice (generation + signature + submission)
427
+ result = api_instance.submit_complete_invoice_api_v1_processing_invoices_submit_complete_post(submit_complete_invoice_request)
428
+ p result
429
+ rescue FactPulse::ApiError => e
430
+ puts "Error when calling InvoiceProcessingApi->submit_complete_invoice_api_v1_processing_invoices_submit_complete_post: #{e}"
431
+ end
432
+ ```
433
+
434
+ #### Using the submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info variant
435
+
436
+ This returns an Array which contains the response data, status code and headers.
437
+
438
+ > <Array(<SubmitCompleteInvoiceResponse>, Integer, Hash)> submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info(submit_complete_invoice_request)
439
+
440
+ ```ruby
441
+ begin
442
+ # Submit a complete invoice (generation + signature + submission)
443
+ data, status_code, headers = api_instance.submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info(submit_complete_invoice_request)
444
+ p status_code # => 2xx
445
+ p headers # => { ... }
446
+ p data # => <SubmitCompleteInvoiceResponse>
447
+ rescue FactPulse::ApiError => e
448
+ puts "Error when calling InvoiceProcessingApi->submit_complete_invoice_api_v1_processing_invoices_submit_complete_post_with_http_info: #{e}"
449
+ end
450
+ ```
451
+
452
+ ### Parameters
453
+
454
+ | Name | Type | Description | Notes |
455
+ | ---- | ---- | ----------- | ----- |
456
+ | **submit_complete_invoice_request** | [**SubmitCompleteInvoiceRequest**](SubmitCompleteInvoiceRequest.md) | | |
457
+
458
+ ### Return type
459
+
460
+ [**SubmitCompleteInvoiceResponse**](SubmitCompleteInvoiceResponse.md)
461
+
462
+ ### Authorization
463
+
464
+ [HTTPBearer](../README.md#HTTPBearer)
465
+
466
+ ### HTTP request headers
467
+
468
+ - **Content-Type**: application/json
469
+ - **Accept**: application/json
470
+
471
+
472
+ ## submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post
473
+
474
+ > <TaskResponse> submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post(submit_complete_invoice_request)
475
+
476
+ Submit a complete invoice (asynchronous with Celery)
477
+
478
+ Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
479
+
480
+ ### Examples
481
+
482
+ ```ruby
483
+ require 'time'
484
+ require 'factpulse'
485
+ # setup authorization
486
+ FactPulse.configure do |config|
487
+ # Configure Bearer authorization: HTTPBearer
488
+ config.access_token = 'YOUR_BEARER_TOKEN'
489
+ end
490
+
491
+ api_instance = FactPulse::InvoiceProcessingApi.new
492
+ submit_complete_invoice_request = FactPulse::SubmitCompleteInvoiceRequest.new({invoice_data: FactPulse::SimplifiedInvoiceData.new({number: 'number_example', supplier: { key: 3.56}, recipient: { key: 3.56}, lines: [{ key: 3.56}]}), source_pdf: 'source_pdf_example', destination: FactPulse::AFNORDestination.new}) # SubmitCompleteInvoiceRequest |
493
+
494
+ begin
495
+ # Submit a complete invoice (asynchronous with Celery)
496
+ result = api_instance.submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post(submit_complete_invoice_request)
497
+ p result
498
+ rescue FactPulse::ApiError => e
499
+ puts "Error when calling InvoiceProcessingApi->submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post: #{e}"
500
+ end
501
+ ```
502
+
503
+ #### Using the submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info variant
504
+
505
+ This returns an Array which contains the response data, status code and headers.
506
+
507
+ > <Array(<TaskResponse>, Integer, Hash)> submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info(submit_complete_invoice_request)
508
+
509
+ ```ruby
510
+ begin
511
+ # Submit a complete invoice (asynchronous with Celery)
512
+ data, status_code, headers = api_instance.submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info(submit_complete_invoice_request)
513
+ p status_code # => 2xx
514
+ p headers # => { ... }
515
+ p data # => <TaskResponse>
516
+ rescue FactPulse::ApiError => e
517
+ puts "Error when calling InvoiceProcessingApi->submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info: #{e}"
518
+ end
519
+ ```
520
+
521
+ ### Parameters
522
+
523
+ | Name | Type | Description | Notes |
524
+ | ---- | ---- | ----------- | ----- |
525
+ | **submit_complete_invoice_request** | [**SubmitCompleteInvoiceRequest**](SubmitCompleteInvoiceRequest.md) | | |
526
+
527
+ ### Return type
528
+
529
+ [**TaskResponse**](TaskResponse.md)
530
+
531
+ ### Authorization
532
+
533
+ [HTTPBearer](../README.md#HTTPBearer)
534
+
535
+ ### HTTP request headers
536
+
537
+ - **Content-Type**: application/json
538
+ - **Accept**: application/json
539
+
540
+
541
+ ## validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post
542
+
543
+ > <PDFValidationResultAPI> validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post(pdf_file, opts)
544
+
545
+ Validate a complete Factur-X PDF
546
+
547
+ Validates a complete Factur-X PDF according to European and French standards. ## Applied validation standards - **EN 16931**: European semantic standard (directive 2014/55/EU) - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Factur-X / ZUGFeRD**: Franco-German specification - **Schematron**: XML business rules validation - **eIDAS**: European regulation on electronic identification (signatures) ## Checks performed ### 1. Factur-X XML extraction and validation **Checks performed:** - Presence of embedded XML file (`factur-x.xml` or `zugferd-invoice.xml`) - Automatic profile detection (MINIMUM, BASIC, EN16931, EXTENDED) - XML parsing with UTF-8 validation - GuidelineSpecifiedDocumentContextParameter/ID extraction **Schematron validation:** - Business rules for detected profile (MINIMUM: 45 rules, EN16931: 178 rules) - Cardinality of required elements - Calculation consistency (net, VAT, gross amounts, discounts) - Identifier formats (SIRET, intra-EU VAT, IBAN) - Standardized codes (ISO country codes, UN/ECE units, VAT codes) **What is verified:** - ✅ XML structure conforming to Cross Industry Invoice XSD - ✅ Correct UN/CEFACT namespace - ✅ European business rules (BR-xx) - ✅ French-specific rules (FR-xx) ### 2. PDF/A-3 compliance **Basic validation (metadata):** - Presence of `/Type` field set to `Catalog` - Metadata `pdfaid:part` = 3 (PDF/A-3) - Metadata `pdfaid:conformance` = B or U - PDF version >= 1.4 **Strict VeraPDF validation (if use_verapdf=True):** - 146+ ISO 19005-3 rules (PDF/A-3B) - Absence of forbidden content (JavaScript, multimedia, dynamic forms) - Correctly embedded fonts and subsets - Compliant color spaces (sRGB, DeviceGray) - Valid file structure (cross-reference table) - XMP metadata conforming to ISO 16684-1 **What is verified:** - ✅ Long-term archivable file (20+ years) - ✅ Guaranteed readability (embedded fonts) - ✅ Legal compliance (France, Germany, EU) ### 3. XMP metadata (eXtensible Metadata Platform) **Checks performed:** - Presence of `<?xpacket>` block with XMP metadata - `fx:` namespace for Factur-X: `urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#` - Required Factur-X fields: - `fx:ConformanceLevel`: Profile (MINIMUM, BASIC, EN16931, EXTENDED) - `fx:DocumentFileName`: Embedded XML name - `fx:DocumentType`: \"INVOICE\" - `fx:Version`: Factur-X version (1.0.07) **What is verified:** - ✅ Metadata conforming to ISO 16684-1 - ✅ Correct declared Factur-X profile - ✅ Supported Factur-X version ### 4. Electronic signatures **Detection and analysis:** - Presence of `/Sig` dictionaries in PDF - Signature type: PAdES (PDF Advanced Electronic Signature) - Information extraction: - Signer name (`/Name`) - Signing date (`/M`) - Signature reason (`/Reason`) - Signature location (`/Location`) - Signature type (approval, certification) **What is verified:** - ✅ Presence of signatures or seals - ✅ Number of signatures (single or multi-signature) - ℹ️ No cryptographic verification (requires certificates) ## Parameters - **pdf_file** (required): The Factur-X PDF file to validate - **profile** (optional): Expected profile. If absent, auto-detected from XML - **use_verapdf** (optional, default=false): Enable strict PDF/A validation with VeraPDF - `false`: Fast metadata validation (2-3 seconds) - `true`: Complete ISO 19005-3 validation (15-30 seconds, **recommended for production**) ## Detailed response ```json { \"isCompliant\": true, \"xml\": { \"present\": true, \"compliant\": true, \"profile\": \"EN16931\", \"errors\": [] }, \"pdfa\": { \"compliant\": true, \"version\": \"PDF/A-3B\", \"method\": \"verapdf\", \"errors\": [] }, \"xmp\": { \"present\": true, \"compliant\": true, \"metadata\": {...} }, \"signatures\": { \"present\": true, \"count\": 1, \"details\": [...] } } ``` ## Use cases - **Before sending**: Validate generated invoice before transmission to client - **On reception**: Verify compliance of invoice received from supplier - **Audit**: Check quality of invoice batches - **Legal compliance**: Ensure B2B/B2G obligations are met in France - **Debugging**: Identify issues in generation process - **Archiving**: Guarantee long-term validity (PDF/A-3) ## Processing time - Basic validation: 2-3 seconds - VeraPDF validation: 15-30 seconds (depends on PDF size)
548
+
549
+ ### Examples
550
+
551
+ ```ruby
552
+ require 'time'
553
+ require 'factpulse'
554
+ # setup authorization
555
+ FactPulse.configure do |config|
556
+ # Configure Bearer authorization: HTTPBearer
557
+ config.access_token = 'YOUR_BEARER_TOKEN'
558
+ end
559
+
560
+ api_instance = FactPulse::InvoiceProcessingApi.new
561
+ pdf_file = File.new('/path/to/some/file') # File | Factur-X PDF file to validate (.pdf format).
562
+ opts = {
563
+ profile: FactPulse::APIProfile::MINIMUM, # APIProfile |
564
+ use_verapdf: true # Boolean | Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation.
565
+ }
566
+
567
+ begin
568
+ # Validate a complete Factur-X PDF
569
+ result = api_instance.validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post(pdf_file, opts)
570
+ p result
571
+ rescue FactPulse::ApiError => e
572
+ puts "Error when calling InvoiceProcessingApi->validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post: #{e}"
573
+ end
574
+ ```
575
+
576
+ #### Using the validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post_with_http_info variant
577
+
578
+ This returns an Array which contains the response data, status code and headers.
579
+
580
+ > <Array(<PDFValidationResultAPI>, Integer, Hash)> validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post_with_http_info(pdf_file, opts)
581
+
582
+ ```ruby
583
+ begin
584
+ # Validate a complete Factur-X PDF
585
+ data, status_code, headers = api_instance.validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post_with_http_info(pdf_file, opts)
586
+ p status_code # => 2xx
587
+ p headers # => { ... }
588
+ p data # => <PDFValidationResultAPI>
589
+ rescue FactPulse::ApiError => e
590
+ puts "Error when calling InvoiceProcessingApi->validate_facturx_pdf_api_v1_processing_validate_facturx_pdf_post_with_http_info: #{e}"
591
+ end
592
+ ```
593
+
594
+ ### Parameters
595
+
596
+ | Name | Type | Description | Notes |
597
+ | ---- | ---- | ----------- | ----- |
598
+ | **pdf_file** | **File** | Factur-X PDF file to validate (.pdf format). | |
599
+ | **profile** | [**APIProfile**](APIProfile.md) | | [optional] |
600
+ | **use_verapdf** | **Boolean** | Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation. | [optional][default to false] |
601
+
602
+ ### Return type
603
+
604
+ [**PDFValidationResultAPI**](PDFValidationResultAPI.md)
605
+
606
+ ### Authorization
607
+
608
+ [HTTPBearer](../README.md#HTTPBearer)
609
+
610
+ ### HTTP request headers
611
+
612
+ - **Content-Type**: multipart/form-data
613
+ - **Accept**: application/json
614
+
615
+
616
+ ## validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post
617
+
618
+ > <TaskResponse> validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post(pdf_file, opts)
619
+
620
+ Validate a Factur-X PDF (asynchronous with polling)
621
+
622
+ Validates a Factur-X PDF asynchronously with polling system. ## How it works 1. **Submission**: PDF is queued for asynchronous validation 2. **Immediate return**: You receive a `task_id` (HTTP 202) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Advantages of asynchronous mode - **No timeout**: Ideal for large PDFs or VeraPDF validation (which can take several seconds) - **Scalability**: Validations are processed by dedicated Celery workers - **Status tracking**: Allows you to monitor validation progress - **Non-blocking**: Your client doesn't wait during validation ## When to use this mode? - **VeraPDF validation enabled** (`use_verapdf=True`): Strict validation can take 2-10 seconds - **Large PDF files**: PDFs > 1 MB - **Batch processing**: Validating multiple invoices in parallel - **Asynchronous integration**: Your system supports polling ## Checks performed ### 1. Factur-X XML extraction and validation - Verifies presence of Factur-X compliant embedded XML file - Automatically detects profile used (MINIMUM, BASIC, EN16931, EXTENDED) - Validates XML against detected profile's Schematron rules ### 2. PDF/A compliance - **Without VeraPDF**: Basic metadata validation (fast, ~100ms) - **With VeraPDF**: Strict ISO 19005 validation (146+ rules, 2-10s) - Detects PDF/A version (PDF/A-1, PDF/A-3, etc.) - Detailed non-compliance reports ### 3. XMP metadata - Verifies presence of XMP metadata in PDF - Validates Factur-X metadata compliance (profile, version) - Extracts all available XMP metadata ### 4. Electronic signatures - Detects presence of electronic signatures or seals - Extracts information about each signature (signer, date, reason) - Counts number of signatures present ## Parameters - **pdf_file**: The Factur-X PDF file to validate - **profile**: Expected Factur-X profile (optional). If not specified, profile will be auto-detected from embedded XML file. - **use_verapdf**: Enable strict PDF/A validation with VeraPDF. ⚠️ **Warning**: VeraPDF can take 2-10 seconds depending on PDF size. Recommended only in asynchronous mode to avoid timeouts. ## Retrieving results After submission, use `GET /tasks/{task_id}/status` endpoint to retrieve the result. **Polling example**: ```python import requests import time # 1. Submit task response = requests.post(\"/validate-facturx-async\", files={\"pdf_file\": pdf_file}) task_id = response.json()[\"taskId\"] # 2. Poll every 2 seconds while True: status_response = requests.get(f\"/tasks/{task_id}/status\") status = status_response.json() if status[\"status\"] == \"SUCCESS\": result = status[\"result\"][\"validation_result\"] print(f\"Compliant: {result['is_compliant']}\") break elif status[\"status\"] == \"FAILURE\": print(f\"Error: {status['result']['errorMessage']}\") break time.sleep(2) # Wait 2 seconds before next check ``` ## Use cases - Validate invoices before sending with VeraPDF (strict validation) - Process invoice batches in parallel - Integrate validation into an asynchronous pipeline - Validate large PDFs without timeout risk
623
+
624
+ ### Examples
625
+
626
+ ```ruby
627
+ require 'time'
628
+ require 'factpulse'
629
+ # setup authorization
630
+ FactPulse.configure do |config|
631
+ # Configure Bearer authorization: HTTPBearer
632
+ config.access_token = 'YOUR_BEARER_TOKEN'
633
+ end
634
+
635
+ api_instance = FactPulse::InvoiceProcessingApi.new
636
+ pdf_file = File.new('/path/to/some/file') # File | Factur-X PDF file to validate (.pdf format).
637
+ opts = {
638
+ profile: FactPulse::APIProfile::MINIMUM, # APIProfile |
639
+ use_verapdf: true # Boolean | Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds.
640
+ }
641
+
642
+ begin
643
+ # Validate a Factur-X PDF (asynchronous with polling)
644
+ result = api_instance.validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post(pdf_file, opts)
645
+ p result
646
+ rescue FactPulse::ApiError => e
647
+ puts "Error when calling InvoiceProcessingApi->validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post: #{e}"
648
+ end
649
+ ```
650
+
651
+ #### Using the validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post_with_http_info variant
652
+
653
+ This returns an Array which contains the response data, status code and headers.
654
+
655
+ > <Array(<TaskResponse>, Integer, Hash)> validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post_with_http_info(pdf_file, opts)
656
+
657
+ ```ruby
658
+ begin
659
+ # Validate a Factur-X PDF (asynchronous with polling)
660
+ data, status_code, headers = api_instance.validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post_with_http_info(pdf_file, opts)
661
+ p status_code # => 2xx
662
+ p headers # => { ... }
663
+ p data # => <TaskResponse>
664
+ rescue FactPulse::ApiError => e
665
+ puts "Error when calling InvoiceProcessingApi->validate_facturx_pdf_async_api_v1_processing_validate_facturx_async_post_with_http_info: #{e}"
666
+ end
667
+ ```
668
+
669
+ ### Parameters
670
+
671
+ | Name | Type | Description | Notes |
672
+ | ---- | ---- | ----------- | ----- |
673
+ | **pdf_file** | **File** | Factur-X PDF file to validate (.pdf format). | |
674
+ | **profile** | [**APIProfile**](APIProfile.md) | | [optional] |
675
+ | **use_verapdf** | **Boolean** | Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds. | [optional][default to false] |
676
+
677
+ ### Return type
678
+
679
+ [**TaskResponse**](TaskResponse.md)
680
+
681
+ ### Authorization
682
+
683
+ [HTTPBearer](../README.md#HTTPBearer)
684
+
685
+ ### HTTP request headers
686
+
687
+ - **Content-Type**: multipart/form-data
688
+ - **Accept**: application/json
689
+
690
+
691
+ ## validate_pdf_signature_endpoint_api_v1_processing_validate_pdf_signature_post
692
+
693
+ > Object validate_pdf_signature_endpoint_api_v1_processing_validate_pdf_signature_post(pdf_file)
694
+
695
+ Validate electronic signatures of a PDF
696
+
697
+ Validates electronic signatures present in an uploaded PDF. **Verifications performed**: - Presence of signatures - Document integrity (not modified since signing) - Certificate validity - Chain of trust (if available) - Presence of timestamp (PAdES-B-T) - Validation data (PAdES-B-LT) **Supported standards**: PAdES-B-B, PAdES-B-T, PAdES-B-LT, ISO 32000-2. **⚠️ Note**: This validation is technical (cryptographic integrity). Legal validity depends on the eIDAS level of the certificate (SES/AdES/QES) and the context of use.
698
+
699
+ ### Examples
700
+
701
+ ```ruby
702
+ require 'time'
703
+ require 'factpulse'
704
+ # setup authorization
705
+ FactPulse.configure do |config|
706
+ # Configure Bearer authorization: HTTPBearer
707
+ config.access_token = 'YOUR_BEARER_TOKEN'
708
+ end
709
+
710
+ api_instance = FactPulse::InvoiceProcessingApi.new
711
+ pdf_file = File.new('/path/to/some/file') # File | PDF file to validate (will be analyzed to detect and validate signatures)
712
+
713
+ begin
714
+ # Validate electronic signatures of a PDF
715
+ result = api_instance.validate_pdf_signature_endpoint_api_v1_processing_validate_pdf_signature_post(pdf_file)
716
+ p result
717
+ rescue FactPulse::ApiError => e
718
+ puts "Error when calling InvoiceProcessingApi->validate_pdf_signature_endpoint_api_v1_processing_validate_pdf_signature_post: #{e}"
719
+ end
720
+ ```
721
+
722
+ #### Using the validate_pdf_signature_endpoint_api_v1_processing_validate_pdf_signature_post_with_http_info variant
723
+
724
+ This returns an Array which contains the response data, status code and headers.
725
+
726
+ > <Array(Object, Integer, Hash)> validate_pdf_signature_endpoint_api_v1_processing_validate_pdf_signature_post_with_http_info(pdf_file)
727
+
728
+ ```ruby
729
+ begin
730
+ # Validate electronic signatures of a PDF
731
+ data, status_code, headers = api_instance.validate_pdf_signature_endpoint_api_v1_processing_validate_pdf_signature_post_with_http_info(pdf_file)
732
+ p status_code # => 2xx
733
+ p headers # => { ... }
734
+ p data # => Object
735
+ rescue FactPulse::ApiError => e
736
+ puts "Error when calling InvoiceProcessingApi->validate_pdf_signature_endpoint_api_v1_processing_validate_pdf_signature_post_with_http_info: #{e}"
737
+ end
738
+ ```
739
+
740
+ ### Parameters
741
+
742
+ | Name | Type | Description | Notes |
743
+ | ---- | ---- | ----------- | ----- |
744
+ | **pdf_file** | **File** | PDF file to validate (will be analyzed to detect and validate signatures) | |
745
+
746
+ ### Return type
747
+
748
+ **Object**
749
+
750
+ ### Authorization
751
+
752
+ [HTTPBearer](../README.md#HTTPBearer)
753
+
754
+ ### HTTP request headers
755
+
756
+ - **Content-Type**: multipart/form-data
757
+ - **Accept**: application/json
758
+
759
+
760
+ ## validate_xml_api_v1_processing_validate_xml_post
761
+
762
+ > <ValidationSuccessResponse> validate_xml_api_v1_processing_validate_xml_post(xml_file, opts)
763
+
764
+ Validate an existing Factur-X XML
765
+
766
+ Validates a Factur-X XML file against Schematron business rules according to EN 16931 standard. ## 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 Factur-X rules - Arithmetic calculations and data consistency ## Profiles and validated rules ### 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
767
+
768
+ ### Examples
769
+
770
+ ```ruby
771
+ require 'time'
772
+ require 'factpulse'
773
+ # setup authorization
774
+ FactPulse.configure do |config|
775
+ # Configure Bearer authorization: HTTPBearer
776
+ config.access_token = 'YOUR_BEARER_TOKEN'
777
+ end
778
+
779
+ api_instance = FactPulse::InvoiceProcessingApi.new
780
+ xml_file = File.new('/path/to/some/file') # File | Factur-X XML file to validate (.xml format).
781
+ opts = {
782
+ profile: FactPulse::APIProfile::MINIMUM # APIProfile | Validation profile (MINIMUM, BASIC, EN16931, EXTENDED).
783
+ }
784
+
785
+ begin
786
+ # Validate an existing Factur-X XML
787
+ result = api_instance.validate_xml_api_v1_processing_validate_xml_post(xml_file, opts)
788
+ p result
789
+ rescue FactPulse::ApiError => e
790
+ puts "Error when calling InvoiceProcessingApi->validate_xml_api_v1_processing_validate_xml_post: #{e}"
791
+ end
792
+ ```
793
+
794
+ #### Using the validate_xml_api_v1_processing_validate_xml_post_with_http_info variant
795
+
796
+ This returns an Array which contains the response data, status code and headers.
797
+
798
+ > <Array(<ValidationSuccessResponse>, Integer, Hash)> validate_xml_api_v1_processing_validate_xml_post_with_http_info(xml_file, opts)
799
+
800
+ ```ruby
801
+ begin
802
+ # Validate an existing Factur-X XML
803
+ data, status_code, headers = api_instance.validate_xml_api_v1_processing_validate_xml_post_with_http_info(xml_file, opts)
804
+ p status_code # => 2xx
805
+ p headers # => { ... }
806
+ p data # => <ValidationSuccessResponse>
807
+ rescue FactPulse::ApiError => e
808
+ puts "Error when calling InvoiceProcessingApi->validate_xml_api_v1_processing_validate_xml_post_with_http_info: #{e}"
809
+ end
810
+ ```
811
+
812
+ ### Parameters
813
+
814
+ | Name | Type | Description | Notes |
815
+ | ---- | ---- | ----------- | ----- |
816
+ | **xml_file** | **File** | Factur-X XML file to validate (.xml format). | |
817
+ | **profile** | [**APIProfile**](APIProfile.md) | Validation profile (MINIMUM, BASIC, EN16931, EXTENDED). | [optional] |
818
+
819
+ ### Return type
820
+
821
+ [**ValidationSuccessResponse**](ValidationSuccessResponse.md)
822
+
823
+ ### Authorization
824
+
825
+ [HTTPBearer](../README.md#HTTPBearer)
826
+
827
+ ### HTTP request headers
828
+
829
+ - **Content-Type**: multipart/form-data
830
+ - **Accept**: application/json
831
+