factpulse 2.0.4 → 2.0.5

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 (137) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -3
  3. data/Gemfile.lock +1 -1
  4. data/factpulse.gemspec +2 -2
  5. data/lib/factpulse/api/afnorpdppa_api.rb +1 -1
  6. data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +1 -1
  7. data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +1 -1
  8. data/lib/factpulse/api/chorus_pro_api.rb +1 -1
  9. data/lib/factpulse/api/sant_api.rb +1 -1
  10. data/lib/factpulse/api/traitement_facture_api.rb +1 -1
  11. data/lib/factpulse/api/utilisateur_api.rb +1 -1
  12. data/lib/factpulse/api_client.rb +1 -1
  13. data/lib/factpulse/api_error.rb +1 -1
  14. data/lib/factpulse/api_model_base.rb +1 -1
  15. data/lib/factpulse/configuration.rb +1 -1
  16. data/lib/factpulse/models/adresse_electronique.rb +1 -1
  17. data/lib/factpulse/models/adresse_postale.rb +1 -1
  18. data/lib/factpulse/models/body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post.rb +1 -1
  19. data/lib/factpulse/models/body_completer_facture_api_v1_chorus_pro_factures_completer_post.rb +1 -1
  20. data/lib/factpulse/models/body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get.rb +1 -1
  21. data/lib/factpulse/models/body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post.rb +1 -1
  22. data/lib/factpulse/models/body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post.rb +1 -1
  23. data/lib/factpulse/models/body_recycler_facture_api_v1_chorus_pro_factures_recycler_post.rb +1 -1
  24. data/lib/factpulse/models/body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post.rb +1 -1
  25. data/lib/factpulse/models/body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post.rb +1 -1
  26. data/lib/factpulse/models/body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post.rb +1 -1
  27. data/lib/factpulse/models/body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post.rb +1 -1
  28. data/lib/factpulse/models/body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post.rb +1 -1
  29. data/lib/factpulse/models/cadre_de_facturation.rb +1 -1
  30. data/lib/factpulse/models/categorie_tva.rb +11 -11
  31. data/lib/factpulse/models/certificate_info_response.rb +1 -1
  32. data/lib/factpulse/models/chorus_pro_credentials.rb +1 -1
  33. data/lib/factpulse/models/code_cadre_facturation.rb +1 -1
  34. data/lib/factpulse/models/code_raison_reduction.rb +9 -9
  35. data/lib/factpulse/models/consulter_facture_request.rb +1 -1
  36. data/lib/factpulse/models/consulter_facture_response.rb +1 -1
  37. data/lib/factpulse/models/consulter_structure_request.rb +1 -1
  38. data/lib/factpulse/models/consulter_structure_response.rb +1 -1
  39. data/lib/factpulse/models/credentials_afnor.rb +1 -1
  40. data/lib/factpulse/models/credentials_chorus_pro.rb +1 -1
  41. data/lib/factpulse/models/destinataire.rb +1 -1
  42. data/lib/factpulse/models/destination.rb +1 -1
  43. data/lib/factpulse/models/destination_afnor.rb +1 -1
  44. data/lib/factpulse/models/destination_chorus_pro.rb +1 -1
  45. data/lib/factpulse/models/donnees_facture_simplifiees.rb +1 -1
  46. data/lib/factpulse/models/facture_enrichie_info_input.rb +1 -1
  47. data/lib/factpulse/models/facture_enrichie_info_output.rb +1 -1
  48. data/lib/factpulse/models/facture_factur_x.rb +1 -1
  49. data/lib/factpulse/models/format_sortie.rb +1 -1
  50. data/lib/factpulse/models/fournisseur.rb +1 -1
  51. data/lib/factpulse/models/generate_certificate_request.rb +1 -1
  52. data/lib/factpulse/models/generate_certificate_response.rb +1 -1
  53. data/lib/factpulse/models/http_validation_error.rb +1 -1
  54. data/lib/factpulse/models/information_signature_api.rb +1 -1
  55. data/lib/factpulse/models/ligne_de_poste.rb +1 -1
  56. data/lib/factpulse/models/ligne_de_poste_montant_remise_ht.rb +1 -1
  57. data/lib/factpulse/models/ligne_de_poste_taux_tva_manuel.rb +1 -1
  58. data/lib/factpulse/models/ligne_de_tva.rb +1 -1
  59. data/lib/factpulse/models/mode_depot.rb +1 -1
  60. data/lib/factpulse/models/mode_paiement.rb +1 -1
  61. data/lib/factpulse/models/montant_a_payer.rb +1 -1
  62. data/lib/factpulse/models/montant_base_ht.rb +1 -1
  63. data/lib/factpulse/models/montant_ht_total.rb +1 -1
  64. data/lib/factpulse/models/montant_ht_total1.rb +1 -1
  65. data/lib/factpulse/models/montant_remise_globale_ttc.rb +1 -1
  66. data/lib/factpulse/models/montant_total.rb +1 -1
  67. data/lib/factpulse/models/montant_total_acompte.rb +1 -1
  68. data/lib/factpulse/models/montant_total_ligne_ht.rb +1 -1
  69. data/lib/factpulse/models/montant_ttc_total.rb +1 -1
  70. data/lib/factpulse/models/montant_ttc_total1.rb +1 -1
  71. data/lib/factpulse/models/montant_tva.rb +1 -1
  72. data/lib/factpulse/models/montant_tva1.rb +1 -1
  73. data/lib/factpulse/models/montant_unitaire_ht.rb +1 -1
  74. data/lib/factpulse/models/obtenir_id_chorus_pro_request.rb +1 -1
  75. data/lib/factpulse/models/obtenir_id_chorus_pro_response.rb +1 -1
  76. data/lib/factpulse/models/options_processing.rb +1 -1
  77. data/lib/factpulse/models/parametres_signature.rb +1 -1
  78. data/lib/factpulse/models/parametres_structure.rb +1 -1
  79. data/lib/factpulse/models/pdf_factur_x_info.rb +1 -1
  80. data/lib/factpulse/models/piece_jointe_complementaire.rb +1 -1
  81. data/lib/factpulse/models/profil_api.rb +1 -1
  82. data/lib/factpulse/models/quantite.rb +1 -1
  83. data/lib/factpulse/models/quota_info.rb +1 -1
  84. data/lib/factpulse/models/rechercher_services_response.rb +1 -1
  85. data/lib/factpulse/models/rechercher_structure_request.rb +1 -1
  86. data/lib/factpulse/models/rechercher_structure_response.rb +1 -1
  87. data/lib/factpulse/models/references.rb +1 -1
  88. data/lib/factpulse/models/reponse_tache.rb +1 -1
  89. data/lib/factpulse/models/reponse_validation_erreur.rb +1 -1
  90. data/lib/factpulse/models/reponse_validation_succes.rb +1 -1
  91. data/lib/factpulse/models/resultat_afnor.rb +1 -1
  92. data/lib/factpulse/models/resultat_chorus_pro.rb +1 -1
  93. data/lib/factpulse/models/resultat_validation_pdfapi.rb +1 -1
  94. data/lib/factpulse/models/scheme_id.rb +7 -7
  95. data/lib/factpulse/models/service_structure.rb +1 -1
  96. data/lib/factpulse/models/signature_info.rb +1 -1
  97. data/lib/factpulse/models/soumettre_facture_complete_request.rb +1 -1
  98. data/lib/factpulse/models/soumettre_facture_complete_response.rb +1 -1
  99. data/lib/factpulse/models/soumettre_facture_request.rb +1 -1
  100. data/lib/factpulse/models/soumettre_facture_response.rb +1 -1
  101. data/lib/factpulse/models/statut_facture.rb +1 -1
  102. data/lib/factpulse/models/statut_tache.rb +1 -1
  103. data/lib/factpulse/models/structure_info.rb +1 -1
  104. data/lib/factpulse/models/tauxmanuel.rb +1 -1
  105. data/lib/factpulse/models/type_facture.rb +1 -1
  106. data/lib/factpulse/models/type_tva.rb +1 -1
  107. data/lib/factpulse/models/unite.rb +1 -1
  108. data/lib/factpulse/models/utilisateur.rb +1 -1
  109. data/lib/factpulse/models/validation_error.rb +1 -1
  110. data/lib/factpulse/models/validation_error_loc_inner.rb +1 -1
  111. data/lib/factpulse/version.rb +2 -2
  112. data/lib/factpulse.rb +1 -13
  113. metadata +11 -27
  114. data/docs/DirectionFlux.md +0 -15
  115. data/docs/FluxResume.md +0 -32
  116. data/docs/PDPCredentials.md +0 -26
  117. data/docs/ProfilFlux.md +0 -15
  118. data/docs/ReponseHealthcheckAFNOR.md +0 -22
  119. data/docs/ReponseRechercheFlux.md +0 -24
  120. data/docs/ReponseSoumissionFlux.md +0 -30
  121. data/docs/RequeteRechercheFlux.md +0 -34
  122. data/docs/RequeteSoumissionFlux.md +0 -28
  123. data/docs/StatutAcquittement.md +0 -15
  124. data/docs/SyntaxeFlux.md +0 -15
  125. data/docs/TypeFlux.md +0 -15
  126. data/lib/factpulse/models/direction_flux.rb +0 -40
  127. data/lib/factpulse/models/flux_resume.rb +0 -251
  128. data/lib/factpulse/models/pdp_credentials.rb +0 -257
  129. data/lib/factpulse/models/profil_flux.rb +0 -41
  130. data/lib/factpulse/models/reponse_healthcheck_afnor.rb +0 -220
  131. data/lib/factpulse/models/reponse_recherche_flux.rb +0 -249
  132. data/lib/factpulse/models/reponse_soumission_flux.rb +0 -294
  133. data/lib/factpulse/models/requete_recherche_flux.rb +0 -306
  134. data/lib/factpulse/models/requete_soumission_flux.rb +0 -238
  135. data/lib/factpulse/models/statut_acquittement.rb +0 -41
  136. data/lib/factpulse/models/syntaxe_flux.rb +0 -43
  137. data/lib/factpulse/models/type_flux.rb +0 -43
@@ -1,28 +0,0 @@
1
- # FactPulse::RequeteSoumissionFlux
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **nom_flux** | **String** | Nom du flux (ex: 'Facture 2025-001') | |
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
-
@@ -1,15 +0,0 @@
1
- # FactPulse::StatutAcquittement
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
-
8
- ## Example
9
-
10
- ```ruby
11
- require 'factpulse'
12
-
13
- instance = FactPulse::StatutAcquittement.new()
14
- ```
15
-
data/docs/SyntaxeFlux.md DELETED
@@ -1,15 +0,0 @@
1
- # FactPulse::SyntaxeFlux
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
-
8
- ## Example
9
-
10
- ```ruby
11
- require 'factpulse'
12
-
13
- instance = FactPulse::SyntaxeFlux.new()
14
- ```
15
-
data/docs/TypeFlux.md DELETED
@@ -1,15 +0,0 @@
1
- # FactPulse::TypeFlux
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
-
8
- ## Example
9
-
10
- ```ruby
11
- require 'factpulse'
12
-
13
- instance = FactPulse::TypeFlux.new()
14
- ```
15
-
@@ -1,40 +0,0 @@
1
- =begin
2
- #API REST FactPulse
3
-
4
- # API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }' ``` **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l'accès - ✅ Intégration facile dans n'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l'automatisation ### 📚 Documentation complète Pour plus d'informations sur l'authentification et l'utilisation de l'API : https://www.factpulse.fr/documentation-api/
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module FactPulse
17
- class DirectionFlux
18
- IN = "In".freeze
19
- OUT = "Out".freeze
20
-
21
- def self.all_vars
22
- @all_vars ||= [IN, OUT].freeze
23
- end
24
-
25
- # Builds the enum from string
26
- # @param [String] The enum value in the form of the string
27
- # @return [String] The enum value
28
- def self.build_from_hash(value)
29
- new.build_from_hash(value)
30
- end
31
-
32
- # Builds the enum from string
33
- # @param [String] The enum value in the form of the string
34
- # @return [String] The enum value
35
- def build_from_hash(value)
36
- return value if DirectionFlux.all_vars.include?(value)
37
- raise "Invalid ENUM value #{value} for class #DirectionFlux"
38
- end
39
- end
40
- end
@@ -1,251 +0,0 @@
1
- =begin
2
- #API REST FactPulse
3
-
4
- # API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }' ``` **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l'accès - ✅ Intégration facile dans n'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l'automatisation ### 📚 Documentation complète Pour plus d'informations sur l'authentification et l'utilisation de l'API : https://www.factpulse.fr/documentation-api/
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module FactPulse
17
- # Résumé d'un flux dans les résultats de recherche
18
- class FluxResume < ApiModelBase
19
- attr_accessor :flow_id
20
-
21
- attr_accessor :tracking_id
22
-
23
- attr_accessor :nom
24
-
25
- attr_accessor :type_flux
26
-
27
- attr_accessor :direction_flux
28
-
29
- attr_accessor :statut_acquittement
30
-
31
- attr_accessor :date_creation
32
-
33
- attr_accessor :date_maj
34
-
35
- # Attribute mapping from ruby-style variable name to JSON key.
36
- def self.attribute_map
37
- {
38
- :'flow_id' => :'flow_id',
39
- :'tracking_id' => :'tracking_id',
40
- :'nom' => :'nom',
41
- :'type_flux' => :'type_flux',
42
- :'direction_flux' => :'direction_flux',
43
- :'statut_acquittement' => :'statut_acquittement',
44
- :'date_creation' => :'date_creation',
45
- :'date_maj' => :'date_maj'
46
- }
47
- end
48
-
49
- # Returns attribute mapping this model knows about
50
- def self.acceptable_attribute_map
51
- attribute_map
52
- end
53
-
54
- # Returns all the JSON keys this model knows about
55
- def self.acceptable_attributes
56
- acceptable_attribute_map.values
57
- end
58
-
59
- # Attribute type mapping.
60
- def self.openapi_types
61
- {
62
- :'flow_id' => :'String',
63
- :'tracking_id' => :'String',
64
- :'nom' => :'String',
65
- :'type_flux' => :'String',
66
- :'direction_flux' => :'String',
67
- :'statut_acquittement' => :'String',
68
- :'date_creation' => :'String',
69
- :'date_maj' => :'String'
70
- }
71
- end
72
-
73
- # List of attributes with nullable: true
74
- def self.openapi_nullable
75
- Set.new([
76
- :'tracking_id',
77
- :'type_flux',
78
- :'direction_flux',
79
- :'statut_acquittement',
80
- :'date_creation',
81
- :'date_maj'
82
- ])
83
- end
84
-
85
- # Initializes the object
86
- # @param [Hash] attributes Model attributes in the form of hash
87
- def initialize(attributes = {})
88
- if (!attributes.is_a?(Hash))
89
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::FluxResume` initialize method"
90
- end
91
-
92
- # check to see if the attribute exists and convert string to symbol for hash key
93
- acceptable_attribute_map = self.class.acceptable_attribute_map
94
- attributes = attributes.each_with_object({}) { |(k, v), h|
95
- if (!acceptable_attribute_map.key?(k.to_sym))
96
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::FluxResume`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
97
- end
98
- h[k.to_sym] = v
99
- }
100
-
101
- if attributes.key?(:'flow_id')
102
- self.flow_id = attributes[:'flow_id']
103
- else
104
- self.flow_id = nil
105
- end
106
-
107
- if attributes.key?(:'tracking_id')
108
- self.tracking_id = attributes[:'tracking_id']
109
- end
110
-
111
- if attributes.key?(:'nom')
112
- self.nom = attributes[:'nom']
113
- else
114
- self.nom = nil
115
- end
116
-
117
- if attributes.key?(:'type_flux')
118
- self.type_flux = attributes[:'type_flux']
119
- end
120
-
121
- if attributes.key?(:'direction_flux')
122
- self.direction_flux = attributes[:'direction_flux']
123
- end
124
-
125
- if attributes.key?(:'statut_acquittement')
126
- self.statut_acquittement = attributes[:'statut_acquittement']
127
- end
128
-
129
- if attributes.key?(:'date_creation')
130
- self.date_creation = attributes[:'date_creation']
131
- end
132
-
133
- if attributes.key?(:'date_maj')
134
- self.date_maj = attributes[:'date_maj']
135
- end
136
- end
137
-
138
- # Show invalid properties with the reasons. Usually used together with valid?
139
- # @return Array for valid properties with the reasons
140
- def list_invalid_properties
141
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
142
- invalid_properties = Array.new
143
- if @flow_id.nil?
144
- invalid_properties.push('invalid value for "flow_id", flow_id cannot be nil.')
145
- end
146
-
147
- if @nom.nil?
148
- invalid_properties.push('invalid value for "nom", nom cannot be nil.')
149
- end
150
-
151
- invalid_properties
152
- end
153
-
154
- # Check to see if the all the properties in the model are valid
155
- # @return true if the model is valid
156
- def valid?
157
- warn '[DEPRECATED] the `valid?` method is obsolete'
158
- return false if @flow_id.nil?
159
- return false if @nom.nil?
160
- true
161
- end
162
-
163
- # Custom attribute writer method with validation
164
- # @param [Object] flow_id Value to be assigned
165
- def flow_id=(flow_id)
166
- if flow_id.nil?
167
- fail ArgumentError, 'flow_id cannot be nil'
168
- end
169
-
170
- @flow_id = flow_id
171
- end
172
-
173
- # Custom attribute writer method with validation
174
- # @param [Object] nom Value to be assigned
175
- def nom=(nom)
176
- if nom.nil?
177
- fail ArgumentError, 'nom cannot be nil'
178
- end
179
-
180
- @nom = nom
181
- end
182
-
183
- # Checks equality by comparing each attribute.
184
- # @param [Object] Object to be compared
185
- def ==(o)
186
- return true if self.equal?(o)
187
- self.class == o.class &&
188
- flow_id == o.flow_id &&
189
- tracking_id == o.tracking_id &&
190
- nom == o.nom &&
191
- type_flux == o.type_flux &&
192
- direction_flux == o.direction_flux &&
193
- statut_acquittement == o.statut_acquittement &&
194
- date_creation == o.date_creation &&
195
- date_maj == o.date_maj
196
- end
197
-
198
- # @see the `==` method
199
- # @param [Object] Object to be compared
200
- def eql?(o)
201
- self == o
202
- end
203
-
204
- # Calculates hash code according to all attributes.
205
- # @return [Integer] Hash code
206
- def hash
207
- [flow_id, tracking_id, nom, type_flux, direction_flux, statut_acquittement, date_creation, date_maj].hash
208
- end
209
-
210
- # Builds the object from hash
211
- # @param [Hash] attributes Model attributes in the form of hash
212
- # @return [Object] Returns the model itself
213
- def self.build_from_hash(attributes)
214
- return nil unless attributes.is_a?(Hash)
215
- attributes = attributes.transform_keys(&:to_sym)
216
- transformed_hash = {}
217
- openapi_types.each_pair do |key, type|
218
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
219
- transformed_hash["#{key}"] = nil
220
- elsif type =~ /\AArray<(.*)>/i
221
- # check to ensure the input is an array given that the attribute
222
- # is documented as an array but the input is not
223
- if attributes[attribute_map[key]].is_a?(Array)
224
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
225
- end
226
- elsif !attributes[attribute_map[key]].nil?
227
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
228
- end
229
- end
230
- new(transformed_hash)
231
- end
232
-
233
- # Returns the object in the form of hash
234
- # @return [Hash] Returns the object in the form of hash
235
- def to_hash
236
- hash = {}
237
- self.class.attribute_map.each_pair do |attr, param|
238
- value = self.send(attr)
239
- if value.nil?
240
- is_nullable = self.class.openapi_nullable.include?(attr)
241
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
242
- end
243
-
244
- hash[param] = _to_hash(value)
245
- end
246
- hash
247
- end
248
-
249
- end
250
-
251
- end
@@ -1,257 +0,0 @@
1
- =begin
2
- #API REST FactPulse
3
-
4
- # API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }' ``` **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l'accès - ✅ Intégration facile dans n'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l'automatisation ### 📚 Documentation complète Pour plus d'informations sur l'authentification et l'utilisation de l'API : https://www.factpulse.fr/documentation-api/
5
-
6
- The version of the OpenAPI document: 1.0.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.18.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module FactPulse
17
- # Credentials PDP pour la stratégie zero-storage (Strategy B). Permet de fournir directement les credentials PDP dans la requête au lieu de les stocker dans Django. Utile pour : - Tests ponctuels sans persister les credentials - Intégrations temporaires - Environnements de développement
18
- class PDPCredentials < ApiModelBase
19
- # URL de base du Flow Service AFNOR
20
- attr_accessor :flow_service_url
21
-
22
- attr_accessor :directory_service_url
23
-
24
- # URL du serveur OAuth2
25
- attr_accessor :token_url
26
-
27
- # Client ID OAuth2
28
- attr_accessor :client_id
29
-
30
- # Client Secret OAuth2 (sensible)
31
- attr_accessor :client_secret
32
-
33
- # Attribute mapping from ruby-style variable name to JSON key.
34
- def self.attribute_map
35
- {
36
- :'flow_service_url' => :'flow_service_url',
37
- :'directory_service_url' => :'directory_service_url',
38
- :'token_url' => :'token_url',
39
- :'client_id' => :'client_id',
40
- :'client_secret' => :'client_secret'
41
- }
42
- end
43
-
44
- # Returns attribute mapping this model knows about
45
- def self.acceptable_attribute_map
46
- attribute_map
47
- end
48
-
49
- # Returns all the JSON keys this model knows about
50
- def self.acceptable_attributes
51
- acceptable_attribute_map.values
52
- end
53
-
54
- # Attribute type mapping.
55
- def self.openapi_types
56
- {
57
- :'flow_service_url' => :'String',
58
- :'directory_service_url' => :'String',
59
- :'token_url' => :'String',
60
- :'client_id' => :'String',
61
- :'client_secret' => :'String'
62
- }
63
- end
64
-
65
- # List of attributes with nullable: true
66
- def self.openapi_nullable
67
- Set.new([
68
- :'directory_service_url',
69
- ])
70
- end
71
-
72
- # Initializes the object
73
- # @param [Hash] attributes Model attributes in the form of hash
74
- def initialize(attributes = {})
75
- if (!attributes.is_a?(Hash))
76
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::PDPCredentials` initialize method"
77
- end
78
-
79
- # check to see if the attribute exists and convert string to symbol for hash key
80
- acceptable_attribute_map = self.class.acceptable_attribute_map
81
- attributes = attributes.each_with_object({}) { |(k, v), h|
82
- if (!acceptable_attribute_map.key?(k.to_sym))
83
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::PDPCredentials`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
84
- end
85
- h[k.to_sym] = v
86
- }
87
-
88
- if attributes.key?(:'flow_service_url')
89
- self.flow_service_url = attributes[:'flow_service_url']
90
- else
91
- self.flow_service_url = nil
92
- end
93
-
94
- if attributes.key?(:'directory_service_url')
95
- self.directory_service_url = attributes[:'directory_service_url']
96
- end
97
-
98
- if attributes.key?(:'token_url')
99
- self.token_url = attributes[:'token_url']
100
- else
101
- self.token_url = nil
102
- end
103
-
104
- if attributes.key?(:'client_id')
105
- self.client_id = attributes[:'client_id']
106
- else
107
- self.client_id = nil
108
- end
109
-
110
- if attributes.key?(:'client_secret')
111
- self.client_secret = attributes[:'client_secret']
112
- else
113
- self.client_secret = nil
114
- end
115
- end
116
-
117
- # Show invalid properties with the reasons. Usually used together with valid?
118
- # @return Array for valid properties with the reasons
119
- def list_invalid_properties
120
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
121
- invalid_properties = Array.new
122
- if @flow_service_url.nil?
123
- invalid_properties.push('invalid value for "flow_service_url", flow_service_url cannot be nil.')
124
- end
125
-
126
- if @token_url.nil?
127
- invalid_properties.push('invalid value for "token_url", token_url cannot be nil.')
128
- end
129
-
130
- if @client_id.nil?
131
- invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
132
- end
133
-
134
- if @client_secret.nil?
135
- invalid_properties.push('invalid value for "client_secret", client_secret cannot be nil.')
136
- end
137
-
138
- invalid_properties
139
- end
140
-
141
- # Check to see if the all the properties in the model are valid
142
- # @return true if the model is valid
143
- def valid?
144
- warn '[DEPRECATED] the `valid?` method is obsolete'
145
- return false if @flow_service_url.nil?
146
- return false if @token_url.nil?
147
- return false if @client_id.nil?
148
- return false if @client_secret.nil?
149
- true
150
- end
151
-
152
- # Custom attribute writer method with validation
153
- # @param [Object] flow_service_url Value to be assigned
154
- def flow_service_url=(flow_service_url)
155
- if flow_service_url.nil?
156
- fail ArgumentError, 'flow_service_url cannot be nil'
157
- end
158
-
159
- @flow_service_url = flow_service_url
160
- end
161
-
162
- # Custom attribute writer method with validation
163
- # @param [Object] token_url Value to be assigned
164
- def token_url=(token_url)
165
- if token_url.nil?
166
- fail ArgumentError, 'token_url cannot be nil'
167
- end
168
-
169
- @token_url = token_url
170
- end
171
-
172
- # Custom attribute writer method with validation
173
- # @param [Object] client_id Value to be assigned
174
- def client_id=(client_id)
175
- if client_id.nil?
176
- fail ArgumentError, 'client_id cannot be nil'
177
- end
178
-
179
- @client_id = client_id
180
- end
181
-
182
- # Custom attribute writer method with validation
183
- # @param [Object] client_secret Value to be assigned
184
- def client_secret=(client_secret)
185
- if client_secret.nil?
186
- fail ArgumentError, 'client_secret cannot be nil'
187
- end
188
-
189
- @client_secret = client_secret
190
- end
191
-
192
- # Checks equality by comparing each attribute.
193
- # @param [Object] Object to be compared
194
- def ==(o)
195
- return true if self.equal?(o)
196
- self.class == o.class &&
197
- flow_service_url == o.flow_service_url &&
198
- directory_service_url == o.directory_service_url &&
199
- token_url == o.token_url &&
200
- client_id == o.client_id &&
201
- client_secret == o.client_secret
202
- end
203
-
204
- # @see the `==` method
205
- # @param [Object] Object to be compared
206
- def eql?(o)
207
- self == o
208
- end
209
-
210
- # Calculates hash code according to all attributes.
211
- # @return [Integer] Hash code
212
- def hash
213
- [flow_service_url, directory_service_url, token_url, client_id, client_secret].hash
214
- end
215
-
216
- # Builds the object from hash
217
- # @param [Hash] attributes Model attributes in the form of hash
218
- # @return [Object] Returns the model itself
219
- def self.build_from_hash(attributes)
220
- return nil unless attributes.is_a?(Hash)
221
- attributes = attributes.transform_keys(&:to_sym)
222
- transformed_hash = {}
223
- openapi_types.each_pair do |key, type|
224
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
225
- transformed_hash["#{key}"] = nil
226
- elsif type =~ /\AArray<(.*)>/i
227
- # check to ensure the input is an array given that the attribute
228
- # is documented as an array but the input is not
229
- if attributes[attribute_map[key]].is_a?(Array)
230
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
231
- end
232
- elsif !attributes[attribute_map[key]].nil?
233
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
234
- end
235
- end
236
- new(transformed_hash)
237
- end
238
-
239
- # Returns the object in the form of hash
240
- # @return [Hash] Returns the object in the form of hash
241
- def to_hash
242
- hash = {}
243
- self.class.attribute_map.each_pair do |attr, param|
244
- value = self.send(attr)
245
- if value.nil?
246
- is_nullable = self.class.openapi_nullable.include?(attr)
247
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
248
- end
249
-
250
- hash[param] = _to_hash(value)
251
- end
252
- hash
253
- end
254
-
255
- end
256
-
257
- end