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,294 +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 après soumission d'un flux
18
- class ReponseSoumissionFlux < ApiModelBase
19
- # Identifiant unique du flux généré par la PDP
20
- attr_accessor :flow_id
21
-
22
- attr_accessor :tracking_id
23
-
24
- # Nom du flux
25
- attr_accessor :nom
26
-
27
- # Syntaxe du flux (CII, UBL, etc.)
28
- attr_accessor :syntaxe_flux
29
-
30
- attr_accessor :profil_flux
31
-
32
- # Hash SHA256 du fichier soumis
33
- attr_accessor :sha256
34
-
35
- # Message de confirmation
36
- attr_accessor :message
37
-
38
- # Attribute mapping from ruby-style variable name to JSON key.
39
- def self.attribute_map
40
- {
41
- :'flow_id' => :'flow_id',
42
- :'tracking_id' => :'tracking_id',
43
- :'nom' => :'nom',
44
- :'syntaxe_flux' => :'syntaxe_flux',
45
- :'profil_flux' => :'profil_flux',
46
- :'sha256' => :'sha256',
47
- :'message' => :'message'
48
- }
49
- end
50
-
51
- # Returns attribute mapping this model knows about
52
- def self.acceptable_attribute_map
53
- attribute_map
54
- end
55
-
56
- # Returns all the JSON keys this model knows about
57
- def self.acceptable_attributes
58
- acceptable_attribute_map.values
59
- end
60
-
61
- # Attribute type mapping.
62
- def self.openapi_types
63
- {
64
- :'flow_id' => :'String',
65
- :'tracking_id' => :'String',
66
- :'nom' => :'String',
67
- :'syntaxe_flux' => :'String',
68
- :'profil_flux' => :'String',
69
- :'sha256' => :'String',
70
- :'message' => :'String'
71
- }
72
- end
73
-
74
- # List of attributes with nullable: true
75
- def self.openapi_nullable
76
- Set.new([
77
- :'tracking_id',
78
- :'profil_flux',
79
- ])
80
- end
81
-
82
- # Initializes the object
83
- # @param [Hash] attributes Model attributes in the form of hash
84
- def initialize(attributes = {})
85
- if (!attributes.is_a?(Hash))
86
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::ReponseSoumissionFlux` initialize method"
87
- end
88
-
89
- # check to see if the attribute exists and convert string to symbol for hash key
90
- acceptable_attribute_map = self.class.acceptable_attribute_map
91
- attributes = attributes.each_with_object({}) { |(k, v), h|
92
- if (!acceptable_attribute_map.key?(k.to_sym))
93
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::ReponseSoumissionFlux`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
- end
95
- h[k.to_sym] = v
96
- }
97
-
98
- if attributes.key?(:'flow_id')
99
- self.flow_id = attributes[:'flow_id']
100
- else
101
- self.flow_id = nil
102
- end
103
-
104
- if attributes.key?(:'tracking_id')
105
- self.tracking_id = attributes[:'tracking_id']
106
- end
107
-
108
- if attributes.key?(:'nom')
109
- self.nom = attributes[:'nom']
110
- else
111
- self.nom = nil
112
- end
113
-
114
- if attributes.key?(:'syntaxe_flux')
115
- self.syntaxe_flux = attributes[:'syntaxe_flux']
116
- else
117
- self.syntaxe_flux = nil
118
- end
119
-
120
- if attributes.key?(:'profil_flux')
121
- self.profil_flux = attributes[:'profil_flux']
122
- end
123
-
124
- if attributes.key?(:'sha256')
125
- self.sha256 = attributes[:'sha256']
126
- else
127
- self.sha256 = nil
128
- end
129
-
130
- if attributes.key?(:'message')
131
- self.message = attributes[:'message']
132
- else
133
- self.message = nil
134
- end
135
- end
136
-
137
- # Show invalid properties with the reasons. Usually used together with valid?
138
- # @return Array for valid properties with the reasons
139
- def list_invalid_properties
140
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
141
- invalid_properties = Array.new
142
- if @flow_id.nil?
143
- invalid_properties.push('invalid value for "flow_id", flow_id cannot be nil.')
144
- end
145
-
146
- if @nom.nil?
147
- invalid_properties.push('invalid value for "nom", nom cannot be nil.')
148
- end
149
-
150
- if @syntaxe_flux.nil?
151
- invalid_properties.push('invalid value for "syntaxe_flux", syntaxe_flux cannot be nil.')
152
- end
153
-
154
- if @sha256.nil?
155
- invalid_properties.push('invalid value for "sha256", sha256 cannot be nil.')
156
- end
157
-
158
- if @message.nil?
159
- invalid_properties.push('invalid value for "message", message cannot be nil.')
160
- end
161
-
162
- invalid_properties
163
- end
164
-
165
- # Check to see if the all the properties in the model are valid
166
- # @return true if the model is valid
167
- def valid?
168
- warn '[DEPRECATED] the `valid?` method is obsolete'
169
- return false if @flow_id.nil?
170
- return false if @nom.nil?
171
- return false if @syntaxe_flux.nil?
172
- return false if @sha256.nil?
173
- return false if @message.nil?
174
- true
175
- end
176
-
177
- # Custom attribute writer method with validation
178
- # @param [Object] flow_id Value to be assigned
179
- def flow_id=(flow_id)
180
- if flow_id.nil?
181
- fail ArgumentError, 'flow_id cannot be nil'
182
- end
183
-
184
- @flow_id = flow_id
185
- end
186
-
187
- # Custom attribute writer method with validation
188
- # @param [Object] nom Value to be assigned
189
- def nom=(nom)
190
- if nom.nil?
191
- fail ArgumentError, 'nom cannot be nil'
192
- end
193
-
194
- @nom = nom
195
- end
196
-
197
- # Custom attribute writer method with validation
198
- # @param [Object] syntaxe_flux Value to be assigned
199
- def syntaxe_flux=(syntaxe_flux)
200
- if syntaxe_flux.nil?
201
- fail ArgumentError, 'syntaxe_flux cannot be nil'
202
- end
203
-
204
- @syntaxe_flux = syntaxe_flux
205
- end
206
-
207
- # Custom attribute writer method with validation
208
- # @param [Object] sha256 Value to be assigned
209
- def sha256=(sha256)
210
- if sha256.nil?
211
- fail ArgumentError, 'sha256 cannot be nil'
212
- end
213
-
214
- @sha256 = sha256
215
- end
216
-
217
- # Custom attribute writer method with validation
218
- # @param [Object] message Value to be assigned
219
- def message=(message)
220
- if message.nil?
221
- fail ArgumentError, 'message cannot be nil'
222
- end
223
-
224
- @message = message
225
- end
226
-
227
- # Checks equality by comparing each attribute.
228
- # @param [Object] Object to be compared
229
- def ==(o)
230
- return true if self.equal?(o)
231
- self.class == o.class &&
232
- flow_id == o.flow_id &&
233
- tracking_id == o.tracking_id &&
234
- nom == o.nom &&
235
- syntaxe_flux == o.syntaxe_flux &&
236
- profil_flux == o.profil_flux &&
237
- sha256 == o.sha256 &&
238
- message == o.message
239
- end
240
-
241
- # @see the `==` method
242
- # @param [Object] Object to be compared
243
- def eql?(o)
244
- self == o
245
- end
246
-
247
- # Calculates hash code according to all attributes.
248
- # @return [Integer] Hash code
249
- def hash
250
- [flow_id, tracking_id, nom, syntaxe_flux, profil_flux, sha256, message].hash
251
- end
252
-
253
- # Builds the object from hash
254
- # @param [Hash] attributes Model attributes in the form of hash
255
- # @return [Object] Returns the model itself
256
- def self.build_from_hash(attributes)
257
- return nil unless attributes.is_a?(Hash)
258
- attributes = attributes.transform_keys(&:to_sym)
259
- transformed_hash = {}
260
- openapi_types.each_pair do |key, type|
261
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
262
- transformed_hash["#{key}"] = nil
263
- elsif type =~ /\AArray<(.*)>/i
264
- # check to ensure the input is an array given that the attribute
265
- # is documented as an array but the input is not
266
- if attributes[attribute_map[key]].is_a?(Array)
267
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
268
- end
269
- elsif !attributes[attribute_map[key]].nil?
270
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
271
- end
272
- end
273
- new(transformed_hash)
274
- end
275
-
276
- # Returns the object in the form of hash
277
- # @return [Hash] Returns the object in the form of hash
278
- def to_hash
279
- hash = {}
280
- self.class.attribute_map.each_pair do |attr, param|
281
- value = self.send(attr)
282
- if value.nil?
283
- is_nullable = self.class.openapi_nullable.include?(attr)
284
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
285
- end
286
-
287
- hash[param] = _to_hash(value)
288
- end
289
- hash
290
- end
291
-
292
- end
293
-
294
- end
@@ -1,306 +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 rechercher des flux soumis
18
- class RequeteRechercheFlux < ApiModelBase
19
- attr_accessor :date_maj_apres
20
-
21
- attr_accessor :date_maj_avant
22
-
23
- attr_accessor :type_flux
24
-
25
- attr_accessor :direction_flux
26
-
27
- attr_accessor :tracking_id
28
-
29
- attr_accessor :flow_id
30
-
31
- attr_accessor :statut_acquittement
32
-
33
- # Décalage pour la pagination
34
- attr_accessor :offset
35
-
36
- # Nombre maximum de résultats (max 100)
37
- attr_accessor :limit
38
-
39
- class EnumAttributeValidator
40
- attr_reader :datatype
41
- attr_reader :allowable_values
42
-
43
- def initialize(datatype, allowable_values)
44
- @allowable_values = allowable_values.map do |value|
45
- case datatype.to_s
46
- when /Integer/i
47
- value.to_i
48
- when /Float/i
49
- value.to_f
50
- else
51
- value
52
- end
53
- end
54
- end
55
-
56
- def valid?(value)
57
- !value || allowable_values.include?(value)
58
- end
59
- end
60
-
61
- # Attribute mapping from ruby-style variable name to JSON key.
62
- def self.attribute_map
63
- {
64
- :'date_maj_apres' => :'date_maj_apres',
65
- :'date_maj_avant' => :'date_maj_avant',
66
- :'type_flux' => :'type_flux',
67
- :'direction_flux' => :'direction_flux',
68
- :'tracking_id' => :'tracking_id',
69
- :'flow_id' => :'flow_id',
70
- :'statut_acquittement' => :'statut_acquittement',
71
- :'offset' => :'offset',
72
- :'limit' => :'limit'
73
- }
74
- end
75
-
76
- # Returns attribute mapping this model knows about
77
- def self.acceptable_attribute_map
78
- attribute_map
79
- end
80
-
81
- # Returns all the JSON keys this model knows about
82
- def self.acceptable_attributes
83
- acceptable_attribute_map.values
84
- end
85
-
86
- # Attribute type mapping.
87
- def self.openapi_types
88
- {
89
- :'date_maj_apres' => :'Time',
90
- :'date_maj_avant' => :'Time',
91
- :'type_flux' => :'Array<TypeFlux>',
92
- :'direction_flux' => :'Array<DirectionFlux>',
93
- :'tracking_id' => :'String',
94
- :'flow_id' => :'String',
95
- :'statut_acquittement' => :'StatutAcquittement',
96
- :'offset' => :'Integer',
97
- :'limit' => :'Integer'
98
- }
99
- end
100
-
101
- # List of attributes with nullable: true
102
- def self.openapi_nullable
103
- Set.new([
104
- :'date_maj_apres',
105
- :'date_maj_avant',
106
- :'type_flux',
107
- :'direction_flux',
108
- :'tracking_id',
109
- :'flow_id',
110
- :'statut_acquittement',
111
- ])
112
- end
113
-
114
- # Initializes the object
115
- # @param [Hash] attributes Model attributes in the form of hash
116
- def initialize(attributes = {})
117
- if (!attributes.is_a?(Hash))
118
- fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::RequeteRechercheFlux` initialize method"
119
- end
120
-
121
- # check to see if the attribute exists and convert string to symbol for hash key
122
- acceptable_attribute_map = self.class.acceptable_attribute_map
123
- attributes = attributes.each_with_object({}) { |(k, v), h|
124
- if (!acceptable_attribute_map.key?(k.to_sym))
125
- fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::RequeteRechercheFlux`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
126
- end
127
- h[k.to_sym] = v
128
- }
129
-
130
- if attributes.key?(:'date_maj_apres')
131
- self.date_maj_apres = attributes[:'date_maj_apres']
132
- end
133
-
134
- if attributes.key?(:'date_maj_avant')
135
- self.date_maj_avant = attributes[:'date_maj_avant']
136
- end
137
-
138
- if attributes.key?(:'type_flux')
139
- if (value = attributes[:'type_flux']).is_a?(Array)
140
- self.type_flux = value
141
- end
142
- end
143
-
144
- if attributes.key?(:'direction_flux')
145
- if (value = attributes[:'direction_flux']).is_a?(Array)
146
- self.direction_flux = value
147
- end
148
- end
149
-
150
- if attributes.key?(:'tracking_id')
151
- self.tracking_id = attributes[:'tracking_id']
152
- end
153
-
154
- if attributes.key?(:'flow_id')
155
- self.flow_id = attributes[:'flow_id']
156
- end
157
-
158
- if attributes.key?(:'statut_acquittement')
159
- self.statut_acquittement = attributes[:'statut_acquittement']
160
- end
161
-
162
- if attributes.key?(:'offset')
163
- self.offset = attributes[:'offset']
164
- else
165
- self.offset = 0
166
- end
167
-
168
- if attributes.key?(:'limit')
169
- self.limit = attributes[:'limit']
170
- else
171
- self.limit = 25
172
- end
173
- end
174
-
175
- # Show invalid properties with the reasons. Usually used together with valid?
176
- # @return Array for valid properties with the reasons
177
- def list_invalid_properties
178
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
179
- invalid_properties = Array.new
180
- if !@offset.nil? && @offset < 0
181
- invalid_properties.push('invalid value for "offset", must be greater than or equal to 0.')
182
- end
183
-
184
- if !@limit.nil? && @limit > 100
185
- invalid_properties.push('invalid value for "limit", must be smaller than or equal to 100.')
186
- end
187
-
188
- if !@limit.nil? && @limit < 1
189
- invalid_properties.push('invalid value for "limit", must be greater than or equal to 1.')
190
- end
191
-
192
- invalid_properties
193
- end
194
-
195
- # Check to see if the all the properties in the model are valid
196
- # @return true if the model is valid
197
- def valid?
198
- warn '[DEPRECATED] the `valid?` method is obsolete'
199
- return false if !@offset.nil? && @offset < 0
200
- return false if !@limit.nil? && @limit > 100
201
- return false if !@limit.nil? && @limit < 1
202
- true
203
- end
204
-
205
- # Custom attribute writer method with validation
206
- # @param [Object] offset Value to be assigned
207
- def offset=(offset)
208
- if offset.nil?
209
- fail ArgumentError, 'offset cannot be nil'
210
- end
211
-
212
- if offset < 0
213
- fail ArgumentError, 'invalid value for "offset", must be greater than or equal to 0.'
214
- end
215
-
216
- @offset = offset
217
- end
218
-
219
- # Custom attribute writer method with validation
220
- # @param [Object] limit Value to be assigned
221
- def limit=(limit)
222
- if limit.nil?
223
- fail ArgumentError, 'limit cannot be nil'
224
- end
225
-
226
- if limit > 100
227
- fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 100.'
228
- end
229
-
230
- if limit < 1
231
- fail ArgumentError, 'invalid value for "limit", must be greater than or equal to 1.'
232
- end
233
-
234
- @limit = limit
235
- end
236
-
237
- # Checks equality by comparing each attribute.
238
- # @param [Object] Object to be compared
239
- def ==(o)
240
- return true if self.equal?(o)
241
- self.class == o.class &&
242
- date_maj_apres == o.date_maj_apres &&
243
- date_maj_avant == o.date_maj_avant &&
244
- type_flux == o.type_flux &&
245
- direction_flux == o.direction_flux &&
246
- tracking_id == o.tracking_id &&
247
- flow_id == o.flow_id &&
248
- statut_acquittement == o.statut_acquittement &&
249
- offset == o.offset &&
250
- limit == o.limit
251
- end
252
-
253
- # @see the `==` method
254
- # @param [Object] Object to be compared
255
- def eql?(o)
256
- self == o
257
- end
258
-
259
- # Calculates hash code according to all attributes.
260
- # @return [Integer] Hash code
261
- def hash
262
- [date_maj_apres, date_maj_avant, type_flux, direction_flux, tracking_id, flow_id, statut_acquittement, offset, limit].hash
263
- end
264
-
265
- # Builds the object from hash
266
- # @param [Hash] attributes Model attributes in the form of hash
267
- # @return [Object] Returns the model itself
268
- def self.build_from_hash(attributes)
269
- return nil unless attributes.is_a?(Hash)
270
- attributes = attributes.transform_keys(&:to_sym)
271
- transformed_hash = {}
272
- openapi_types.each_pair do |key, type|
273
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
274
- transformed_hash["#{key}"] = nil
275
- elsif type =~ /\AArray<(.*)>/i
276
- # check to ensure the input is an array given that the attribute
277
- # is documented as an array but the input is not
278
- if attributes[attribute_map[key]].is_a?(Array)
279
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
280
- end
281
- elsif !attributes[attribute_map[key]].nil?
282
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
283
- end
284
- end
285
- new(transformed_hash)
286
- end
287
-
288
- # Returns the object in the form of hash
289
- # @return [Hash] Returns the object in the form of hash
290
- def to_hash
291
- hash = {}
292
- self.class.attribute_map.each_pair do |attr, param|
293
- value = self.send(attr)
294
- if value.nil?
295
- is_nullable = self.class.openapi_nullable.include?(attr)
296
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
297
- end
298
-
299
- hash[param] = _to_hash(value)
300
- end
301
- hash
302
- end
303
-
304
- end
305
-
306
- end