factpulse 2.0.4 → 2.0.6

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