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,247 @@
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
+ # Service d'une structure.
18
+ class ServiceStructure < ApiModelBase
19
+ # ID du service
20
+ attr_accessor :id_service
21
+
22
+ # Code du service
23
+ attr_accessor :code_service
24
+
25
+ # Libellé du service
26
+ attr_accessor :libelle_service
27
+
28
+ # Service actif
29
+ attr_accessor :est_actif
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'id_service' => :'id_service',
35
+ :'code_service' => :'code_service',
36
+ :'libelle_service' => :'libelle_service',
37
+ :'est_actif' => :'est_actif'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'id_service' => :'Integer',
55
+ :'code_service' => :'String',
56
+ :'libelle_service' => :'String',
57
+ :'est_actif' => :'Boolean'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::ServiceStructure` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!acceptable_attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::ServiceStructure`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'id_service')
84
+ self.id_service = attributes[:'id_service']
85
+ else
86
+ self.id_service = nil
87
+ end
88
+
89
+ if attributes.key?(:'code_service')
90
+ self.code_service = attributes[:'code_service']
91
+ else
92
+ self.code_service = nil
93
+ end
94
+
95
+ if attributes.key?(:'libelle_service')
96
+ self.libelle_service = attributes[:'libelle_service']
97
+ else
98
+ self.libelle_service = nil
99
+ end
100
+
101
+ if attributes.key?(:'est_actif')
102
+ self.est_actif = attributes[:'est_actif']
103
+ else
104
+ self.est_actif = nil
105
+ end
106
+ end
107
+
108
+ # Show invalid properties with the reasons. Usually used together with valid?
109
+ # @return Array for valid properties with the reasons
110
+ def list_invalid_properties
111
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
112
+ invalid_properties = Array.new
113
+ if @id_service.nil?
114
+ invalid_properties.push('invalid value for "id_service", id_service cannot be nil.')
115
+ end
116
+
117
+ if @code_service.nil?
118
+ invalid_properties.push('invalid value for "code_service", code_service cannot be nil.')
119
+ end
120
+
121
+ if @libelle_service.nil?
122
+ invalid_properties.push('invalid value for "libelle_service", libelle_service cannot be nil.')
123
+ end
124
+
125
+ if @est_actif.nil?
126
+ invalid_properties.push('invalid value for "est_actif", est_actif cannot be nil.')
127
+ end
128
+
129
+ invalid_properties
130
+ end
131
+
132
+ # Check to see if the all the properties in the model are valid
133
+ # @return true if the model is valid
134
+ def valid?
135
+ warn '[DEPRECATED] the `valid?` method is obsolete'
136
+ return false if @id_service.nil?
137
+ return false if @code_service.nil?
138
+ return false if @libelle_service.nil?
139
+ return false if @est_actif.nil?
140
+ true
141
+ end
142
+
143
+ # Custom attribute writer method with validation
144
+ # @param [Object] id_service Value to be assigned
145
+ def id_service=(id_service)
146
+ if id_service.nil?
147
+ fail ArgumentError, 'id_service cannot be nil'
148
+ end
149
+
150
+ @id_service = id_service
151
+ end
152
+
153
+ # Custom attribute writer method with validation
154
+ # @param [Object] code_service Value to be assigned
155
+ def code_service=(code_service)
156
+ if code_service.nil?
157
+ fail ArgumentError, 'code_service cannot be nil'
158
+ end
159
+
160
+ @code_service = code_service
161
+ end
162
+
163
+ # Custom attribute writer method with validation
164
+ # @param [Object] libelle_service Value to be assigned
165
+ def libelle_service=(libelle_service)
166
+ if libelle_service.nil?
167
+ fail ArgumentError, 'libelle_service cannot be nil'
168
+ end
169
+
170
+ @libelle_service = libelle_service
171
+ end
172
+
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] est_actif Value to be assigned
175
+ def est_actif=(est_actif)
176
+ if est_actif.nil?
177
+ fail ArgumentError, 'est_actif cannot be nil'
178
+ end
179
+
180
+ @est_actif = est_actif
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
+ id_service == o.id_service &&
189
+ code_service == o.code_service &&
190
+ libelle_service == o.libelle_service &&
191
+ est_actif == o.est_actif
192
+ end
193
+
194
+ # @see the `==` method
195
+ # @param [Object] Object to be compared
196
+ def eql?(o)
197
+ self == o
198
+ end
199
+
200
+ # Calculates hash code according to all attributes.
201
+ # @return [Integer] Hash code
202
+ def hash
203
+ [id_service, code_service, libelle_service, est_actif].hash
204
+ end
205
+
206
+ # Builds the object from hash
207
+ # @param [Hash] attributes Model attributes in the form of hash
208
+ # @return [Object] Returns the model itself
209
+ def self.build_from_hash(attributes)
210
+ return nil unless attributes.is_a?(Hash)
211
+ attributes = attributes.transform_keys(&:to_sym)
212
+ transformed_hash = {}
213
+ openapi_types.each_pair do |key, type|
214
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
215
+ transformed_hash["#{key}"] = nil
216
+ elsif type =~ /\AArray<(.*)>/i
217
+ # check to ensure the input is an array given that the attribute
218
+ # is documented as an array but the input is not
219
+ if attributes[attribute_map[key]].is_a?(Array)
220
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
221
+ end
222
+ elsif !attributes[attribute_map[key]].nil?
223
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
224
+ end
225
+ end
226
+ new(transformed_hash)
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ self.class.attribute_map.each_pair do |attr, param|
234
+ value = self.send(attr)
235
+ if value.nil?
236
+ is_nullable = self.class.openapi_nullable.include?(attr)
237
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
238
+ end
239
+
240
+ hash[param] = _to_hash(value)
241
+ end
242
+ hash
243
+ end
244
+
245
+ end
246
+
247
+ end
@@ -0,0 +1,186 @@
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
+ # Informations sur la signature électronique.
18
+ class SignatureInfo < ApiModelBase
19
+ # Le PDF a été signé
20
+ attr_accessor :signe
21
+
22
+ attr_accessor :cn
23
+
24
+ attr_accessor :expiration
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'signe' => :'signe',
30
+ :'cn' => :'cn',
31
+ :'expiration' => :'expiration'
32
+ }
33
+ end
34
+
35
+ # Returns attribute mapping this model knows about
36
+ def self.acceptable_attribute_map
37
+ attribute_map
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ acceptable_attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'signe' => :'Boolean',
49
+ :'cn' => :'String',
50
+ :'expiration' => :'String'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ :'cn',
58
+ :'expiration'
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::SignatureInfo` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::SignatureInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'signe')
79
+ self.signe = attributes[:'signe']
80
+ else
81
+ self.signe = nil
82
+ end
83
+
84
+ if attributes.key?(:'cn')
85
+ self.cn = attributes[:'cn']
86
+ end
87
+
88
+ if attributes.key?(:'expiration')
89
+ self.expiration = attributes[:'expiration']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
+ invalid_properties = Array.new
98
+ if @signe.nil?
99
+ invalid_properties.push('invalid value for "signe", signe cannot be nil.')
100
+ end
101
+
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
+ return false if @signe.nil?
110
+ true
111
+ end
112
+
113
+ # Custom attribute writer method with validation
114
+ # @param [Object] signe Value to be assigned
115
+ def signe=(signe)
116
+ if signe.nil?
117
+ fail ArgumentError, 'signe cannot be nil'
118
+ end
119
+
120
+ @signe = signe
121
+ end
122
+
123
+ # Checks equality by comparing each attribute.
124
+ # @param [Object] Object to be compared
125
+ def ==(o)
126
+ return true if self.equal?(o)
127
+ self.class == o.class &&
128
+ signe == o.signe &&
129
+ cn == o.cn &&
130
+ expiration == o.expiration
131
+ end
132
+
133
+ # @see the `==` method
134
+ # @param [Object] Object to be compared
135
+ def eql?(o)
136
+ self == o
137
+ end
138
+
139
+ # Calculates hash code according to all attributes.
140
+ # @return [Integer] Hash code
141
+ def hash
142
+ [signe, cn, expiration].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def self.build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+ attributes = attributes.transform_keys(&:to_sym)
151
+ transformed_hash = {}
152
+ openapi_types.each_pair do |key, type|
153
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
154
+ transformed_hash["#{key}"] = nil
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[attribute_map[key]].is_a?(Array)
159
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
160
+ end
161
+ elsif !attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
163
+ end
164
+ end
165
+ new(transformed_hash)
166
+ end
167
+
168
+ # Returns the object in the form of hash
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_hash
171
+ hash = {}
172
+ self.class.attribute_map.each_pair do |attr, param|
173
+ value = self.send(attr)
174
+ if value.nil?
175
+ is_nullable = self.class.openapi_nullable.include?(attr)
176
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
177
+ end
178
+
179
+ hash[param] = _to_hash(value)
180
+ end
181
+ hash
182
+ end
183
+
184
+ end
185
+
186
+ end
@@ -0,0 +1,239 @@
1
+ =begin
2
+ #API REST FactPulse
3
+
4
+ # API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }' ``` **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l'accès - ✅ Intégration facile dans n'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l'automatisation ### 📚 Documentation complète Pour plus d'informations sur l'authentification et l'utilisation de l'API : https://www.factpulse.fr/documentation-api/
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FactPulse
17
+ # Requête pour soumettre une facture complète (génération + soumission). Workflow : 1. Auto-enrichissement (optionnel) 2. Génération PDF Factur-X 3. Signature (optionnelle) 4. Soumission vers la destination
18
+ class SoumettreFactureCompleteRequest < ApiModelBase
19
+ # Données de la facture au format simplifié (voir exemples)
20
+ attr_accessor :donnees_facture
21
+
22
+ # PDF source encodé en base64 (sera transformé en Factur-X)
23
+ attr_accessor :pdf_source
24
+
25
+ attr_accessor :destination
26
+
27
+ attr_accessor :signature
28
+
29
+ # Options de traitement
30
+ attr_accessor :options
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'donnees_facture' => :'donnees_facture',
36
+ :'pdf_source' => :'pdf_source',
37
+ :'destination' => :'destination',
38
+ :'signature' => :'signature',
39
+ :'options' => :'options'
40
+ }
41
+ end
42
+
43
+ # Returns attribute mapping this model knows about
44
+ def self.acceptable_attribute_map
45
+ attribute_map
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ acceptable_attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'donnees_facture' => :'DonneesFactureSimplifiees',
57
+ :'pdf_source' => :'String',
58
+ :'destination' => :'Destination',
59
+ :'signature' => :'ParametresSignature',
60
+ :'options' => :'OptionsProcessing'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ :'signature',
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::SoumettreFactureCompleteRequest` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ acceptable_attribute_map = self.class.acceptable_attribute_map
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!acceptable_attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::SoumettreFactureCompleteRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'donnees_facture')
88
+ self.donnees_facture = attributes[:'donnees_facture']
89
+ else
90
+ self.donnees_facture = nil
91
+ end
92
+
93
+ if attributes.key?(:'pdf_source')
94
+ self.pdf_source = attributes[:'pdf_source']
95
+ else
96
+ self.pdf_source = nil
97
+ end
98
+
99
+ if attributes.key?(:'destination')
100
+ self.destination = attributes[:'destination']
101
+ else
102
+ self.destination = nil
103
+ end
104
+
105
+ if attributes.key?(:'signature')
106
+ self.signature = attributes[:'signature']
107
+ end
108
+
109
+ if attributes.key?(:'options')
110
+ self.options = attributes[:'options']
111
+ end
112
+ end
113
+
114
+ # Show invalid properties with the reasons. Usually used together with valid?
115
+ # @return Array for valid properties with the reasons
116
+ def list_invalid_properties
117
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
118
+ invalid_properties = Array.new
119
+ if @donnees_facture.nil?
120
+ invalid_properties.push('invalid value for "donnees_facture", donnees_facture cannot be nil.')
121
+ end
122
+
123
+ if @pdf_source.nil?
124
+ invalid_properties.push('invalid value for "pdf_source", pdf_source cannot be nil.')
125
+ end
126
+
127
+ if @destination.nil?
128
+ invalid_properties.push('invalid value for "destination", destination cannot be nil.')
129
+ end
130
+
131
+ invalid_properties
132
+ end
133
+
134
+ # Check to see if the all the properties in the model are valid
135
+ # @return true if the model is valid
136
+ def valid?
137
+ warn '[DEPRECATED] the `valid?` method is obsolete'
138
+ return false if @donnees_facture.nil?
139
+ return false if @pdf_source.nil?
140
+ return false if @destination.nil?
141
+ true
142
+ end
143
+
144
+ # Custom attribute writer method with validation
145
+ # @param [Object] donnees_facture Value to be assigned
146
+ def donnees_facture=(donnees_facture)
147
+ if donnees_facture.nil?
148
+ fail ArgumentError, 'donnees_facture cannot be nil'
149
+ end
150
+
151
+ @donnees_facture = donnees_facture
152
+ end
153
+
154
+ # Custom attribute writer method with validation
155
+ # @param [Object] pdf_source Value to be assigned
156
+ def pdf_source=(pdf_source)
157
+ if pdf_source.nil?
158
+ fail ArgumentError, 'pdf_source cannot be nil'
159
+ end
160
+
161
+ @pdf_source = pdf_source
162
+ end
163
+
164
+ # Custom attribute writer method with validation
165
+ # @param [Object] destination Value to be assigned
166
+ def destination=(destination)
167
+ if destination.nil?
168
+ fail ArgumentError, 'destination cannot be nil'
169
+ end
170
+
171
+ @destination = destination
172
+ end
173
+
174
+ # Checks equality by comparing each attribute.
175
+ # @param [Object] Object to be compared
176
+ def ==(o)
177
+ return true if self.equal?(o)
178
+ self.class == o.class &&
179
+ donnees_facture == o.donnees_facture &&
180
+ pdf_source == o.pdf_source &&
181
+ destination == o.destination &&
182
+ signature == o.signature &&
183
+ options == o.options
184
+ end
185
+
186
+ # @see the `==` method
187
+ # @param [Object] Object to be compared
188
+ def eql?(o)
189
+ self == o
190
+ end
191
+
192
+ # Calculates hash code according to all attributes.
193
+ # @return [Integer] Hash code
194
+ def hash
195
+ [donnees_facture, pdf_source, destination, signature, options].hash
196
+ end
197
+
198
+ # Builds the object from hash
199
+ # @param [Hash] attributes Model attributes in the form of hash
200
+ # @return [Object] Returns the model itself
201
+ def self.build_from_hash(attributes)
202
+ return nil unless attributes.is_a?(Hash)
203
+ attributes = attributes.transform_keys(&:to_sym)
204
+ transformed_hash = {}
205
+ openapi_types.each_pair do |key, type|
206
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
207
+ transformed_hash["#{key}"] = nil
208
+ elsif type =~ /\AArray<(.*)>/i
209
+ # check to ensure the input is an array given that the attribute
210
+ # is documented as an array but the input is not
211
+ if attributes[attribute_map[key]].is_a?(Array)
212
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
213
+ end
214
+ elsif !attributes[attribute_map[key]].nil?
215
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
216
+ end
217
+ end
218
+ new(transformed_hash)
219
+ end
220
+
221
+ # Returns the object in the form of hash
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_hash
224
+ hash = {}
225
+ self.class.attribute_map.each_pair do |attr, param|
226
+ value = self.send(attr)
227
+ if value.nil?
228
+ is_nullable = self.class.openapi_nullable.include?(attr)
229
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
230
+ end
231
+
232
+ hash[param] = _to_hash(value)
233
+ end
234
+ hash
235
+ end
236
+
237
+ end
238
+
239
+ end