factpulse 1.0.8

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 (250) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +28 -0
  3. data/Gemfile +9 -0
  4. data/Gemfile.lock +74 -0
  5. data/LICENSE +21 -0
  6. data/README.md +161 -0
  7. data/Rakefile +10 -0
  8. data/docs/AFNORPDPPAApi.md +69 -0
  9. data/docs/AFNORPDPPADirectoryServiceApi.md +196 -0
  10. data/docs/AFNORPDPPAFlowServiceApi.md +258 -0
  11. data/docs/AdresseElectronique.md +20 -0
  12. data/docs/AdressePostale.md +26 -0
  13. data/docs/BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost.md +22 -0
  14. data/docs/BodyCompleterFactureApiV1ChorusProFacturesCompleterPost.md +22 -0
  15. data/docs/BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet.md +20 -0
  16. data/docs/BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost.md +22 -0
  17. data/docs/BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost.md +22 -0
  18. data/docs/BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost.md +22 -0
  19. data/docs/BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost.md +22 -0
  20. data/docs/BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost.md +22 -0
  21. data/docs/BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost.md +22 -0
  22. data/docs/BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost.md +22 -0
  23. data/docs/BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost.md +22 -0
  24. data/docs/CadreDeFacturation.md +22 -0
  25. data/docs/CategorieTVA.md +15 -0
  26. data/docs/CertificateInfoResponse.md +40 -0
  27. data/docs/ChorusProApi.md +1129 -0
  28. data/docs/ChorusProCredentials.md +26 -0
  29. data/docs/CodeCadreFacturation.md +15 -0
  30. data/docs/CodeRaisonReduction.md +15 -0
  31. data/docs/ConsulterFactureRequest.md +20 -0
  32. data/docs/ConsulterFactureResponse.md +34 -0
  33. data/docs/ConsulterStructureRequest.md +22 -0
  34. data/docs/ConsulterStructureResponse.md +34 -0
  35. data/docs/CredentialsAFNOR.md +22 -0
  36. data/docs/CredentialsChorusPro.md +26 -0
  37. data/docs/Destinataire.md +24 -0
  38. data/docs/Destination.md +79 -0
  39. data/docs/DestinationAFNOR.md +24 -0
  40. data/docs/DestinationChorusPro.md +20 -0
  41. data/docs/DirectionFlux.md +15 -0
  42. data/docs/DonneesFactureSimplifiees.md +34 -0
  43. data/docs/FactureEnrichieInfoInput.md +32 -0
  44. data/docs/FactureEnrichieInfoOutput.md +32 -0
  45. data/docs/FactureFacturX.md +44 -0
  46. data/docs/FluxResume.md +32 -0
  47. data/docs/FormatSortie.md +15 -0
  48. data/docs/Fournisseur.md +34 -0
  49. data/docs/GenerateCertificateRequest.md +38 -0
  50. data/docs/GenerateCertificateResponse.md +32 -0
  51. data/docs/HTTPValidationError.md +18 -0
  52. data/docs/InformationSignatureAPI.md +28 -0
  53. data/docs/LigneDePoste.md +46 -0
  54. data/docs/LigneDePosteMontantRemiseHt.md +15 -0
  55. data/docs/LigneDePosteMontantTotalLigneHt.md +15 -0
  56. data/docs/LigneDePosteTauxTvaManuel.md +15 -0
  57. data/docs/LigneDeTVA.md +26 -0
  58. data/docs/ModeDepot.md +15 -0
  59. data/docs/ModePaiement.md +15 -0
  60. data/docs/MontantHtTotal.md +15 -0
  61. data/docs/MontantTotal.md +30 -0
  62. data/docs/MontantTotalAcompte.md +15 -0
  63. data/docs/MontantTotalMontantRemiseGlobaleTtc.md +15 -0
  64. data/docs/MontantTtcTotal.md +15 -0
  65. data/docs/MontantTva.md +15 -0
  66. data/docs/Montantapayer.md +15 -0
  67. data/docs/Montantbaseht.md +15 -0
  68. data/docs/Montanthttotal.md +15 -0
  69. data/docs/Montantttctotal.md +15 -0
  70. data/docs/Montanttva.md +15 -0
  71. data/docs/Montanttva1.md +15 -0
  72. data/docs/Montantunitaireht.md +15 -0
  73. data/docs/ObtenirIdChorusProRequest.md +22 -0
  74. data/docs/ObtenirIdChorusProResponse.md +24 -0
  75. data/docs/OptionsProcessing.md +24 -0
  76. data/docs/PDFFacturXInfo.md +22 -0
  77. data/docs/PDPCredentials.md +24 -0
  78. data/docs/ParametresSignature.md +34 -0
  79. data/docs/ParametresStructure.md +22 -0
  80. data/docs/PieceJointeComplementaire.md +26 -0
  81. data/docs/ProcessingEndpointsUnifisApi.md +147 -0
  82. data/docs/ProfilAPI.md +15 -0
  83. data/docs/ProfilFlux.md +15 -0
  84. data/docs/Quantite.md +15 -0
  85. data/docs/QuotaInfo.md +26 -0
  86. data/docs/RechercherServicesResponse.md +24 -0
  87. data/docs/RechercherStructureRequest.md +26 -0
  88. data/docs/RechercherStructureResponse.md +24 -0
  89. data/docs/References.md +32 -0
  90. data/docs/ReponseHealthcheckAFNOR.md +22 -0
  91. data/docs/ReponseRechercheFlux.md +24 -0
  92. data/docs/ReponseSoumissionFlux.md +30 -0
  93. data/docs/ReponseTache.md +18 -0
  94. data/docs/ReponseValidationErreur.md +18 -0
  95. data/docs/ReponseValidationSucces.md +18 -0
  96. data/docs/RequeteRechercheFlux.md +34 -0
  97. data/docs/RequeteSoumissionFlux.md +28 -0
  98. data/docs/ResultatAFNOR.md +26 -0
  99. data/docs/ResultatChorusPro.md +22 -0
  100. data/docs/ResultatValidationPDFAPI.md +62 -0
  101. data/docs/SantApi.md +69 -0
  102. data/docs/SchemeID.md +15 -0
  103. data/docs/ServiceStructure.md +24 -0
  104. data/docs/SignatureInfo.md +22 -0
  105. data/docs/SignatureLectroniqueApi.md +315 -0
  106. data/docs/SoumettreFactureCompleteRequest.md +26 -0
  107. data/docs/SoumettreFactureCompleteResponse.md +34 -0
  108. data/docs/SoumettreFactureRequest.md +46 -0
  109. data/docs/SoumettreFactureResponse.md +24 -0
  110. data/docs/StatutAcquittement.md +15 -0
  111. data/docs/StatutFacture.md +22 -0
  112. data/docs/StatutTache.md +22 -0
  113. data/docs/StructureInfo.md +26 -0
  114. data/docs/SyntaxeFlux.md +15 -0
  115. data/docs/Tauxmanuel.md +15 -0
  116. data/docs/TraitementFactureApi.md +831 -0
  117. data/docs/TypeFacture.md +15 -0
  118. data/docs/TypeFlux.md +15 -0
  119. data/docs/TypeTVA.md +15 -0
  120. data/docs/Unite.md +15 -0
  121. data/docs/Utilisateur.md +40 -0
  122. data/docs/UtilisateurApi.md +74 -0
  123. data/docs/ValidationError.md +22 -0
  124. data/docs/ValidationErrorLocInner.md +15 -0
  125. data/factpulse.gemspec +39 -0
  126. data/git_push.sh +57 -0
  127. data/lib/factpulse/api/afnorpdppa_api.rb +79 -0
  128. data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +199 -0
  129. data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +256 -0
  130. data/lib/factpulse/api/chorus_pro_api.rb +1116 -0
  131. data/lib/factpulse/api/processing_endpoints_unifis_api.rb +158 -0
  132. data/lib/factpulse/api/sant_api.rb +79 -0
  133. data/lib/factpulse/api/signature_lectronique_api.rb +333 -0
  134. data/lib/factpulse/api/traitement_facture_api.rb +835 -0
  135. data/lib/factpulse/api/utilisateur_api.rb +79 -0
  136. data/lib/factpulse/api_client.rb +393 -0
  137. data/lib/factpulse/api_error.rb +58 -0
  138. data/lib/factpulse/api_model_base.rb +88 -0
  139. data/lib/factpulse/configuration.rb +308 -0
  140. data/lib/factpulse/models/adresse_electronique.rb +196 -0
  141. data/lib/factpulse/models/adresse_postale.rb +189 -0
  142. data/lib/factpulse/models/body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post.rb +202 -0
  143. data/lib/factpulse/models/body_completer_facture_api_v1_chorus_pro_factures_completer_post.rb +202 -0
  144. data/lib/factpulse/models/body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get.rb +174 -0
  145. data/lib/factpulse/models/body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post.rb +202 -0
  146. data/lib/factpulse/models/body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post.rb +202 -0
  147. data/lib/factpulse/models/body_recycler_facture_api_v1_chorus_pro_factures_recycler_post.rb +202 -0
  148. data/lib/factpulse/models/body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post.rb +202 -0
  149. data/lib/factpulse/models/body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post.rb +202 -0
  150. data/lib/factpulse/models/body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post.rb +202 -0
  151. data/lib/factpulse/models/body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post.rb +202 -0
  152. data/lib/factpulse/models/body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post.rb +202 -0
  153. data/lib/factpulse/models/cadre_de_facturation.rb +207 -0
  154. data/lib/factpulse/models/categorie_tva.rb +47 -0
  155. data/lib/factpulse/models/certificate_info_response.rb +446 -0
  156. data/lib/factpulse/models/chorus_pro_credentials.rb +259 -0
  157. data/lib/factpulse/models/code_cadre_facturation.rb +42 -0
  158. data/lib/factpulse/models/code_raison_reduction.rb +45 -0
  159. data/lib/factpulse/models/consulter_facture_request.rb +176 -0
  160. data/lib/factpulse/models/consulter_facture_response.rb +261 -0
  161. data/lib/factpulse/models/consulter_structure_request.rb +188 -0
  162. data/lib/factpulse/models/consulter_structure_response.rb +261 -0
  163. data/lib/factpulse/models/credentials_afnor.rb +169 -0
  164. data/lib/factpulse/models/credentials_chorus_pro.rb +191 -0
  165. data/lib/factpulse/models/destinataire.rb +195 -0
  166. data/lib/factpulse/models/destination.rb +56 -0
  167. data/lib/factpulse/models/destination_afnor.rb +228 -0
  168. data/lib/factpulse/models/destination_chorus_pro.rb +194 -0
  169. data/lib/factpulse/models/direction_flux.rb +40 -0
  170. data/lib/factpulse/models/donnees_facture_simplifiees.rb +342 -0
  171. data/lib/factpulse/models/facture_enrichie_info_input.rb +315 -0
  172. data/lib/factpulse/models/facture_enrichie_info_output.rb +348 -0
  173. data/lib/factpulse/models/facture_factur_x.rb +432 -0
  174. data/lib/factpulse/models/flux_resume.rb +251 -0
  175. data/lib/factpulse/models/format_sortie.rb +40 -0
  176. data/lib/factpulse/models/fournisseur.rb +261 -0
  177. data/lib/factpulse/models/generate_certificate_request.rb +323 -0
  178. data/lib/factpulse/models/generate_certificate_response.rb +254 -0
  179. data/lib/factpulse/models/http_validation_error.rb +149 -0
  180. data/lib/factpulse/models/information_signature_api.rb +216 -0
  181. data/lib/factpulse/models/ligne_de_poste.rb +391 -0
  182. data/lib/factpulse/models/ligne_de_poste_montant_remise_ht.rb +104 -0
  183. data/lib/factpulse/models/ligne_de_poste_montant_total_ligne_ht.rb +104 -0
  184. data/lib/factpulse/models/ligne_de_poste_taux_tva_manuel.rb +104 -0
  185. data/lib/factpulse/models/ligne_de_tva.rb +242 -0
  186. data/lib/factpulse/models/mode_depot.rb +41 -0
  187. data/lib/factpulse/models/mode_paiement.rb +44 -0
  188. data/lib/factpulse/models/montant_ht_total.rb +103 -0
  189. data/lib/factpulse/models/montant_total.rb +273 -0
  190. data/lib/factpulse/models/montant_total_acompte.rb +104 -0
  191. data/lib/factpulse/models/montant_total_montant_remise_globale_ttc.rb +104 -0
  192. data/lib/factpulse/models/montant_ttc_total.rb +103 -0
  193. data/lib/factpulse/models/montant_tva.rb +103 -0
  194. data/lib/factpulse/models/montantapayer.rb +104 -0
  195. data/lib/factpulse/models/montantbaseht.rb +104 -0
  196. data/lib/factpulse/models/montanthttotal.rb +104 -0
  197. data/lib/factpulse/models/montantttctotal.rb +104 -0
  198. data/lib/factpulse/models/montanttva.rb +104 -0
  199. data/lib/factpulse/models/montanttva1.rb +104 -0
  200. data/lib/factpulse/models/montantunitaireht.rb +104 -0
  201. data/lib/factpulse/models/obtenir_id_chorus_pro_request.rb +188 -0
  202. data/lib/factpulse/models/obtenir_id_chorus_pro_response.rb +230 -0
  203. data/lib/factpulse/models/options_processing.rb +221 -0
  204. data/lib/factpulse/models/parametres_signature.rb +235 -0
  205. data/lib/factpulse/models/parametres_structure.rb +175 -0
  206. data/lib/factpulse/models/pdf_factur_x_info.rb +205 -0
  207. data/lib/factpulse/models/pdp_credentials.rb +247 -0
  208. data/lib/factpulse/models/piece_jointe_complementaire.rb +269 -0
  209. data/lib/factpulse/models/profil_api.rb +42 -0
  210. data/lib/factpulse/models/profil_flux.rb +41 -0
  211. data/lib/factpulse/models/quantite.rb +104 -0
  212. data/lib/factpulse/models/quota_info.rb +269 -0
  213. data/lib/factpulse/models/rechercher_services_response.rb +214 -0
  214. data/lib/factpulse/models/rechercher_structure_request.rb +191 -0
  215. data/lib/factpulse/models/rechercher_structure_response.rb +216 -0
  216. data/lib/factpulse/models/references.rb +290 -0
  217. data/lib/factpulse/models/reponse_healthcheck_afnor.rb +220 -0
  218. data/lib/factpulse/models/reponse_recherche_flux.rb +249 -0
  219. data/lib/factpulse/models/reponse_soumission_flux.rb +294 -0
  220. data/lib/factpulse/models/reponse_tache.rb +165 -0
  221. data/lib/factpulse/models/reponse_validation_erreur.rb +167 -0
  222. data/lib/factpulse/models/reponse_validation_succes.rb +165 -0
  223. data/lib/factpulse/models/requete_recherche_flux.rb +306 -0
  224. data/lib/factpulse/models/requete_soumission_flux.rb +238 -0
  225. data/lib/factpulse/models/resultat_afnor.rb +240 -0
  226. data/lib/factpulse/models/resultat_chorus_pro.rb +186 -0
  227. data/lib/factpulse/models/resultat_validation_pdfapi.rb +523 -0
  228. data/lib/factpulse/models/scheme_id.rb +43 -0
  229. data/lib/factpulse/models/service_structure.rb +247 -0
  230. data/lib/factpulse/models/signature_info.rb +186 -0
  231. data/lib/factpulse/models/soumettre_facture_complete_request.rb +239 -0
  232. data/lib/factpulse/models/soumettre_facture_complete_response.rb +355 -0
  233. data/lib/factpulse/models/soumettre_facture_request.rb +391 -0
  234. data/lib/factpulse/models/soumettre_facture_response.rb +213 -0
  235. data/lib/factpulse/models/statut_acquittement.rb +41 -0
  236. data/lib/factpulse/models/statut_facture.rb +203 -0
  237. data/lib/factpulse/models/statut_tache.rb +201 -0
  238. data/lib/factpulse/models/structure_info.rb +274 -0
  239. data/lib/factpulse/models/syntaxe_flux.rb +43 -0
  240. data/lib/factpulse/models/tauxmanuel.rb +104 -0
  241. data/lib/factpulse/models/type_facture.rb +40 -0
  242. data/lib/factpulse/models/type_flux.rb +43 -0
  243. data/lib/factpulse/models/type_tva.rb +42 -0
  244. data/lib/factpulse/models/unite.rb +44 -0
  245. data/lib/factpulse/models/utilisateur.rb +328 -0
  246. data/lib/factpulse/models/validation_error.rb +218 -0
  247. data/lib/factpulse/models/validation_error_loc_inner.rb +103 -0
  248. data/lib/factpulse/version.rb +15 -0
  249. data/lib/factpulse.rb +157 -0
  250. metadata +382 -0
@@ -0,0 +1,147 @@
1
+ # FactPulse::ProcessingEndpointsUnifisApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**soumettre_facture_complete_api_v1_traitement_factures_soumettre_complete_post**](ProcessingEndpointsUnifisApi.md#soumettre_facture_complete_api_v1_traitement_factures_soumettre_complete_post) | **POST** /api/v1/traitement/factures/soumettre-complete | Soumettre une facture complète (génération + signature + soumission) |
8
+ | [**soumettre_facture_complete_async_api_v1_traitement_factures_soumettre_complete_async_post**](ProcessingEndpointsUnifisApi.md#soumettre_facture_complete_async_api_v1_traitement_factures_soumettre_complete_async_post) | **POST** /api/v1/traitement/factures/soumettre-complete-async | Soumettre une facture complète (asynchrone avec Celery) |
9
+
10
+
11
+ ## soumettre_facture_complete_api_v1_traitement_factures_soumettre_complete_post
12
+
13
+ > <SoumettreFactureCompleteResponse> soumettre_facture_complete_api_v1_traitement_factures_soumettre_complete_post(soumettre_facture_complete_request)
14
+
15
+ Soumettre une facture complète (génération + signature + soumission)
16
+
17
+ Endpoint unifié pour soumettre une facture complète vers différentes destinations. **Workflow automatisé :** 1. **Auto-enrichissement** (optionnel) : récupère les données via APIs publiques et Chorus Pro/AFNOR 2. **Génération PDF Factur-X** : crée un PDF/A-3 avec XML embarqué 3. **Signature électronique** (optionnelle) : signe le PDF avec un certificat 4. **Soumission** : envoie vers la destination choisie (Chorus Pro ou AFNOR PDP) **Destinations supportées :** - **Chorus Pro** : plateforme B2G française (factures vers secteur public) - **AFNOR PDP** : Plateformes de Dématérialisation Partenaires **Credentials de destination - 2 modes disponibles :** **Mode 1 - Récupération via JWT (recommandé) :** - Les credentials sont récupérés automatiquement via le `client_uid` du JWT - Ne pas fournir le champ `credentials` dans `destination` - Architecture 0-trust : aucun secret dans le payload - Exemple : `\"destination\": {\"type\": \"chorus_pro\"}` **Mode 2 - Credentials dans le payload :** - Fournir les credentials directement dans le payload - Utile pour tests ou intégrations tierces - Exemple : `\"destination\": {\"type\": \"chorus_pro\", \"credentials\": {...}}` **Signature électronique (optionnelle) - 2 modes disponibles :** **Mode 1 - Certificat stocké (recommandé) :** - Le certificat est récupéré automatiquement via le `client_uid` du JWT - Aucune clé à fournir dans le payload - Signature PAdES-B-LT avec horodatage (conforme eIDAS) - Exemple : `\"signature\": {\"raison\": \"Conformité Factur-X\"}` **Mode 2 - Clés dans le payload (pour tests) :** - Fournir `key_pem` et `cert_pem` directement - Format PEM accepté : brut ou base64 - Utile pour tests ou cas spéciaux sans certificat stocké - Exemple : `\"signature\": {\"key_pem\": \"-----BEGIN...\", \"cert_pem\": \"-----BEGIN...\"}` Si `key_pem` et `cert_pem` sont fournis → Mode 2 Sinon → Mode 1 (certificat récupéré via `client_uid`)
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'factpulse'
24
+ # setup authorization
25
+ FactPulse.configure do |config|
26
+ # Configure Bearer authorization: HTTPBearer
27
+ config.access_token = 'YOUR_BEARER_TOKEN'
28
+ end
29
+
30
+ api_instance = FactPulse::ProcessingEndpointsUnifisApi.new
31
+ soumettre_facture_complete_request = FactPulse::SoumettreFactureCompleteRequest.new({donnees_facture: FactPulse::DonneesFactureSimplifiees.new({numero: 'numero_example', emetteur: { key: 3.56}, destinataire: { key: 3.56}, lignes: [{ key: 3.56}]}), pdf_source: 'pdf_source_example', destination: FactPulse::DestinationAFNOR.new}) # SoumettreFactureCompleteRequest |
32
+
33
+ begin
34
+ # Soumettre une facture complète (génération + signature + soumission)
35
+ result = api_instance.soumettre_facture_complete_api_v1_traitement_factures_soumettre_complete_post(soumettre_facture_complete_request)
36
+ p result
37
+ rescue FactPulse::ApiError => e
38
+ puts "Error when calling ProcessingEndpointsUnifisApi->soumettre_facture_complete_api_v1_traitement_factures_soumettre_complete_post: #{e}"
39
+ end
40
+ ```
41
+
42
+ #### Using the soumettre_facture_complete_api_v1_traitement_factures_soumettre_complete_post_with_http_info variant
43
+
44
+ This returns an Array which contains the response data, status code and headers.
45
+
46
+ > <Array(<SoumettreFactureCompleteResponse>, Integer, Hash)> soumettre_facture_complete_api_v1_traitement_factures_soumettre_complete_post_with_http_info(soumettre_facture_complete_request)
47
+
48
+ ```ruby
49
+ begin
50
+ # Soumettre une facture complète (génération + signature + soumission)
51
+ data, status_code, headers = api_instance.soumettre_facture_complete_api_v1_traitement_factures_soumettre_complete_post_with_http_info(soumettre_facture_complete_request)
52
+ p status_code # => 2xx
53
+ p headers # => { ... }
54
+ p data # => <SoumettreFactureCompleteResponse>
55
+ rescue FactPulse::ApiError => e
56
+ puts "Error when calling ProcessingEndpointsUnifisApi->soumettre_facture_complete_api_v1_traitement_factures_soumettre_complete_post_with_http_info: #{e}"
57
+ end
58
+ ```
59
+
60
+ ### Parameters
61
+
62
+ | Name | Type | Description | Notes |
63
+ | ---- | ---- | ----------- | ----- |
64
+ | **soumettre_facture_complete_request** | [**SoumettreFactureCompleteRequest**](SoumettreFactureCompleteRequest.md) | | |
65
+
66
+ ### Return type
67
+
68
+ [**SoumettreFactureCompleteResponse**](SoumettreFactureCompleteResponse.md)
69
+
70
+ ### Authorization
71
+
72
+ [HTTPBearer](../README.md#HTTPBearer)
73
+
74
+ ### HTTP request headers
75
+
76
+ - **Content-Type**: application/json
77
+ - **Accept**: application/json
78
+
79
+
80
+ ## soumettre_facture_complete_async_api_v1_traitement_factures_soumettre_complete_async_post
81
+
82
+ > <ReponseTache> soumettre_facture_complete_async_api_v1_traitement_factures_soumettre_complete_async_post(soumettre_facture_complete_request)
83
+
84
+ Soumettre une facture complète (asynchrone avec Celery)
85
+
86
+ Version asynchrone de l'endpoint `/factures/soumettre-complete` utilisant Celery pour le traitement en arrière-plan. **Workflow automatisé (identique à la version synchrone) :** 1. **Auto-enrichissement** (optionnel) : récupère les données via APIs publiques et Chorus Pro/AFNOR 2. **Génération PDF Factur-X** : crée un PDF/A-3 avec XML embarqué 3. **Signature électronique** (optionnelle) : signe le PDF avec un certificat 4. **Soumission** : envoie vers la destination choisie (Chorus Pro ou AFNOR PDP) **Destinations supportées :** - **Chorus Pro** : plateforme B2G française (factures vers secteur public) - **AFNOR PDP** : Plateformes de Dématérialisation Partenaires **Différences avec la version synchrone :** - ✅ **Non-bloquant** : Retourne immédiatement un `id_tache` (HTTP 202 Accepted) - ✅ **Traitement en arrière-plan** : La facture est traitée par un worker Celery - ✅ **Suivi d'avancement** : Utilisez `/taches/{id_tache}/statut` pour suivre le statut - ✅ **Idéal pour gros volumes** : Permet de traiter de nombreuses factures en parallèle **Comment utiliser :** 1. **Soumission** : Appelez cet endpoint avec vos données de facture 2. **Retour immédiat** : Vous recevez un `id_tache` (ex: \"abc123-def456\") 3. **Suivi** : Appelez `/taches/{id_tache}/statut` pour vérifier l'avancement 4. **Résultat** : Quand `statut = \"SUCCESS\"`, le champ `resultat` contient la réponse complète **Credentials et signature** : Mêmes modes que la version synchrone (JWT ou payload).
87
+
88
+ ### Examples
89
+
90
+ ```ruby
91
+ require 'time'
92
+ require 'factpulse'
93
+ # setup authorization
94
+ FactPulse.configure do |config|
95
+ # Configure Bearer authorization: HTTPBearer
96
+ config.access_token = 'YOUR_BEARER_TOKEN'
97
+ end
98
+
99
+ api_instance = FactPulse::ProcessingEndpointsUnifisApi.new
100
+ soumettre_facture_complete_request = FactPulse::SoumettreFactureCompleteRequest.new({donnees_facture: FactPulse::DonneesFactureSimplifiees.new({numero: 'numero_example', emetteur: { key: 3.56}, destinataire: { key: 3.56}, lignes: [{ key: 3.56}]}), pdf_source: 'pdf_source_example', destination: FactPulse::DestinationAFNOR.new}) # SoumettreFactureCompleteRequest |
101
+
102
+ begin
103
+ # Soumettre une facture complète (asynchrone avec Celery)
104
+ result = api_instance.soumettre_facture_complete_async_api_v1_traitement_factures_soumettre_complete_async_post(soumettre_facture_complete_request)
105
+ p result
106
+ rescue FactPulse::ApiError => e
107
+ puts "Error when calling ProcessingEndpointsUnifisApi->soumettre_facture_complete_async_api_v1_traitement_factures_soumettre_complete_async_post: #{e}"
108
+ end
109
+ ```
110
+
111
+ #### Using the soumettre_facture_complete_async_api_v1_traitement_factures_soumettre_complete_async_post_with_http_info variant
112
+
113
+ This returns an Array which contains the response data, status code and headers.
114
+
115
+ > <Array(<ReponseTache>, Integer, Hash)> soumettre_facture_complete_async_api_v1_traitement_factures_soumettre_complete_async_post_with_http_info(soumettre_facture_complete_request)
116
+
117
+ ```ruby
118
+ begin
119
+ # Soumettre une facture complète (asynchrone avec Celery)
120
+ data, status_code, headers = api_instance.soumettre_facture_complete_async_api_v1_traitement_factures_soumettre_complete_async_post_with_http_info(soumettre_facture_complete_request)
121
+ p status_code # => 2xx
122
+ p headers # => { ... }
123
+ p data # => <ReponseTache>
124
+ rescue FactPulse::ApiError => e
125
+ puts "Error when calling ProcessingEndpointsUnifisApi->soumettre_facture_complete_async_api_v1_traitement_factures_soumettre_complete_async_post_with_http_info: #{e}"
126
+ end
127
+ ```
128
+
129
+ ### Parameters
130
+
131
+ | Name | Type | Description | Notes |
132
+ | ---- | ---- | ----------- | ----- |
133
+ | **soumettre_facture_complete_request** | [**SoumettreFactureCompleteRequest**](SoumettreFactureCompleteRequest.md) | | |
134
+
135
+ ### Return type
136
+
137
+ [**ReponseTache**](ReponseTache.md)
138
+
139
+ ### Authorization
140
+
141
+ [HTTPBearer](../README.md#HTTPBearer)
142
+
143
+ ### HTTP request headers
144
+
145
+ - **Content-Type**: application/json
146
+ - **Accept**: application/json
147
+
data/docs/ProfilAPI.md ADDED
@@ -0,0 +1,15 @@
1
+ # FactPulse::ProfilAPI
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'factpulse'
12
+
13
+ instance = FactPulse::ProfilAPI.new()
14
+ ```
15
+
@@ -0,0 +1,15 @@
1
+ # FactPulse::ProfilFlux
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'factpulse'
12
+
13
+ instance = FactPulse::ProfilFlux.new()
14
+ ```
15
+
data/docs/Quantite.md ADDED
@@ -0,0 +1,15 @@
1
+ # FactPulse::Quantite
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'factpulse'
12
+
13
+ instance = FactPulse::Quantite.new()
14
+ ```
15
+
data/docs/QuotaInfo.md ADDED
@@ -0,0 +1,26 @@
1
+ # FactPulse::QuotaInfo
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **limit** | **Integer** | | |
8
+ | **usage** | **Integer** | | |
9
+ | **remaining** | **Integer** | | |
10
+ | **reset_date** | **String** | | |
11
+ | **plan** | **String** | | |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'factpulse'
17
+
18
+ instance = FactPulse::QuotaInfo.new(
19
+ limit: null,
20
+ usage: null,
21
+ remaining: null,
22
+ reset_date: null,
23
+ plan: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,24 @@
1
+ # FactPulse::RechercherServicesResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code_retour** | **Integer** | | |
8
+ | **libelle** | **String** | | |
9
+ | **liste_services** | [**Array&lt;ServiceStructure&gt;**](ServiceStructure.md) | | [optional] |
10
+ | **total** | **Integer** | Nombre de services | [optional][default to 0] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'factpulse'
16
+
17
+ instance = FactPulse::RechercherServicesResponse.new(
18
+ code_retour: null,
19
+ libelle: null,
20
+ liste_services: null,
21
+ total: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,26 @@
1
+ # FactPulse::RechercherStructureRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **credentials** | [**ChorusProCredentials**](ChorusProCredentials.md) | | [optional] |
8
+ | **identifiant_structure** | **String** | | [optional] |
9
+ | **type_identifiant_structure** | **String** | | [optional] |
10
+ | **raison_sociale_structure** | **String** | | [optional] |
11
+ | **restreindre_structures_privees** | **Boolean** | Limiter la recherche aux structures privées uniquement | [optional][default to false] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'factpulse'
17
+
18
+ instance = FactPulse::RechercherStructureRequest.new(
19
+ credentials: null,
20
+ identifiant_structure: null,
21
+ type_identifiant_structure: null,
22
+ raison_sociale_structure: null,
23
+ restreindre_structures_privees: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,24 @@
1
+ # FactPulse::RechercherStructureResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code_retour** | **Integer** | Code retour (0 &#x3D; succès) | |
8
+ | **libelle** | **String** | Message de retour | |
9
+ | **liste_structures** | [**Array&lt;StructureInfo&gt;**](StructureInfo.md) | | [optional] |
10
+ | **total** | **Integer** | Nombre total de résultats | [optional][default to 0] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'factpulse'
16
+
17
+ instance = FactPulse::RechercherStructureResponse.new(
18
+ code_retour: null,
19
+ libelle: null,
20
+ liste_structures: null,
21
+ total: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,32 @@
1
+ # FactPulse::References
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **devise_facture** | **String** | | [optional][default to &#39;EUR&#39;] |
8
+ | **mode_paiement** | [**ModePaiement**](ModePaiement.md) | | |
9
+ | **type_facture** | [**TypeFacture**](TypeFacture.md) | | |
10
+ | **type_tva** | [**TypeTVA**](TypeTVA.md) | | |
11
+ | **numero_marche** | **String** | | [optional] |
12
+ | **motif_exoneration_tva** | **String** | | [optional] |
13
+ | **numero_bon_commande** | **String** | | [optional] |
14
+ | **numero_facture_origine** | **String** | | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'factpulse'
20
+
21
+ instance = FactPulse::References.new(
22
+ devise_facture: null,
23
+ mode_paiement: null,
24
+ type_facture: null,
25
+ type_tva: null,
26
+ numero_marche: null,
27
+ motif_exoneration_tva: null,
28
+ numero_bon_commande: null,
29
+ numero_facture_origine: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,22 @@
1
+ # FactPulse::ReponseHealthcheckAFNOR
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **flow_service_ok** | **Boolean** | État du Flow Service API | |
8
+ | **directory_service_ok** | **Boolean** | État du Directory Service API | |
9
+ | **message** | **String** | Message descriptif de l&#39;état | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'factpulse'
15
+
16
+ instance = FactPulse::ReponseHealthcheckAFNOR.new(
17
+ flow_service_ok: null,
18
+ directory_service_ok: null,
19
+ message: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,24 @@
1
+ # FactPulse::ReponseRechercheFlux
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **total** | **Integer** | Nombre total de résultats | |
8
+ | **offset** | **Integer** | Décalage appliqué | |
9
+ | **limit** | **Integer** | Limite de résultats | |
10
+ | **resultats** | [**Array&lt;FluxResume&gt;**](FluxResume.md) | Liste des flux trouvés | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'factpulse'
16
+
17
+ instance = FactPulse::ReponseRechercheFlux.new(
18
+ total: null,
19
+ offset: null,
20
+ limit: null,
21
+ resultats: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,30 @@
1
+ # FactPulse::ReponseSoumissionFlux
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **flow_id** | **String** | Identifiant unique du flux généré par la PDP | |
8
+ | **tracking_id** | **String** | | [optional] |
9
+ | **nom** | **String** | Nom du flux | |
10
+ | **syntaxe_flux** | **String** | Syntaxe du flux (CII, UBL, etc.) | |
11
+ | **profil_flux** | **String** | | [optional] |
12
+ | **sha256** | **String** | Hash SHA256 du fichier soumis | |
13
+ | **message** | **String** | Message de confirmation | |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'factpulse'
19
+
20
+ instance = FactPulse::ReponseSoumissionFlux.new(
21
+ flow_id: null,
22
+ tracking_id: null,
23
+ nom: null,
24
+ syntaxe_flux: null,
25
+ profil_flux: null,
26
+ sha256: null,
27
+ message: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,18 @@
1
+ # FactPulse::ReponseTache
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id_tache** | **String** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'factpulse'
13
+
14
+ instance = FactPulse::ReponseTache.new(
15
+ id_tache: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # FactPulse::ReponseValidationErreur
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **detail** | **Array&lt;String&gt;** | Liste des erreurs de validation détectées. | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'factpulse'
13
+
14
+ instance = FactPulse::ReponseValidationErreur.new(
15
+ detail: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # FactPulse::ReponseValidationSucces
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **message** | **String** | Message confirmant la conformité du XML. | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'factpulse'
13
+
14
+ instance = FactPulse::ReponseValidationSucces.new(
15
+ message: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,34 @@
1
+ # FactPulse::RequeteRechercheFlux
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **date_maj_apres** | **Time** | | [optional] |
8
+ | **date_maj_avant** | **Time** | | [optional] |
9
+ | **type_flux** | [**Array&lt;TypeFlux&gt;**](TypeFlux.md) | | [optional] |
10
+ | **direction_flux** | [**Array&lt;DirectionFlux&gt;**](DirectionFlux.md) | | [optional] |
11
+ | **tracking_id** | **String** | | [optional] |
12
+ | **flow_id** | **String** | | [optional] |
13
+ | **statut_acquittement** | [**StatutAcquittement**](StatutAcquittement.md) | | [optional] |
14
+ | **offset** | **Integer** | Décalage pour la pagination | [optional][default to 0] |
15
+ | **limit** | **Integer** | Nombre maximum de résultats (max 100) | [optional][default to 25] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'factpulse'
21
+
22
+ instance = FactPulse::RequeteRechercheFlux.new(
23
+ date_maj_apres: null,
24
+ date_maj_avant: null,
25
+ type_flux: null,
26
+ direction_flux: null,
27
+ tracking_id: null,
28
+ flow_id: null,
29
+ statut_acquittement: null,
30
+ offset: null,
31
+ limit: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,28 @@
1
+ # FactPulse::RequeteSoumissionFlux
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **nom_flux** | **String** | Nom du flux (ex: &#39;Facture 2025-001&#39;) | |
8
+ | **syntaxe_flux** | [**SyntaxeFlux**](SyntaxeFlux.md) | Syntaxe du flux (CII pour Factur-X) | [optional] |
9
+ | **profil_flux** | [**ProfilFlux**](ProfilFlux.md) | | [optional] |
10
+ | **tracking_id** | **String** | | [optional] |
11
+ | **request_id** | **String** | | [optional] |
12
+ | **pdp_credentials** | [**PDPCredentials**](PDPCredentials.md) | | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'factpulse'
18
+
19
+ instance = FactPulse::RequeteSoumissionFlux.new(
20
+ nom_flux: Facture 2025-001,
21
+ syntaxe_flux: null,
22
+ profil_flux: null,
23
+ tracking_id: null,
24
+ request_id: null,
25
+ pdp_credentials: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,26 @@
1
+ # FactPulse::ResultatAFNOR
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **flow_id** | **String** | Identifiant du flux soumis | |
8
+ | **tracking_id** | **String** | | [optional] |
9
+ | **sha256** | **String** | Hash SHA-256 du fichier soumis | |
10
+ | **flow_syntax** | **String** | Syntaxe du flux | |
11
+ | **flow_profile** | **String** | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'factpulse'
17
+
18
+ instance = FactPulse::ResultatAFNOR.new(
19
+ flow_id: null,
20
+ tracking_id: null,
21
+ sha256: null,
22
+ flow_syntax: null,
23
+ flow_profile: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,22 @@
1
+ # FactPulse::ResultatChorusPro
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **identifiant_facture_cpp** | **Integer** | ID Chorus Pro de la facture soumise | |
8
+ | **numero_flux_depot** | **String** | | [optional] |
9
+ | **piece_jointe_id** | **Integer** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'factpulse'
15
+
16
+ instance = FactPulse::ResultatChorusPro.new(
17
+ identifiant_facture_cpp: null,
18
+ numero_flux_depot: null,
19
+ piece_jointe_id: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,62 @@
1
+ # FactPulse::ResultatValidationPDFAPI
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **est_conforme** | **Boolean** | True si le PDF est conforme à tous les critères (XML, PDF/A, XMP) | |
8
+ | **xml_present** | **Boolean** | True si un XML Factur-X est embarqué dans le PDF | |
9
+ | **xml_conforme** | **Boolean** | True si le XML Factur-X est conforme aux règles Schematron | |
10
+ | **profil_detecte** | **String** | | [optional] |
11
+ | **erreurs_xml** | **Array&lt;String&gt;** | Liste des erreurs de validation XML | [optional] |
12
+ | **pdfa_conforme** | **Boolean** | True si le PDF est conforme PDF/A | |
13
+ | **version_pdfa** | **String** | | [optional] |
14
+ | **methode_validation_pdfa** | **String** | Méthode utilisée pour la validation PDF/A (metadata ou verapdf) | [optional][default to &#39;metadata&#39;] |
15
+ | **regles_validees** | **Integer** | | [optional] |
16
+ | **regles_echouees** | **Integer** | | [optional] |
17
+ | **erreurs_pdfa** | **Array&lt;String&gt;** | Liste des erreurs de conformité PDF/A | [optional] |
18
+ | **avertissements_pdfa** | **Array&lt;String&gt;** | Liste des avertissements PDF/A | [optional] |
19
+ | **xmp_present** | **Boolean** | True si des métadonnées XMP sont présentes | |
20
+ | **xmp_conforme_facturx** | **Boolean** | True si les métadonnées XMP contiennent des informations Factur-X | |
21
+ | **profil_xmp** | **String** | | [optional] |
22
+ | **version_xmp** | **String** | | [optional] |
23
+ | **erreurs_xmp** | **Array&lt;String&gt;** | Liste des erreurs de métadonnées XMP | [optional] |
24
+ | **metadonnees_xmp** | **Hash&lt;String, Object&gt;** | Métadonnées XMP extraites du PDF | [optional] |
25
+ | **est_signe** | **Boolean** | True si le PDF contient au moins une signature | |
26
+ | **nombre_signatures** | **Integer** | Nombre de signatures électroniques trouvées | [optional][default to 0] |
27
+ | **signatures** | [**Array&lt;InformationSignatureAPI&gt;**](InformationSignatureAPI.md) | Liste des signatures trouvées avec leurs informations | [optional] |
28
+ | **erreurs_signatures** | **Array&lt;String&gt;** | Liste des erreurs lors de l&#39;analyse des signatures | [optional] |
29
+ | **message_resume** | **String** | Message résumant le résultat de la validation | |
30
+
31
+ ## Example
32
+
33
+ ```ruby
34
+ require 'factpulse'
35
+
36
+ instance = FactPulse::ResultatValidationPDFAPI.new(
37
+ est_conforme: null,
38
+ xml_present: null,
39
+ xml_conforme: null,
40
+ profil_detecte: null,
41
+ erreurs_xml: null,
42
+ pdfa_conforme: null,
43
+ version_pdfa: null,
44
+ methode_validation_pdfa: null,
45
+ regles_validees: null,
46
+ regles_echouees: null,
47
+ erreurs_pdfa: null,
48
+ avertissements_pdfa: null,
49
+ xmp_present: null,
50
+ xmp_conforme_facturx: null,
51
+ profil_xmp: null,
52
+ version_xmp: null,
53
+ erreurs_xmp: null,
54
+ metadonnees_xmp: null,
55
+ est_signe: null,
56
+ nombre_signatures: null,
57
+ signatures: null,
58
+ erreurs_signatures: null,
59
+ message_resume: null
60
+ )
61
+ ```
62
+