factpulse 2.0.3 → 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 (138) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -3
  3. data/Gemfile.lock +1 -1
  4. data/docs/AFNORPDPPADirectoryServiceApi.md +108 -18
  5. data/factpulse.gemspec +2 -2
  6. data/lib/factpulse/api/afnorpdppa_api.rb +1 -1
  7. data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +19 -19
  8. data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +1 -1
  9. data/lib/factpulse/api/chorus_pro_api.rb +1 -1
  10. data/lib/factpulse/api/sant_api.rb +1 -1
  11. data/lib/factpulse/api/traitement_facture_api.rb +1 -1
  12. data/lib/factpulse/api/utilisateur_api.rb +1 -1
  13. data/lib/factpulse/api_client.rb +1 -1
  14. data/lib/factpulse/api_error.rb +1 -1
  15. data/lib/factpulse/api_model_base.rb +1 -1
  16. data/lib/factpulse/configuration.rb +1 -1
  17. data/lib/factpulse/models/adresse_electronique.rb +1 -1
  18. data/lib/factpulse/models/adresse_postale.rb +1 -1
  19. data/lib/factpulse/models/body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post.rb +1 -1
  20. data/lib/factpulse/models/body_completer_facture_api_v1_chorus_pro_factures_completer_post.rb +1 -1
  21. data/lib/factpulse/models/body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get.rb +1 -1
  22. data/lib/factpulse/models/body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post.rb +1 -1
  23. data/lib/factpulse/models/body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post.rb +1 -1
  24. data/lib/factpulse/models/body_recycler_facture_api_v1_chorus_pro_factures_recycler_post.rb +1 -1
  25. data/lib/factpulse/models/body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post.rb +1 -1
  26. data/lib/factpulse/models/body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post.rb +1 -1
  27. data/lib/factpulse/models/body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post.rb +1 -1
  28. data/lib/factpulse/models/body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post.rb +1 -1
  29. data/lib/factpulse/models/body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post.rb +1 -1
  30. data/lib/factpulse/models/cadre_de_facturation.rb +1 -1
  31. data/lib/factpulse/models/categorie_tva.rb +11 -11
  32. data/lib/factpulse/models/certificate_info_response.rb +1 -1
  33. data/lib/factpulse/models/chorus_pro_credentials.rb +1 -1
  34. data/lib/factpulse/models/code_cadre_facturation.rb +1 -1
  35. data/lib/factpulse/models/code_raison_reduction.rb +9 -9
  36. data/lib/factpulse/models/consulter_facture_request.rb +1 -1
  37. data/lib/factpulse/models/consulter_facture_response.rb +1 -1
  38. data/lib/factpulse/models/consulter_structure_request.rb +1 -1
  39. data/lib/factpulse/models/consulter_structure_response.rb +1 -1
  40. data/lib/factpulse/models/credentials_afnor.rb +1 -1
  41. data/lib/factpulse/models/credentials_chorus_pro.rb +1 -1
  42. data/lib/factpulse/models/destinataire.rb +1 -1
  43. data/lib/factpulse/models/destination.rb +1 -1
  44. data/lib/factpulse/models/destination_afnor.rb +1 -1
  45. data/lib/factpulse/models/destination_chorus_pro.rb +1 -1
  46. data/lib/factpulse/models/donnees_facture_simplifiees.rb +1 -1
  47. data/lib/factpulse/models/facture_enrichie_info_input.rb +1 -1
  48. data/lib/factpulse/models/facture_enrichie_info_output.rb +1 -1
  49. data/lib/factpulse/models/facture_factur_x.rb +1 -1
  50. data/lib/factpulse/models/format_sortie.rb +1 -1
  51. data/lib/factpulse/models/fournisseur.rb +1 -1
  52. data/lib/factpulse/models/generate_certificate_request.rb +1 -1
  53. data/lib/factpulse/models/generate_certificate_response.rb +1 -1
  54. data/lib/factpulse/models/http_validation_error.rb +1 -1
  55. data/lib/factpulse/models/information_signature_api.rb +1 -1
  56. data/lib/factpulse/models/ligne_de_poste.rb +1 -1
  57. data/lib/factpulse/models/ligne_de_poste_montant_remise_ht.rb +1 -1
  58. data/lib/factpulse/models/ligne_de_poste_taux_tva_manuel.rb +1 -1
  59. data/lib/factpulse/models/ligne_de_tva.rb +1 -1
  60. data/lib/factpulse/models/mode_depot.rb +1 -1
  61. data/lib/factpulse/models/mode_paiement.rb +1 -1
  62. data/lib/factpulse/models/montant_a_payer.rb +1 -1
  63. data/lib/factpulse/models/montant_base_ht.rb +1 -1
  64. data/lib/factpulse/models/montant_ht_total.rb +1 -1
  65. data/lib/factpulse/models/montant_ht_total1.rb +1 -1
  66. data/lib/factpulse/models/montant_remise_globale_ttc.rb +1 -1
  67. data/lib/factpulse/models/montant_total.rb +1 -1
  68. data/lib/factpulse/models/montant_total_acompte.rb +1 -1
  69. data/lib/factpulse/models/montant_total_ligne_ht.rb +1 -1
  70. data/lib/factpulse/models/montant_ttc_total.rb +1 -1
  71. data/lib/factpulse/models/montant_ttc_total1.rb +1 -1
  72. data/lib/factpulse/models/montant_tva.rb +1 -1
  73. data/lib/factpulse/models/montant_tva1.rb +1 -1
  74. data/lib/factpulse/models/montant_unitaire_ht.rb +1 -1
  75. data/lib/factpulse/models/obtenir_id_chorus_pro_request.rb +1 -1
  76. data/lib/factpulse/models/obtenir_id_chorus_pro_response.rb +1 -1
  77. data/lib/factpulse/models/options_processing.rb +1 -1
  78. data/lib/factpulse/models/parametres_signature.rb +1 -1
  79. data/lib/factpulse/models/parametres_structure.rb +1 -1
  80. data/lib/factpulse/models/pdf_factur_x_info.rb +1 -1
  81. data/lib/factpulse/models/piece_jointe_complementaire.rb +1 -1
  82. data/lib/factpulse/models/profil_api.rb +1 -1
  83. data/lib/factpulse/models/quantite.rb +1 -1
  84. data/lib/factpulse/models/quota_info.rb +1 -1
  85. data/lib/factpulse/models/rechercher_services_response.rb +1 -1
  86. data/lib/factpulse/models/rechercher_structure_request.rb +1 -1
  87. data/lib/factpulse/models/rechercher_structure_response.rb +1 -1
  88. data/lib/factpulse/models/references.rb +1 -1
  89. data/lib/factpulse/models/reponse_tache.rb +1 -1
  90. data/lib/factpulse/models/reponse_validation_erreur.rb +1 -1
  91. data/lib/factpulse/models/reponse_validation_succes.rb +1 -1
  92. data/lib/factpulse/models/resultat_afnor.rb +1 -1
  93. data/lib/factpulse/models/resultat_chorus_pro.rb +1 -1
  94. data/lib/factpulse/models/resultat_validation_pdfapi.rb +1 -1
  95. data/lib/factpulse/models/scheme_id.rb +7 -7
  96. data/lib/factpulse/models/service_structure.rb +1 -1
  97. data/lib/factpulse/models/signature_info.rb +1 -1
  98. data/lib/factpulse/models/soumettre_facture_complete_request.rb +1 -1
  99. data/lib/factpulse/models/soumettre_facture_complete_response.rb +1 -1
  100. data/lib/factpulse/models/soumettre_facture_request.rb +1 -1
  101. data/lib/factpulse/models/soumettre_facture_response.rb +1 -1
  102. data/lib/factpulse/models/statut_facture.rb +1 -1
  103. data/lib/factpulse/models/statut_tache.rb +1 -1
  104. data/lib/factpulse/models/structure_info.rb +1 -1
  105. data/lib/factpulse/models/tauxmanuel.rb +1 -1
  106. data/lib/factpulse/models/type_facture.rb +1 -1
  107. data/lib/factpulse/models/type_tva.rb +1 -1
  108. data/lib/factpulse/models/unite.rb +1 -1
  109. data/lib/factpulse/models/utilisateur.rb +1 -1
  110. data/lib/factpulse/models/validation_error.rb +1 -1
  111. data/lib/factpulse/models/validation_error_loc_inner.rb +1 -1
  112. data/lib/factpulse/version.rb +2 -2
  113. data/lib/factpulse.rb +1 -13
  114. metadata +11 -27
  115. data/docs/DirectionFlux.md +0 -15
  116. data/docs/FluxResume.md +0 -32
  117. data/docs/PDPCredentials.md +0 -26
  118. data/docs/ProfilFlux.md +0 -15
  119. data/docs/ReponseHealthcheckAFNOR.md +0 -22
  120. data/docs/ReponseRechercheFlux.md +0 -24
  121. data/docs/ReponseSoumissionFlux.md +0 -30
  122. data/docs/RequeteRechercheFlux.md +0 -34
  123. data/docs/RequeteSoumissionFlux.md +0 -28
  124. data/docs/StatutAcquittement.md +0 -15
  125. data/docs/SyntaxeFlux.md +0 -15
  126. data/docs/TypeFlux.md +0 -15
  127. data/lib/factpulse/models/direction_flux.rb +0 -40
  128. data/lib/factpulse/models/flux_resume.rb +0 -251
  129. data/lib/factpulse/models/pdp_credentials.rb +0 -257
  130. data/lib/factpulse/models/profil_flux.rb +0 -41
  131. data/lib/factpulse/models/reponse_healthcheck_afnor.rb +0 -220
  132. data/lib/factpulse/models/reponse_recherche_flux.rb +0 -249
  133. data/lib/factpulse/models/reponse_soumission_flux.rb +0 -294
  134. data/lib/factpulse/models/requete_recherche_flux.rb +0 -306
  135. data/lib/factpulse/models/requete_soumission_flux.rb +0 -238
  136. data/lib/factpulse/models/statut_acquittement.rb +0 -41
  137. data/lib/factpulse/models/syntaxe_flux.rb +0 -43
  138. data/lib/factpulse/models/type_flux.rb +0 -43
@@ -1,41 +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 ProfilFlux
18
- BASIC = "Basic".freeze
19
- CIUS = "CIUS".freeze
20
- EXTENDED_CTC_FR = "Extended-CTC-FR".freeze
21
-
22
- def self.all_vars
23
- @all_vars ||= [BASIC, CIUS, EXTENDED_CTC_FR].freeze
24
- end
25
-
26
- # Builds the enum from string
27
- # @param [String] The enum value in the form of the string
28
- # @return [String] The enum value
29
- def self.build_from_hash(value)
30
- new.build_from_hash(value)
31
- end
32
-
33
- # Builds the enum from string
34
- # @param [String] The enum value in the form of the string
35
- # @return [String] The enum value
36
- def build_from_hash(value)
37
- return value if ProfilFlux.all_vars.include?(value)
38
- raise "Invalid ENUM value #{value} for class #ProfilFlux"
39
- end
40
- end
41
- end
@@ -1,220 +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éponse du healthcheck des services AFNOR
18
- class ReponseHealthcheckAFNOR < ApiModelBase
19
- # État du Flow Service API
20
- attr_accessor :flow_service_ok
21
-
22
- # État du Directory Service API
23
- attr_accessor :directory_service_ok
24
-
25
- # Message descriptif de l'état
26
- attr_accessor :message
27
-
28
- # Attribute mapping from ruby-style variable name to JSON key.
29
- def self.attribute_map
30
- {
31
- :'flow_service_ok' => :'flow_service_ok',
32
- :'directory_service_ok' => :'directory_service_ok',
33
- :'message' => :'message'
34
- }
35
- end
36
-
37
- # Returns attribute mapping this model knows about
38
- def self.acceptable_attribute_map
39
- attribute_map
40
- end
41
-
42
- # Returns all the JSON keys this model knows about
43
- def self.acceptable_attributes
44
- acceptable_attribute_map.values
45
- end
46
-
47
- # Attribute type mapping.
48
- def self.openapi_types
49
- {
50
- :'flow_service_ok' => :'Boolean',
51
- :'directory_service_ok' => :'Boolean',
52
- :'message' => :'String'
53
- }
54
- end
55
-
56
- # List of attributes with nullable: true
57
- def self.openapi_nullable
58
- Set.new([
59
- ])
60
- end
61
-
62
- # Initializes the object
63
- # @param [Hash] attributes Model attributes in the form of hash
64
- def initialize(attributes = {})
65
- if (!attributes.is_a?(Hash))
66
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::ReponseHealthcheckAFNOR` initialize method"
67
- end
68
-
69
- # check to see if the attribute exists and convert string to symbol for hash key
70
- acceptable_attribute_map = self.class.acceptable_attribute_map
71
- attributes = attributes.each_with_object({}) { |(k, v), h|
72
- if (!acceptable_attribute_map.key?(k.to_sym))
73
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::ReponseHealthcheckAFNOR`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
- end
75
- h[k.to_sym] = v
76
- }
77
-
78
- if attributes.key?(:'flow_service_ok')
79
- self.flow_service_ok = attributes[:'flow_service_ok']
80
- else
81
- self.flow_service_ok = nil
82
- end
83
-
84
- if attributes.key?(:'directory_service_ok')
85
- self.directory_service_ok = attributes[:'directory_service_ok']
86
- else
87
- self.directory_service_ok = nil
88
- end
89
-
90
- if attributes.key?(:'message')
91
- self.message = attributes[:'message']
92
- else
93
- self.message = nil
94
- end
95
- end
96
-
97
- # Show invalid properties with the reasons. Usually used together with valid?
98
- # @return Array for valid properties with the reasons
99
- def list_invalid_properties
100
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
- invalid_properties = Array.new
102
- if @flow_service_ok.nil?
103
- invalid_properties.push('invalid value for "flow_service_ok", flow_service_ok cannot be nil.')
104
- end
105
-
106
- if @directory_service_ok.nil?
107
- invalid_properties.push('invalid value for "directory_service_ok", directory_service_ok cannot be nil.')
108
- end
109
-
110
- if @message.nil?
111
- invalid_properties.push('invalid value for "message", message cannot be nil.')
112
- end
113
-
114
- invalid_properties
115
- end
116
-
117
- # Check to see if the all the properties in the model are valid
118
- # @return true if the model is valid
119
- def valid?
120
- warn '[DEPRECATED] the `valid?` method is obsolete'
121
- return false if @flow_service_ok.nil?
122
- return false if @directory_service_ok.nil?
123
- return false if @message.nil?
124
- true
125
- end
126
-
127
- # Custom attribute writer method with validation
128
- # @param [Object] flow_service_ok Value to be assigned
129
- def flow_service_ok=(flow_service_ok)
130
- if flow_service_ok.nil?
131
- fail ArgumentError, 'flow_service_ok cannot be nil'
132
- end
133
-
134
- @flow_service_ok = flow_service_ok
135
- end
136
-
137
- # Custom attribute writer method with validation
138
- # @param [Object] directory_service_ok Value to be assigned
139
- def directory_service_ok=(directory_service_ok)
140
- if directory_service_ok.nil?
141
- fail ArgumentError, 'directory_service_ok cannot be nil'
142
- end
143
-
144
- @directory_service_ok = directory_service_ok
145
- end
146
-
147
- # Custom attribute writer method with validation
148
- # @param [Object] message Value to be assigned
149
- def message=(message)
150
- if message.nil?
151
- fail ArgumentError, 'message cannot be nil'
152
- end
153
-
154
- @message = message
155
- end
156
-
157
- # Checks equality by comparing each attribute.
158
- # @param [Object] Object to be compared
159
- def ==(o)
160
- return true if self.equal?(o)
161
- self.class == o.class &&
162
- flow_service_ok == o.flow_service_ok &&
163
- directory_service_ok == o.directory_service_ok &&
164
- message == o.message
165
- end
166
-
167
- # @see the `==` method
168
- # @param [Object] Object to be compared
169
- def eql?(o)
170
- self == o
171
- end
172
-
173
- # Calculates hash code according to all attributes.
174
- # @return [Integer] Hash code
175
- def hash
176
- [flow_service_ok, directory_service_ok, message].hash
177
- end
178
-
179
- # Builds the object from hash
180
- # @param [Hash] attributes Model attributes in the form of hash
181
- # @return [Object] Returns the model itself
182
- def self.build_from_hash(attributes)
183
- return nil unless attributes.is_a?(Hash)
184
- attributes = attributes.transform_keys(&:to_sym)
185
- transformed_hash = {}
186
- openapi_types.each_pair do |key, type|
187
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
188
- transformed_hash["#{key}"] = nil
189
- elsif type =~ /\AArray<(.*)>/i
190
- # check to ensure the input is an array given that the attribute
191
- # is documented as an array but the input is not
192
- if attributes[attribute_map[key]].is_a?(Array)
193
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
194
- end
195
- elsif !attributes[attribute_map[key]].nil?
196
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
197
- end
198
- end
199
- new(transformed_hash)
200
- end
201
-
202
- # Returns the object in the form of hash
203
- # @return [Hash] Returns the object in the form of hash
204
- def to_hash
205
- hash = {}
206
- self.class.attribute_map.each_pair do |attr, param|
207
- value = self.send(attr)
208
- if value.nil?
209
- is_nullable = self.class.openapi_nullable.include?(attr)
210
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
- end
212
-
213
- hash[param] = _to_hash(value)
214
- end
215
- hash
216
- end
217
-
218
- end
219
-
220
- end
@@ -1,249 +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éponse d'une recherche de flux
18
- class ReponseRechercheFlux < ApiModelBase
19
- # Nombre total de résultats
20
- attr_accessor :total
21
-
22
- # Décalage appliqué
23
- attr_accessor :offset
24
-
25
- # Limite de résultats
26
- attr_accessor :limit
27
-
28
- # Liste des flux trouvés
29
- attr_accessor :resultats
30
-
31
- # Attribute mapping from ruby-style variable name to JSON key.
32
- def self.attribute_map
33
- {
34
- :'total' => :'total',
35
- :'offset' => :'offset',
36
- :'limit' => :'limit',
37
- :'resultats' => :'resultats'
38
- }
39
- end
40
-
41
- # Returns attribute mapping this model knows about
42
- def self.acceptable_attribute_map
43
- attribute_map
44
- end
45
-
46
- # Returns all the JSON keys this model knows about
47
- def self.acceptable_attributes
48
- acceptable_attribute_map.values
49
- end
50
-
51
- # Attribute type mapping.
52
- def self.openapi_types
53
- {
54
- :'total' => :'Integer',
55
- :'offset' => :'Integer',
56
- :'limit' => :'Integer',
57
- :'resultats' => :'Array<FluxResume>'
58
- }
59
- end
60
-
61
- # List of attributes with nullable: true
62
- def self.openapi_nullable
63
- Set.new([
64
- ])
65
- end
66
-
67
- # Initializes the object
68
- # @param [Hash] attributes Model attributes in the form of hash
69
- def initialize(attributes = {})
70
- if (!attributes.is_a?(Hash))
71
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::ReponseRechercheFlux` initialize method"
72
- end
73
-
74
- # check to see if the attribute exists and convert string to symbol for hash key
75
- acceptable_attribute_map = self.class.acceptable_attribute_map
76
- attributes = attributes.each_with_object({}) { |(k, v), h|
77
- if (!acceptable_attribute_map.key?(k.to_sym))
78
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::ReponseRechercheFlux`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
- end
80
- h[k.to_sym] = v
81
- }
82
-
83
- if attributes.key?(:'total')
84
- self.total = attributes[:'total']
85
- else
86
- self.total = nil
87
- end
88
-
89
- if attributes.key?(:'offset')
90
- self.offset = attributes[:'offset']
91
- else
92
- self.offset = nil
93
- end
94
-
95
- if attributes.key?(:'limit')
96
- self.limit = attributes[:'limit']
97
- else
98
- self.limit = nil
99
- end
100
-
101
- if attributes.key?(:'resultats')
102
- if (value = attributes[:'resultats']).is_a?(Array)
103
- self.resultats = value
104
- end
105
- else
106
- self.resultats = nil
107
- end
108
- end
109
-
110
- # Show invalid properties with the reasons. Usually used together with valid?
111
- # @return Array for valid properties with the reasons
112
- def list_invalid_properties
113
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
- invalid_properties = Array.new
115
- if @total.nil?
116
- invalid_properties.push('invalid value for "total", total cannot be nil.')
117
- end
118
-
119
- if @offset.nil?
120
- invalid_properties.push('invalid value for "offset", offset cannot be nil.')
121
- end
122
-
123
- if @limit.nil?
124
- invalid_properties.push('invalid value for "limit", limit cannot be nil.')
125
- end
126
-
127
- if @resultats.nil?
128
- invalid_properties.push('invalid value for "resultats", resultats cannot be nil.')
129
- end
130
-
131
- invalid_properties
132
- end
133
-
134
- # Check to see if the all the properties in the model are valid
135
- # @return true if the model is valid
136
- def valid?
137
- warn '[DEPRECATED] the `valid?` method is obsolete'
138
- return false if @total.nil?
139
- return false if @offset.nil?
140
- return false if @limit.nil?
141
- return false if @resultats.nil?
142
- true
143
- end
144
-
145
- # Custom attribute writer method with validation
146
- # @param [Object] total Value to be assigned
147
- def total=(total)
148
- if total.nil?
149
- fail ArgumentError, 'total cannot be nil'
150
- end
151
-
152
- @total = total
153
- end
154
-
155
- # Custom attribute writer method with validation
156
- # @param [Object] offset Value to be assigned
157
- def offset=(offset)
158
- if offset.nil?
159
- fail ArgumentError, 'offset cannot be nil'
160
- end
161
-
162
- @offset = offset
163
- end
164
-
165
- # Custom attribute writer method with validation
166
- # @param [Object] limit Value to be assigned
167
- def limit=(limit)
168
- if limit.nil?
169
- fail ArgumentError, 'limit cannot be nil'
170
- end
171
-
172
- @limit = limit
173
- end
174
-
175
- # Custom attribute writer method with validation
176
- # @param [Object] resultats Value to be assigned
177
- def resultats=(resultats)
178
- if resultats.nil?
179
- fail ArgumentError, 'resultats cannot be nil'
180
- end
181
-
182
- @resultats = resultats
183
- end
184
-
185
- # Checks equality by comparing each attribute.
186
- # @param [Object] Object to be compared
187
- def ==(o)
188
- return true if self.equal?(o)
189
- self.class == o.class &&
190
- total == o.total &&
191
- offset == o.offset &&
192
- limit == o.limit &&
193
- resultats == o.resultats
194
- end
195
-
196
- # @see the `==` method
197
- # @param [Object] Object to be compared
198
- def eql?(o)
199
- self == o
200
- end
201
-
202
- # Calculates hash code according to all attributes.
203
- # @return [Integer] Hash code
204
- def hash
205
- [total, offset, limit, resultats].hash
206
- end
207
-
208
- # Builds the object from hash
209
- # @param [Hash] attributes Model attributes in the form of hash
210
- # @return [Object] Returns the model itself
211
- def self.build_from_hash(attributes)
212
- return nil unless attributes.is_a?(Hash)
213
- attributes = attributes.transform_keys(&:to_sym)
214
- transformed_hash = {}
215
- openapi_types.each_pair do |key, type|
216
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
217
- transformed_hash["#{key}"] = nil
218
- elsif type =~ /\AArray<(.*)>/i
219
- # check to ensure the input is an array given that the attribute
220
- # is documented as an array but the input is not
221
- if attributes[attribute_map[key]].is_a?(Array)
222
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
223
- end
224
- elsif !attributes[attribute_map[key]].nil?
225
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
226
- end
227
- end
228
- new(transformed_hash)
229
- end
230
-
231
- # Returns the object in the form of hash
232
- # @return [Hash] Returns the object in the form of hash
233
- def to_hash
234
- hash = {}
235
- self.class.attribute_map.each_pair do |attr, param|
236
- value = self.send(attr)
237
- if value.nil?
238
- is_nullable = self.class.openapi_nullable.include?(attr)
239
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
240
- end
241
-
242
- hash[param] = _to_hash(value)
243
- end
244
- hash
245
- end
246
-
247
- end
248
-
249
- end