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
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3ce0f1f2fe92c3fa54367c5becea06a2cc0f8a2235e14fdea09a8eb59fe3a336
4
+ data.tar.gz: 61180b0780bd01888e992885050450d294a5bedbf6ed7487ac18bcc59598a2ce
5
+ SHA512:
6
+ metadata.gz: 2b2513e2925b6a89191bdc6918c1ab3cd453eb9a672646f244a0688f425e9053efbd2b28187f8593c8a3586b31ab5ee4764112684b031955cfc7d10aee426036
7
+ data.tar.gz: 6c08603a0b953b86c18e2d9402bb4f93fa3fcafdc8e696c24fc94e8a4cd69dbc789f342f814770380320413682a5b25b62ee62c27365099c1b148e1a35cd2436
data/CHANGELOG.md ADDED
@@ -0,0 +1,28 @@
1
+ # Changelog
2
+
3
+ Toutes les modifications notables de ce projet seront documentées dans ce fichier.
4
+
5
+ Le format est basé sur [Keep a Changelog](https://keepachangelog.com/fr/1.0.0/),
6
+ et ce projet adhère au [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.0.8] - 2025-11-13
11
+
12
+ ### Added
13
+ - Version initiale du SDK ruby
14
+ - Support complet de l'API FactPulse v1.0.0
15
+ - Endpoints Factur-X (génération, validation)
16
+ - Endpoints AFNOR PDP/PA (Flow Service, Directory Service)
17
+ - Endpoints Chorus Pro (recherche entreprise, soumission factures)
18
+ - Endpoints Signature électronique (PAdES-B-B, PAdES-B-T, PAdES-B-LT)
19
+ - Support des deux modes d'authentification (stored credentials et zero-trust)
20
+ - Documentation complète et exemples
21
+
22
+ ### Documentation
23
+ - README.md avec quickstart et exemples
24
+ - Guide d'authentification JWT
25
+ - Configuration avancée (timeout, proxy, debug)
26
+
27
+ [Unreleased]: https://github.com/factpulse/sdk-ruby/compare/v1.0.8...HEAD
28
+ [1.0.8]: https://github.com/factpulse/sdk-ruby/releases/tag/v1.0.8
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,74 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ factpulse (1.0.8)
5
+ typhoeus (~> 1.0, >= 1.0.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.3)
11
+ byebug (11.1.3)
12
+ coderay (1.1.3)
13
+ date (3.5.0)
14
+ diff-lcs (1.6.2)
15
+ ethon (0.15.0)
16
+ ffi (>= 1.15.0)
17
+ ffi (1.17.2)
18
+ jaro_winkler (1.5.6)
19
+ method_source (1.1.0)
20
+ parallel (1.27.0)
21
+ parser (3.3.10.0)
22
+ ast (~> 2.4.1)
23
+ racc
24
+ pry (0.14.2)
25
+ coderay (~> 1.1)
26
+ method_source (~> 1.0)
27
+ pry-byebug (3.10.1)
28
+ byebug (~> 11.0)
29
+ pry (>= 0.13, < 0.15)
30
+ psych (5.2.6)
31
+ date
32
+ stringio
33
+ racc (1.8.1)
34
+ rainbow (3.1.1)
35
+ rake (13.0.6)
36
+ rspec (3.13.2)
37
+ rspec-core (~> 3.13.0)
38
+ rspec-expectations (~> 3.13.0)
39
+ rspec-mocks (~> 3.13.0)
40
+ rspec-core (3.13.6)
41
+ rspec-support (~> 3.13.0)
42
+ rspec-expectations (3.13.5)
43
+ diff-lcs (>= 1.2.0, < 2.0)
44
+ rspec-support (~> 3.13.0)
45
+ rspec-mocks (3.13.7)
46
+ diff-lcs (>= 1.2.0, < 2.0)
47
+ rspec-support (~> 3.13.0)
48
+ rspec-support (3.13.6)
49
+ rubocop (0.66.0)
50
+ jaro_winkler (~> 1.5.1)
51
+ parallel (~> 1.10)
52
+ parser (>= 2.5, != 2.5.1.1)
53
+ psych (>= 3.1.0)
54
+ rainbow (>= 2.2.2, < 4.0)
55
+ ruby-progressbar (~> 1.7)
56
+ unicode-display_width (>= 1.4.0, < 1.6)
57
+ ruby-progressbar (1.13.0)
58
+ stringio (3.1.8)
59
+ typhoeus (1.5.0)
60
+ ethon (>= 0.9.0, < 0.16.0)
61
+ unicode-display_width (1.5.0)
62
+
63
+ PLATFORMS
64
+ x86_64-linux
65
+
66
+ DEPENDENCIES
67
+ factpulse!
68
+ pry-byebug
69
+ rake (~> 13.0.1)
70
+ rspec (~> 3.6, >= 3.6.0)
71
+ rubocop (~> 0.66.0)
72
+
73
+ BUNDLED WITH
74
+ 2.2.33
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 FactPulse
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,161 @@
1
+ # FactPulse SDK Ruby
2
+
3
+ Client Ruby officiel pour l'API FactPulse - Facturation électronique française.
4
+
5
+ ## 🎯 Fonctionnalités
6
+
7
+ - **Factur-X** : Génération et validation de factures électroniques (profils MINIMUM, BASIC, EN16931, EXTENDED)
8
+ - **Chorus Pro** : Intégration avec la plateforme de facturation publique française
9
+ - **AFNOR PDP/PA** : Soumission de flux conformes à la norme XP Z12-013
10
+ - **Signature électronique** : Signature PDF (PAdES-B-B, PAdES-B-T, PAdES-B-LT)
11
+ - **Traitement asynchrone** : Support Celery pour opérations longues
12
+ - **Ruby 2.7+** : Compatible avec les versions modernes de Ruby
13
+
14
+ ## 🚀 Installation
15
+
16
+ ```bash
17
+ gem install factpulse
18
+ ```
19
+
20
+ Ou dans votre Gemfile :
21
+
22
+ ```ruby
23
+ gem 'factpulse'
24
+ ```
25
+
26
+ ## 📖 Démarrage rapide
27
+
28
+ ### 1. Authentification
29
+
30
+ ```ruby
31
+ require 'factpulse'
32
+
33
+ # Configuration du client
34
+ FactPulse.configure do |config|
35
+ config.host = 'https://factpulse.fr/api/facturation'
36
+ config.access_token = 'votre_token_jwt'
37
+ end
38
+
39
+ api_instance = FactPulse::TraitementFactureApi.new
40
+ ```
41
+
42
+ ### 2. Générer une facture Factur-X
43
+
44
+ ```ruby
45
+ require 'json'
46
+
47
+ # Données de la facture
48
+ facture_data = {
49
+ numero_facture: "FAC-2025-001",
50
+ date_facture: "2025-01-15",
51
+ montant_total_ht: "1000.00",
52
+ montant_total_ttc: "1200.00",
53
+ fournisseur: {
54
+ nom: "Mon Entreprise SAS",
55
+ siret: "12345678901234",
56
+ adresse_postale: {
57
+ ligne_un: "123 Rue Example",
58
+ code_postal: "75001",
59
+ nom_ville: "Paris",
60
+ pays_code_iso: "FR"
61
+ }
62
+ },
63
+ destinataire: {
64
+ nom: "Client SARL",
65
+ siret: "98765432109876",
66
+ adresse_postale: {
67
+ ligne_un: "456 Avenue Test",
68
+ code_postal: "69001",
69
+ nom_ville: "Lyon",
70
+ pays_code_iso: "FR"
71
+ }
72
+ },
73
+ lignes_de_poste: [{
74
+ numero: 1,
75
+ denomination: "Prestation de conseil",
76
+ quantite: "10.00",
77
+ montant_unitaire_ht: "100.00",
78
+ montant_ligne_ht: "1000.00"
79
+ }]
80
+ }
81
+
82
+ # Générer le PDF Factur-X
83
+ pdf_bytes = api_instance.generer_facture_api_v1_traitement_generer_facture_post(
84
+ facture_data.to_json,
85
+ 'EN16931',
86
+ 'pdf'
87
+ )
88
+
89
+ # Sauvegarder
90
+ File.open('facture.pdf', 'wb') { |f| f.write(pdf_bytes) }
91
+ ```
92
+
93
+ ### 3. Soumettre une facture complète (Chorus Pro / AFNOR PDP)
94
+
95
+ ```ruby
96
+ response = api_instance.soumettre_facture_complete_api_v1_traitement_factures_soumettre_complete_post({
97
+ facture: facture_data,
98
+ destination: {
99
+ type: "chorus_pro",
100
+ credentials: {
101
+ login: "votre_login_chorus",
102
+ password: "votre_password_chorus"
103
+ }
104
+ }
105
+ })
106
+
107
+ puts "Facture soumise : #{response.id_facture_chorus}"
108
+ ```
109
+
110
+ ## 🔑 Obtention du token JWT
111
+
112
+ ### Via l'API
113
+
114
+ ```ruby
115
+ require 'net/http'
116
+ require 'json'
117
+ require 'uri'
118
+
119
+ uri = URI('https://factpulse.fr/api/token/')
120
+ http = Net::HTTP.new(uri.host, uri.port)
121
+ http.use_ssl = true
122
+
123
+ request = Net::HTTP::Post.new(uri.path, {'Content-Type' => 'application/json'})
124
+ request.body = {
125
+ username: 'votre_email@example.com',
126
+ password: 'votre_mot_de_passe'
127
+ }.to_json
128
+
129
+ response = http.request(request)
130
+ result = JSON.parse(response.body)
131
+ token = result['access']
132
+ ```
133
+
134
+ **Accès aux credentials d'un client spécifique :**
135
+
136
+ Si vous gérez plusieurs clients et souhaitez accéder aux credentials (Chorus Pro, AFNOR PDP) d'un client particulier, ajoutez le champ `client_uid` :
137
+
138
+ ```ruby
139
+ request.body = {
140
+ username: 'votre_email@example.com',
141
+ password: 'votre_mot_de_passe',
142
+ client_uid: 'identifiant_client' # UID du client cible
143
+ }.to_json
144
+ ```
145
+
146
+ ### Via le Dashboard
147
+
148
+ 1. Connectez-vous sur https://factpulse.fr/api/dashboard/
149
+ 2. Générez un token API
150
+ 3. Copiez et utilisez le token dans votre configuration
151
+
152
+ ## 📚 Ressources
153
+
154
+ - **Documentation API** : https://factpulse.fr/api/facturation/documentation
155
+ - **Code source** : https://github.com/factpulse/sdk-ruby
156
+ - **Issues** : https://github.com/factpulse/sdk-ruby/issues
157
+ - **Support** : contact@factpulse.fr
158
+
159
+ ## 📄 Licence
160
+
161
+ MIT License - Copyright (c) 2025 FactPulse
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
@@ -0,0 +1,69 @@
1
+ # FactPulse::AFNORPDPPAApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**oauth_token_proxy_api_v1_afnor_oauth_token_post**](AFNORPDPPAApi.md#oauth_token_proxy_api_v1_afnor_oauth_token_post) | **POST** /api/v1/afnor/oauth/token | Endpoint OAuth2 pour authentification AFNOR |
8
+
9
+
10
+ ## oauth_token_proxy_api_v1_afnor_oauth_token_post
11
+
12
+ > Object oauth_token_proxy_api_v1_afnor_oauth_token_post
13
+
14
+ Endpoint OAuth2 pour authentification AFNOR
15
+
16
+ Endpoint proxy OAuth2 pour obtenir un token d'accès AFNOR. Fait proxy vers le mock AFNOR (sandbox) ou la vraie PDP selon MOCK_AFNOR_BASE_URL. Cet endpoint est public (pas d'auth Django requise) car il est appelé par le SDK AFNOR.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'factpulse'
23
+
24
+ api_instance = FactPulse::AFNORPDPPAApi.new
25
+
26
+ begin
27
+ # Endpoint OAuth2 pour authentification AFNOR
28
+ result = api_instance.oauth_token_proxy_api_v1_afnor_oauth_token_post
29
+ p result
30
+ rescue FactPulse::ApiError => e
31
+ puts "Error when calling AFNORPDPPAApi->oauth_token_proxy_api_v1_afnor_oauth_token_post: #{e}"
32
+ end
33
+ ```
34
+
35
+ #### Using the oauth_token_proxy_api_v1_afnor_oauth_token_post_with_http_info variant
36
+
37
+ This returns an Array which contains the response data, status code and headers.
38
+
39
+ > <Array(Object, Integer, Hash)> oauth_token_proxy_api_v1_afnor_oauth_token_post_with_http_info
40
+
41
+ ```ruby
42
+ begin
43
+ # Endpoint OAuth2 pour authentification AFNOR
44
+ data, status_code, headers = api_instance.oauth_token_proxy_api_v1_afnor_oauth_token_post_with_http_info
45
+ p status_code # => 2xx
46
+ p headers # => { ... }
47
+ p data # => Object
48
+ rescue FactPulse::ApiError => e
49
+ puts "Error when calling AFNORPDPPAApi->oauth_token_proxy_api_v1_afnor_oauth_token_post_with_http_info: #{e}"
50
+ end
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+ This endpoint does not need any parameter.
56
+
57
+ ### Return type
58
+
59
+ **Object**
60
+
61
+ ### Authorization
62
+
63
+ No authorization required
64
+
65
+ ### HTTP request headers
66
+
67
+ - **Content-Type**: Not defined
68
+ - **Accept**: application/json
69
+
@@ -0,0 +1,196 @@
1
+ # FactPulse::AFNORPDPPADirectoryServiceApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get**](AFNORPDPPADirectoryServiceApi.md#directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get) | **GET** /api/v1/afnor/directory/v1/healthcheck | Healthcheck Directory Service |
8
+ | [**get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get**](AFNORPDPPADirectoryServiceApi.md#get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get) | **GET** /api/v1/afnor/directory/v1/companies/{siren} | Récupérer une entreprise |
9
+ | [**search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post**](AFNORPDPPADirectoryServiceApi.md#search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post) | **POST** /api/v1/afnor/directory/v1/companies/search | Rechercher des entreprises |
10
+
11
+
12
+ ## directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get
13
+
14
+ > Object directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get
15
+
16
+ Healthcheck Directory Service
17
+
18
+ Vérifier la disponibilité du Directory Service
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'factpulse'
25
+
26
+ api_instance = FactPulse::AFNORPDPPADirectoryServiceApi.new
27
+
28
+ begin
29
+ # Healthcheck Directory Service
30
+ result = api_instance.directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get
31
+ p result
32
+ rescue FactPulse::ApiError => e
33
+ puts "Error when calling AFNORPDPPADirectoryServiceApi->directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get: #{e}"
34
+ end
35
+ ```
36
+
37
+ #### Using the directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get_with_http_info variant
38
+
39
+ This returns an Array which contains the response data, status code and headers.
40
+
41
+ > <Array(Object, Integer, Hash)> directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get_with_http_info
42
+
43
+ ```ruby
44
+ begin
45
+ # Healthcheck Directory Service
46
+ data, status_code, headers = api_instance.directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get_with_http_info
47
+ p status_code # => 2xx
48
+ p headers # => { ... }
49
+ p data # => Object
50
+ rescue FactPulse::ApiError => e
51
+ puts "Error when calling AFNORPDPPADirectoryServiceApi->directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get_with_http_info: #{e}"
52
+ end
53
+ ```
54
+
55
+ ### Parameters
56
+
57
+ This endpoint does not need any parameter.
58
+
59
+ ### Return type
60
+
61
+ **Object**
62
+
63
+ ### Authorization
64
+
65
+ No authorization required
66
+
67
+ ### HTTP request headers
68
+
69
+ - **Content-Type**: Not defined
70
+ - **Accept**: application/json
71
+
72
+
73
+ ## get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get
74
+
75
+ > Object get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get(siren)
76
+
77
+ Récupérer une entreprise
78
+
79
+ Récupérer les informations d'une entreprise par son SIREN
80
+
81
+ ### Examples
82
+
83
+ ```ruby
84
+ require 'time'
85
+ require 'factpulse'
86
+
87
+ api_instance = FactPulse::AFNORPDPPADirectoryServiceApi.new
88
+ siren = 'siren_example' # String |
89
+
90
+ begin
91
+ # Récupérer une entreprise
92
+ result = api_instance.get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get(siren)
93
+ p result
94
+ rescue FactPulse::ApiError => e
95
+ puts "Error when calling AFNORPDPPADirectoryServiceApi->get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get: #{e}"
96
+ end
97
+ ```
98
+
99
+ #### Using the get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get_with_http_info variant
100
+
101
+ This returns an Array which contains the response data, status code and headers.
102
+
103
+ > <Array(Object, Integer, Hash)> get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get_with_http_info(siren)
104
+
105
+ ```ruby
106
+ begin
107
+ # Récupérer une entreprise
108
+ data, status_code, headers = api_instance.get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get_with_http_info(siren)
109
+ p status_code # => 2xx
110
+ p headers # => { ... }
111
+ p data # => Object
112
+ rescue FactPulse::ApiError => e
113
+ puts "Error when calling AFNORPDPPADirectoryServiceApi->get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get_with_http_info: #{e}"
114
+ end
115
+ ```
116
+
117
+ ### Parameters
118
+
119
+ | Name | Type | Description | Notes |
120
+ | ---- | ---- | ----------- | ----- |
121
+ | **siren** | **String** | | |
122
+
123
+ ### Return type
124
+
125
+ **Object**
126
+
127
+ ### Authorization
128
+
129
+ No authorization required
130
+
131
+ ### HTTP request headers
132
+
133
+ - **Content-Type**: Not defined
134
+ - **Accept**: application/json
135
+
136
+
137
+ ## search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post
138
+
139
+ > Object search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post
140
+
141
+ Rechercher des entreprises
142
+
143
+ Rechercher des entreprises dans l'annuaire AFNOR
144
+
145
+ ### Examples
146
+
147
+ ```ruby
148
+ require 'time'
149
+ require 'factpulse'
150
+
151
+ api_instance = FactPulse::AFNORPDPPADirectoryServiceApi.new
152
+
153
+ begin
154
+ # Rechercher des entreprises
155
+ result = api_instance.search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post
156
+ p result
157
+ rescue FactPulse::ApiError => e
158
+ puts "Error when calling AFNORPDPPADirectoryServiceApi->search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post: #{e}"
159
+ end
160
+ ```
161
+
162
+ #### Using the search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post_with_http_info variant
163
+
164
+ This returns an Array which contains the response data, status code and headers.
165
+
166
+ > <Array(Object, Integer, Hash)> search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post_with_http_info
167
+
168
+ ```ruby
169
+ begin
170
+ # Rechercher des entreprises
171
+ data, status_code, headers = api_instance.search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post_with_http_info
172
+ p status_code # => 2xx
173
+ p headers # => { ... }
174
+ p data # => Object
175
+ rescue FactPulse::ApiError => e
176
+ puts "Error when calling AFNORPDPPADirectoryServiceApi->search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post_with_http_info: #{e}"
177
+ end
178
+ ```
179
+
180
+ ### Parameters
181
+
182
+ This endpoint does not need any parameter.
183
+
184
+ ### Return type
185
+
186
+ **Object**
187
+
188
+ ### Authorization
189
+
190
+ No authorization required
191
+
192
+ ### HTTP request headers
193
+
194
+ - **Content-Type**: Not defined
195
+ - **Accept**: application/json
196
+