factpulse 1.0.8

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 (250) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +28 -0
  3. data/Gemfile +9 -0
  4. data/Gemfile.lock +74 -0
  5. data/LICENSE +21 -0
  6. data/README.md +161 -0
  7. data/Rakefile +10 -0
  8. data/docs/AFNORPDPPAApi.md +69 -0
  9. data/docs/AFNORPDPPADirectoryServiceApi.md +196 -0
  10. data/docs/AFNORPDPPAFlowServiceApi.md +258 -0
  11. data/docs/AdresseElectronique.md +20 -0
  12. data/docs/AdressePostale.md +26 -0
  13. data/docs/BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost.md +22 -0
  14. data/docs/BodyCompleterFactureApiV1ChorusProFacturesCompleterPost.md +22 -0
  15. data/docs/BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet.md +20 -0
  16. data/docs/BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost.md +22 -0
  17. data/docs/BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost.md +22 -0
  18. data/docs/BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost.md +22 -0
  19. data/docs/BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost.md +22 -0
  20. data/docs/BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost.md +22 -0
  21. data/docs/BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost.md +22 -0
  22. data/docs/BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost.md +22 -0
  23. data/docs/BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost.md +22 -0
  24. data/docs/CadreDeFacturation.md +22 -0
  25. data/docs/CategorieTVA.md +15 -0
  26. data/docs/CertificateInfoResponse.md +40 -0
  27. data/docs/ChorusProApi.md +1129 -0
  28. data/docs/ChorusProCredentials.md +26 -0
  29. data/docs/CodeCadreFacturation.md +15 -0
  30. data/docs/CodeRaisonReduction.md +15 -0
  31. data/docs/ConsulterFactureRequest.md +20 -0
  32. data/docs/ConsulterFactureResponse.md +34 -0
  33. data/docs/ConsulterStructureRequest.md +22 -0
  34. data/docs/ConsulterStructureResponse.md +34 -0
  35. data/docs/CredentialsAFNOR.md +22 -0
  36. data/docs/CredentialsChorusPro.md +26 -0
  37. data/docs/Destinataire.md +24 -0
  38. data/docs/Destination.md +79 -0
  39. data/docs/DestinationAFNOR.md +24 -0
  40. data/docs/DestinationChorusPro.md +20 -0
  41. data/docs/DirectionFlux.md +15 -0
  42. data/docs/DonneesFactureSimplifiees.md +34 -0
  43. data/docs/FactureEnrichieInfoInput.md +32 -0
  44. data/docs/FactureEnrichieInfoOutput.md +32 -0
  45. data/docs/FactureFacturX.md +44 -0
  46. data/docs/FluxResume.md +32 -0
  47. data/docs/FormatSortie.md +15 -0
  48. data/docs/Fournisseur.md +34 -0
  49. data/docs/GenerateCertificateRequest.md +38 -0
  50. data/docs/GenerateCertificateResponse.md +32 -0
  51. data/docs/HTTPValidationError.md +18 -0
  52. data/docs/InformationSignatureAPI.md +28 -0
  53. data/docs/LigneDePoste.md +46 -0
  54. data/docs/LigneDePosteMontantRemiseHt.md +15 -0
  55. data/docs/LigneDePosteMontantTotalLigneHt.md +15 -0
  56. data/docs/LigneDePosteTauxTvaManuel.md +15 -0
  57. data/docs/LigneDeTVA.md +26 -0
  58. data/docs/ModeDepot.md +15 -0
  59. data/docs/ModePaiement.md +15 -0
  60. data/docs/MontantHtTotal.md +15 -0
  61. data/docs/MontantTotal.md +30 -0
  62. data/docs/MontantTotalAcompte.md +15 -0
  63. data/docs/MontantTotalMontantRemiseGlobaleTtc.md +15 -0
  64. data/docs/MontantTtcTotal.md +15 -0
  65. data/docs/MontantTva.md +15 -0
  66. data/docs/Montantapayer.md +15 -0
  67. data/docs/Montantbaseht.md +15 -0
  68. data/docs/Montanthttotal.md +15 -0
  69. data/docs/Montantttctotal.md +15 -0
  70. data/docs/Montanttva.md +15 -0
  71. data/docs/Montanttva1.md +15 -0
  72. data/docs/Montantunitaireht.md +15 -0
  73. data/docs/ObtenirIdChorusProRequest.md +22 -0
  74. data/docs/ObtenirIdChorusProResponse.md +24 -0
  75. data/docs/OptionsProcessing.md +24 -0
  76. data/docs/PDFFacturXInfo.md +22 -0
  77. data/docs/PDPCredentials.md +24 -0
  78. data/docs/ParametresSignature.md +34 -0
  79. data/docs/ParametresStructure.md +22 -0
  80. data/docs/PieceJointeComplementaire.md +26 -0
  81. data/docs/ProcessingEndpointsUnifisApi.md +147 -0
  82. data/docs/ProfilAPI.md +15 -0
  83. data/docs/ProfilFlux.md +15 -0
  84. data/docs/Quantite.md +15 -0
  85. data/docs/QuotaInfo.md +26 -0
  86. data/docs/RechercherServicesResponse.md +24 -0
  87. data/docs/RechercherStructureRequest.md +26 -0
  88. data/docs/RechercherStructureResponse.md +24 -0
  89. data/docs/References.md +32 -0
  90. data/docs/ReponseHealthcheckAFNOR.md +22 -0
  91. data/docs/ReponseRechercheFlux.md +24 -0
  92. data/docs/ReponseSoumissionFlux.md +30 -0
  93. data/docs/ReponseTache.md +18 -0
  94. data/docs/ReponseValidationErreur.md +18 -0
  95. data/docs/ReponseValidationSucces.md +18 -0
  96. data/docs/RequeteRechercheFlux.md +34 -0
  97. data/docs/RequeteSoumissionFlux.md +28 -0
  98. data/docs/ResultatAFNOR.md +26 -0
  99. data/docs/ResultatChorusPro.md +22 -0
  100. data/docs/ResultatValidationPDFAPI.md +62 -0
  101. data/docs/SantApi.md +69 -0
  102. data/docs/SchemeID.md +15 -0
  103. data/docs/ServiceStructure.md +24 -0
  104. data/docs/SignatureInfo.md +22 -0
  105. data/docs/SignatureLectroniqueApi.md +315 -0
  106. data/docs/SoumettreFactureCompleteRequest.md +26 -0
  107. data/docs/SoumettreFactureCompleteResponse.md +34 -0
  108. data/docs/SoumettreFactureRequest.md +46 -0
  109. data/docs/SoumettreFactureResponse.md +24 -0
  110. data/docs/StatutAcquittement.md +15 -0
  111. data/docs/StatutFacture.md +22 -0
  112. data/docs/StatutTache.md +22 -0
  113. data/docs/StructureInfo.md +26 -0
  114. data/docs/SyntaxeFlux.md +15 -0
  115. data/docs/Tauxmanuel.md +15 -0
  116. data/docs/TraitementFactureApi.md +831 -0
  117. data/docs/TypeFacture.md +15 -0
  118. data/docs/TypeFlux.md +15 -0
  119. data/docs/TypeTVA.md +15 -0
  120. data/docs/Unite.md +15 -0
  121. data/docs/Utilisateur.md +40 -0
  122. data/docs/UtilisateurApi.md +74 -0
  123. data/docs/ValidationError.md +22 -0
  124. data/docs/ValidationErrorLocInner.md +15 -0
  125. data/factpulse.gemspec +39 -0
  126. data/git_push.sh +57 -0
  127. data/lib/factpulse/api/afnorpdppa_api.rb +79 -0
  128. data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +199 -0
  129. data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +256 -0
  130. data/lib/factpulse/api/chorus_pro_api.rb +1116 -0
  131. data/lib/factpulse/api/processing_endpoints_unifis_api.rb +158 -0
  132. data/lib/factpulse/api/sant_api.rb +79 -0
  133. data/lib/factpulse/api/signature_lectronique_api.rb +333 -0
  134. data/lib/factpulse/api/traitement_facture_api.rb +835 -0
  135. data/lib/factpulse/api/utilisateur_api.rb +79 -0
  136. data/lib/factpulse/api_client.rb +393 -0
  137. data/lib/factpulse/api_error.rb +58 -0
  138. data/lib/factpulse/api_model_base.rb +88 -0
  139. data/lib/factpulse/configuration.rb +308 -0
  140. data/lib/factpulse/models/adresse_electronique.rb +196 -0
  141. data/lib/factpulse/models/adresse_postale.rb +189 -0
  142. data/lib/factpulse/models/body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post.rb +202 -0
  143. data/lib/factpulse/models/body_completer_facture_api_v1_chorus_pro_factures_completer_post.rb +202 -0
  144. data/lib/factpulse/models/body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get.rb +174 -0
  145. data/lib/factpulse/models/body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post.rb +202 -0
  146. data/lib/factpulse/models/body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post.rb +202 -0
  147. data/lib/factpulse/models/body_recycler_facture_api_v1_chorus_pro_factures_recycler_post.rb +202 -0
  148. data/lib/factpulse/models/body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post.rb +202 -0
  149. data/lib/factpulse/models/body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post.rb +202 -0
  150. data/lib/factpulse/models/body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post.rb +202 -0
  151. data/lib/factpulse/models/body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post.rb +202 -0
  152. data/lib/factpulse/models/body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post.rb +202 -0
  153. data/lib/factpulse/models/cadre_de_facturation.rb +207 -0
  154. data/lib/factpulse/models/categorie_tva.rb +47 -0
  155. data/lib/factpulse/models/certificate_info_response.rb +446 -0
  156. data/lib/factpulse/models/chorus_pro_credentials.rb +259 -0
  157. data/lib/factpulse/models/code_cadre_facturation.rb +42 -0
  158. data/lib/factpulse/models/code_raison_reduction.rb +45 -0
  159. data/lib/factpulse/models/consulter_facture_request.rb +176 -0
  160. data/lib/factpulse/models/consulter_facture_response.rb +261 -0
  161. data/lib/factpulse/models/consulter_structure_request.rb +188 -0
  162. data/lib/factpulse/models/consulter_structure_response.rb +261 -0
  163. data/lib/factpulse/models/credentials_afnor.rb +169 -0
  164. data/lib/factpulse/models/credentials_chorus_pro.rb +191 -0
  165. data/lib/factpulse/models/destinataire.rb +195 -0
  166. data/lib/factpulse/models/destination.rb +56 -0
  167. data/lib/factpulse/models/destination_afnor.rb +228 -0
  168. data/lib/factpulse/models/destination_chorus_pro.rb +194 -0
  169. data/lib/factpulse/models/direction_flux.rb +40 -0
  170. data/lib/factpulse/models/donnees_facture_simplifiees.rb +342 -0
  171. data/lib/factpulse/models/facture_enrichie_info_input.rb +315 -0
  172. data/lib/factpulse/models/facture_enrichie_info_output.rb +348 -0
  173. data/lib/factpulse/models/facture_factur_x.rb +432 -0
  174. data/lib/factpulse/models/flux_resume.rb +251 -0
  175. data/lib/factpulse/models/format_sortie.rb +40 -0
  176. data/lib/factpulse/models/fournisseur.rb +261 -0
  177. data/lib/factpulse/models/generate_certificate_request.rb +323 -0
  178. data/lib/factpulse/models/generate_certificate_response.rb +254 -0
  179. data/lib/factpulse/models/http_validation_error.rb +149 -0
  180. data/lib/factpulse/models/information_signature_api.rb +216 -0
  181. data/lib/factpulse/models/ligne_de_poste.rb +391 -0
  182. data/lib/factpulse/models/ligne_de_poste_montant_remise_ht.rb +104 -0
  183. data/lib/factpulse/models/ligne_de_poste_montant_total_ligne_ht.rb +104 -0
  184. data/lib/factpulse/models/ligne_de_poste_taux_tva_manuel.rb +104 -0
  185. data/lib/factpulse/models/ligne_de_tva.rb +242 -0
  186. data/lib/factpulse/models/mode_depot.rb +41 -0
  187. data/lib/factpulse/models/mode_paiement.rb +44 -0
  188. data/lib/factpulse/models/montant_ht_total.rb +103 -0
  189. data/lib/factpulse/models/montant_total.rb +273 -0
  190. data/lib/factpulse/models/montant_total_acompte.rb +104 -0
  191. data/lib/factpulse/models/montant_total_montant_remise_globale_ttc.rb +104 -0
  192. data/lib/factpulse/models/montant_ttc_total.rb +103 -0
  193. data/lib/factpulse/models/montant_tva.rb +103 -0
  194. data/lib/factpulse/models/montantapayer.rb +104 -0
  195. data/lib/factpulse/models/montantbaseht.rb +104 -0
  196. data/lib/factpulse/models/montanthttotal.rb +104 -0
  197. data/lib/factpulse/models/montantttctotal.rb +104 -0
  198. data/lib/factpulse/models/montanttva.rb +104 -0
  199. data/lib/factpulse/models/montanttva1.rb +104 -0
  200. data/lib/factpulse/models/montantunitaireht.rb +104 -0
  201. data/lib/factpulse/models/obtenir_id_chorus_pro_request.rb +188 -0
  202. data/lib/factpulse/models/obtenir_id_chorus_pro_response.rb +230 -0
  203. data/lib/factpulse/models/options_processing.rb +221 -0
  204. data/lib/factpulse/models/parametres_signature.rb +235 -0
  205. data/lib/factpulse/models/parametres_structure.rb +175 -0
  206. data/lib/factpulse/models/pdf_factur_x_info.rb +205 -0
  207. data/lib/factpulse/models/pdp_credentials.rb +247 -0
  208. data/lib/factpulse/models/piece_jointe_complementaire.rb +269 -0
  209. data/lib/factpulse/models/profil_api.rb +42 -0
  210. data/lib/factpulse/models/profil_flux.rb +41 -0
  211. data/lib/factpulse/models/quantite.rb +104 -0
  212. data/lib/factpulse/models/quota_info.rb +269 -0
  213. data/lib/factpulse/models/rechercher_services_response.rb +214 -0
  214. data/lib/factpulse/models/rechercher_structure_request.rb +191 -0
  215. data/lib/factpulse/models/rechercher_structure_response.rb +216 -0
  216. data/lib/factpulse/models/references.rb +290 -0
  217. data/lib/factpulse/models/reponse_healthcheck_afnor.rb +220 -0
  218. data/lib/factpulse/models/reponse_recherche_flux.rb +249 -0
  219. data/lib/factpulse/models/reponse_soumission_flux.rb +294 -0
  220. data/lib/factpulse/models/reponse_tache.rb +165 -0
  221. data/lib/factpulse/models/reponse_validation_erreur.rb +167 -0
  222. data/lib/factpulse/models/reponse_validation_succes.rb +165 -0
  223. data/lib/factpulse/models/requete_recherche_flux.rb +306 -0
  224. data/lib/factpulse/models/requete_soumission_flux.rb +238 -0
  225. data/lib/factpulse/models/resultat_afnor.rb +240 -0
  226. data/lib/factpulse/models/resultat_chorus_pro.rb +186 -0
  227. data/lib/factpulse/models/resultat_validation_pdfapi.rb +523 -0
  228. data/lib/factpulse/models/scheme_id.rb +43 -0
  229. data/lib/factpulse/models/service_structure.rb +247 -0
  230. data/lib/factpulse/models/signature_info.rb +186 -0
  231. data/lib/factpulse/models/soumettre_facture_complete_request.rb +239 -0
  232. data/lib/factpulse/models/soumettre_facture_complete_response.rb +355 -0
  233. data/lib/factpulse/models/soumettre_facture_request.rb +391 -0
  234. data/lib/factpulse/models/soumettre_facture_response.rb +213 -0
  235. data/lib/factpulse/models/statut_acquittement.rb +41 -0
  236. data/lib/factpulse/models/statut_facture.rb +203 -0
  237. data/lib/factpulse/models/statut_tache.rb +201 -0
  238. data/lib/factpulse/models/structure_info.rb +274 -0
  239. data/lib/factpulse/models/syntaxe_flux.rb +43 -0
  240. data/lib/factpulse/models/tauxmanuel.rb +104 -0
  241. data/lib/factpulse/models/type_facture.rb +40 -0
  242. data/lib/factpulse/models/type_flux.rb +43 -0
  243. data/lib/factpulse/models/type_tva.rb +42 -0
  244. data/lib/factpulse/models/unite.rb +44 -0
  245. data/lib/factpulse/models/utilisateur.rb +328 -0
  246. data/lib/factpulse/models/validation_error.rb +218 -0
  247. data/lib/factpulse/models/validation_error_loc_inner.rb +103 -0
  248. data/lib/factpulse/version.rb +15 -0
  249. data/lib/factpulse.rb +157 -0
  250. metadata +382 -0
@@ -0,0 +1,523 @@
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ésultat complet de la validation d'un PDF Factur-X.
18
+ class ResultatValidationPDFAPI < ApiModelBase
19
+ # True si le PDF est conforme à tous les critères (XML, PDF/A, XMP)
20
+ attr_accessor :est_conforme
21
+
22
+ # True si un XML Factur-X est embarqué dans le PDF
23
+ attr_accessor :xml_present
24
+
25
+ # True si le XML Factur-X est conforme aux règles Schematron
26
+ attr_accessor :xml_conforme
27
+
28
+ attr_accessor :profil_detecte
29
+
30
+ # Liste des erreurs de validation XML
31
+ attr_accessor :erreurs_xml
32
+
33
+ # True si le PDF est conforme PDF/A
34
+ attr_accessor :pdfa_conforme
35
+
36
+ attr_accessor :version_pdfa
37
+
38
+ # Méthode utilisée pour la validation PDF/A (metadata ou verapdf)
39
+ attr_accessor :methode_validation_pdfa
40
+
41
+ attr_accessor :regles_validees
42
+
43
+ attr_accessor :regles_echouees
44
+
45
+ # Liste des erreurs de conformité PDF/A
46
+ attr_accessor :erreurs_pdfa
47
+
48
+ # Liste des avertissements PDF/A
49
+ attr_accessor :avertissements_pdfa
50
+
51
+ # True si des métadonnées XMP sont présentes
52
+ attr_accessor :xmp_present
53
+
54
+ # True si les métadonnées XMP contiennent des informations Factur-X
55
+ attr_accessor :xmp_conforme_facturx
56
+
57
+ attr_accessor :profil_xmp
58
+
59
+ attr_accessor :version_xmp
60
+
61
+ # Liste des erreurs de métadonnées XMP
62
+ attr_accessor :erreurs_xmp
63
+
64
+ # Métadonnées XMP extraites du PDF
65
+ attr_accessor :metadonnees_xmp
66
+
67
+ # True si le PDF contient au moins une signature
68
+ attr_accessor :est_signe
69
+
70
+ # Nombre de signatures électroniques trouvées
71
+ attr_accessor :nombre_signatures
72
+
73
+ # Liste des signatures trouvées avec leurs informations
74
+ attr_accessor :signatures
75
+
76
+ # Liste des erreurs lors de l'analyse des signatures
77
+ attr_accessor :erreurs_signatures
78
+
79
+ # Message résumant le résultat de la validation
80
+ attr_accessor :message_resume
81
+
82
+ # Attribute mapping from ruby-style variable name to JSON key.
83
+ def self.attribute_map
84
+ {
85
+ :'est_conforme' => :'est_conforme',
86
+ :'xml_present' => :'xml_present',
87
+ :'xml_conforme' => :'xml_conforme',
88
+ :'profil_detecte' => :'profil_detecte',
89
+ :'erreurs_xml' => :'erreurs_xml',
90
+ :'pdfa_conforme' => :'pdfa_conforme',
91
+ :'version_pdfa' => :'version_pdfa',
92
+ :'methode_validation_pdfa' => :'methode_validation_pdfa',
93
+ :'regles_validees' => :'regles_validees',
94
+ :'regles_echouees' => :'regles_echouees',
95
+ :'erreurs_pdfa' => :'erreurs_pdfa',
96
+ :'avertissements_pdfa' => :'avertissements_pdfa',
97
+ :'xmp_present' => :'xmp_present',
98
+ :'xmp_conforme_facturx' => :'xmp_conforme_facturx',
99
+ :'profil_xmp' => :'profil_xmp',
100
+ :'version_xmp' => :'version_xmp',
101
+ :'erreurs_xmp' => :'erreurs_xmp',
102
+ :'metadonnees_xmp' => :'metadonnees_xmp',
103
+ :'est_signe' => :'est_signe',
104
+ :'nombre_signatures' => :'nombre_signatures',
105
+ :'signatures' => :'signatures',
106
+ :'erreurs_signatures' => :'erreurs_signatures',
107
+ :'message_resume' => :'message_resume'
108
+ }
109
+ end
110
+
111
+ # Returns attribute mapping this model knows about
112
+ def self.acceptable_attribute_map
113
+ attribute_map
114
+ end
115
+
116
+ # Returns all the JSON keys this model knows about
117
+ def self.acceptable_attributes
118
+ acceptable_attribute_map.values
119
+ end
120
+
121
+ # Attribute type mapping.
122
+ def self.openapi_types
123
+ {
124
+ :'est_conforme' => :'Boolean',
125
+ :'xml_present' => :'Boolean',
126
+ :'xml_conforme' => :'Boolean',
127
+ :'profil_detecte' => :'String',
128
+ :'erreurs_xml' => :'Array<String>',
129
+ :'pdfa_conforme' => :'Boolean',
130
+ :'version_pdfa' => :'String',
131
+ :'methode_validation_pdfa' => :'String',
132
+ :'regles_validees' => :'Integer',
133
+ :'regles_echouees' => :'Integer',
134
+ :'erreurs_pdfa' => :'Array<String>',
135
+ :'avertissements_pdfa' => :'Array<String>',
136
+ :'xmp_present' => :'Boolean',
137
+ :'xmp_conforme_facturx' => :'Boolean',
138
+ :'profil_xmp' => :'String',
139
+ :'version_xmp' => :'String',
140
+ :'erreurs_xmp' => :'Array<String>',
141
+ :'metadonnees_xmp' => :'Hash<String, Object>',
142
+ :'est_signe' => :'Boolean',
143
+ :'nombre_signatures' => :'Integer',
144
+ :'signatures' => :'Array<InformationSignatureAPI>',
145
+ :'erreurs_signatures' => :'Array<String>',
146
+ :'message_resume' => :'String'
147
+ }
148
+ end
149
+
150
+ # List of attributes with nullable: true
151
+ def self.openapi_nullable
152
+ Set.new([
153
+ :'profil_detecte',
154
+ :'version_pdfa',
155
+ :'regles_validees',
156
+ :'regles_echouees',
157
+ :'profil_xmp',
158
+ :'version_xmp',
159
+ ])
160
+ end
161
+
162
+ # Initializes the object
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ def initialize(attributes = {})
165
+ if (!attributes.is_a?(Hash))
166
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::ResultatValidationPDFAPI` initialize method"
167
+ end
168
+
169
+ # check to see if the attribute exists and convert string to symbol for hash key
170
+ acceptable_attribute_map = self.class.acceptable_attribute_map
171
+ attributes = attributes.each_with_object({}) { |(k, v), h|
172
+ if (!acceptable_attribute_map.key?(k.to_sym))
173
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::ResultatValidationPDFAPI`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
174
+ end
175
+ h[k.to_sym] = v
176
+ }
177
+
178
+ if attributes.key?(:'est_conforme')
179
+ self.est_conforme = attributes[:'est_conforme']
180
+ else
181
+ self.est_conforme = nil
182
+ end
183
+
184
+ if attributes.key?(:'xml_present')
185
+ self.xml_present = attributes[:'xml_present']
186
+ else
187
+ self.xml_present = nil
188
+ end
189
+
190
+ if attributes.key?(:'xml_conforme')
191
+ self.xml_conforme = attributes[:'xml_conforme']
192
+ else
193
+ self.xml_conforme = nil
194
+ end
195
+
196
+ if attributes.key?(:'profil_detecte')
197
+ self.profil_detecte = attributes[:'profil_detecte']
198
+ end
199
+
200
+ if attributes.key?(:'erreurs_xml')
201
+ if (value = attributes[:'erreurs_xml']).is_a?(Array)
202
+ self.erreurs_xml = value
203
+ end
204
+ end
205
+
206
+ if attributes.key?(:'pdfa_conforme')
207
+ self.pdfa_conforme = attributes[:'pdfa_conforme']
208
+ else
209
+ self.pdfa_conforme = nil
210
+ end
211
+
212
+ if attributes.key?(:'version_pdfa')
213
+ self.version_pdfa = attributes[:'version_pdfa']
214
+ end
215
+
216
+ if attributes.key?(:'methode_validation_pdfa')
217
+ self.methode_validation_pdfa = attributes[:'methode_validation_pdfa']
218
+ else
219
+ self.methode_validation_pdfa = 'metadata'
220
+ end
221
+
222
+ if attributes.key?(:'regles_validees')
223
+ self.regles_validees = attributes[:'regles_validees']
224
+ end
225
+
226
+ if attributes.key?(:'regles_echouees')
227
+ self.regles_echouees = attributes[:'regles_echouees']
228
+ end
229
+
230
+ if attributes.key?(:'erreurs_pdfa')
231
+ if (value = attributes[:'erreurs_pdfa']).is_a?(Array)
232
+ self.erreurs_pdfa = value
233
+ end
234
+ end
235
+
236
+ if attributes.key?(:'avertissements_pdfa')
237
+ if (value = attributes[:'avertissements_pdfa']).is_a?(Array)
238
+ self.avertissements_pdfa = value
239
+ end
240
+ end
241
+
242
+ if attributes.key?(:'xmp_present')
243
+ self.xmp_present = attributes[:'xmp_present']
244
+ else
245
+ self.xmp_present = nil
246
+ end
247
+
248
+ if attributes.key?(:'xmp_conforme_facturx')
249
+ self.xmp_conforme_facturx = attributes[:'xmp_conforme_facturx']
250
+ else
251
+ self.xmp_conforme_facturx = nil
252
+ end
253
+
254
+ if attributes.key?(:'profil_xmp')
255
+ self.profil_xmp = attributes[:'profil_xmp']
256
+ end
257
+
258
+ if attributes.key?(:'version_xmp')
259
+ self.version_xmp = attributes[:'version_xmp']
260
+ end
261
+
262
+ if attributes.key?(:'erreurs_xmp')
263
+ if (value = attributes[:'erreurs_xmp']).is_a?(Array)
264
+ self.erreurs_xmp = value
265
+ end
266
+ end
267
+
268
+ if attributes.key?(:'metadonnees_xmp')
269
+ if (value = attributes[:'metadonnees_xmp']).is_a?(Hash)
270
+ self.metadonnees_xmp = value
271
+ end
272
+ end
273
+
274
+ if attributes.key?(:'est_signe')
275
+ self.est_signe = attributes[:'est_signe']
276
+ else
277
+ self.est_signe = nil
278
+ end
279
+
280
+ if attributes.key?(:'nombre_signatures')
281
+ self.nombre_signatures = attributes[:'nombre_signatures']
282
+ else
283
+ self.nombre_signatures = 0
284
+ end
285
+
286
+ if attributes.key?(:'signatures')
287
+ if (value = attributes[:'signatures']).is_a?(Array)
288
+ self.signatures = value
289
+ end
290
+ end
291
+
292
+ if attributes.key?(:'erreurs_signatures')
293
+ if (value = attributes[:'erreurs_signatures']).is_a?(Array)
294
+ self.erreurs_signatures = value
295
+ end
296
+ end
297
+
298
+ if attributes.key?(:'message_resume')
299
+ self.message_resume = attributes[:'message_resume']
300
+ else
301
+ self.message_resume = nil
302
+ end
303
+ end
304
+
305
+ # Show invalid properties with the reasons. Usually used together with valid?
306
+ # @return Array for valid properties with the reasons
307
+ def list_invalid_properties
308
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
309
+ invalid_properties = Array.new
310
+ if @est_conforme.nil?
311
+ invalid_properties.push('invalid value for "est_conforme", est_conforme cannot be nil.')
312
+ end
313
+
314
+ if @xml_present.nil?
315
+ invalid_properties.push('invalid value for "xml_present", xml_present cannot be nil.')
316
+ end
317
+
318
+ if @xml_conforme.nil?
319
+ invalid_properties.push('invalid value for "xml_conforme", xml_conforme cannot be nil.')
320
+ end
321
+
322
+ if @pdfa_conforme.nil?
323
+ invalid_properties.push('invalid value for "pdfa_conforme", pdfa_conforme cannot be nil.')
324
+ end
325
+
326
+ if @xmp_present.nil?
327
+ invalid_properties.push('invalid value for "xmp_present", xmp_present cannot be nil.')
328
+ end
329
+
330
+ if @xmp_conforme_facturx.nil?
331
+ invalid_properties.push('invalid value for "xmp_conforme_facturx", xmp_conforme_facturx cannot be nil.')
332
+ end
333
+
334
+ if @est_signe.nil?
335
+ invalid_properties.push('invalid value for "est_signe", est_signe cannot be nil.')
336
+ end
337
+
338
+ if @message_resume.nil?
339
+ invalid_properties.push('invalid value for "message_resume", message_resume cannot be nil.')
340
+ end
341
+
342
+ invalid_properties
343
+ end
344
+
345
+ # Check to see if the all the properties in the model are valid
346
+ # @return true if the model is valid
347
+ def valid?
348
+ warn '[DEPRECATED] the `valid?` method is obsolete'
349
+ return false if @est_conforme.nil?
350
+ return false if @xml_present.nil?
351
+ return false if @xml_conforme.nil?
352
+ return false if @pdfa_conforme.nil?
353
+ return false if @xmp_present.nil?
354
+ return false if @xmp_conforme_facturx.nil?
355
+ return false if @est_signe.nil?
356
+ return false if @message_resume.nil?
357
+ true
358
+ end
359
+
360
+ # Custom attribute writer method with validation
361
+ # @param [Object] est_conforme Value to be assigned
362
+ def est_conforme=(est_conforme)
363
+ if est_conforme.nil?
364
+ fail ArgumentError, 'est_conforme cannot be nil'
365
+ end
366
+
367
+ @est_conforme = est_conforme
368
+ end
369
+
370
+ # Custom attribute writer method with validation
371
+ # @param [Object] xml_present Value to be assigned
372
+ def xml_present=(xml_present)
373
+ if xml_present.nil?
374
+ fail ArgumentError, 'xml_present cannot be nil'
375
+ end
376
+
377
+ @xml_present = xml_present
378
+ end
379
+
380
+ # Custom attribute writer method with validation
381
+ # @param [Object] xml_conforme Value to be assigned
382
+ def xml_conforme=(xml_conforme)
383
+ if xml_conforme.nil?
384
+ fail ArgumentError, 'xml_conforme cannot be nil'
385
+ end
386
+
387
+ @xml_conforme = xml_conforme
388
+ end
389
+
390
+ # Custom attribute writer method with validation
391
+ # @param [Object] pdfa_conforme Value to be assigned
392
+ def pdfa_conforme=(pdfa_conforme)
393
+ if pdfa_conforme.nil?
394
+ fail ArgumentError, 'pdfa_conforme cannot be nil'
395
+ end
396
+
397
+ @pdfa_conforme = pdfa_conforme
398
+ end
399
+
400
+ # Custom attribute writer method with validation
401
+ # @param [Object] xmp_present Value to be assigned
402
+ def xmp_present=(xmp_present)
403
+ if xmp_present.nil?
404
+ fail ArgumentError, 'xmp_present cannot be nil'
405
+ end
406
+
407
+ @xmp_present = xmp_present
408
+ end
409
+
410
+ # Custom attribute writer method with validation
411
+ # @param [Object] xmp_conforme_facturx Value to be assigned
412
+ def xmp_conforme_facturx=(xmp_conforme_facturx)
413
+ if xmp_conforme_facturx.nil?
414
+ fail ArgumentError, 'xmp_conforme_facturx cannot be nil'
415
+ end
416
+
417
+ @xmp_conforme_facturx = xmp_conforme_facturx
418
+ end
419
+
420
+ # Custom attribute writer method with validation
421
+ # @param [Object] est_signe Value to be assigned
422
+ def est_signe=(est_signe)
423
+ if est_signe.nil?
424
+ fail ArgumentError, 'est_signe cannot be nil'
425
+ end
426
+
427
+ @est_signe = est_signe
428
+ end
429
+
430
+ # Custom attribute writer method with validation
431
+ # @param [Object] message_resume Value to be assigned
432
+ def message_resume=(message_resume)
433
+ if message_resume.nil?
434
+ fail ArgumentError, 'message_resume cannot be nil'
435
+ end
436
+
437
+ @message_resume = message_resume
438
+ end
439
+
440
+ # Checks equality by comparing each attribute.
441
+ # @param [Object] Object to be compared
442
+ def ==(o)
443
+ return true if self.equal?(o)
444
+ self.class == o.class &&
445
+ est_conforme == o.est_conforme &&
446
+ xml_present == o.xml_present &&
447
+ xml_conforme == o.xml_conforme &&
448
+ profil_detecte == o.profil_detecte &&
449
+ erreurs_xml == o.erreurs_xml &&
450
+ pdfa_conforme == o.pdfa_conforme &&
451
+ version_pdfa == o.version_pdfa &&
452
+ methode_validation_pdfa == o.methode_validation_pdfa &&
453
+ regles_validees == o.regles_validees &&
454
+ regles_echouees == o.regles_echouees &&
455
+ erreurs_pdfa == o.erreurs_pdfa &&
456
+ avertissements_pdfa == o.avertissements_pdfa &&
457
+ xmp_present == o.xmp_present &&
458
+ xmp_conforme_facturx == o.xmp_conforme_facturx &&
459
+ profil_xmp == o.profil_xmp &&
460
+ version_xmp == o.version_xmp &&
461
+ erreurs_xmp == o.erreurs_xmp &&
462
+ metadonnees_xmp == o.metadonnees_xmp &&
463
+ est_signe == o.est_signe &&
464
+ nombre_signatures == o.nombre_signatures &&
465
+ signatures == o.signatures &&
466
+ erreurs_signatures == o.erreurs_signatures &&
467
+ message_resume == o.message_resume
468
+ end
469
+
470
+ # @see the `==` method
471
+ # @param [Object] Object to be compared
472
+ def eql?(o)
473
+ self == o
474
+ end
475
+
476
+ # Calculates hash code according to all attributes.
477
+ # @return [Integer] Hash code
478
+ def hash
479
+ [est_conforme, xml_present, xml_conforme, profil_detecte, erreurs_xml, pdfa_conforme, version_pdfa, methode_validation_pdfa, regles_validees, regles_echouees, erreurs_pdfa, avertissements_pdfa, xmp_present, xmp_conforme_facturx, profil_xmp, version_xmp, erreurs_xmp, metadonnees_xmp, est_signe, nombre_signatures, signatures, erreurs_signatures, message_resume].hash
480
+ end
481
+
482
+ # Builds the object from hash
483
+ # @param [Hash] attributes Model attributes in the form of hash
484
+ # @return [Object] Returns the model itself
485
+ def self.build_from_hash(attributes)
486
+ return nil unless attributes.is_a?(Hash)
487
+ attributes = attributes.transform_keys(&:to_sym)
488
+ transformed_hash = {}
489
+ openapi_types.each_pair do |key, type|
490
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
491
+ transformed_hash["#{key}"] = nil
492
+ elsif type =~ /\AArray<(.*)>/i
493
+ # check to ensure the input is an array given that the attribute
494
+ # is documented as an array but the input is not
495
+ if attributes[attribute_map[key]].is_a?(Array)
496
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
497
+ end
498
+ elsif !attributes[attribute_map[key]].nil?
499
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
500
+ end
501
+ end
502
+ new(transformed_hash)
503
+ end
504
+
505
+ # Returns the object in the form of hash
506
+ # @return [Hash] Returns the object in the form of hash
507
+ def to_hash
508
+ hash = {}
509
+ self.class.attribute_map.each_pair do |attr, param|
510
+ value = self.send(attr)
511
+ if value.nil?
512
+ is_nullable = self.class.openapi_nullable.include?(attr)
513
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
514
+ end
515
+
516
+ hash[param] = _to_hash(value)
517
+ end
518
+ hash
519
+ end
520
+
521
+ end
522
+
523
+ end
@@ -0,0 +1,43 @@
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 SchemeID
18
+ N0225 = "0225".freeze
19
+ N0088 = "0088".freeze
20
+ N0060 = "0060".freeze
21
+ N9957 = "9957".freeze
22
+ N0199 = "0199".freeze
23
+
24
+ def self.all_vars
25
+ @all_vars ||= [N0225, N0088, N0060, N9957, N0199].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 SchemeID.all_vars.include?(value)
40
+ raise "Invalid ENUM value #{value} for class #SchemeID"
41
+ end
42
+ end
43
+ end