factpulse 1.0.0 → 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -3
- data/Gemfile.lock +1 -1
- data/README.md +73 -119
- data/docs/AFNORPDPPADirectoryServiceApi.md +31 -1148
- data/docs/BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost.md +22 -0
- data/docs/BodyCompleterFactureApiV1ChorusProFacturesCompleterPost.md +22 -0
- data/docs/BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet.md +20 -0
- data/docs/BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost.md +22 -0
- data/docs/BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost.md +22 -0
- data/docs/BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost.md +22 -0
- data/docs/BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost.md +22 -0
- data/docs/BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost.md +22 -0
- data/docs/BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost.md +22 -0
- data/docs/BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost.md +22 -0
- data/docs/BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost.md +22 -0
- data/docs/ChorusProApi.md +70 -66
- data/docs/Destinataire.md +0 -4
- data/docs/{MontantAPayer.md → DirectionFlux.md} +2 -2
- data/docs/FactureEnrichieInfoInput.md +32 -0
- data/docs/{FactureEnrichieInfo.md → FactureEnrichieInfoOutput.md} +2 -2
- data/docs/FactureFacturX.md +0 -2
- data/docs/FluxResume.md +32 -0
- data/docs/Fournisseur.md +0 -2
- data/docs/LigneDePoste.md +2 -2
- data/docs/LigneDePosteMontantTotalLigneHt.md +15 -0
- data/docs/LigneDeTVA.md +2 -2
- data/docs/MontantTotal.md +5 -5
- data/docs/MontantTotalMontantRemiseGlobaleTtc.md +15 -0
- data/docs/{MontantBaseHt.md → Montantapayer.md} +2 -2
- data/docs/Montantbaseht.md +15 -0
- data/docs/Montanthttotal.md +15 -0
- data/docs/Montantttctotal.md +15 -0
- data/docs/{ErrorLevel.md → Montanttva.md} +2 -2
- data/docs/{ErrorSource.md → Montanttva1.md} +2 -2
- data/docs/Montantunitaireht.md +15 -0
- data/docs/OptionsProcessing.md +1 -1
- data/docs/PDPCredentials.md +24 -0
- data/docs/ProcessingEndpointsUnifisApi.md +147 -0
- data/docs/{StatutCelery.md → ProfilFlux.md} +2 -2
- data/docs/QuotaInfo.md +26 -0
- data/docs/ReponseHealthcheckAFNOR.md +22 -0
- data/docs/ReponseRechercheFlux.md +24 -0
- data/docs/ReponseSoumissionFlux.md +30 -0
- data/docs/RequeteRechercheFlux.md +34 -0
- data/docs/RequeteSoumissionFlux.md +28 -0
- data/docs/SantApi.md +0 -62
- data/docs/SignatureLectroniqueApi.md +315 -0
- data/docs/SoumettreFactureCompleteResponse.md +1 -1
- data/docs/SoumettreFactureRequest.md +3 -3
- data/docs/StatutAcquittement.md +15 -0
- data/docs/StatutTache.md +2 -2
- data/docs/SyntaxeFlux.md +15 -0
- data/docs/TraitementFactureApi.md +2 -2
- data/docs/TypeFlux.md +15 -0
- data/docs/Utilisateur.md +40 -0
- data/factpulse.gemspec +2 -2
- data/lib/factpulse/api/afnorpdppa_api.rb +1 -1
- data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +30 -1014
- data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +1 -1
- data/lib/factpulse/api/chorus_pro_api.rb +108 -95
- data/lib/factpulse/api/processing_endpoints_unifis_api.rb +158 -0
- data/lib/factpulse/api/sant_api.rb +1 -58
- data/lib/factpulse/api/signature_lectronique_api.rb +333 -0
- data/lib/factpulse/api/traitement_facture_api.rb +5 -5
- data/lib/factpulse/api/utilisateur_api.rb +1 -1
- data/lib/factpulse/api_client.rb +3 -7
- data/lib/factpulse/api_error.rb +1 -1
- data/lib/factpulse/api_model_base.rb +1 -1
- data/lib/factpulse/configuration.rb +1 -1
- data/lib/factpulse/models/adresse_electronique.rb +1 -1
- data/lib/factpulse/models/adresse_postale.rb +1 -1
- data/lib/factpulse/models/body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post.rb +202 -0
- data/lib/factpulse/models/body_completer_facture_api_v1_chorus_pro_factures_completer_post.rb +202 -0
- data/lib/factpulse/models/body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get.rb +174 -0
- data/lib/factpulse/models/body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post.rb +202 -0
- data/lib/factpulse/models/body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post.rb +202 -0
- data/lib/factpulse/models/body_recycler_facture_api_v1_chorus_pro_factures_recycler_post.rb +202 -0
- data/lib/factpulse/models/{api_error.rb → body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post.rb} +44 -47
- data/lib/factpulse/models/{note.rb → body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post.rb} +55 -28
- data/lib/factpulse/models/body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post.rb +202 -0
- data/lib/factpulse/models/body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post.rb +202 -0
- data/lib/factpulse/models/body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post.rb +202 -0
- data/lib/factpulse/models/cadre_de_facturation.rb +1 -1
- data/lib/factpulse/models/categorie_tva.rb +11 -11
- data/lib/factpulse/models/certificate_info_response.rb +1 -1
- data/lib/factpulse/models/chorus_pro_credentials.rb +1 -1
- data/lib/factpulse/models/code_cadre_facturation.rb +1 -1
- data/lib/factpulse/models/code_raison_reduction.rb +9 -9
- data/lib/factpulse/models/consulter_facture_request.rb +1 -1
- data/lib/factpulse/models/consulter_facture_response.rb +1 -1
- data/lib/factpulse/models/consulter_structure_request.rb +1 -1
- data/lib/factpulse/models/consulter_structure_response.rb +1 -1
- data/lib/factpulse/models/credentials_afnor.rb +1 -1
- data/lib/factpulse/models/credentials_chorus_pro.rb +1 -1
- data/lib/factpulse/models/destinataire.rb +2 -22
- data/lib/factpulse/models/destination.rb +1 -1
- data/lib/factpulse/models/destination_afnor.rb +1 -1
- data/lib/factpulse/models/destination_chorus_pro.rb +1 -1
- data/lib/factpulse/models/{statut_celery.rb → direction_flux.rb} +7 -10
- data/lib/factpulse/models/donnees_facture_simplifiees.rb +1 -1
- data/lib/factpulse/models/facture_enrichie_info_input.rb +315 -0
- data/lib/factpulse/models/{facture_enrichie_info.rb → facture_enrichie_info_output.rb} +4 -4
- data/lib/factpulse/models/facture_factur_x.rb +2 -13
- data/lib/factpulse/models/flux_resume.rb +251 -0
- data/lib/factpulse/models/format_sortie.rb +1 -1
- data/lib/factpulse/models/fournisseur.rb +2 -12
- data/lib/factpulse/models/generate_certificate_request.rb +1 -1
- data/lib/factpulse/models/generate_certificate_response.rb +1 -1
- data/lib/factpulse/models/http_validation_error.rb +1 -1
- data/lib/factpulse/models/information_signature_api.rb +1 -1
- data/lib/factpulse/models/ligne_de_poste.rb +4 -3
- data/lib/factpulse/models/ligne_de_poste_montant_remise_ht.rb +2 -2
- data/lib/factpulse/models/{montant_total_ligne_ht.rb → ligne_de_poste_montant_total_ligne_ht.rb} +3 -3
- data/lib/factpulse/models/ligne_de_poste_taux_tva_manuel.rb +2 -2
- data/lib/factpulse/models/ligne_de_tva.rb +3 -3
- data/lib/factpulse/models/mode_depot.rb +1 -1
- data/lib/factpulse/models/mode_paiement.rb +1 -1
- data/lib/factpulse/models/montant_ht_total.rb +1 -2
- data/lib/factpulse/models/montant_total.rb +7 -6
- data/lib/factpulse/models/montant_total_acompte.rb +2 -2
- data/lib/factpulse/models/{montant_a_payer.rb → montant_total_montant_remise_globale_ttc.rb} +3 -3
- data/lib/factpulse/models/montant_ttc_total.rb +1 -2
- data/lib/factpulse/models/montant_tva.rb +1 -2
- data/lib/factpulse/models/{montant_tva_total.rb → montantapayer.rb} +3 -3
- data/lib/factpulse/models/{montant_tva_ligne.rb → montantbaseht.rb} +3 -3
- data/lib/factpulse/models/montanthttotal.rb +104 -0
- data/lib/factpulse/models/montantttctotal.rb +104 -0
- data/lib/factpulse/models/montanttva.rb +104 -0
- data/lib/factpulse/models/montanttva1.rb +104 -0
- data/lib/factpulse/models/{montant_unitaire_ht.rb → montantunitaireht.rb} +2 -2
- data/lib/factpulse/models/obtenir_id_chorus_pro_request.rb +1 -1
- data/lib/factpulse/models/obtenir_id_chorus_pro_response.rb +1 -1
- data/lib/factpulse/models/options_processing.rb +16 -2
- data/lib/factpulse/models/parametres_signature.rb +1 -1
- data/lib/factpulse/models/parametres_structure.rb +1 -1
- data/lib/factpulse/models/pdf_factur_x_info.rb +1 -1
- data/lib/factpulse/models/pdp_credentials.rb +247 -0
- data/lib/factpulse/models/piece_jointe_complementaire.rb +1 -1
- data/lib/factpulse/models/profil_api.rb +1 -1
- data/lib/factpulse/models/profil_flux.rb +41 -0
- data/lib/factpulse/models/quantite.rb +1 -1
- data/lib/factpulse/models/quota_info.rb +269 -0
- data/lib/factpulse/models/rechercher_services_response.rb +1 -1
- data/lib/factpulse/models/rechercher_structure_request.rb +1 -1
- data/lib/factpulse/models/rechercher_structure_response.rb +1 -1
- data/lib/factpulse/models/references.rb +1 -1
- data/lib/factpulse/models/reponse_healthcheck_afnor.rb +220 -0
- data/lib/factpulse/models/reponse_recherche_flux.rb +249 -0
- data/lib/factpulse/models/reponse_soumission_flux.rb +294 -0
- data/lib/factpulse/models/reponse_tache.rb +1 -1
- data/lib/factpulse/models/reponse_validation_erreur.rb +1 -1
- data/lib/factpulse/models/reponse_validation_succes.rb +1 -1
- data/lib/factpulse/models/requete_recherche_flux.rb +306 -0
- data/lib/factpulse/models/{validation_error_detail.rb → requete_soumission_flux.rb} +61 -68
- data/lib/factpulse/models/resultat_afnor.rb +1 -1
- data/lib/factpulse/models/resultat_chorus_pro.rb +1 -1
- data/lib/factpulse/models/resultat_validation_pdfapi.rb +1 -1
- data/lib/factpulse/models/scheme_id.rb +7 -7
- data/lib/factpulse/models/service_structure.rb +1 -1
- data/lib/factpulse/models/signature_info.rb +1 -1
- data/lib/factpulse/models/soumettre_facture_complete_request.rb +1 -1
- data/lib/factpulse/models/soumettre_facture_complete_response.rb +2 -2
- data/lib/factpulse/models/soumettre_facture_request.rb +7 -4
- data/lib/factpulse/models/soumettre_facture_response.rb +1 -1
- data/lib/factpulse/models/{error_level.rb → statut_acquittement.rb} +7 -6
- data/lib/factpulse/models/statut_facture.rb +1 -1
- data/lib/factpulse/models/statut_tache.rb +5 -30
- data/lib/factpulse/models/structure_info.rb +1 -1
- data/lib/factpulse/models/{error_source.rb → syntaxe_flux.rb} +10 -13
- data/lib/factpulse/models/tauxmanuel.rb +2 -2
- data/lib/factpulse/models/type_facture.rb +1 -1
- data/lib/factpulse/models/type_flux.rb +43 -0
- data/lib/factpulse/models/type_tva.rb +1 -1
- data/lib/factpulse/models/unite.rb +1 -1
- data/lib/factpulse/models/utilisateur.rb +328 -0
- data/lib/factpulse/models/validation_error.rb +1 -1
- data/lib/factpulse/models/validation_error_loc_inner.rb +1 -1
- data/lib/factpulse/version.rb +2 -2
- data/lib/factpulse.rb +39 -15
- metadata +79 -42
- data/docs/APIError.md +0 -22
- data/docs/MontantRemiseGlobaleTtc.md +0 -15
- data/docs/MontantTotalLigneHt.md +0 -15
- data/docs/MontantTvaLigne.md +0 -15
- data/docs/MontantTvaTotal.md +0 -15
- data/docs/MontantUnitaireHt.md +0 -15
- data/docs/Note.md +0 -20
- data/docs/ValidationErrorDetail.md +0 -26
- data/lib/factpulse/helpers/client.rb +0 -300
- data/lib/factpulse/helpers/exceptions.rb +0 -21
- data/lib/factpulse/helpers.rb +0 -13
- data/lib/factpulse/models/montant_base_ht.rb +0 -104
- data/lib/factpulse/models/montant_remise_globale_ttc.rb +0 -104
|
@@ -0,0 +1,202 @@
|
|
|
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 BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost < ApiModelBase
|
|
18
|
+
attr_accessor :payload
|
|
19
|
+
|
|
20
|
+
attr_accessor :user_info
|
|
21
|
+
|
|
22
|
+
attr_accessor :credentials
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'payload' => :'payload',
|
|
28
|
+
:'user_info' => :'user_info',
|
|
29
|
+
:'credentials' => :'credentials'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'payload' => :'Hash<String, Object>',
|
|
47
|
+
:'user_info' => :'Utilisateur',
|
|
48
|
+
:'credentials' => :'ChorusProCredentials'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# List of attributes with nullable: true
|
|
53
|
+
def self.openapi_nullable
|
|
54
|
+
Set.new([
|
|
55
|
+
:'credentials'
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'payload')
|
|
76
|
+
if (value = attributes[:'payload']).is_a?(Hash)
|
|
77
|
+
self.payload = value
|
|
78
|
+
end
|
|
79
|
+
else
|
|
80
|
+
self.payload = nil
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'user_info')
|
|
84
|
+
self.user_info = attributes[:'user_info']
|
|
85
|
+
else
|
|
86
|
+
self.user_info = nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'credentials')
|
|
90
|
+
self.credentials = attributes[:'credentials']
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
95
|
+
# @return Array for valid properties with the reasons
|
|
96
|
+
def list_invalid_properties
|
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
98
|
+
invalid_properties = Array.new
|
|
99
|
+
if @payload.nil?
|
|
100
|
+
invalid_properties.push('invalid value for "payload", payload cannot be nil.')
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if @user_info.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "user_info", user_info cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
invalid_properties
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Check to see if the all the properties in the model are valid
|
|
111
|
+
# @return true if the model is valid
|
|
112
|
+
def valid?
|
|
113
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
114
|
+
return false if @payload.nil?
|
|
115
|
+
return false if @user_info.nil?
|
|
116
|
+
true
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Custom attribute writer method with validation
|
|
120
|
+
# @param [Object] payload Value to be assigned
|
|
121
|
+
def payload=(payload)
|
|
122
|
+
if payload.nil?
|
|
123
|
+
fail ArgumentError, 'payload cannot be nil'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
@payload = payload
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Custom attribute writer method with validation
|
|
130
|
+
# @param [Object] user_info Value to be assigned
|
|
131
|
+
def user_info=(user_info)
|
|
132
|
+
if user_info.nil?
|
|
133
|
+
fail ArgumentError, 'user_info cannot be nil'
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
@user_info = user_info
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Checks equality by comparing each attribute.
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def ==(o)
|
|
142
|
+
return true if self.equal?(o)
|
|
143
|
+
self.class == o.class &&
|
|
144
|
+
payload == o.payload &&
|
|
145
|
+
user_info == o.user_info &&
|
|
146
|
+
credentials == o.credentials
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @see the `==` method
|
|
150
|
+
# @param [Object] Object to be compared
|
|
151
|
+
def eql?(o)
|
|
152
|
+
self == o
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Calculates hash code according to all attributes.
|
|
156
|
+
# @return [Integer] Hash code
|
|
157
|
+
def hash
|
|
158
|
+
[payload, user_info, credentials].hash
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Builds the object from hash
|
|
162
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
163
|
+
# @return [Object] Returns the model itself
|
|
164
|
+
def self.build_from_hash(attributes)
|
|
165
|
+
return nil unless attributes.is_a?(Hash)
|
|
166
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
167
|
+
transformed_hash = {}
|
|
168
|
+
openapi_types.each_pair do |key, type|
|
|
169
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
170
|
+
transformed_hash["#{key}"] = nil
|
|
171
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
172
|
+
# check to ensure the input is an array given that the attribute
|
|
173
|
+
# is documented as an array but the input is not
|
|
174
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
175
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
176
|
+
end
|
|
177
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
178
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
new(transformed_hash)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Returns the object in the form of hash
|
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
|
186
|
+
def to_hash
|
|
187
|
+
hash = {}
|
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
189
|
+
value = self.send(attr)
|
|
190
|
+
if value.nil?
|
|
191
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
192
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
hash[param] = _to_hash(value)
|
|
196
|
+
end
|
|
197
|
+
hash
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
end
|
|
@@ -0,0 +1,202 @@
|
|
|
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 BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost < ApiModelBase
|
|
18
|
+
attr_accessor :payload
|
|
19
|
+
|
|
20
|
+
attr_accessor :user_info
|
|
21
|
+
|
|
22
|
+
attr_accessor :credentials
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'payload' => :'payload',
|
|
28
|
+
:'user_info' => :'user_info',
|
|
29
|
+
:'credentials' => :'credentials'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'payload' => :'Hash<String, Object>',
|
|
47
|
+
:'user_info' => :'Utilisateur',
|
|
48
|
+
:'credentials' => :'ChorusProCredentials'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# List of attributes with nullable: true
|
|
53
|
+
def self.openapi_nullable
|
|
54
|
+
Set.new([
|
|
55
|
+
:'credentials'
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'payload')
|
|
76
|
+
if (value = attributes[:'payload']).is_a?(Hash)
|
|
77
|
+
self.payload = value
|
|
78
|
+
end
|
|
79
|
+
else
|
|
80
|
+
self.payload = nil
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'user_info')
|
|
84
|
+
self.user_info = attributes[:'user_info']
|
|
85
|
+
else
|
|
86
|
+
self.user_info = nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'credentials')
|
|
90
|
+
self.credentials = attributes[:'credentials']
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
95
|
+
# @return Array for valid properties with the reasons
|
|
96
|
+
def list_invalid_properties
|
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
98
|
+
invalid_properties = Array.new
|
|
99
|
+
if @payload.nil?
|
|
100
|
+
invalid_properties.push('invalid value for "payload", payload cannot be nil.')
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if @user_info.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "user_info", user_info cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
invalid_properties
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Check to see if the all the properties in the model are valid
|
|
111
|
+
# @return true if the model is valid
|
|
112
|
+
def valid?
|
|
113
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
114
|
+
return false if @payload.nil?
|
|
115
|
+
return false if @user_info.nil?
|
|
116
|
+
true
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Custom attribute writer method with validation
|
|
120
|
+
# @param [Object] payload Value to be assigned
|
|
121
|
+
def payload=(payload)
|
|
122
|
+
if payload.nil?
|
|
123
|
+
fail ArgumentError, 'payload cannot be nil'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
@payload = payload
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Custom attribute writer method with validation
|
|
130
|
+
# @param [Object] user_info Value to be assigned
|
|
131
|
+
def user_info=(user_info)
|
|
132
|
+
if user_info.nil?
|
|
133
|
+
fail ArgumentError, 'user_info cannot be nil'
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
@user_info = user_info
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Checks equality by comparing each attribute.
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def ==(o)
|
|
142
|
+
return true if self.equal?(o)
|
|
143
|
+
self.class == o.class &&
|
|
144
|
+
payload == o.payload &&
|
|
145
|
+
user_info == o.user_info &&
|
|
146
|
+
credentials == o.credentials
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @see the `==` method
|
|
150
|
+
# @param [Object] Object to be compared
|
|
151
|
+
def eql?(o)
|
|
152
|
+
self == o
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Calculates hash code according to all attributes.
|
|
156
|
+
# @return [Integer] Hash code
|
|
157
|
+
def hash
|
|
158
|
+
[payload, user_info, credentials].hash
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Builds the object from hash
|
|
162
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
163
|
+
# @return [Object] Returns the model itself
|
|
164
|
+
def self.build_from_hash(attributes)
|
|
165
|
+
return nil unless attributes.is_a?(Hash)
|
|
166
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
167
|
+
transformed_hash = {}
|
|
168
|
+
openapi_types.each_pair do |key, type|
|
|
169
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
170
|
+
transformed_hash["#{key}"] = nil
|
|
171
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
172
|
+
# check to ensure the input is an array given that the attribute
|
|
173
|
+
# is documented as an array but the input is not
|
|
174
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
175
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
176
|
+
end
|
|
177
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
178
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
new(transformed_hash)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Returns the object in the form of hash
|
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
|
186
|
+
def to_hash
|
|
187
|
+
hash = {}
|
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
189
|
+
value = self.send(attr)
|
|
190
|
+
if value.nil?
|
|
191
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
192
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
hash[param] = _to_hash(value)
|
|
196
|
+
end
|
|
197
|
+
hash
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#API REST FactPulse
|
|
3
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\" }' ``` **
|
|
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
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
|
|
@@ -14,22 +14,19 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module FactPulse
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
# Code alphanumérique identifiant précisément l'erreur
|
|
20
|
-
attr_accessor :error_code
|
|
17
|
+
class BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost < ApiModelBase
|
|
18
|
+
attr_accessor :payload
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
attr_accessor :error_message
|
|
20
|
+
attr_accessor :user_info
|
|
24
21
|
|
|
25
|
-
attr_accessor :
|
|
22
|
+
attr_accessor :credentials
|
|
26
23
|
|
|
27
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
25
|
def self.attribute_map
|
|
29
26
|
{
|
|
30
|
-
:'
|
|
31
|
-
:'
|
|
32
|
-
:'
|
|
27
|
+
:'payload' => :'payload',
|
|
28
|
+
:'user_info' => :'user_info',
|
|
29
|
+
:'credentials' => :'credentials'
|
|
33
30
|
}
|
|
34
31
|
end
|
|
35
32
|
|
|
@@ -46,16 +43,16 @@ module FactPulse
|
|
|
46
43
|
# Attribute type mapping.
|
|
47
44
|
def self.openapi_types
|
|
48
45
|
{
|
|
49
|
-
:'
|
|
50
|
-
:'
|
|
51
|
-
:'
|
|
46
|
+
:'payload' => :'Hash<String, Object>',
|
|
47
|
+
:'user_info' => :'Utilisateur',
|
|
48
|
+
:'credentials' => :'ChorusProCredentials'
|
|
52
49
|
}
|
|
53
50
|
end
|
|
54
51
|
|
|
55
52
|
# List of attributes with nullable: true
|
|
56
53
|
def self.openapi_nullable
|
|
57
54
|
Set.new([
|
|
58
|
-
:'
|
|
55
|
+
:'credentials'
|
|
59
56
|
])
|
|
60
57
|
end
|
|
61
58
|
|
|
@@ -63,34 +60,34 @@ module FactPulse
|
|
|
63
60
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
61
|
def initialize(attributes = {})
|
|
65
62
|
if (!attributes.is_a?(Hash))
|
|
66
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost` initialize method"
|
|
67
64
|
end
|
|
68
65
|
|
|
69
66
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
67
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
68
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
69
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
71
|
end
|
|
75
72
|
h[k.to_sym] = v
|
|
76
73
|
}
|
|
77
74
|
|
|
78
|
-
if attributes.key?(:'
|
|
79
|
-
|
|
75
|
+
if attributes.key?(:'payload')
|
|
76
|
+
if (value = attributes[:'payload']).is_a?(Hash)
|
|
77
|
+
self.payload = value
|
|
78
|
+
end
|
|
80
79
|
else
|
|
81
|
-
self.
|
|
80
|
+
self.payload = nil
|
|
82
81
|
end
|
|
83
82
|
|
|
84
|
-
if attributes.key?(:'
|
|
85
|
-
self.
|
|
83
|
+
if attributes.key?(:'user_info')
|
|
84
|
+
self.user_info = attributes[:'user_info']
|
|
86
85
|
else
|
|
87
|
-
self.
|
|
86
|
+
self.user_info = nil
|
|
88
87
|
end
|
|
89
88
|
|
|
90
|
-
if attributes.key?(:'
|
|
91
|
-
|
|
92
|
-
self.details = value
|
|
93
|
-
end
|
|
89
|
+
if attributes.key?(:'credentials')
|
|
90
|
+
self.credentials = attributes[:'credentials']
|
|
94
91
|
end
|
|
95
92
|
end
|
|
96
93
|
|
|
@@ -99,12 +96,12 @@ module FactPulse
|
|
|
99
96
|
def list_invalid_properties
|
|
100
97
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
101
98
|
invalid_properties = Array.new
|
|
102
|
-
if @
|
|
103
|
-
invalid_properties.push('invalid value for "
|
|
99
|
+
if @payload.nil?
|
|
100
|
+
invalid_properties.push('invalid value for "payload", payload cannot be nil.')
|
|
104
101
|
end
|
|
105
102
|
|
|
106
|
-
if @
|
|
107
|
-
invalid_properties.push('invalid value for "
|
|
103
|
+
if @user_info.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "user_info", user_info cannot be nil.')
|
|
108
105
|
end
|
|
109
106
|
|
|
110
107
|
invalid_properties
|
|
@@ -114,29 +111,29 @@ module FactPulse
|
|
|
114
111
|
# @return true if the model is valid
|
|
115
112
|
def valid?
|
|
116
113
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
117
|
-
return false if @
|
|
118
|
-
return false if @
|
|
114
|
+
return false if @payload.nil?
|
|
115
|
+
return false if @user_info.nil?
|
|
119
116
|
true
|
|
120
117
|
end
|
|
121
118
|
|
|
122
119
|
# Custom attribute writer method with validation
|
|
123
|
-
# @param [Object]
|
|
124
|
-
def
|
|
125
|
-
if
|
|
126
|
-
fail ArgumentError, '
|
|
120
|
+
# @param [Object] payload Value to be assigned
|
|
121
|
+
def payload=(payload)
|
|
122
|
+
if payload.nil?
|
|
123
|
+
fail ArgumentError, 'payload cannot be nil'
|
|
127
124
|
end
|
|
128
125
|
|
|
129
|
-
@
|
|
126
|
+
@payload = payload
|
|
130
127
|
end
|
|
131
128
|
|
|
132
129
|
# Custom attribute writer method with validation
|
|
133
|
-
# @param [Object]
|
|
134
|
-
def
|
|
135
|
-
if
|
|
136
|
-
fail ArgumentError, '
|
|
130
|
+
# @param [Object] user_info Value to be assigned
|
|
131
|
+
def user_info=(user_info)
|
|
132
|
+
if user_info.nil?
|
|
133
|
+
fail ArgumentError, 'user_info cannot be nil'
|
|
137
134
|
end
|
|
138
135
|
|
|
139
|
-
@
|
|
136
|
+
@user_info = user_info
|
|
140
137
|
end
|
|
141
138
|
|
|
142
139
|
# Checks equality by comparing each attribute.
|
|
@@ -144,9 +141,9 @@ module FactPulse
|
|
|
144
141
|
def ==(o)
|
|
145
142
|
return true if self.equal?(o)
|
|
146
143
|
self.class == o.class &&
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
144
|
+
payload == o.payload &&
|
|
145
|
+
user_info == o.user_info &&
|
|
146
|
+
credentials == o.credentials
|
|
150
147
|
end
|
|
151
148
|
|
|
152
149
|
# @see the `==` method
|
|
@@ -158,7 +155,7 @@ module FactPulse
|
|
|
158
155
|
# Calculates hash code according to all attributes.
|
|
159
156
|
# @return [Integer] Hash code
|
|
160
157
|
def hash
|
|
161
|
-
[
|
|
158
|
+
[payload, user_info, credentials].hash
|
|
162
159
|
end
|
|
163
160
|
|
|
164
161
|
# Builds the object from hash
|