factpulse 2.0.34 → 2.0.36

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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -3
  3. data/Gemfile.lock +2 -2
  4. data/docs/BoundingBoxSchema.md +30 -0
  5. data/docs/CadreDeFacturation.md +2 -0
  6. data/docs/ChampVerifieSchema.md +34 -0
  7. data/docs/DimensionPageSchema.md +20 -0
  8. data/docs/DirectionFlux.md +15 -0
  9. data/docs/FluxResume.md +32 -0
  10. data/docs/LigneDeTVA.md +5 -1
  11. data/docs/NatureOperation.md +15 -0
  12. data/docs/Note.md +4 -4
  13. data/docs/NoteObligatoireSchema.md +30 -0
  14. data/docs/PDPCredentials.md +26 -0
  15. data/docs/ProfilFlux.md +15 -0
  16. data/docs/ReponseHealthcheckAFNOR.md +22 -0
  17. data/docs/ReponseRechercheFlux.md +24 -0
  18. data/docs/ReponseSoumissionFlux.md +30 -0
  19. data/docs/ReponseVerificationSucces.md +36 -0
  20. data/docs/RequeteRechercheFlux.md +34 -0
  21. data/docs/RequeteSoumissionFlux.md +28 -0
  22. data/docs/StatutAcquittement.md +15 -0
  23. data/docs/StatutChampAPI.md +15 -0
  24. data/docs/SyntaxeFlux.md +15 -0
  25. data/docs/TraitementFactureApi.md +2 -2
  26. data/docs/TypeFlux.md +15 -0
  27. data/docs/VrificationPDFXMLApi.md +435 -0
  28. data/lib/factpulse/api/traitement_facture_api.rb +4 -4
  29. data/lib/factpulse/api/vrification_pdfxml_api.rb +430 -0
  30. data/lib/factpulse/helpers/client.rb +2 -1
  31. data/lib/factpulse/models/bounding_box_schema.rb +332 -0
  32. data/lib/factpulse/models/cadre_de_facturation.rb +12 -2
  33. data/lib/factpulse/models/champ_verifie_schema.rb +334 -0
  34. data/lib/factpulse/models/dimension_page_schema.rb +193 -0
  35. data/lib/factpulse/models/direction_flux.rb +40 -0
  36. data/lib/factpulse/models/flux_resume.rb +251 -0
  37. data/lib/factpulse/models/ligne_de_tva.rb +26 -6
  38. data/lib/factpulse/models/nature_operation.rb +66 -0
  39. data/lib/factpulse/models/note.rb +23 -23
  40. data/lib/factpulse/models/note_obligatoire_schema.rb +265 -0
  41. data/lib/factpulse/models/pdp_credentials.rb +257 -0
  42. data/lib/factpulse/models/profil_flux.rb +41 -0
  43. data/lib/factpulse/models/reponse_healthcheck_afnor.rb +220 -0
  44. data/lib/factpulse/models/reponse_recherche_flux.rb +249 -0
  45. data/lib/factpulse/models/reponse_soumission_flux.rb +294 -0
  46. data/lib/factpulse/models/reponse_verification_succes.rb +343 -0
  47. data/lib/factpulse/models/requete_recherche_flux.rb +306 -0
  48. data/lib/factpulse/models/requete_soumission_flux.rb +238 -0
  49. data/lib/factpulse/models/statut_acquittement.rb +41 -0
  50. data/lib/factpulse/models/statut_champ_api.rb +43 -0
  51. data/lib/factpulse/models/syntaxe_flux.rb +43 -0
  52. data/lib/factpulse/models/type_flux.rb +43 -0
  53. data/lib/factpulse/version.rb +1 -1
  54. data/lib/factpulse.rb +20 -0
  55. metadata +42 -2
@@ -0,0 +1,251 @@
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\" }' ``` **Paramètre optionnel `client_uid` :** Pour sélectionner les credentials d'un client spécifique (PA/PDP, Chorus Pro, certificats de signature), ajoutez `client_uid` : ```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\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }' ``` Le `client_uid` sera inclus dans le JWT et permettra à l'API d'utiliser automatiquement : - Les credentials AFNOR/PDP configurés pour ce client - Les credentials Chorus Pro configurés pour ce client - Les certificats de signature électronique configurés pour ce client **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
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FactPulse
17
- # Représente une ligne de totalisation par taux de TVA.
17
+ # Représente une ligne de totalisation par taux de TVA. Pour les exonérations (catégories E, AE, K, G, O), les champs `motif_exoneration` et `code_vatex` sont requis selon EN16931.
18
18
  class LigneDeTVA < ApiModelBase
19
19
  attr_accessor :montant_base_ht
20
20
 
@@ -26,6 +26,10 @@ module FactPulse
26
26
 
27
27
  attr_accessor :categorie
28
28
 
29
+ attr_accessor :motif_exoneration
30
+
31
+ attr_accessor :code_vatex
32
+
29
33
  class EnumAttributeValidator
30
34
  attr_reader :datatype
31
35
  attr_reader :allowable_values
@@ -55,7 +59,9 @@ module FactPulse
55
59
  :'montant_tva' => :'montantTva',
56
60
  :'taux' => :'taux',
57
61
  :'taux_manuel' => :'tauxManuel',
58
- :'categorie' => :'categorie'
62
+ :'categorie' => :'categorie',
63
+ :'motif_exoneration' => :'motifExoneration',
64
+ :'code_vatex' => :'codeVatex'
59
65
  }
60
66
  end
61
67
 
@@ -76,7 +82,9 @@ module FactPulse
76
82
  :'montant_tva' => :'MontantTvaLigne',
77
83
  :'taux' => :'String',
78
84
  :'taux_manuel' => :'Tauxmanuel',
79
- :'categorie' => :'CategorieTVA'
85
+ :'categorie' => :'CategorieTVA',
86
+ :'motif_exoneration' => :'String',
87
+ :'code_vatex' => :'String'
80
88
  }
81
89
  end
82
90
 
@@ -84,7 +92,9 @@ module FactPulse
84
92
  def self.openapi_nullable
85
93
  Set.new([
86
94
  :'taux',
87
- :'categorie'
95
+ :'categorie',
96
+ :'motif_exoneration',
97
+ :'code_vatex'
88
98
  ])
89
99
  end
90
100
 
@@ -127,6 +137,14 @@ module FactPulse
127
137
  if attributes.key?(:'categorie')
128
138
  self.categorie = attributes[:'categorie']
129
139
  end
140
+
141
+ if attributes.key?(:'motif_exoneration')
142
+ self.motif_exoneration = attributes[:'motif_exoneration']
143
+ end
144
+
145
+ if attributes.key?(:'code_vatex')
146
+ self.code_vatex = attributes[:'code_vatex']
147
+ end
130
148
  end
131
149
 
132
150
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -183,7 +201,9 @@ module FactPulse
183
201
  montant_tva == o.montant_tva &&
184
202
  taux == o.taux &&
185
203
  taux_manuel == o.taux_manuel &&
186
- categorie == o.categorie
204
+ categorie == o.categorie &&
205
+ motif_exoneration == o.motif_exoneration &&
206
+ code_vatex == o.code_vatex
187
207
  end
188
208
 
189
209
  # @see the `==` method
@@ -195,7 +215,7 @@ module FactPulse
195
215
  # Calculates hash code according to all attributes.
196
216
  # @return [Integer] Hash code
197
217
  def hash
198
- [montant_base_ht, montant_tva, taux, taux_manuel, categorie].hash
218
+ [montant_base_ht, montant_tva, taux, taux_manuel, categorie, motif_exoneration, code_vatex].hash
199
219
  end
200
220
 
201
221
  # Builds the object from hash
@@ -0,0 +1,66 @@
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\" }' ``` **Paramètre optionnel `client_uid` :** Pour sélectionner les credentials d'un client spécifique (PA/PDP, Chorus Pro, certificats de signature), ajoutez `client_uid` : ```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\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }' ``` Le `client_uid` sera inclus dans le JWT et permettra à l'API d'utiliser automatiquement : - Les credentials AFNOR/PDP configurés pour ce client - Les credentials Chorus Pro configurés pour ce client - Les certificats de signature électronique configurés pour ce client **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 NatureOperation
18
+ B1 = "B1".freeze
19
+ B12 = "B1".freeze
20
+ S1 = "S1".freeze
21
+ S12 = "S1".freeze
22
+ M1 = "M1".freeze
23
+ M12 = "M1".freeze
24
+ B2 = "B2".freeze
25
+ B22 = "B2".freeze
26
+ S2 = "S2".freeze
27
+ S22 = "S2".freeze
28
+ M2 = "M2".freeze
29
+ M22 = "M2".freeze
30
+ B4 = "B4".freeze
31
+ B42 = "B4".freeze
32
+ S4 = "S4".freeze
33
+ S42 = "S4".freeze
34
+ M4 = "M4".freeze
35
+ M42 = "M4".freeze
36
+ S3 = "S3".freeze
37
+ S32 = "S3".freeze
38
+ S5 = "S5".freeze
39
+ S52 = "S5".freeze
40
+ S6 = "S6".freeze
41
+ S62 = "S6".freeze
42
+ B7 = "B7".freeze
43
+ B72 = "B7".freeze
44
+ S7 = "S7".freeze
45
+ S72 = "S7".freeze
46
+
47
+ def self.all_vars
48
+ @all_vars ||= [B1, B12, S1, S12, M1, M12, B2, B22, S2, S22, M2, M22, B4, B42, S4, S42, M4, M42, S3, S32, S5, S52, S6, S62, B7, B72, S7, S72].freeze
49
+ end
50
+
51
+ # Builds the enum from string
52
+ # @param [String] The enum value in the form of the string
53
+ # @return [String] The enum value
54
+ def self.build_from_hash(value)
55
+ new.build_from_hash(value)
56
+ end
57
+
58
+ # Builds the enum from string
59
+ # @param [String] The enum value in the form of the string
60
+ # @return [String] The enum value
61
+ def build_from_hash(value)
62
+ return value if NatureOperation.all_vars.include?(value)
63
+ raise "Invalid ENUM value #{value} for class #NatureOperation"
64
+ end
65
+ end
66
+ end
@@ -16,15 +16,15 @@ require 'time'
16
16
  module FactPulse
17
17
  # Note de facture (IncludedNote en Factur-X). Les notes obligatoires pour BR-FR-05 sont : - PMT : Indemnité forfaitaire pour frais de recouvrement - PMD : Pénalités de retard - AAB : Escompte pour paiement anticipé
18
18
  class Note < ApiModelBase
19
- attr_accessor :subject_code
19
+ attr_accessor :code_sujet
20
20
 
21
- attr_accessor :content
21
+ attr_accessor :contenu
22
22
 
23
23
  # Attribute mapping from ruby-style variable name to JSON key.
24
24
  def self.attribute_map
25
25
  {
26
- :'subject_code' => :'subjectCode',
27
- :'content' => :'content'
26
+ :'code_sujet' => :'codeSujet',
27
+ :'contenu' => :'contenu'
28
28
  }
29
29
  end
30
30
 
@@ -41,15 +41,15 @@ module FactPulse
41
41
  # Attribute type mapping.
42
42
  def self.openapi_types
43
43
  {
44
- :'subject_code' => :'String',
45
- :'content' => :'String'
44
+ :'code_sujet' => :'String',
45
+ :'contenu' => :'String'
46
46
  }
47
47
  end
48
48
 
49
49
  # List of attributes with nullable: true
50
50
  def self.openapi_nullable
51
51
  Set.new([
52
- :'subject_code',
52
+ :'code_sujet',
53
53
  ])
54
54
  end
55
55
 
@@ -69,14 +69,14 @@ module FactPulse
69
69
  h[k.to_sym] = v
70
70
  }
71
71
 
72
- if attributes.key?(:'subject_code')
73
- self.subject_code = attributes[:'subject_code']
72
+ if attributes.key?(:'code_sujet')
73
+ self.code_sujet = attributes[:'code_sujet']
74
74
  end
75
75
 
76
- if attributes.key?(:'content')
77
- self.content = attributes[:'content']
76
+ if attributes.key?(:'contenu')
77
+ self.contenu = attributes[:'contenu']
78
78
  else
79
- self.content = nil
79
+ self.contenu = nil
80
80
  end
81
81
  end
82
82
 
@@ -85,8 +85,8 @@ module FactPulse
85
85
  def list_invalid_properties
86
86
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
87
  invalid_properties = Array.new
88
- if @content.nil?
89
- invalid_properties.push('invalid value for "content", content cannot be nil.')
88
+ if @contenu.nil?
89
+ invalid_properties.push('invalid value for "contenu", contenu cannot be nil.')
90
90
  end
91
91
 
92
92
  invalid_properties
@@ -96,18 +96,18 @@ module FactPulse
96
96
  # @return true if the model is valid
97
97
  def valid?
98
98
  warn '[DEPRECATED] the `valid?` method is obsolete'
99
- return false if @content.nil?
99
+ return false if @contenu.nil?
100
100
  true
101
101
  end
102
102
 
103
103
  # Custom attribute writer method with validation
104
- # @param [Object] content Value to be assigned
105
- def content=(content)
106
- if content.nil?
107
- fail ArgumentError, 'content cannot be nil'
104
+ # @param [Object] contenu Value to be assigned
105
+ def contenu=(contenu)
106
+ if contenu.nil?
107
+ fail ArgumentError, 'contenu cannot be nil'
108
108
  end
109
109
 
110
- @content = content
110
+ @contenu = contenu
111
111
  end
112
112
 
113
113
  # Checks equality by comparing each attribute.
@@ -115,8 +115,8 @@ module FactPulse
115
115
  def ==(o)
116
116
  return true if self.equal?(o)
117
117
  self.class == o.class &&
118
- subject_code == o.subject_code &&
119
- content == o.content
118
+ code_sujet == o.code_sujet &&
119
+ contenu == o.contenu
120
120
  end
121
121
 
122
122
  # @see the `==` method
@@ -128,7 +128,7 @@ module FactPulse
128
128
  # Calculates hash code according to all attributes.
129
129
  # @return [Integer] Hash code
130
130
  def hash
131
- [subject_code, content].hash
131
+ [code_sujet, contenu].hash
132
132
  end
133
133
 
134
134
  # Builds the object from hash