factpulse 1.0.3__py3-none-any.whl

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.

Potentially problematic release.


This version of factpulse might be problematic. Click here for more details.

Files changed (131) hide show
  1. factpulse/__init__.py +280 -0
  2. factpulse/api/__init__.py +13 -0
  3. factpulse/api/afnorpdppa_api.py +284 -0
  4. factpulse/api/afnorpdppa_directory_service_api.py +799 -0
  5. factpulse/api/afnorpdppa_flow_service_api.py +1075 -0
  6. factpulse/api/chorus_pro_api.py +4506 -0
  7. factpulse/api/processing_endpoints_unifis_api.py +592 -0
  8. factpulse/api/sant_api.py +281 -0
  9. factpulse/api/signature_lectronique_api.py +1358 -0
  10. factpulse/api/traitement_facture_api.py +3439 -0
  11. factpulse/api/utilisateur_api.py +282 -0
  12. factpulse/api_client.py +804 -0
  13. factpulse/api_response.py +21 -0
  14. factpulse/configuration.py +585 -0
  15. factpulse/exceptions.py +216 -0
  16. factpulse/models/__init__.py +124 -0
  17. factpulse/models/adresse_electronique.py +90 -0
  18. factpulse/models/adresse_postale.py +120 -0
  19. factpulse/models/body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post.py +104 -0
  20. factpulse/models/body_completer_facture_api_v1_chorus_pro_factures_completer_post.py +104 -0
  21. factpulse/models/body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get.py +102 -0
  22. factpulse/models/body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post.py +104 -0
  23. factpulse/models/body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post.py +104 -0
  24. factpulse/models/body_recycler_facture_api_v1_chorus_pro_factures_recycler_post.py +104 -0
  25. factpulse/models/body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post.py +104 -0
  26. factpulse/models/body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post.py +104 -0
  27. factpulse/models/body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post.py +104 -0
  28. factpulse/models/body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post.py +104 -0
  29. factpulse/models/body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post.py +104 -0
  30. factpulse/models/cadre_de_facturation.py +102 -0
  31. factpulse/models/categorie_tva.py +44 -0
  32. factpulse/models/certificate_info_response.py +114 -0
  33. factpulse/models/chorus_pro_credentials.py +95 -0
  34. factpulse/models/code_cadre_facturation.py +39 -0
  35. factpulse/models/code_raison_reduction.py +42 -0
  36. factpulse/models/consulter_facture_request.py +98 -0
  37. factpulse/models/consulter_facture_response.py +142 -0
  38. factpulse/models/consulter_structure_request.py +100 -0
  39. factpulse/models/consulter_structure_response.py +142 -0
  40. factpulse/models/credentials_afnor.py +106 -0
  41. factpulse/models/credentials_chorus_pro.py +115 -0
  42. factpulse/models/destinataire.py +116 -0
  43. factpulse/models/destination.py +140 -0
  44. factpulse/models/destination_afnor.py +127 -0
  45. factpulse/models/destination_chorus_pro.py +108 -0
  46. factpulse/models/direction_flux.py +37 -0
  47. factpulse/models/donnees_facture_simplifiees.py +124 -0
  48. factpulse/models/facture_enrichie_info_input.py +123 -0
  49. factpulse/models/facture_enrichie_info_output.py +133 -0
  50. factpulse/models/facture_factur_x.py +173 -0
  51. factpulse/models/flux_resume.py +131 -0
  52. factpulse/models/format_sortie.py +37 -0
  53. factpulse/models/fournisseur.py +146 -0
  54. factpulse/models/generate_certificate_request.py +118 -0
  55. factpulse/models/generate_certificate_response.py +106 -0
  56. factpulse/models/http_validation_error.py +95 -0
  57. factpulse/models/information_signature_api.py +122 -0
  58. factpulse/models/ligne_de_poste.py +188 -0
  59. factpulse/models/ligne_de_poste_montant_remise_ht.py +145 -0
  60. factpulse/models/ligne_de_poste_montant_total_ligne_ht.py +145 -0
  61. factpulse/models/ligne_de_poste_taux_tva_manuel.py +145 -0
  62. factpulse/models/ligne_de_tva.py +118 -0
  63. factpulse/models/mode_depot.py +38 -0
  64. factpulse/models/mode_paiement.py +41 -0
  65. factpulse/models/montant_ht_total.py +139 -0
  66. factpulse/models/montant_total.py +138 -0
  67. factpulse/models/montant_total_acompte.py +145 -0
  68. factpulse/models/montant_total_montant_remise_globale_ttc.py +145 -0
  69. factpulse/models/montant_ttc_total.py +139 -0
  70. factpulse/models/montant_tva.py +139 -0
  71. factpulse/models/montantapayer.py +139 -0
  72. factpulse/models/montantbaseht.py +139 -0
  73. factpulse/models/montanthttotal.py +139 -0
  74. factpulse/models/montantttctotal.py +139 -0
  75. factpulse/models/montanttva.py +139 -0
  76. factpulse/models/montanttva1.py +139 -0
  77. factpulse/models/montantunitaireht.py +139 -0
  78. factpulse/models/obtenir_id_chorus_pro_request.py +100 -0
  79. factpulse/models/obtenir_id_chorus_pro_response.py +98 -0
  80. factpulse/models/options_processing.py +103 -0
  81. factpulse/models/parametres_signature.py +133 -0
  82. factpulse/models/parametres_structure.py +91 -0
  83. factpulse/models/pdf_factur_x_info.py +91 -0
  84. factpulse/models/pdp_credentials.py +93 -0
  85. factpulse/models/piece_jointe_complementaire.py +95 -0
  86. factpulse/models/profil_api.py +39 -0
  87. factpulse/models/profil_flux.py +38 -0
  88. factpulse/models/quantite.py +139 -0
  89. factpulse/models/quota_info.py +95 -0
  90. factpulse/models/rechercher_services_response.py +101 -0
  91. factpulse/models/rechercher_structure_request.py +119 -0
  92. factpulse/models/rechercher_structure_response.py +101 -0
  93. factpulse/models/references.py +124 -0
  94. factpulse/models/reponse_healthcheck_afnor.py +91 -0
  95. factpulse/models/reponse_recherche_flux.py +101 -0
  96. factpulse/models/reponse_soumission_flux.py +109 -0
  97. factpulse/models/reponse_tache.py +87 -0
  98. factpulse/models/reponse_validation_erreur.py +87 -0
  99. factpulse/models/reponse_validation_succes.py +87 -0
  100. factpulse/models/requete_recherche_flux.py +143 -0
  101. factpulse/models/requete_soumission_flux.py +123 -0
  102. factpulse/models/resultat_afnor.py +105 -0
  103. factpulse/models/resultat_chorus_pro.py +101 -0
  104. factpulse/models/resultat_validation_pdfapi.py +169 -0
  105. factpulse/models/scheme_id.py +40 -0
  106. factpulse/models/service_structure.py +93 -0
  107. factpulse/models/signature_info.py +101 -0
  108. factpulse/models/soumettre_facture_complete_request.py +116 -0
  109. factpulse/models/soumettre_facture_complete_response.py +145 -0
  110. factpulse/models/soumettre_facture_request.py +164 -0
  111. factpulse/models/soumettre_facture_response.py +103 -0
  112. factpulse/models/statut_acquittement.py +38 -0
  113. factpulse/models/statut_facture.py +96 -0
  114. factpulse/models/statut_tache.py +99 -0
  115. factpulse/models/structure_info.py +95 -0
  116. factpulse/models/syntaxe_flux.py +40 -0
  117. factpulse/models/tauxmanuel.py +139 -0
  118. factpulse/models/type_facture.py +37 -0
  119. factpulse/models/type_flux.py +40 -0
  120. factpulse/models/type_tva.py +39 -0
  121. factpulse/models/unite.py +41 -0
  122. factpulse/models/utilisateur.py +128 -0
  123. factpulse/models/validation_error.py +99 -0
  124. factpulse/models/validation_error_loc_inner.py +138 -0
  125. factpulse/py.typed +0 -0
  126. factpulse/rest.py +258 -0
  127. factpulse-1.0.3.dist-info/METADATA +164 -0
  128. factpulse-1.0.3.dist-info/RECORD +131 -0
  129. factpulse-1.0.3.dist-info/WHEEL +5 -0
  130. factpulse-1.0.3.dist-info/licenses/LICENSE +21 -0
  131. factpulse-1.0.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,4506 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ API REST FactPulse
5
+
6
+ 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/
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import StrictInt
20
+ from typing import Any
21
+ from factpulse.models.body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post import BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost
22
+ from factpulse.models.body_completer_facture_api_v1_chorus_pro_factures_completer_post import BodyCompleterFactureApiV1ChorusProFacturesCompleterPost
23
+ from factpulse.models.body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get import BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet
24
+ from factpulse.models.body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post import BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost
25
+ from factpulse.models.body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post import BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost
26
+ from factpulse.models.body_recycler_facture_api_v1_chorus_pro_factures_recycler_post import BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost
27
+ from factpulse.models.body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post import BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost
28
+ from factpulse.models.body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post import BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost
29
+ from factpulse.models.body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post import BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost
30
+ from factpulse.models.body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post import BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost
31
+ from factpulse.models.body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post import BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost
32
+ from factpulse.models.consulter_facture_request import ConsulterFactureRequest
33
+ from factpulse.models.consulter_facture_response import ConsulterFactureResponse
34
+ from factpulse.models.consulter_structure_request import ConsulterStructureRequest
35
+ from factpulse.models.consulter_structure_response import ConsulterStructureResponse
36
+ from factpulse.models.obtenir_id_chorus_pro_request import ObtenirIdChorusProRequest
37
+ from factpulse.models.obtenir_id_chorus_pro_response import ObtenirIdChorusProResponse
38
+ from factpulse.models.rechercher_services_response import RechercherServicesResponse
39
+ from factpulse.models.rechercher_structure_request import RechercherStructureRequest
40
+ from factpulse.models.rechercher_structure_response import RechercherStructureResponse
41
+ from factpulse.models.soumettre_facture_request import SoumettreFactureRequest
42
+ from factpulse.models.soumettre_facture_response import SoumettreFactureResponse
43
+
44
+ from factpulse.api_client import ApiClient, RequestSerialized
45
+ from factpulse.api_response import ApiResponse
46
+ from factpulse.rest import RESTResponseType
47
+
48
+
49
+ class ChorusProApi:
50
+ """NOTE: This class is auto generated by OpenAPI Generator
51
+ Ref: https://openapi-generator.tech
52
+
53
+ Do not edit the class manually.
54
+ """
55
+
56
+ def __init__(self, api_client=None) -> None:
57
+ if api_client is None:
58
+ api_client = ApiClient.get_default()
59
+ self.api_client = api_client
60
+
61
+
62
+ @validate_call
63
+ def ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post(
64
+ self,
65
+ body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post: BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost,
66
+ _request_timeout: Union[
67
+ None,
68
+ Annotated[StrictFloat, Field(gt=0)],
69
+ Tuple[
70
+ Annotated[StrictFloat, Field(gt=0)],
71
+ Annotated[StrictFloat, Field(gt=0)]
72
+ ]
73
+ ] = None,
74
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
75
+ _content_type: Optional[StrictStr] = None,
76
+ _headers: Optional[Dict[StrictStr, Any]] = None,
77
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
78
+ ) -> object:
79
+ """Ajouter une pièce jointe
80
+
81
+ Ajoute une pièce jointe au compte utilisateur courant. **Taille max** : 10 Mo par fichier **Payload exemple** : ```json { \"pieceJointeFichier\": \"JVBERi0xLjQKJeLjz9MKNSAwIG9iago8P...\", \"pieceJointeNom\": \"bon_commande.pdf\", \"pieceJointeTypeMime\": \"application/pdf\", \"pieceJointeExtension\": \"PDF\" } ``` **Retour** : L'ID de la pièce jointe (`pieceJointeIdFichier`) à utiliser ensuite dans `/factures/completer`. **Extensions acceptées** : PDF, JPG, PNG, ZIP, XML, etc.
82
+
83
+ :param body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post: (required)
84
+ :type body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post: BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost
85
+ :param _request_timeout: timeout setting for this request. If one
86
+ number provided, it will be total request
87
+ timeout. It can also be a pair (tuple) of
88
+ (connection, read) timeouts.
89
+ :type _request_timeout: int, tuple(int, int), optional
90
+ :param _request_auth: set to override the auth_settings for an a single
91
+ request; this effectively ignores the
92
+ authentication in the spec for a single request.
93
+ :type _request_auth: dict, optional
94
+ :param _content_type: force content-type for the request.
95
+ :type _content_type: str, Optional
96
+ :param _headers: set to override the headers for a single
97
+ request; this effectively ignores the headers
98
+ in the spec for a single request.
99
+ :type _headers: dict, optional
100
+ :param _host_index: set to override the host_index for a single
101
+ request; this effectively ignores the host_index
102
+ in the spec for a single request.
103
+ :type _host_index: int, optional
104
+ :return: Returns the result object.
105
+ """ # noqa: E501
106
+
107
+ _param = self._ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_serialize(
108
+ body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post=body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post,
109
+ _request_auth=_request_auth,
110
+ _content_type=_content_type,
111
+ _headers=_headers,
112
+ _host_index=_host_index
113
+ )
114
+
115
+ _response_types_map: Dict[str, Optional[str]] = {
116
+ '200': "object",
117
+ '422': "HTTPValidationError",
118
+ }
119
+ response_data = self.api_client.call_api(
120
+ *_param,
121
+ _request_timeout=_request_timeout
122
+ )
123
+ response_data.read()
124
+ return self.api_client.response_deserialize(
125
+ response_data=response_data,
126
+ response_types_map=_response_types_map,
127
+ ).data
128
+
129
+
130
+ @validate_call
131
+ def ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_with_http_info(
132
+ self,
133
+ body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post: BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost,
134
+ _request_timeout: Union[
135
+ None,
136
+ Annotated[StrictFloat, Field(gt=0)],
137
+ Tuple[
138
+ Annotated[StrictFloat, Field(gt=0)],
139
+ Annotated[StrictFloat, Field(gt=0)]
140
+ ]
141
+ ] = None,
142
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
143
+ _content_type: Optional[StrictStr] = None,
144
+ _headers: Optional[Dict[StrictStr, Any]] = None,
145
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
146
+ ) -> ApiResponse[object]:
147
+ """Ajouter une pièce jointe
148
+
149
+ Ajoute une pièce jointe au compte utilisateur courant. **Taille max** : 10 Mo par fichier **Payload exemple** : ```json { \"pieceJointeFichier\": \"JVBERi0xLjQKJeLjz9MKNSAwIG9iago8P...\", \"pieceJointeNom\": \"bon_commande.pdf\", \"pieceJointeTypeMime\": \"application/pdf\", \"pieceJointeExtension\": \"PDF\" } ``` **Retour** : L'ID de la pièce jointe (`pieceJointeIdFichier`) à utiliser ensuite dans `/factures/completer`. **Extensions acceptées** : PDF, JPG, PNG, ZIP, XML, etc.
150
+
151
+ :param body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post: (required)
152
+ :type body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post: BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost
153
+ :param _request_timeout: timeout setting for this request. If one
154
+ number provided, it will be total request
155
+ timeout. It can also be a pair (tuple) of
156
+ (connection, read) timeouts.
157
+ :type _request_timeout: int, tuple(int, int), optional
158
+ :param _request_auth: set to override the auth_settings for an a single
159
+ request; this effectively ignores the
160
+ authentication in the spec for a single request.
161
+ :type _request_auth: dict, optional
162
+ :param _content_type: force content-type for the request.
163
+ :type _content_type: str, Optional
164
+ :param _headers: set to override the headers for a single
165
+ request; this effectively ignores the headers
166
+ in the spec for a single request.
167
+ :type _headers: dict, optional
168
+ :param _host_index: set to override the host_index for a single
169
+ request; this effectively ignores the host_index
170
+ in the spec for a single request.
171
+ :type _host_index: int, optional
172
+ :return: Returns the result object.
173
+ """ # noqa: E501
174
+
175
+ _param = self._ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_serialize(
176
+ body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post=body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post,
177
+ _request_auth=_request_auth,
178
+ _content_type=_content_type,
179
+ _headers=_headers,
180
+ _host_index=_host_index
181
+ )
182
+
183
+ _response_types_map: Dict[str, Optional[str]] = {
184
+ '200': "object",
185
+ '422': "HTTPValidationError",
186
+ }
187
+ response_data = self.api_client.call_api(
188
+ *_param,
189
+ _request_timeout=_request_timeout
190
+ )
191
+ response_data.read()
192
+ return self.api_client.response_deserialize(
193
+ response_data=response_data,
194
+ response_types_map=_response_types_map,
195
+ )
196
+
197
+
198
+ @validate_call
199
+ def ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_without_preload_content(
200
+ self,
201
+ body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post: BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost,
202
+ _request_timeout: Union[
203
+ None,
204
+ Annotated[StrictFloat, Field(gt=0)],
205
+ Tuple[
206
+ Annotated[StrictFloat, Field(gt=0)],
207
+ Annotated[StrictFloat, Field(gt=0)]
208
+ ]
209
+ ] = None,
210
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
211
+ _content_type: Optional[StrictStr] = None,
212
+ _headers: Optional[Dict[StrictStr, Any]] = None,
213
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
214
+ ) -> RESTResponseType:
215
+ """Ajouter une pièce jointe
216
+
217
+ Ajoute une pièce jointe au compte utilisateur courant. **Taille max** : 10 Mo par fichier **Payload exemple** : ```json { \"pieceJointeFichier\": \"JVBERi0xLjQKJeLjz9MKNSAwIG9iago8P...\", \"pieceJointeNom\": \"bon_commande.pdf\", \"pieceJointeTypeMime\": \"application/pdf\", \"pieceJointeExtension\": \"PDF\" } ``` **Retour** : L'ID de la pièce jointe (`pieceJointeIdFichier`) à utiliser ensuite dans `/factures/completer`. **Extensions acceptées** : PDF, JPG, PNG, ZIP, XML, etc.
218
+
219
+ :param body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post: (required)
220
+ :type body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post: BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost
221
+ :param _request_timeout: timeout setting for this request. If one
222
+ number provided, it will be total request
223
+ timeout. It can also be a pair (tuple) of
224
+ (connection, read) timeouts.
225
+ :type _request_timeout: int, tuple(int, int), optional
226
+ :param _request_auth: set to override the auth_settings for an a single
227
+ request; this effectively ignores the
228
+ authentication in the spec for a single request.
229
+ :type _request_auth: dict, optional
230
+ :param _content_type: force content-type for the request.
231
+ :type _content_type: str, Optional
232
+ :param _headers: set to override the headers for a single
233
+ request; this effectively ignores the headers
234
+ in the spec for a single request.
235
+ :type _headers: dict, optional
236
+ :param _host_index: set to override the host_index for a single
237
+ request; this effectively ignores the host_index
238
+ in the spec for a single request.
239
+ :type _host_index: int, optional
240
+ :return: Returns the result object.
241
+ """ # noqa: E501
242
+
243
+ _param = self._ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_serialize(
244
+ body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post=body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post,
245
+ _request_auth=_request_auth,
246
+ _content_type=_content_type,
247
+ _headers=_headers,
248
+ _host_index=_host_index
249
+ )
250
+
251
+ _response_types_map: Dict[str, Optional[str]] = {
252
+ '200': "object",
253
+ '422': "HTTPValidationError",
254
+ }
255
+ response_data = self.api_client.call_api(
256
+ *_param,
257
+ _request_timeout=_request_timeout
258
+ )
259
+ return response_data.response
260
+
261
+
262
+ def _ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_serialize(
263
+ self,
264
+ body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post,
265
+ _request_auth,
266
+ _content_type,
267
+ _headers,
268
+ _host_index,
269
+ ) -> RequestSerialized:
270
+
271
+ _host = None
272
+
273
+ _collection_formats: Dict[str, str] = {
274
+ }
275
+
276
+ _path_params: Dict[str, str] = {}
277
+ _query_params: List[Tuple[str, str]] = []
278
+ _header_params: Dict[str, Optional[str]] = _headers or {}
279
+ _form_params: List[Tuple[str, str]] = []
280
+ _files: Dict[
281
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
282
+ ] = {}
283
+ _body_params: Optional[bytes] = None
284
+
285
+ # process the path parameters
286
+ # process the query parameters
287
+ # process the header parameters
288
+ # process the form parameters
289
+ # process the body parameter
290
+ if body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post is not None:
291
+ _body_params = body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post
292
+
293
+
294
+ # set the HTTP header `Accept`
295
+ if 'Accept' not in _header_params:
296
+ _header_params['Accept'] = self.api_client.select_header_accept(
297
+ [
298
+ 'application/json'
299
+ ]
300
+ )
301
+
302
+ # set the HTTP header `Content-Type`
303
+ if _content_type:
304
+ _header_params['Content-Type'] = _content_type
305
+ else:
306
+ _default_content_type = (
307
+ self.api_client.select_header_content_type(
308
+ [
309
+ 'application/json'
310
+ ]
311
+ )
312
+ )
313
+ if _default_content_type is not None:
314
+ _header_params['Content-Type'] = _default_content_type
315
+
316
+ # authentication setting
317
+ _auth_settings: List[str] = [
318
+ 'HTTPBearer'
319
+ ]
320
+
321
+ return self.api_client.param_serialize(
322
+ method='POST',
323
+ resource_path='/api/v1/chorus-pro/transverses/ajouter-fichier',
324
+ path_params=_path_params,
325
+ query_params=_query_params,
326
+ header_params=_header_params,
327
+ body=_body_params,
328
+ post_params=_form_params,
329
+ files=_files,
330
+ auth_settings=_auth_settings,
331
+ collection_formats=_collection_formats,
332
+ _host=_host,
333
+ _request_auth=_request_auth
334
+ )
335
+
336
+
337
+
338
+
339
+ @validate_call
340
+ def completer_facture_api_v1_chorus_pro_factures_completer_post(
341
+ self,
342
+ body_completer_facture_api_v1_chorus_pro_factures_completer_post: BodyCompleterFactureApiV1ChorusProFacturesCompleterPost,
343
+ _request_timeout: Union[
344
+ None,
345
+ Annotated[StrictFloat, Field(gt=0)],
346
+ Tuple[
347
+ Annotated[StrictFloat, Field(gt=0)],
348
+ Annotated[StrictFloat, Field(gt=0)]
349
+ ]
350
+ ] = None,
351
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
352
+ _content_type: Optional[StrictStr] = None,
353
+ _headers: Optional[Dict[StrictStr, Any]] = None,
354
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
355
+ ) -> object:
356
+ """Compléter une facture suspendue (Fournisseur)
357
+
358
+ Complète une facture au statut SUSPENDUE en ajoutant des pièces jointes ou un commentaire. **Statut requis** : SUSPENDUE **Actions possibles** : - Ajouter des pièces jointes (justificatifs, bons de commande, etc.) - Modifier le commentaire **Payload exemple** : ```json { \"identifiantFactureCPP\": 12345, \"commentaire\": \"Voici les justificatifs demandés\", \"listePiecesJointes\": [ { \"pieceJointeIdFichier\": 98765, \"pieceJointeNom\": \"bon_commande.pdf\" } ] } ``` **Note** : Les pièces jointes doivent d'abord être uploadées via `/transverses/ajouter-fichier`. **Après complétion** : La facture repasse au statut MISE_A_DISPOSITION.
359
+
360
+ :param body_completer_facture_api_v1_chorus_pro_factures_completer_post: (required)
361
+ :type body_completer_facture_api_v1_chorus_pro_factures_completer_post: BodyCompleterFactureApiV1ChorusProFacturesCompleterPost
362
+ :param _request_timeout: timeout setting for this request. If one
363
+ number provided, it will be total request
364
+ timeout. It can also be a pair (tuple) of
365
+ (connection, read) timeouts.
366
+ :type _request_timeout: int, tuple(int, int), optional
367
+ :param _request_auth: set to override the auth_settings for an a single
368
+ request; this effectively ignores the
369
+ authentication in the spec for a single request.
370
+ :type _request_auth: dict, optional
371
+ :param _content_type: force content-type for the request.
372
+ :type _content_type: str, Optional
373
+ :param _headers: set to override the headers for a single
374
+ request; this effectively ignores the headers
375
+ in the spec for a single request.
376
+ :type _headers: dict, optional
377
+ :param _host_index: set to override the host_index for a single
378
+ request; this effectively ignores the host_index
379
+ in the spec for a single request.
380
+ :type _host_index: int, optional
381
+ :return: Returns the result object.
382
+ """ # noqa: E501
383
+
384
+ _param = self._completer_facture_api_v1_chorus_pro_factures_completer_post_serialize(
385
+ body_completer_facture_api_v1_chorus_pro_factures_completer_post=body_completer_facture_api_v1_chorus_pro_factures_completer_post,
386
+ _request_auth=_request_auth,
387
+ _content_type=_content_type,
388
+ _headers=_headers,
389
+ _host_index=_host_index
390
+ )
391
+
392
+ _response_types_map: Dict[str, Optional[str]] = {
393
+ '200': "object",
394
+ '422': "HTTPValidationError",
395
+ }
396
+ response_data = self.api_client.call_api(
397
+ *_param,
398
+ _request_timeout=_request_timeout
399
+ )
400
+ response_data.read()
401
+ return self.api_client.response_deserialize(
402
+ response_data=response_data,
403
+ response_types_map=_response_types_map,
404
+ ).data
405
+
406
+
407
+ @validate_call
408
+ def completer_facture_api_v1_chorus_pro_factures_completer_post_with_http_info(
409
+ self,
410
+ body_completer_facture_api_v1_chorus_pro_factures_completer_post: BodyCompleterFactureApiV1ChorusProFacturesCompleterPost,
411
+ _request_timeout: Union[
412
+ None,
413
+ Annotated[StrictFloat, Field(gt=0)],
414
+ Tuple[
415
+ Annotated[StrictFloat, Field(gt=0)],
416
+ Annotated[StrictFloat, Field(gt=0)]
417
+ ]
418
+ ] = None,
419
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
420
+ _content_type: Optional[StrictStr] = None,
421
+ _headers: Optional[Dict[StrictStr, Any]] = None,
422
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
423
+ ) -> ApiResponse[object]:
424
+ """Compléter une facture suspendue (Fournisseur)
425
+
426
+ Complète une facture au statut SUSPENDUE en ajoutant des pièces jointes ou un commentaire. **Statut requis** : SUSPENDUE **Actions possibles** : - Ajouter des pièces jointes (justificatifs, bons de commande, etc.) - Modifier le commentaire **Payload exemple** : ```json { \"identifiantFactureCPP\": 12345, \"commentaire\": \"Voici les justificatifs demandés\", \"listePiecesJointes\": [ { \"pieceJointeIdFichier\": 98765, \"pieceJointeNom\": \"bon_commande.pdf\" } ] } ``` **Note** : Les pièces jointes doivent d'abord être uploadées via `/transverses/ajouter-fichier`. **Après complétion** : La facture repasse au statut MISE_A_DISPOSITION.
427
+
428
+ :param body_completer_facture_api_v1_chorus_pro_factures_completer_post: (required)
429
+ :type body_completer_facture_api_v1_chorus_pro_factures_completer_post: BodyCompleterFactureApiV1ChorusProFacturesCompleterPost
430
+ :param _request_timeout: timeout setting for this request. If one
431
+ number provided, it will be total request
432
+ timeout. It can also be a pair (tuple) of
433
+ (connection, read) timeouts.
434
+ :type _request_timeout: int, tuple(int, int), optional
435
+ :param _request_auth: set to override the auth_settings for an a single
436
+ request; this effectively ignores the
437
+ authentication in the spec for a single request.
438
+ :type _request_auth: dict, optional
439
+ :param _content_type: force content-type for the request.
440
+ :type _content_type: str, Optional
441
+ :param _headers: set to override the headers for a single
442
+ request; this effectively ignores the headers
443
+ in the spec for a single request.
444
+ :type _headers: dict, optional
445
+ :param _host_index: set to override the host_index for a single
446
+ request; this effectively ignores the host_index
447
+ in the spec for a single request.
448
+ :type _host_index: int, optional
449
+ :return: Returns the result object.
450
+ """ # noqa: E501
451
+
452
+ _param = self._completer_facture_api_v1_chorus_pro_factures_completer_post_serialize(
453
+ body_completer_facture_api_v1_chorus_pro_factures_completer_post=body_completer_facture_api_v1_chorus_pro_factures_completer_post,
454
+ _request_auth=_request_auth,
455
+ _content_type=_content_type,
456
+ _headers=_headers,
457
+ _host_index=_host_index
458
+ )
459
+
460
+ _response_types_map: Dict[str, Optional[str]] = {
461
+ '200': "object",
462
+ '422': "HTTPValidationError",
463
+ }
464
+ response_data = self.api_client.call_api(
465
+ *_param,
466
+ _request_timeout=_request_timeout
467
+ )
468
+ response_data.read()
469
+ return self.api_client.response_deserialize(
470
+ response_data=response_data,
471
+ response_types_map=_response_types_map,
472
+ )
473
+
474
+
475
+ @validate_call
476
+ def completer_facture_api_v1_chorus_pro_factures_completer_post_without_preload_content(
477
+ self,
478
+ body_completer_facture_api_v1_chorus_pro_factures_completer_post: BodyCompleterFactureApiV1ChorusProFacturesCompleterPost,
479
+ _request_timeout: Union[
480
+ None,
481
+ Annotated[StrictFloat, Field(gt=0)],
482
+ Tuple[
483
+ Annotated[StrictFloat, Field(gt=0)],
484
+ Annotated[StrictFloat, Field(gt=0)]
485
+ ]
486
+ ] = None,
487
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
488
+ _content_type: Optional[StrictStr] = None,
489
+ _headers: Optional[Dict[StrictStr, Any]] = None,
490
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
491
+ ) -> RESTResponseType:
492
+ """Compléter une facture suspendue (Fournisseur)
493
+
494
+ Complète une facture au statut SUSPENDUE en ajoutant des pièces jointes ou un commentaire. **Statut requis** : SUSPENDUE **Actions possibles** : - Ajouter des pièces jointes (justificatifs, bons de commande, etc.) - Modifier le commentaire **Payload exemple** : ```json { \"identifiantFactureCPP\": 12345, \"commentaire\": \"Voici les justificatifs demandés\", \"listePiecesJointes\": [ { \"pieceJointeIdFichier\": 98765, \"pieceJointeNom\": \"bon_commande.pdf\" } ] } ``` **Note** : Les pièces jointes doivent d'abord être uploadées via `/transverses/ajouter-fichier`. **Après complétion** : La facture repasse au statut MISE_A_DISPOSITION.
495
+
496
+ :param body_completer_facture_api_v1_chorus_pro_factures_completer_post: (required)
497
+ :type body_completer_facture_api_v1_chorus_pro_factures_completer_post: BodyCompleterFactureApiV1ChorusProFacturesCompleterPost
498
+ :param _request_timeout: timeout setting for this request. If one
499
+ number provided, it will be total request
500
+ timeout. It can also be a pair (tuple) of
501
+ (connection, read) timeouts.
502
+ :type _request_timeout: int, tuple(int, int), optional
503
+ :param _request_auth: set to override the auth_settings for an a single
504
+ request; this effectively ignores the
505
+ authentication in the spec for a single request.
506
+ :type _request_auth: dict, optional
507
+ :param _content_type: force content-type for the request.
508
+ :type _content_type: str, Optional
509
+ :param _headers: set to override the headers for a single
510
+ request; this effectively ignores the headers
511
+ in the spec for a single request.
512
+ :type _headers: dict, optional
513
+ :param _host_index: set to override the host_index for a single
514
+ request; this effectively ignores the host_index
515
+ in the spec for a single request.
516
+ :type _host_index: int, optional
517
+ :return: Returns the result object.
518
+ """ # noqa: E501
519
+
520
+ _param = self._completer_facture_api_v1_chorus_pro_factures_completer_post_serialize(
521
+ body_completer_facture_api_v1_chorus_pro_factures_completer_post=body_completer_facture_api_v1_chorus_pro_factures_completer_post,
522
+ _request_auth=_request_auth,
523
+ _content_type=_content_type,
524
+ _headers=_headers,
525
+ _host_index=_host_index
526
+ )
527
+
528
+ _response_types_map: Dict[str, Optional[str]] = {
529
+ '200': "object",
530
+ '422': "HTTPValidationError",
531
+ }
532
+ response_data = self.api_client.call_api(
533
+ *_param,
534
+ _request_timeout=_request_timeout
535
+ )
536
+ return response_data.response
537
+
538
+
539
+ def _completer_facture_api_v1_chorus_pro_factures_completer_post_serialize(
540
+ self,
541
+ body_completer_facture_api_v1_chorus_pro_factures_completer_post,
542
+ _request_auth,
543
+ _content_type,
544
+ _headers,
545
+ _host_index,
546
+ ) -> RequestSerialized:
547
+
548
+ _host = None
549
+
550
+ _collection_formats: Dict[str, str] = {
551
+ }
552
+
553
+ _path_params: Dict[str, str] = {}
554
+ _query_params: List[Tuple[str, str]] = []
555
+ _header_params: Dict[str, Optional[str]] = _headers or {}
556
+ _form_params: List[Tuple[str, str]] = []
557
+ _files: Dict[
558
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
559
+ ] = {}
560
+ _body_params: Optional[bytes] = None
561
+
562
+ # process the path parameters
563
+ # process the query parameters
564
+ # process the header parameters
565
+ # process the form parameters
566
+ # process the body parameter
567
+ if body_completer_facture_api_v1_chorus_pro_factures_completer_post is not None:
568
+ _body_params = body_completer_facture_api_v1_chorus_pro_factures_completer_post
569
+
570
+
571
+ # set the HTTP header `Accept`
572
+ if 'Accept' not in _header_params:
573
+ _header_params['Accept'] = self.api_client.select_header_accept(
574
+ [
575
+ 'application/json'
576
+ ]
577
+ )
578
+
579
+ # set the HTTP header `Content-Type`
580
+ if _content_type:
581
+ _header_params['Content-Type'] = _content_type
582
+ else:
583
+ _default_content_type = (
584
+ self.api_client.select_header_content_type(
585
+ [
586
+ 'application/json'
587
+ ]
588
+ )
589
+ )
590
+ if _default_content_type is not None:
591
+ _header_params['Content-Type'] = _default_content_type
592
+
593
+ # authentication setting
594
+ _auth_settings: List[str] = [
595
+ 'HTTPBearer'
596
+ ]
597
+
598
+ return self.api_client.param_serialize(
599
+ method='POST',
600
+ resource_path='/api/v1/chorus-pro/factures/completer',
601
+ path_params=_path_params,
602
+ query_params=_query_params,
603
+ header_params=_header_params,
604
+ body=_body_params,
605
+ post_params=_form_params,
606
+ files=_files,
607
+ auth_settings=_auth_settings,
608
+ collection_formats=_collection_formats,
609
+ _host=_host,
610
+ _request_auth=_request_auth
611
+ )
612
+
613
+
614
+
615
+
616
+ @validate_call
617
+ def consulter_facture_api_v1_chorus_pro_factures_consulter_post(
618
+ self,
619
+ consulter_facture_request: ConsulterFactureRequest,
620
+ _request_timeout: Union[
621
+ None,
622
+ Annotated[StrictFloat, Field(gt=0)],
623
+ Tuple[
624
+ Annotated[StrictFloat, Field(gt=0)],
625
+ Annotated[StrictFloat, Field(gt=0)]
626
+ ]
627
+ ] = None,
628
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
629
+ _content_type: Optional[StrictStr] = None,
630
+ _headers: Optional[Dict[StrictStr, Any]] = None,
631
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
632
+ ) -> ConsulterFactureResponse:
633
+ """Consulter le statut d'une facture
634
+
635
+ Récupère les informations et le statut actuel d'une facture soumise à Chorus Pro. **Retour** : - Numéro et date de facture - Montant TTC - **Statut courant** : SOUMISE, VALIDEE, REJETEE, SUSPENDUE, MANDATEE, MISE_EN_PAIEMENT, etc. - Structure destinataire **Cas d'usage** : - Suivre l'évolution du traitement d'une facture - Vérifier si une facture a été validée ou rejetée - Obtenir la date de mise en paiement **Polling** : Appelez cet endpoint régulièrement pour suivre l'évolution du statut.
636
+
637
+ :param consulter_facture_request: (required)
638
+ :type consulter_facture_request: ConsulterFactureRequest
639
+ :param _request_timeout: timeout setting for this request. If one
640
+ number provided, it will be total request
641
+ timeout. It can also be a pair (tuple) of
642
+ (connection, read) timeouts.
643
+ :type _request_timeout: int, tuple(int, int), optional
644
+ :param _request_auth: set to override the auth_settings for an a single
645
+ request; this effectively ignores the
646
+ authentication in the spec for a single request.
647
+ :type _request_auth: dict, optional
648
+ :param _content_type: force content-type for the request.
649
+ :type _content_type: str, Optional
650
+ :param _headers: set to override the headers for a single
651
+ request; this effectively ignores the headers
652
+ in the spec for a single request.
653
+ :type _headers: dict, optional
654
+ :param _host_index: set to override the host_index for a single
655
+ request; this effectively ignores the host_index
656
+ in the spec for a single request.
657
+ :type _host_index: int, optional
658
+ :return: Returns the result object.
659
+ """ # noqa: E501
660
+
661
+ _param = self._consulter_facture_api_v1_chorus_pro_factures_consulter_post_serialize(
662
+ consulter_facture_request=consulter_facture_request,
663
+ _request_auth=_request_auth,
664
+ _content_type=_content_type,
665
+ _headers=_headers,
666
+ _host_index=_host_index
667
+ )
668
+
669
+ _response_types_map: Dict[str, Optional[str]] = {
670
+ '200': "ConsulterFactureResponse",
671
+ '422': "HTTPValidationError",
672
+ }
673
+ response_data = self.api_client.call_api(
674
+ *_param,
675
+ _request_timeout=_request_timeout
676
+ )
677
+ response_data.read()
678
+ return self.api_client.response_deserialize(
679
+ response_data=response_data,
680
+ response_types_map=_response_types_map,
681
+ ).data
682
+
683
+
684
+ @validate_call
685
+ def consulter_facture_api_v1_chorus_pro_factures_consulter_post_with_http_info(
686
+ self,
687
+ consulter_facture_request: ConsulterFactureRequest,
688
+ _request_timeout: Union[
689
+ None,
690
+ Annotated[StrictFloat, Field(gt=0)],
691
+ Tuple[
692
+ Annotated[StrictFloat, Field(gt=0)],
693
+ Annotated[StrictFloat, Field(gt=0)]
694
+ ]
695
+ ] = None,
696
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
697
+ _content_type: Optional[StrictStr] = None,
698
+ _headers: Optional[Dict[StrictStr, Any]] = None,
699
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
700
+ ) -> ApiResponse[ConsulterFactureResponse]:
701
+ """Consulter le statut d'une facture
702
+
703
+ Récupère les informations et le statut actuel d'une facture soumise à Chorus Pro. **Retour** : - Numéro et date de facture - Montant TTC - **Statut courant** : SOUMISE, VALIDEE, REJETEE, SUSPENDUE, MANDATEE, MISE_EN_PAIEMENT, etc. - Structure destinataire **Cas d'usage** : - Suivre l'évolution du traitement d'une facture - Vérifier si une facture a été validée ou rejetée - Obtenir la date de mise en paiement **Polling** : Appelez cet endpoint régulièrement pour suivre l'évolution du statut.
704
+
705
+ :param consulter_facture_request: (required)
706
+ :type consulter_facture_request: ConsulterFactureRequest
707
+ :param _request_timeout: timeout setting for this request. If one
708
+ number provided, it will be total request
709
+ timeout. It can also be a pair (tuple) of
710
+ (connection, read) timeouts.
711
+ :type _request_timeout: int, tuple(int, int), optional
712
+ :param _request_auth: set to override the auth_settings for an a single
713
+ request; this effectively ignores the
714
+ authentication in the spec for a single request.
715
+ :type _request_auth: dict, optional
716
+ :param _content_type: force content-type for the request.
717
+ :type _content_type: str, Optional
718
+ :param _headers: set to override the headers for a single
719
+ request; this effectively ignores the headers
720
+ in the spec for a single request.
721
+ :type _headers: dict, optional
722
+ :param _host_index: set to override the host_index for a single
723
+ request; this effectively ignores the host_index
724
+ in the spec for a single request.
725
+ :type _host_index: int, optional
726
+ :return: Returns the result object.
727
+ """ # noqa: E501
728
+
729
+ _param = self._consulter_facture_api_v1_chorus_pro_factures_consulter_post_serialize(
730
+ consulter_facture_request=consulter_facture_request,
731
+ _request_auth=_request_auth,
732
+ _content_type=_content_type,
733
+ _headers=_headers,
734
+ _host_index=_host_index
735
+ )
736
+
737
+ _response_types_map: Dict[str, Optional[str]] = {
738
+ '200': "ConsulterFactureResponse",
739
+ '422': "HTTPValidationError",
740
+ }
741
+ response_data = self.api_client.call_api(
742
+ *_param,
743
+ _request_timeout=_request_timeout
744
+ )
745
+ response_data.read()
746
+ return self.api_client.response_deserialize(
747
+ response_data=response_data,
748
+ response_types_map=_response_types_map,
749
+ )
750
+
751
+
752
+ @validate_call
753
+ def consulter_facture_api_v1_chorus_pro_factures_consulter_post_without_preload_content(
754
+ self,
755
+ consulter_facture_request: ConsulterFactureRequest,
756
+ _request_timeout: Union[
757
+ None,
758
+ Annotated[StrictFloat, Field(gt=0)],
759
+ Tuple[
760
+ Annotated[StrictFloat, Field(gt=0)],
761
+ Annotated[StrictFloat, Field(gt=0)]
762
+ ]
763
+ ] = None,
764
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
765
+ _content_type: Optional[StrictStr] = None,
766
+ _headers: Optional[Dict[StrictStr, Any]] = None,
767
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
768
+ ) -> RESTResponseType:
769
+ """Consulter le statut d'une facture
770
+
771
+ Récupère les informations et le statut actuel d'une facture soumise à Chorus Pro. **Retour** : - Numéro et date de facture - Montant TTC - **Statut courant** : SOUMISE, VALIDEE, REJETEE, SUSPENDUE, MANDATEE, MISE_EN_PAIEMENT, etc. - Structure destinataire **Cas d'usage** : - Suivre l'évolution du traitement d'une facture - Vérifier si une facture a été validée ou rejetée - Obtenir la date de mise en paiement **Polling** : Appelez cet endpoint régulièrement pour suivre l'évolution du statut.
772
+
773
+ :param consulter_facture_request: (required)
774
+ :type consulter_facture_request: ConsulterFactureRequest
775
+ :param _request_timeout: timeout setting for this request. If one
776
+ number provided, it will be total request
777
+ timeout. It can also be a pair (tuple) of
778
+ (connection, read) timeouts.
779
+ :type _request_timeout: int, tuple(int, int), optional
780
+ :param _request_auth: set to override the auth_settings for an a single
781
+ request; this effectively ignores the
782
+ authentication in the spec for a single request.
783
+ :type _request_auth: dict, optional
784
+ :param _content_type: force content-type for the request.
785
+ :type _content_type: str, Optional
786
+ :param _headers: set to override the headers for a single
787
+ request; this effectively ignores the headers
788
+ in the spec for a single request.
789
+ :type _headers: dict, optional
790
+ :param _host_index: set to override the host_index for a single
791
+ request; this effectively ignores the host_index
792
+ in the spec for a single request.
793
+ :type _host_index: int, optional
794
+ :return: Returns the result object.
795
+ """ # noqa: E501
796
+
797
+ _param = self._consulter_facture_api_v1_chorus_pro_factures_consulter_post_serialize(
798
+ consulter_facture_request=consulter_facture_request,
799
+ _request_auth=_request_auth,
800
+ _content_type=_content_type,
801
+ _headers=_headers,
802
+ _host_index=_host_index
803
+ )
804
+
805
+ _response_types_map: Dict[str, Optional[str]] = {
806
+ '200': "ConsulterFactureResponse",
807
+ '422': "HTTPValidationError",
808
+ }
809
+ response_data = self.api_client.call_api(
810
+ *_param,
811
+ _request_timeout=_request_timeout
812
+ )
813
+ return response_data.response
814
+
815
+
816
+ def _consulter_facture_api_v1_chorus_pro_factures_consulter_post_serialize(
817
+ self,
818
+ consulter_facture_request,
819
+ _request_auth,
820
+ _content_type,
821
+ _headers,
822
+ _host_index,
823
+ ) -> RequestSerialized:
824
+
825
+ _host = None
826
+
827
+ _collection_formats: Dict[str, str] = {
828
+ }
829
+
830
+ _path_params: Dict[str, str] = {}
831
+ _query_params: List[Tuple[str, str]] = []
832
+ _header_params: Dict[str, Optional[str]] = _headers or {}
833
+ _form_params: List[Tuple[str, str]] = []
834
+ _files: Dict[
835
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
836
+ ] = {}
837
+ _body_params: Optional[bytes] = None
838
+
839
+ # process the path parameters
840
+ # process the query parameters
841
+ # process the header parameters
842
+ # process the form parameters
843
+ # process the body parameter
844
+ if consulter_facture_request is not None:
845
+ _body_params = consulter_facture_request
846
+
847
+
848
+ # set the HTTP header `Accept`
849
+ if 'Accept' not in _header_params:
850
+ _header_params['Accept'] = self.api_client.select_header_accept(
851
+ [
852
+ 'application/json'
853
+ ]
854
+ )
855
+
856
+ # set the HTTP header `Content-Type`
857
+ if _content_type:
858
+ _header_params['Content-Type'] = _content_type
859
+ else:
860
+ _default_content_type = (
861
+ self.api_client.select_header_content_type(
862
+ [
863
+ 'application/json'
864
+ ]
865
+ )
866
+ )
867
+ if _default_content_type is not None:
868
+ _header_params['Content-Type'] = _default_content_type
869
+
870
+ # authentication setting
871
+ _auth_settings: List[str] = [
872
+ 'HTTPBearer'
873
+ ]
874
+
875
+ return self.api_client.param_serialize(
876
+ method='POST',
877
+ resource_path='/api/v1/chorus-pro/factures/consulter',
878
+ path_params=_path_params,
879
+ query_params=_query_params,
880
+ header_params=_header_params,
881
+ body=_body_params,
882
+ post_params=_form_params,
883
+ files=_files,
884
+ auth_settings=_auth_settings,
885
+ collection_formats=_collection_formats,
886
+ _host=_host,
887
+ _request_auth=_request_auth
888
+ )
889
+
890
+
891
+
892
+
893
+ @validate_call
894
+ def consulter_structure_api_v1_chorus_pro_structures_consulter_post(
895
+ self,
896
+ consulter_structure_request: ConsulterStructureRequest,
897
+ _request_timeout: Union[
898
+ None,
899
+ Annotated[StrictFloat, Field(gt=0)],
900
+ Tuple[
901
+ Annotated[StrictFloat, Field(gt=0)],
902
+ Annotated[StrictFloat, Field(gt=0)]
903
+ ]
904
+ ] = None,
905
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
906
+ _content_type: Optional[StrictStr] = None,
907
+ _headers: Optional[Dict[StrictStr, Any]] = None,
908
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
909
+ ) -> ConsulterStructureResponse:
910
+ """Consulter les détails d'une structure
911
+
912
+ Récupère les informations détaillées d'une structure Chorus Pro. **Retour** : - Raison sociale - Numéro de TVA intracommunautaire - Email de contact - **Paramètres obligatoires** : Indique si le code service et/ou numéro d'engagement sont requis pour soumettre une facture **Étape typique** : Appelée après `rechercher-structures` pour savoir quels champs sont obligatoires avant de soumettre une facture.
913
+
914
+ :param consulter_structure_request: (required)
915
+ :type consulter_structure_request: ConsulterStructureRequest
916
+ :param _request_timeout: timeout setting for this request. If one
917
+ number provided, it will be total request
918
+ timeout. It can also be a pair (tuple) of
919
+ (connection, read) timeouts.
920
+ :type _request_timeout: int, tuple(int, int), optional
921
+ :param _request_auth: set to override the auth_settings for an a single
922
+ request; this effectively ignores the
923
+ authentication in the spec for a single request.
924
+ :type _request_auth: dict, optional
925
+ :param _content_type: force content-type for the request.
926
+ :type _content_type: str, Optional
927
+ :param _headers: set to override the headers for a single
928
+ request; this effectively ignores the headers
929
+ in the spec for a single request.
930
+ :type _headers: dict, optional
931
+ :param _host_index: set to override the host_index for a single
932
+ request; this effectively ignores the host_index
933
+ in the spec for a single request.
934
+ :type _host_index: int, optional
935
+ :return: Returns the result object.
936
+ """ # noqa: E501
937
+
938
+ _param = self._consulter_structure_api_v1_chorus_pro_structures_consulter_post_serialize(
939
+ consulter_structure_request=consulter_structure_request,
940
+ _request_auth=_request_auth,
941
+ _content_type=_content_type,
942
+ _headers=_headers,
943
+ _host_index=_host_index
944
+ )
945
+
946
+ _response_types_map: Dict[str, Optional[str]] = {
947
+ '200': "ConsulterStructureResponse",
948
+ '422': "HTTPValidationError",
949
+ }
950
+ response_data = self.api_client.call_api(
951
+ *_param,
952
+ _request_timeout=_request_timeout
953
+ )
954
+ response_data.read()
955
+ return self.api_client.response_deserialize(
956
+ response_data=response_data,
957
+ response_types_map=_response_types_map,
958
+ ).data
959
+
960
+
961
+ @validate_call
962
+ def consulter_structure_api_v1_chorus_pro_structures_consulter_post_with_http_info(
963
+ self,
964
+ consulter_structure_request: ConsulterStructureRequest,
965
+ _request_timeout: Union[
966
+ None,
967
+ Annotated[StrictFloat, Field(gt=0)],
968
+ Tuple[
969
+ Annotated[StrictFloat, Field(gt=0)],
970
+ Annotated[StrictFloat, Field(gt=0)]
971
+ ]
972
+ ] = None,
973
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
974
+ _content_type: Optional[StrictStr] = None,
975
+ _headers: Optional[Dict[StrictStr, Any]] = None,
976
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
977
+ ) -> ApiResponse[ConsulterStructureResponse]:
978
+ """Consulter les détails d'une structure
979
+
980
+ Récupère les informations détaillées d'une structure Chorus Pro. **Retour** : - Raison sociale - Numéro de TVA intracommunautaire - Email de contact - **Paramètres obligatoires** : Indique si le code service et/ou numéro d'engagement sont requis pour soumettre une facture **Étape typique** : Appelée après `rechercher-structures` pour savoir quels champs sont obligatoires avant de soumettre une facture.
981
+
982
+ :param consulter_structure_request: (required)
983
+ :type consulter_structure_request: ConsulterStructureRequest
984
+ :param _request_timeout: timeout setting for this request. If one
985
+ number provided, it will be total request
986
+ timeout. It can also be a pair (tuple) of
987
+ (connection, read) timeouts.
988
+ :type _request_timeout: int, tuple(int, int), optional
989
+ :param _request_auth: set to override the auth_settings for an a single
990
+ request; this effectively ignores the
991
+ authentication in the spec for a single request.
992
+ :type _request_auth: dict, optional
993
+ :param _content_type: force content-type for the request.
994
+ :type _content_type: str, Optional
995
+ :param _headers: set to override the headers for a single
996
+ request; this effectively ignores the headers
997
+ in the spec for a single request.
998
+ :type _headers: dict, optional
999
+ :param _host_index: set to override the host_index for a single
1000
+ request; this effectively ignores the host_index
1001
+ in the spec for a single request.
1002
+ :type _host_index: int, optional
1003
+ :return: Returns the result object.
1004
+ """ # noqa: E501
1005
+
1006
+ _param = self._consulter_structure_api_v1_chorus_pro_structures_consulter_post_serialize(
1007
+ consulter_structure_request=consulter_structure_request,
1008
+ _request_auth=_request_auth,
1009
+ _content_type=_content_type,
1010
+ _headers=_headers,
1011
+ _host_index=_host_index
1012
+ )
1013
+
1014
+ _response_types_map: Dict[str, Optional[str]] = {
1015
+ '200': "ConsulterStructureResponse",
1016
+ '422': "HTTPValidationError",
1017
+ }
1018
+ response_data = self.api_client.call_api(
1019
+ *_param,
1020
+ _request_timeout=_request_timeout
1021
+ )
1022
+ response_data.read()
1023
+ return self.api_client.response_deserialize(
1024
+ response_data=response_data,
1025
+ response_types_map=_response_types_map,
1026
+ )
1027
+
1028
+
1029
+ @validate_call
1030
+ def consulter_structure_api_v1_chorus_pro_structures_consulter_post_without_preload_content(
1031
+ self,
1032
+ consulter_structure_request: ConsulterStructureRequest,
1033
+ _request_timeout: Union[
1034
+ None,
1035
+ Annotated[StrictFloat, Field(gt=0)],
1036
+ Tuple[
1037
+ Annotated[StrictFloat, Field(gt=0)],
1038
+ Annotated[StrictFloat, Field(gt=0)]
1039
+ ]
1040
+ ] = None,
1041
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1042
+ _content_type: Optional[StrictStr] = None,
1043
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1044
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1045
+ ) -> RESTResponseType:
1046
+ """Consulter les détails d'une structure
1047
+
1048
+ Récupère les informations détaillées d'une structure Chorus Pro. **Retour** : - Raison sociale - Numéro de TVA intracommunautaire - Email de contact - **Paramètres obligatoires** : Indique si le code service et/ou numéro d'engagement sont requis pour soumettre une facture **Étape typique** : Appelée après `rechercher-structures` pour savoir quels champs sont obligatoires avant de soumettre une facture.
1049
+
1050
+ :param consulter_structure_request: (required)
1051
+ :type consulter_structure_request: ConsulterStructureRequest
1052
+ :param _request_timeout: timeout setting for this request. If one
1053
+ number provided, it will be total request
1054
+ timeout. It can also be a pair (tuple) of
1055
+ (connection, read) timeouts.
1056
+ :type _request_timeout: int, tuple(int, int), optional
1057
+ :param _request_auth: set to override the auth_settings for an a single
1058
+ request; this effectively ignores the
1059
+ authentication in the spec for a single request.
1060
+ :type _request_auth: dict, optional
1061
+ :param _content_type: force content-type for the request.
1062
+ :type _content_type: str, Optional
1063
+ :param _headers: set to override the headers for a single
1064
+ request; this effectively ignores the headers
1065
+ in the spec for a single request.
1066
+ :type _headers: dict, optional
1067
+ :param _host_index: set to override the host_index for a single
1068
+ request; this effectively ignores the host_index
1069
+ in the spec for a single request.
1070
+ :type _host_index: int, optional
1071
+ :return: Returns the result object.
1072
+ """ # noqa: E501
1073
+
1074
+ _param = self._consulter_structure_api_v1_chorus_pro_structures_consulter_post_serialize(
1075
+ consulter_structure_request=consulter_structure_request,
1076
+ _request_auth=_request_auth,
1077
+ _content_type=_content_type,
1078
+ _headers=_headers,
1079
+ _host_index=_host_index
1080
+ )
1081
+
1082
+ _response_types_map: Dict[str, Optional[str]] = {
1083
+ '200': "ConsulterStructureResponse",
1084
+ '422': "HTTPValidationError",
1085
+ }
1086
+ response_data = self.api_client.call_api(
1087
+ *_param,
1088
+ _request_timeout=_request_timeout
1089
+ )
1090
+ return response_data.response
1091
+
1092
+
1093
+ def _consulter_structure_api_v1_chorus_pro_structures_consulter_post_serialize(
1094
+ self,
1095
+ consulter_structure_request,
1096
+ _request_auth,
1097
+ _content_type,
1098
+ _headers,
1099
+ _host_index,
1100
+ ) -> RequestSerialized:
1101
+
1102
+ _host = None
1103
+
1104
+ _collection_formats: Dict[str, str] = {
1105
+ }
1106
+
1107
+ _path_params: Dict[str, str] = {}
1108
+ _query_params: List[Tuple[str, str]] = []
1109
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1110
+ _form_params: List[Tuple[str, str]] = []
1111
+ _files: Dict[
1112
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1113
+ ] = {}
1114
+ _body_params: Optional[bytes] = None
1115
+
1116
+ # process the path parameters
1117
+ # process the query parameters
1118
+ # process the header parameters
1119
+ # process the form parameters
1120
+ # process the body parameter
1121
+ if consulter_structure_request is not None:
1122
+ _body_params = consulter_structure_request
1123
+
1124
+
1125
+ # set the HTTP header `Accept`
1126
+ if 'Accept' not in _header_params:
1127
+ _header_params['Accept'] = self.api_client.select_header_accept(
1128
+ [
1129
+ 'application/json'
1130
+ ]
1131
+ )
1132
+
1133
+ # set the HTTP header `Content-Type`
1134
+ if _content_type:
1135
+ _header_params['Content-Type'] = _content_type
1136
+ else:
1137
+ _default_content_type = (
1138
+ self.api_client.select_header_content_type(
1139
+ [
1140
+ 'application/json'
1141
+ ]
1142
+ )
1143
+ )
1144
+ if _default_content_type is not None:
1145
+ _header_params['Content-Type'] = _default_content_type
1146
+
1147
+ # authentication setting
1148
+ _auth_settings: List[str] = [
1149
+ 'HTTPBearer'
1150
+ ]
1151
+
1152
+ return self.api_client.param_serialize(
1153
+ method='POST',
1154
+ resource_path='/api/v1/chorus-pro/structures/consulter',
1155
+ path_params=_path_params,
1156
+ query_params=_query_params,
1157
+ header_params=_header_params,
1158
+ body=_body_params,
1159
+ post_params=_form_params,
1160
+ files=_files,
1161
+ auth_settings=_auth_settings,
1162
+ collection_formats=_collection_formats,
1163
+ _host=_host,
1164
+ _request_auth=_request_auth
1165
+ )
1166
+
1167
+
1168
+
1169
+
1170
+ @validate_call
1171
+ def lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get(
1172
+ self,
1173
+ id_structure_cpp: StrictInt,
1174
+ body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get: BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet,
1175
+ _request_timeout: Union[
1176
+ None,
1177
+ Annotated[StrictFloat, Field(gt=0)],
1178
+ Tuple[
1179
+ Annotated[StrictFloat, Field(gt=0)],
1180
+ Annotated[StrictFloat, Field(gt=0)]
1181
+ ]
1182
+ ] = None,
1183
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1184
+ _content_type: Optional[StrictStr] = None,
1185
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1186
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1187
+ ) -> RechercherServicesResponse:
1188
+ """Lister les services d'une structure
1189
+
1190
+ Récupère la liste des services actifs d'une structure publique. **Cas d'usage** : - Lister les services disponibles pour une administration - Vérifier qu'un code service existe avant de soumettre une facture **Retour** : - Liste des services avec leur code, libellé et statut (actif/inactif)
1191
+
1192
+ :param id_structure_cpp: (required)
1193
+ :type id_structure_cpp: int
1194
+ :param body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get: (required)
1195
+ :type body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get: BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet
1196
+ :param _request_timeout: timeout setting for this request. If one
1197
+ number provided, it will be total request
1198
+ timeout. It can also be a pair (tuple) of
1199
+ (connection, read) timeouts.
1200
+ :type _request_timeout: int, tuple(int, int), optional
1201
+ :param _request_auth: set to override the auth_settings for an a single
1202
+ request; this effectively ignores the
1203
+ authentication in the spec for a single request.
1204
+ :type _request_auth: dict, optional
1205
+ :param _content_type: force content-type for the request.
1206
+ :type _content_type: str, Optional
1207
+ :param _headers: set to override the headers for a single
1208
+ request; this effectively ignores the headers
1209
+ in the spec for a single request.
1210
+ :type _headers: dict, optional
1211
+ :param _host_index: set to override the host_index for a single
1212
+ request; this effectively ignores the host_index
1213
+ in the spec for a single request.
1214
+ :type _host_index: int, optional
1215
+ :return: Returns the result object.
1216
+ """ # noqa: E501
1217
+
1218
+ _param = self._lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_serialize(
1219
+ id_structure_cpp=id_structure_cpp,
1220
+ body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get=body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get,
1221
+ _request_auth=_request_auth,
1222
+ _content_type=_content_type,
1223
+ _headers=_headers,
1224
+ _host_index=_host_index
1225
+ )
1226
+
1227
+ _response_types_map: Dict[str, Optional[str]] = {
1228
+ '200': "RechercherServicesResponse",
1229
+ '422': "HTTPValidationError",
1230
+ }
1231
+ response_data = self.api_client.call_api(
1232
+ *_param,
1233
+ _request_timeout=_request_timeout
1234
+ )
1235
+ response_data.read()
1236
+ return self.api_client.response_deserialize(
1237
+ response_data=response_data,
1238
+ response_types_map=_response_types_map,
1239
+ ).data
1240
+
1241
+
1242
+ @validate_call
1243
+ def lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_with_http_info(
1244
+ self,
1245
+ id_structure_cpp: StrictInt,
1246
+ body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get: BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet,
1247
+ _request_timeout: Union[
1248
+ None,
1249
+ Annotated[StrictFloat, Field(gt=0)],
1250
+ Tuple[
1251
+ Annotated[StrictFloat, Field(gt=0)],
1252
+ Annotated[StrictFloat, Field(gt=0)]
1253
+ ]
1254
+ ] = None,
1255
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1256
+ _content_type: Optional[StrictStr] = None,
1257
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1258
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1259
+ ) -> ApiResponse[RechercherServicesResponse]:
1260
+ """Lister les services d'une structure
1261
+
1262
+ Récupère la liste des services actifs d'une structure publique. **Cas d'usage** : - Lister les services disponibles pour une administration - Vérifier qu'un code service existe avant de soumettre une facture **Retour** : - Liste des services avec leur code, libellé et statut (actif/inactif)
1263
+
1264
+ :param id_structure_cpp: (required)
1265
+ :type id_structure_cpp: int
1266
+ :param body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get: (required)
1267
+ :type body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get: BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet
1268
+ :param _request_timeout: timeout setting for this request. If one
1269
+ number provided, it will be total request
1270
+ timeout. It can also be a pair (tuple) of
1271
+ (connection, read) timeouts.
1272
+ :type _request_timeout: int, tuple(int, int), optional
1273
+ :param _request_auth: set to override the auth_settings for an a single
1274
+ request; this effectively ignores the
1275
+ authentication in the spec for a single request.
1276
+ :type _request_auth: dict, optional
1277
+ :param _content_type: force content-type for the request.
1278
+ :type _content_type: str, Optional
1279
+ :param _headers: set to override the headers for a single
1280
+ request; this effectively ignores the headers
1281
+ in the spec for a single request.
1282
+ :type _headers: dict, optional
1283
+ :param _host_index: set to override the host_index for a single
1284
+ request; this effectively ignores the host_index
1285
+ in the spec for a single request.
1286
+ :type _host_index: int, optional
1287
+ :return: Returns the result object.
1288
+ """ # noqa: E501
1289
+
1290
+ _param = self._lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_serialize(
1291
+ id_structure_cpp=id_structure_cpp,
1292
+ body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get=body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get,
1293
+ _request_auth=_request_auth,
1294
+ _content_type=_content_type,
1295
+ _headers=_headers,
1296
+ _host_index=_host_index
1297
+ )
1298
+
1299
+ _response_types_map: Dict[str, Optional[str]] = {
1300
+ '200': "RechercherServicesResponse",
1301
+ '422': "HTTPValidationError",
1302
+ }
1303
+ response_data = self.api_client.call_api(
1304
+ *_param,
1305
+ _request_timeout=_request_timeout
1306
+ )
1307
+ response_data.read()
1308
+ return self.api_client.response_deserialize(
1309
+ response_data=response_data,
1310
+ response_types_map=_response_types_map,
1311
+ )
1312
+
1313
+
1314
+ @validate_call
1315
+ def lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_without_preload_content(
1316
+ self,
1317
+ id_structure_cpp: StrictInt,
1318
+ body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get: BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet,
1319
+ _request_timeout: Union[
1320
+ None,
1321
+ Annotated[StrictFloat, Field(gt=0)],
1322
+ Tuple[
1323
+ Annotated[StrictFloat, Field(gt=0)],
1324
+ Annotated[StrictFloat, Field(gt=0)]
1325
+ ]
1326
+ ] = None,
1327
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1328
+ _content_type: Optional[StrictStr] = None,
1329
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1330
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1331
+ ) -> RESTResponseType:
1332
+ """Lister les services d'une structure
1333
+
1334
+ Récupère la liste des services actifs d'une structure publique. **Cas d'usage** : - Lister les services disponibles pour une administration - Vérifier qu'un code service existe avant de soumettre une facture **Retour** : - Liste des services avec leur code, libellé et statut (actif/inactif)
1335
+
1336
+ :param id_structure_cpp: (required)
1337
+ :type id_structure_cpp: int
1338
+ :param body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get: (required)
1339
+ :type body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get: BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet
1340
+ :param _request_timeout: timeout setting for this request. If one
1341
+ number provided, it will be total request
1342
+ timeout. It can also be a pair (tuple) of
1343
+ (connection, read) timeouts.
1344
+ :type _request_timeout: int, tuple(int, int), optional
1345
+ :param _request_auth: set to override the auth_settings for an a single
1346
+ request; this effectively ignores the
1347
+ authentication in the spec for a single request.
1348
+ :type _request_auth: dict, optional
1349
+ :param _content_type: force content-type for the request.
1350
+ :type _content_type: str, Optional
1351
+ :param _headers: set to override the headers for a single
1352
+ request; this effectively ignores the headers
1353
+ in the spec for a single request.
1354
+ :type _headers: dict, optional
1355
+ :param _host_index: set to override the host_index for a single
1356
+ request; this effectively ignores the host_index
1357
+ in the spec for a single request.
1358
+ :type _host_index: int, optional
1359
+ :return: Returns the result object.
1360
+ """ # noqa: E501
1361
+
1362
+ _param = self._lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_serialize(
1363
+ id_structure_cpp=id_structure_cpp,
1364
+ body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get=body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get,
1365
+ _request_auth=_request_auth,
1366
+ _content_type=_content_type,
1367
+ _headers=_headers,
1368
+ _host_index=_host_index
1369
+ )
1370
+
1371
+ _response_types_map: Dict[str, Optional[str]] = {
1372
+ '200': "RechercherServicesResponse",
1373
+ '422': "HTTPValidationError",
1374
+ }
1375
+ response_data = self.api_client.call_api(
1376
+ *_param,
1377
+ _request_timeout=_request_timeout
1378
+ )
1379
+ return response_data.response
1380
+
1381
+
1382
+ def _lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_serialize(
1383
+ self,
1384
+ id_structure_cpp,
1385
+ body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get,
1386
+ _request_auth,
1387
+ _content_type,
1388
+ _headers,
1389
+ _host_index,
1390
+ ) -> RequestSerialized:
1391
+
1392
+ _host = None
1393
+
1394
+ _collection_formats: Dict[str, str] = {
1395
+ }
1396
+
1397
+ _path_params: Dict[str, str] = {}
1398
+ _query_params: List[Tuple[str, str]] = []
1399
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1400
+ _form_params: List[Tuple[str, str]] = []
1401
+ _files: Dict[
1402
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1403
+ ] = {}
1404
+ _body_params: Optional[bytes] = None
1405
+
1406
+ # process the path parameters
1407
+ if id_structure_cpp is not None:
1408
+ _path_params['id_structure_cpp'] = id_structure_cpp
1409
+ # process the query parameters
1410
+ # process the header parameters
1411
+ # process the form parameters
1412
+ # process the body parameter
1413
+ if body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get is not None:
1414
+ _body_params = body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get
1415
+
1416
+
1417
+ # set the HTTP header `Accept`
1418
+ if 'Accept' not in _header_params:
1419
+ _header_params['Accept'] = self.api_client.select_header_accept(
1420
+ [
1421
+ 'application/json'
1422
+ ]
1423
+ )
1424
+
1425
+ # set the HTTP header `Content-Type`
1426
+ if _content_type:
1427
+ _header_params['Content-Type'] = _content_type
1428
+ else:
1429
+ _default_content_type = (
1430
+ self.api_client.select_header_content_type(
1431
+ [
1432
+ 'application/json'
1433
+ ]
1434
+ )
1435
+ )
1436
+ if _default_content_type is not None:
1437
+ _header_params['Content-Type'] = _default_content_type
1438
+
1439
+ # authentication setting
1440
+ _auth_settings: List[str] = [
1441
+ 'HTTPBearer'
1442
+ ]
1443
+
1444
+ return self.api_client.param_serialize(
1445
+ method='GET',
1446
+ resource_path='/api/v1/chorus-pro/structures/{id_structure_cpp}/services',
1447
+ path_params=_path_params,
1448
+ query_params=_query_params,
1449
+ header_params=_header_params,
1450
+ body=_body_params,
1451
+ post_params=_form_params,
1452
+ files=_files,
1453
+ auth_settings=_auth_settings,
1454
+ collection_formats=_collection_formats,
1455
+ _host=_host,
1456
+ _request_auth=_request_auth
1457
+ )
1458
+
1459
+
1460
+
1461
+
1462
+ @validate_call
1463
+ def obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post(
1464
+ self,
1465
+ obtenir_id_chorus_pro_request: ObtenirIdChorusProRequest,
1466
+ _request_timeout: Union[
1467
+ None,
1468
+ Annotated[StrictFloat, Field(gt=0)],
1469
+ Tuple[
1470
+ Annotated[StrictFloat, Field(gt=0)],
1471
+ Annotated[StrictFloat, Field(gt=0)]
1472
+ ]
1473
+ ] = None,
1474
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1475
+ _content_type: Optional[StrictStr] = None,
1476
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1477
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1478
+ ) -> ObtenirIdChorusProResponse:
1479
+ """Utilitaire : Obtenir l'ID Chorus Pro depuis un SIRET
1480
+
1481
+ **Utilitaire pratique** pour obtenir l'ID Chorus Pro d'une structure à partir de son SIRET. Cette fonction wrapper combine : 1. Recherche de la structure par SIRET 2. Extraction de l'`id_structure_cpp` si une seule structure est trouvée **Retour** : - `id_structure_cpp` : ID Chorus Pro (0 si non trouvé ou si plusieurs résultats) - `designation_structure` : Nom de la structure (si trouvée) - `message` : Message explicatif **Cas d'usage** : - Raccourci pour obtenir directement l'ID Chorus Pro avant de soumettre une facture - Alternative simplifiée à `rechercher-structures` + extraction manuelle de l'ID **Note** : Si plusieurs structures correspondent au SIRET (rare), retourne 0 et un message d'erreur.
1482
+
1483
+ :param obtenir_id_chorus_pro_request: (required)
1484
+ :type obtenir_id_chorus_pro_request: ObtenirIdChorusProRequest
1485
+ :param _request_timeout: timeout setting for this request. If one
1486
+ number provided, it will be total request
1487
+ timeout. It can also be a pair (tuple) of
1488
+ (connection, read) timeouts.
1489
+ :type _request_timeout: int, tuple(int, int), optional
1490
+ :param _request_auth: set to override the auth_settings for an a single
1491
+ request; this effectively ignores the
1492
+ authentication in the spec for a single request.
1493
+ :type _request_auth: dict, optional
1494
+ :param _content_type: force content-type for the request.
1495
+ :type _content_type: str, Optional
1496
+ :param _headers: set to override the headers for a single
1497
+ request; this effectively ignores the headers
1498
+ in the spec for a single request.
1499
+ :type _headers: dict, optional
1500
+ :param _host_index: set to override the host_index for a single
1501
+ request; this effectively ignores the host_index
1502
+ in the spec for a single request.
1503
+ :type _host_index: int, optional
1504
+ :return: Returns the result object.
1505
+ """ # noqa: E501
1506
+
1507
+ _param = self._obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post_serialize(
1508
+ obtenir_id_chorus_pro_request=obtenir_id_chorus_pro_request,
1509
+ _request_auth=_request_auth,
1510
+ _content_type=_content_type,
1511
+ _headers=_headers,
1512
+ _host_index=_host_index
1513
+ )
1514
+
1515
+ _response_types_map: Dict[str, Optional[str]] = {
1516
+ '200': "ObtenirIdChorusProResponse",
1517
+ '422': "HTTPValidationError",
1518
+ }
1519
+ response_data = self.api_client.call_api(
1520
+ *_param,
1521
+ _request_timeout=_request_timeout
1522
+ )
1523
+ response_data.read()
1524
+ return self.api_client.response_deserialize(
1525
+ response_data=response_data,
1526
+ response_types_map=_response_types_map,
1527
+ ).data
1528
+
1529
+
1530
+ @validate_call
1531
+ def obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post_with_http_info(
1532
+ self,
1533
+ obtenir_id_chorus_pro_request: ObtenirIdChorusProRequest,
1534
+ _request_timeout: Union[
1535
+ None,
1536
+ Annotated[StrictFloat, Field(gt=0)],
1537
+ Tuple[
1538
+ Annotated[StrictFloat, Field(gt=0)],
1539
+ Annotated[StrictFloat, Field(gt=0)]
1540
+ ]
1541
+ ] = None,
1542
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1543
+ _content_type: Optional[StrictStr] = None,
1544
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1545
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1546
+ ) -> ApiResponse[ObtenirIdChorusProResponse]:
1547
+ """Utilitaire : Obtenir l'ID Chorus Pro depuis un SIRET
1548
+
1549
+ **Utilitaire pratique** pour obtenir l'ID Chorus Pro d'une structure à partir de son SIRET. Cette fonction wrapper combine : 1. Recherche de la structure par SIRET 2. Extraction de l'`id_structure_cpp` si une seule structure est trouvée **Retour** : - `id_structure_cpp` : ID Chorus Pro (0 si non trouvé ou si plusieurs résultats) - `designation_structure` : Nom de la structure (si trouvée) - `message` : Message explicatif **Cas d'usage** : - Raccourci pour obtenir directement l'ID Chorus Pro avant de soumettre une facture - Alternative simplifiée à `rechercher-structures` + extraction manuelle de l'ID **Note** : Si plusieurs structures correspondent au SIRET (rare), retourne 0 et un message d'erreur.
1550
+
1551
+ :param obtenir_id_chorus_pro_request: (required)
1552
+ :type obtenir_id_chorus_pro_request: ObtenirIdChorusProRequest
1553
+ :param _request_timeout: timeout setting for this request. If one
1554
+ number provided, it will be total request
1555
+ timeout. It can also be a pair (tuple) of
1556
+ (connection, read) timeouts.
1557
+ :type _request_timeout: int, tuple(int, int), optional
1558
+ :param _request_auth: set to override the auth_settings for an a single
1559
+ request; this effectively ignores the
1560
+ authentication in the spec for a single request.
1561
+ :type _request_auth: dict, optional
1562
+ :param _content_type: force content-type for the request.
1563
+ :type _content_type: str, Optional
1564
+ :param _headers: set to override the headers for a single
1565
+ request; this effectively ignores the headers
1566
+ in the spec for a single request.
1567
+ :type _headers: dict, optional
1568
+ :param _host_index: set to override the host_index for a single
1569
+ request; this effectively ignores the host_index
1570
+ in the spec for a single request.
1571
+ :type _host_index: int, optional
1572
+ :return: Returns the result object.
1573
+ """ # noqa: E501
1574
+
1575
+ _param = self._obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post_serialize(
1576
+ obtenir_id_chorus_pro_request=obtenir_id_chorus_pro_request,
1577
+ _request_auth=_request_auth,
1578
+ _content_type=_content_type,
1579
+ _headers=_headers,
1580
+ _host_index=_host_index
1581
+ )
1582
+
1583
+ _response_types_map: Dict[str, Optional[str]] = {
1584
+ '200': "ObtenirIdChorusProResponse",
1585
+ '422': "HTTPValidationError",
1586
+ }
1587
+ response_data = self.api_client.call_api(
1588
+ *_param,
1589
+ _request_timeout=_request_timeout
1590
+ )
1591
+ response_data.read()
1592
+ return self.api_client.response_deserialize(
1593
+ response_data=response_data,
1594
+ response_types_map=_response_types_map,
1595
+ )
1596
+
1597
+
1598
+ @validate_call
1599
+ def obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post_without_preload_content(
1600
+ self,
1601
+ obtenir_id_chorus_pro_request: ObtenirIdChorusProRequest,
1602
+ _request_timeout: Union[
1603
+ None,
1604
+ Annotated[StrictFloat, Field(gt=0)],
1605
+ Tuple[
1606
+ Annotated[StrictFloat, Field(gt=0)],
1607
+ Annotated[StrictFloat, Field(gt=0)]
1608
+ ]
1609
+ ] = None,
1610
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1611
+ _content_type: Optional[StrictStr] = None,
1612
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1613
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1614
+ ) -> RESTResponseType:
1615
+ """Utilitaire : Obtenir l'ID Chorus Pro depuis un SIRET
1616
+
1617
+ **Utilitaire pratique** pour obtenir l'ID Chorus Pro d'une structure à partir de son SIRET. Cette fonction wrapper combine : 1. Recherche de la structure par SIRET 2. Extraction de l'`id_structure_cpp` si une seule structure est trouvée **Retour** : - `id_structure_cpp` : ID Chorus Pro (0 si non trouvé ou si plusieurs résultats) - `designation_structure` : Nom de la structure (si trouvée) - `message` : Message explicatif **Cas d'usage** : - Raccourci pour obtenir directement l'ID Chorus Pro avant de soumettre une facture - Alternative simplifiée à `rechercher-structures` + extraction manuelle de l'ID **Note** : Si plusieurs structures correspondent au SIRET (rare), retourne 0 et un message d'erreur.
1618
+
1619
+ :param obtenir_id_chorus_pro_request: (required)
1620
+ :type obtenir_id_chorus_pro_request: ObtenirIdChorusProRequest
1621
+ :param _request_timeout: timeout setting for this request. If one
1622
+ number provided, it will be total request
1623
+ timeout. It can also be a pair (tuple) of
1624
+ (connection, read) timeouts.
1625
+ :type _request_timeout: int, tuple(int, int), optional
1626
+ :param _request_auth: set to override the auth_settings for an a single
1627
+ request; this effectively ignores the
1628
+ authentication in the spec for a single request.
1629
+ :type _request_auth: dict, optional
1630
+ :param _content_type: force content-type for the request.
1631
+ :type _content_type: str, Optional
1632
+ :param _headers: set to override the headers for a single
1633
+ request; this effectively ignores the headers
1634
+ in the spec for a single request.
1635
+ :type _headers: dict, optional
1636
+ :param _host_index: set to override the host_index for a single
1637
+ request; this effectively ignores the host_index
1638
+ in the spec for a single request.
1639
+ :type _host_index: int, optional
1640
+ :return: Returns the result object.
1641
+ """ # noqa: E501
1642
+
1643
+ _param = self._obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post_serialize(
1644
+ obtenir_id_chorus_pro_request=obtenir_id_chorus_pro_request,
1645
+ _request_auth=_request_auth,
1646
+ _content_type=_content_type,
1647
+ _headers=_headers,
1648
+ _host_index=_host_index
1649
+ )
1650
+
1651
+ _response_types_map: Dict[str, Optional[str]] = {
1652
+ '200': "ObtenirIdChorusProResponse",
1653
+ '422': "HTTPValidationError",
1654
+ }
1655
+ response_data = self.api_client.call_api(
1656
+ *_param,
1657
+ _request_timeout=_request_timeout
1658
+ )
1659
+ return response_data.response
1660
+
1661
+
1662
+ def _obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post_serialize(
1663
+ self,
1664
+ obtenir_id_chorus_pro_request,
1665
+ _request_auth,
1666
+ _content_type,
1667
+ _headers,
1668
+ _host_index,
1669
+ ) -> RequestSerialized:
1670
+
1671
+ _host = None
1672
+
1673
+ _collection_formats: Dict[str, str] = {
1674
+ }
1675
+
1676
+ _path_params: Dict[str, str] = {}
1677
+ _query_params: List[Tuple[str, str]] = []
1678
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1679
+ _form_params: List[Tuple[str, str]] = []
1680
+ _files: Dict[
1681
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1682
+ ] = {}
1683
+ _body_params: Optional[bytes] = None
1684
+
1685
+ # process the path parameters
1686
+ # process the query parameters
1687
+ # process the header parameters
1688
+ # process the form parameters
1689
+ # process the body parameter
1690
+ if obtenir_id_chorus_pro_request is not None:
1691
+ _body_params = obtenir_id_chorus_pro_request
1692
+
1693
+
1694
+ # set the HTTP header `Accept`
1695
+ if 'Accept' not in _header_params:
1696
+ _header_params['Accept'] = self.api_client.select_header_accept(
1697
+ [
1698
+ 'application/json'
1699
+ ]
1700
+ )
1701
+
1702
+ # set the HTTP header `Content-Type`
1703
+ if _content_type:
1704
+ _header_params['Content-Type'] = _content_type
1705
+ else:
1706
+ _default_content_type = (
1707
+ self.api_client.select_header_content_type(
1708
+ [
1709
+ 'application/json'
1710
+ ]
1711
+ )
1712
+ )
1713
+ if _default_content_type is not None:
1714
+ _header_params['Content-Type'] = _default_content_type
1715
+
1716
+ # authentication setting
1717
+ _auth_settings: List[str] = [
1718
+ 'HTTPBearer'
1719
+ ]
1720
+
1721
+ return self.api_client.param_serialize(
1722
+ method='POST',
1723
+ resource_path='/api/v1/chorus-pro/structures/obtenir-id-depuis-siret',
1724
+ path_params=_path_params,
1725
+ query_params=_query_params,
1726
+ header_params=_header_params,
1727
+ body=_body_params,
1728
+ post_params=_form_params,
1729
+ files=_files,
1730
+ auth_settings=_auth_settings,
1731
+ collection_formats=_collection_formats,
1732
+ _host=_host,
1733
+ _request_auth=_request_auth
1734
+ )
1735
+
1736
+
1737
+
1738
+
1739
+ @validate_call
1740
+ def rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post(
1741
+ self,
1742
+ body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post: BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost,
1743
+ _request_timeout: Union[
1744
+ None,
1745
+ Annotated[StrictFloat, Field(gt=0)],
1746
+ Tuple[
1747
+ Annotated[StrictFloat, Field(gt=0)],
1748
+ Annotated[StrictFloat, Field(gt=0)]
1749
+ ]
1750
+ ] = None,
1751
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1752
+ _content_type: Optional[StrictStr] = None,
1753
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1754
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1755
+ ) -> object:
1756
+ """Rechercher factures reçues (Destinataire)
1757
+
1758
+ Recherche les factures reçues par le destinataire connecté. **Filtres** : - Téléchargée / non téléchargée - Dates de réception - Statut (MISE_A_DISPOSITION, SUSPENDUE, etc.) - Fournisseur **Indicateur utile** : `factureTelechargeeParDestinataire` permet de savoir si la facture a déjà été téléchargée.
1759
+
1760
+ :param body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post: (required)
1761
+ :type body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post: BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost
1762
+ :param _request_timeout: timeout setting for this request. If one
1763
+ number provided, it will be total request
1764
+ timeout. It can also be a pair (tuple) of
1765
+ (connection, read) timeouts.
1766
+ :type _request_timeout: int, tuple(int, int), optional
1767
+ :param _request_auth: set to override the auth_settings for an a single
1768
+ request; this effectively ignores the
1769
+ authentication in the spec for a single request.
1770
+ :type _request_auth: dict, optional
1771
+ :param _content_type: force content-type for the request.
1772
+ :type _content_type: str, Optional
1773
+ :param _headers: set to override the headers for a single
1774
+ request; this effectively ignores the headers
1775
+ in the spec for a single request.
1776
+ :type _headers: dict, optional
1777
+ :param _host_index: set to override the host_index for a single
1778
+ request; this effectively ignores the host_index
1779
+ in the spec for a single request.
1780
+ :type _host_index: int, optional
1781
+ :return: Returns the result object.
1782
+ """ # noqa: E501
1783
+
1784
+ _param = self._rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_serialize(
1785
+ body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post=body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post,
1786
+ _request_auth=_request_auth,
1787
+ _content_type=_content_type,
1788
+ _headers=_headers,
1789
+ _host_index=_host_index
1790
+ )
1791
+
1792
+ _response_types_map: Dict[str, Optional[str]] = {
1793
+ '200': "object",
1794
+ '422': "HTTPValidationError",
1795
+ }
1796
+ response_data = self.api_client.call_api(
1797
+ *_param,
1798
+ _request_timeout=_request_timeout
1799
+ )
1800
+ response_data.read()
1801
+ return self.api_client.response_deserialize(
1802
+ response_data=response_data,
1803
+ response_types_map=_response_types_map,
1804
+ ).data
1805
+
1806
+
1807
+ @validate_call
1808
+ def rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_with_http_info(
1809
+ self,
1810
+ body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post: BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost,
1811
+ _request_timeout: Union[
1812
+ None,
1813
+ Annotated[StrictFloat, Field(gt=0)],
1814
+ Tuple[
1815
+ Annotated[StrictFloat, Field(gt=0)],
1816
+ Annotated[StrictFloat, Field(gt=0)]
1817
+ ]
1818
+ ] = None,
1819
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1820
+ _content_type: Optional[StrictStr] = None,
1821
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1822
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1823
+ ) -> ApiResponse[object]:
1824
+ """Rechercher factures reçues (Destinataire)
1825
+
1826
+ Recherche les factures reçues par le destinataire connecté. **Filtres** : - Téléchargée / non téléchargée - Dates de réception - Statut (MISE_A_DISPOSITION, SUSPENDUE, etc.) - Fournisseur **Indicateur utile** : `factureTelechargeeParDestinataire` permet de savoir si la facture a déjà été téléchargée.
1827
+
1828
+ :param body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post: (required)
1829
+ :type body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post: BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost
1830
+ :param _request_timeout: timeout setting for this request. If one
1831
+ number provided, it will be total request
1832
+ timeout. It can also be a pair (tuple) of
1833
+ (connection, read) timeouts.
1834
+ :type _request_timeout: int, tuple(int, int), optional
1835
+ :param _request_auth: set to override the auth_settings for an a single
1836
+ request; this effectively ignores the
1837
+ authentication in the spec for a single request.
1838
+ :type _request_auth: dict, optional
1839
+ :param _content_type: force content-type for the request.
1840
+ :type _content_type: str, Optional
1841
+ :param _headers: set to override the headers for a single
1842
+ request; this effectively ignores the headers
1843
+ in the spec for a single request.
1844
+ :type _headers: dict, optional
1845
+ :param _host_index: set to override the host_index for a single
1846
+ request; this effectively ignores the host_index
1847
+ in the spec for a single request.
1848
+ :type _host_index: int, optional
1849
+ :return: Returns the result object.
1850
+ """ # noqa: E501
1851
+
1852
+ _param = self._rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_serialize(
1853
+ body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post=body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post,
1854
+ _request_auth=_request_auth,
1855
+ _content_type=_content_type,
1856
+ _headers=_headers,
1857
+ _host_index=_host_index
1858
+ )
1859
+
1860
+ _response_types_map: Dict[str, Optional[str]] = {
1861
+ '200': "object",
1862
+ '422': "HTTPValidationError",
1863
+ }
1864
+ response_data = self.api_client.call_api(
1865
+ *_param,
1866
+ _request_timeout=_request_timeout
1867
+ )
1868
+ response_data.read()
1869
+ return self.api_client.response_deserialize(
1870
+ response_data=response_data,
1871
+ response_types_map=_response_types_map,
1872
+ )
1873
+
1874
+
1875
+ @validate_call
1876
+ def rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_without_preload_content(
1877
+ self,
1878
+ body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post: BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost,
1879
+ _request_timeout: Union[
1880
+ None,
1881
+ Annotated[StrictFloat, Field(gt=0)],
1882
+ Tuple[
1883
+ Annotated[StrictFloat, Field(gt=0)],
1884
+ Annotated[StrictFloat, Field(gt=0)]
1885
+ ]
1886
+ ] = None,
1887
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1888
+ _content_type: Optional[StrictStr] = None,
1889
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1890
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1891
+ ) -> RESTResponseType:
1892
+ """Rechercher factures reçues (Destinataire)
1893
+
1894
+ Recherche les factures reçues par le destinataire connecté. **Filtres** : - Téléchargée / non téléchargée - Dates de réception - Statut (MISE_A_DISPOSITION, SUSPENDUE, etc.) - Fournisseur **Indicateur utile** : `factureTelechargeeParDestinataire` permet de savoir si la facture a déjà été téléchargée.
1895
+
1896
+ :param body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post: (required)
1897
+ :type body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post: BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost
1898
+ :param _request_timeout: timeout setting for this request. If one
1899
+ number provided, it will be total request
1900
+ timeout. It can also be a pair (tuple) of
1901
+ (connection, read) timeouts.
1902
+ :type _request_timeout: int, tuple(int, int), optional
1903
+ :param _request_auth: set to override the auth_settings for an a single
1904
+ request; this effectively ignores the
1905
+ authentication in the spec for a single request.
1906
+ :type _request_auth: dict, optional
1907
+ :param _content_type: force content-type for the request.
1908
+ :type _content_type: str, Optional
1909
+ :param _headers: set to override the headers for a single
1910
+ request; this effectively ignores the headers
1911
+ in the spec for a single request.
1912
+ :type _headers: dict, optional
1913
+ :param _host_index: set to override the host_index for a single
1914
+ request; this effectively ignores the host_index
1915
+ in the spec for a single request.
1916
+ :type _host_index: int, optional
1917
+ :return: Returns the result object.
1918
+ """ # noqa: E501
1919
+
1920
+ _param = self._rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_serialize(
1921
+ body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post=body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post,
1922
+ _request_auth=_request_auth,
1923
+ _content_type=_content_type,
1924
+ _headers=_headers,
1925
+ _host_index=_host_index
1926
+ )
1927
+
1928
+ _response_types_map: Dict[str, Optional[str]] = {
1929
+ '200': "object",
1930
+ '422': "HTTPValidationError",
1931
+ }
1932
+ response_data = self.api_client.call_api(
1933
+ *_param,
1934
+ _request_timeout=_request_timeout
1935
+ )
1936
+ return response_data.response
1937
+
1938
+
1939
+ def _rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_serialize(
1940
+ self,
1941
+ body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post,
1942
+ _request_auth,
1943
+ _content_type,
1944
+ _headers,
1945
+ _host_index,
1946
+ ) -> RequestSerialized:
1947
+
1948
+ _host = None
1949
+
1950
+ _collection_formats: Dict[str, str] = {
1951
+ }
1952
+
1953
+ _path_params: Dict[str, str] = {}
1954
+ _query_params: List[Tuple[str, str]] = []
1955
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1956
+ _form_params: List[Tuple[str, str]] = []
1957
+ _files: Dict[
1958
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1959
+ ] = {}
1960
+ _body_params: Optional[bytes] = None
1961
+
1962
+ # process the path parameters
1963
+ # process the query parameters
1964
+ # process the header parameters
1965
+ # process the form parameters
1966
+ # process the body parameter
1967
+ if body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post is not None:
1968
+ _body_params = body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post
1969
+
1970
+
1971
+ # set the HTTP header `Accept`
1972
+ if 'Accept' not in _header_params:
1973
+ _header_params['Accept'] = self.api_client.select_header_accept(
1974
+ [
1975
+ 'application/json'
1976
+ ]
1977
+ )
1978
+
1979
+ # set the HTTP header `Content-Type`
1980
+ if _content_type:
1981
+ _header_params['Content-Type'] = _content_type
1982
+ else:
1983
+ _default_content_type = (
1984
+ self.api_client.select_header_content_type(
1985
+ [
1986
+ 'application/json'
1987
+ ]
1988
+ )
1989
+ )
1990
+ if _default_content_type is not None:
1991
+ _header_params['Content-Type'] = _default_content_type
1992
+
1993
+ # authentication setting
1994
+ _auth_settings: List[str] = [
1995
+ 'HTTPBearer'
1996
+ ]
1997
+
1998
+ return self.api_client.param_serialize(
1999
+ method='POST',
2000
+ resource_path='/api/v1/chorus-pro/factures/rechercher-destinataire',
2001
+ path_params=_path_params,
2002
+ query_params=_query_params,
2003
+ header_params=_header_params,
2004
+ body=_body_params,
2005
+ post_params=_form_params,
2006
+ files=_files,
2007
+ auth_settings=_auth_settings,
2008
+ collection_formats=_collection_formats,
2009
+ _host=_host,
2010
+ _request_auth=_request_auth
2011
+ )
2012
+
2013
+
2014
+
2015
+
2016
+ @validate_call
2017
+ def rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post(
2018
+ self,
2019
+ body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post: BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost,
2020
+ _request_timeout: Union[
2021
+ None,
2022
+ Annotated[StrictFloat, Field(gt=0)],
2023
+ Tuple[
2024
+ Annotated[StrictFloat, Field(gt=0)],
2025
+ Annotated[StrictFloat, Field(gt=0)]
2026
+ ]
2027
+ ] = None,
2028
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2029
+ _content_type: Optional[StrictStr] = None,
2030
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2031
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2032
+ ) -> object:
2033
+ """Rechercher factures émises (Fournisseur)
2034
+
2035
+ Recherche les factures émises par le fournisseur connecté. **Filtres disponibles** : - Numéro de facture - Dates (début/fin) - Statut - Structure destinataire - Montant **Cas d'usage** : - Suivi des factures émises - Vérification des statuts - Export pour comptabilité
2036
+
2037
+ :param body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post: (required)
2038
+ :type body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post: BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost
2039
+ :param _request_timeout: timeout setting for this request. If one
2040
+ number provided, it will be total request
2041
+ timeout. It can also be a pair (tuple) of
2042
+ (connection, read) timeouts.
2043
+ :type _request_timeout: int, tuple(int, int), optional
2044
+ :param _request_auth: set to override the auth_settings for an a single
2045
+ request; this effectively ignores the
2046
+ authentication in the spec for a single request.
2047
+ :type _request_auth: dict, optional
2048
+ :param _content_type: force content-type for the request.
2049
+ :type _content_type: str, Optional
2050
+ :param _headers: set to override the headers for a single
2051
+ request; this effectively ignores the headers
2052
+ in the spec for a single request.
2053
+ :type _headers: dict, optional
2054
+ :param _host_index: set to override the host_index for a single
2055
+ request; this effectively ignores the host_index
2056
+ in the spec for a single request.
2057
+ :type _host_index: int, optional
2058
+ :return: Returns the result object.
2059
+ """ # noqa: E501
2060
+
2061
+ _param = self._rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_serialize(
2062
+ body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post=body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post,
2063
+ _request_auth=_request_auth,
2064
+ _content_type=_content_type,
2065
+ _headers=_headers,
2066
+ _host_index=_host_index
2067
+ )
2068
+
2069
+ _response_types_map: Dict[str, Optional[str]] = {
2070
+ '200': "object",
2071
+ '422': "HTTPValidationError",
2072
+ }
2073
+ response_data = self.api_client.call_api(
2074
+ *_param,
2075
+ _request_timeout=_request_timeout
2076
+ )
2077
+ response_data.read()
2078
+ return self.api_client.response_deserialize(
2079
+ response_data=response_data,
2080
+ response_types_map=_response_types_map,
2081
+ ).data
2082
+
2083
+
2084
+ @validate_call
2085
+ def rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_with_http_info(
2086
+ self,
2087
+ body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post: BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost,
2088
+ _request_timeout: Union[
2089
+ None,
2090
+ Annotated[StrictFloat, Field(gt=0)],
2091
+ Tuple[
2092
+ Annotated[StrictFloat, Field(gt=0)],
2093
+ Annotated[StrictFloat, Field(gt=0)]
2094
+ ]
2095
+ ] = None,
2096
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2097
+ _content_type: Optional[StrictStr] = None,
2098
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2099
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2100
+ ) -> ApiResponse[object]:
2101
+ """Rechercher factures émises (Fournisseur)
2102
+
2103
+ Recherche les factures émises par le fournisseur connecté. **Filtres disponibles** : - Numéro de facture - Dates (début/fin) - Statut - Structure destinataire - Montant **Cas d'usage** : - Suivi des factures émises - Vérification des statuts - Export pour comptabilité
2104
+
2105
+ :param body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post: (required)
2106
+ :type body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post: BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost
2107
+ :param _request_timeout: timeout setting for this request. If one
2108
+ number provided, it will be total request
2109
+ timeout. It can also be a pair (tuple) of
2110
+ (connection, read) timeouts.
2111
+ :type _request_timeout: int, tuple(int, int), optional
2112
+ :param _request_auth: set to override the auth_settings for an a single
2113
+ request; this effectively ignores the
2114
+ authentication in the spec for a single request.
2115
+ :type _request_auth: dict, optional
2116
+ :param _content_type: force content-type for the request.
2117
+ :type _content_type: str, Optional
2118
+ :param _headers: set to override the headers for a single
2119
+ request; this effectively ignores the headers
2120
+ in the spec for a single request.
2121
+ :type _headers: dict, optional
2122
+ :param _host_index: set to override the host_index for a single
2123
+ request; this effectively ignores the host_index
2124
+ in the spec for a single request.
2125
+ :type _host_index: int, optional
2126
+ :return: Returns the result object.
2127
+ """ # noqa: E501
2128
+
2129
+ _param = self._rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_serialize(
2130
+ body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post=body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post,
2131
+ _request_auth=_request_auth,
2132
+ _content_type=_content_type,
2133
+ _headers=_headers,
2134
+ _host_index=_host_index
2135
+ )
2136
+
2137
+ _response_types_map: Dict[str, Optional[str]] = {
2138
+ '200': "object",
2139
+ '422': "HTTPValidationError",
2140
+ }
2141
+ response_data = self.api_client.call_api(
2142
+ *_param,
2143
+ _request_timeout=_request_timeout
2144
+ )
2145
+ response_data.read()
2146
+ return self.api_client.response_deserialize(
2147
+ response_data=response_data,
2148
+ response_types_map=_response_types_map,
2149
+ )
2150
+
2151
+
2152
+ @validate_call
2153
+ def rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_without_preload_content(
2154
+ self,
2155
+ body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post: BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost,
2156
+ _request_timeout: Union[
2157
+ None,
2158
+ Annotated[StrictFloat, Field(gt=0)],
2159
+ Tuple[
2160
+ Annotated[StrictFloat, Field(gt=0)],
2161
+ Annotated[StrictFloat, Field(gt=0)]
2162
+ ]
2163
+ ] = None,
2164
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2165
+ _content_type: Optional[StrictStr] = None,
2166
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2167
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2168
+ ) -> RESTResponseType:
2169
+ """Rechercher factures émises (Fournisseur)
2170
+
2171
+ Recherche les factures émises par le fournisseur connecté. **Filtres disponibles** : - Numéro de facture - Dates (début/fin) - Statut - Structure destinataire - Montant **Cas d'usage** : - Suivi des factures émises - Vérification des statuts - Export pour comptabilité
2172
+
2173
+ :param body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post: (required)
2174
+ :type body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post: BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost
2175
+ :param _request_timeout: timeout setting for this request. If one
2176
+ number provided, it will be total request
2177
+ timeout. It can also be a pair (tuple) of
2178
+ (connection, read) timeouts.
2179
+ :type _request_timeout: int, tuple(int, int), optional
2180
+ :param _request_auth: set to override the auth_settings for an a single
2181
+ request; this effectively ignores the
2182
+ authentication in the spec for a single request.
2183
+ :type _request_auth: dict, optional
2184
+ :param _content_type: force content-type for the request.
2185
+ :type _content_type: str, Optional
2186
+ :param _headers: set to override the headers for a single
2187
+ request; this effectively ignores the headers
2188
+ in the spec for a single request.
2189
+ :type _headers: dict, optional
2190
+ :param _host_index: set to override the host_index for a single
2191
+ request; this effectively ignores the host_index
2192
+ in the spec for a single request.
2193
+ :type _host_index: int, optional
2194
+ :return: Returns the result object.
2195
+ """ # noqa: E501
2196
+
2197
+ _param = self._rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_serialize(
2198
+ body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post=body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post,
2199
+ _request_auth=_request_auth,
2200
+ _content_type=_content_type,
2201
+ _headers=_headers,
2202
+ _host_index=_host_index
2203
+ )
2204
+
2205
+ _response_types_map: Dict[str, Optional[str]] = {
2206
+ '200': "object",
2207
+ '422': "HTTPValidationError",
2208
+ }
2209
+ response_data = self.api_client.call_api(
2210
+ *_param,
2211
+ _request_timeout=_request_timeout
2212
+ )
2213
+ return response_data.response
2214
+
2215
+
2216
+ def _rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_serialize(
2217
+ self,
2218
+ body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post,
2219
+ _request_auth,
2220
+ _content_type,
2221
+ _headers,
2222
+ _host_index,
2223
+ ) -> RequestSerialized:
2224
+
2225
+ _host = None
2226
+
2227
+ _collection_formats: Dict[str, str] = {
2228
+ }
2229
+
2230
+ _path_params: Dict[str, str] = {}
2231
+ _query_params: List[Tuple[str, str]] = []
2232
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2233
+ _form_params: List[Tuple[str, str]] = []
2234
+ _files: Dict[
2235
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2236
+ ] = {}
2237
+ _body_params: Optional[bytes] = None
2238
+
2239
+ # process the path parameters
2240
+ # process the query parameters
2241
+ # process the header parameters
2242
+ # process the form parameters
2243
+ # process the body parameter
2244
+ if body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post is not None:
2245
+ _body_params = body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post
2246
+
2247
+
2248
+ # set the HTTP header `Accept`
2249
+ if 'Accept' not in _header_params:
2250
+ _header_params['Accept'] = self.api_client.select_header_accept(
2251
+ [
2252
+ 'application/json'
2253
+ ]
2254
+ )
2255
+
2256
+ # set the HTTP header `Content-Type`
2257
+ if _content_type:
2258
+ _header_params['Content-Type'] = _content_type
2259
+ else:
2260
+ _default_content_type = (
2261
+ self.api_client.select_header_content_type(
2262
+ [
2263
+ 'application/json'
2264
+ ]
2265
+ )
2266
+ )
2267
+ if _default_content_type is not None:
2268
+ _header_params['Content-Type'] = _default_content_type
2269
+
2270
+ # authentication setting
2271
+ _auth_settings: List[str] = [
2272
+ 'HTTPBearer'
2273
+ ]
2274
+
2275
+ return self.api_client.param_serialize(
2276
+ method='POST',
2277
+ resource_path='/api/v1/chorus-pro/factures/rechercher-fournisseur',
2278
+ path_params=_path_params,
2279
+ query_params=_query_params,
2280
+ header_params=_header_params,
2281
+ body=_body_params,
2282
+ post_params=_form_params,
2283
+ files=_files,
2284
+ auth_settings=_auth_settings,
2285
+ collection_formats=_collection_formats,
2286
+ _host=_host,
2287
+ _request_auth=_request_auth
2288
+ )
2289
+
2290
+
2291
+
2292
+
2293
+ @validate_call
2294
+ def rechercher_structures_api_v1_chorus_pro_structures_rechercher_post(
2295
+ self,
2296
+ rechercher_structure_request: RechercherStructureRequest,
2297
+ _request_timeout: Union[
2298
+ None,
2299
+ Annotated[StrictFloat, Field(gt=0)],
2300
+ Tuple[
2301
+ Annotated[StrictFloat, Field(gt=0)],
2302
+ Annotated[StrictFloat, Field(gt=0)]
2303
+ ]
2304
+ ] = None,
2305
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2306
+ _content_type: Optional[StrictStr] = None,
2307
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2308
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2309
+ ) -> RechercherStructureResponse:
2310
+ """Rechercher des structures Chorus Pro
2311
+
2312
+ Recherche des structures (entreprises, administrations) enregistrées sur Chorus Pro. **Cas d'usage** : - Trouver l'ID Chorus Pro d'une structure à partir de son SIRET - Vérifier si une structure est enregistrée sur Chorus Pro - Lister les structures correspondant à des critères **Filtres disponibles** : - Identifiant (SIRET, SIREN, etc.) - Raison sociale - Type d'identifiant - Structures privées uniquement **Étape typique** : Appelée avant `soumettre-facture` pour obtenir l'`id_structure_cpp` du destinataire.
2313
+
2314
+ :param rechercher_structure_request: (required)
2315
+ :type rechercher_structure_request: RechercherStructureRequest
2316
+ :param _request_timeout: timeout setting for this request. If one
2317
+ number provided, it will be total request
2318
+ timeout. It can also be a pair (tuple) of
2319
+ (connection, read) timeouts.
2320
+ :type _request_timeout: int, tuple(int, int), optional
2321
+ :param _request_auth: set to override the auth_settings for an a single
2322
+ request; this effectively ignores the
2323
+ authentication in the spec for a single request.
2324
+ :type _request_auth: dict, optional
2325
+ :param _content_type: force content-type for the request.
2326
+ :type _content_type: str, Optional
2327
+ :param _headers: set to override the headers for a single
2328
+ request; this effectively ignores the headers
2329
+ in the spec for a single request.
2330
+ :type _headers: dict, optional
2331
+ :param _host_index: set to override the host_index for a single
2332
+ request; this effectively ignores the host_index
2333
+ in the spec for a single request.
2334
+ :type _host_index: int, optional
2335
+ :return: Returns the result object.
2336
+ """ # noqa: E501
2337
+
2338
+ _param = self._rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_serialize(
2339
+ rechercher_structure_request=rechercher_structure_request,
2340
+ _request_auth=_request_auth,
2341
+ _content_type=_content_type,
2342
+ _headers=_headers,
2343
+ _host_index=_host_index
2344
+ )
2345
+
2346
+ _response_types_map: Dict[str, Optional[str]] = {
2347
+ '200': "RechercherStructureResponse",
2348
+ '422': "HTTPValidationError",
2349
+ }
2350
+ response_data = self.api_client.call_api(
2351
+ *_param,
2352
+ _request_timeout=_request_timeout
2353
+ )
2354
+ response_data.read()
2355
+ return self.api_client.response_deserialize(
2356
+ response_data=response_data,
2357
+ response_types_map=_response_types_map,
2358
+ ).data
2359
+
2360
+
2361
+ @validate_call
2362
+ def rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_with_http_info(
2363
+ self,
2364
+ rechercher_structure_request: RechercherStructureRequest,
2365
+ _request_timeout: Union[
2366
+ None,
2367
+ Annotated[StrictFloat, Field(gt=0)],
2368
+ Tuple[
2369
+ Annotated[StrictFloat, Field(gt=0)],
2370
+ Annotated[StrictFloat, Field(gt=0)]
2371
+ ]
2372
+ ] = None,
2373
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2374
+ _content_type: Optional[StrictStr] = None,
2375
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2376
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2377
+ ) -> ApiResponse[RechercherStructureResponse]:
2378
+ """Rechercher des structures Chorus Pro
2379
+
2380
+ Recherche des structures (entreprises, administrations) enregistrées sur Chorus Pro. **Cas d'usage** : - Trouver l'ID Chorus Pro d'une structure à partir de son SIRET - Vérifier si une structure est enregistrée sur Chorus Pro - Lister les structures correspondant à des critères **Filtres disponibles** : - Identifiant (SIRET, SIREN, etc.) - Raison sociale - Type d'identifiant - Structures privées uniquement **Étape typique** : Appelée avant `soumettre-facture` pour obtenir l'`id_structure_cpp` du destinataire.
2381
+
2382
+ :param rechercher_structure_request: (required)
2383
+ :type rechercher_structure_request: RechercherStructureRequest
2384
+ :param _request_timeout: timeout setting for this request. If one
2385
+ number provided, it will be total request
2386
+ timeout. It can also be a pair (tuple) of
2387
+ (connection, read) timeouts.
2388
+ :type _request_timeout: int, tuple(int, int), optional
2389
+ :param _request_auth: set to override the auth_settings for an a single
2390
+ request; this effectively ignores the
2391
+ authentication in the spec for a single request.
2392
+ :type _request_auth: dict, optional
2393
+ :param _content_type: force content-type for the request.
2394
+ :type _content_type: str, Optional
2395
+ :param _headers: set to override the headers for a single
2396
+ request; this effectively ignores the headers
2397
+ in the spec for a single request.
2398
+ :type _headers: dict, optional
2399
+ :param _host_index: set to override the host_index for a single
2400
+ request; this effectively ignores the host_index
2401
+ in the spec for a single request.
2402
+ :type _host_index: int, optional
2403
+ :return: Returns the result object.
2404
+ """ # noqa: E501
2405
+
2406
+ _param = self._rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_serialize(
2407
+ rechercher_structure_request=rechercher_structure_request,
2408
+ _request_auth=_request_auth,
2409
+ _content_type=_content_type,
2410
+ _headers=_headers,
2411
+ _host_index=_host_index
2412
+ )
2413
+
2414
+ _response_types_map: Dict[str, Optional[str]] = {
2415
+ '200': "RechercherStructureResponse",
2416
+ '422': "HTTPValidationError",
2417
+ }
2418
+ response_data = self.api_client.call_api(
2419
+ *_param,
2420
+ _request_timeout=_request_timeout
2421
+ )
2422
+ response_data.read()
2423
+ return self.api_client.response_deserialize(
2424
+ response_data=response_data,
2425
+ response_types_map=_response_types_map,
2426
+ )
2427
+
2428
+
2429
+ @validate_call
2430
+ def rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_without_preload_content(
2431
+ self,
2432
+ rechercher_structure_request: RechercherStructureRequest,
2433
+ _request_timeout: Union[
2434
+ None,
2435
+ Annotated[StrictFloat, Field(gt=0)],
2436
+ Tuple[
2437
+ Annotated[StrictFloat, Field(gt=0)],
2438
+ Annotated[StrictFloat, Field(gt=0)]
2439
+ ]
2440
+ ] = None,
2441
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2442
+ _content_type: Optional[StrictStr] = None,
2443
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2444
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2445
+ ) -> RESTResponseType:
2446
+ """Rechercher des structures Chorus Pro
2447
+
2448
+ Recherche des structures (entreprises, administrations) enregistrées sur Chorus Pro. **Cas d'usage** : - Trouver l'ID Chorus Pro d'une structure à partir de son SIRET - Vérifier si une structure est enregistrée sur Chorus Pro - Lister les structures correspondant à des critères **Filtres disponibles** : - Identifiant (SIRET, SIREN, etc.) - Raison sociale - Type d'identifiant - Structures privées uniquement **Étape typique** : Appelée avant `soumettre-facture` pour obtenir l'`id_structure_cpp` du destinataire.
2449
+
2450
+ :param rechercher_structure_request: (required)
2451
+ :type rechercher_structure_request: RechercherStructureRequest
2452
+ :param _request_timeout: timeout setting for this request. If one
2453
+ number provided, it will be total request
2454
+ timeout. It can also be a pair (tuple) of
2455
+ (connection, read) timeouts.
2456
+ :type _request_timeout: int, tuple(int, int), optional
2457
+ :param _request_auth: set to override the auth_settings for an a single
2458
+ request; this effectively ignores the
2459
+ authentication in the spec for a single request.
2460
+ :type _request_auth: dict, optional
2461
+ :param _content_type: force content-type for the request.
2462
+ :type _content_type: str, Optional
2463
+ :param _headers: set to override the headers for a single
2464
+ request; this effectively ignores the headers
2465
+ in the spec for a single request.
2466
+ :type _headers: dict, optional
2467
+ :param _host_index: set to override the host_index for a single
2468
+ request; this effectively ignores the host_index
2469
+ in the spec for a single request.
2470
+ :type _host_index: int, optional
2471
+ :return: Returns the result object.
2472
+ """ # noqa: E501
2473
+
2474
+ _param = self._rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_serialize(
2475
+ rechercher_structure_request=rechercher_structure_request,
2476
+ _request_auth=_request_auth,
2477
+ _content_type=_content_type,
2478
+ _headers=_headers,
2479
+ _host_index=_host_index
2480
+ )
2481
+
2482
+ _response_types_map: Dict[str, Optional[str]] = {
2483
+ '200': "RechercherStructureResponse",
2484
+ '422': "HTTPValidationError",
2485
+ }
2486
+ response_data = self.api_client.call_api(
2487
+ *_param,
2488
+ _request_timeout=_request_timeout
2489
+ )
2490
+ return response_data.response
2491
+
2492
+
2493
+ def _rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_serialize(
2494
+ self,
2495
+ rechercher_structure_request,
2496
+ _request_auth,
2497
+ _content_type,
2498
+ _headers,
2499
+ _host_index,
2500
+ ) -> RequestSerialized:
2501
+
2502
+ _host = None
2503
+
2504
+ _collection_formats: Dict[str, str] = {
2505
+ }
2506
+
2507
+ _path_params: Dict[str, str] = {}
2508
+ _query_params: List[Tuple[str, str]] = []
2509
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2510
+ _form_params: List[Tuple[str, str]] = []
2511
+ _files: Dict[
2512
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2513
+ ] = {}
2514
+ _body_params: Optional[bytes] = None
2515
+
2516
+ # process the path parameters
2517
+ # process the query parameters
2518
+ # process the header parameters
2519
+ # process the form parameters
2520
+ # process the body parameter
2521
+ if rechercher_structure_request is not None:
2522
+ _body_params = rechercher_structure_request
2523
+
2524
+
2525
+ # set the HTTP header `Accept`
2526
+ if 'Accept' not in _header_params:
2527
+ _header_params['Accept'] = self.api_client.select_header_accept(
2528
+ [
2529
+ 'application/json'
2530
+ ]
2531
+ )
2532
+
2533
+ # set the HTTP header `Content-Type`
2534
+ if _content_type:
2535
+ _header_params['Content-Type'] = _content_type
2536
+ else:
2537
+ _default_content_type = (
2538
+ self.api_client.select_header_content_type(
2539
+ [
2540
+ 'application/json'
2541
+ ]
2542
+ )
2543
+ )
2544
+ if _default_content_type is not None:
2545
+ _header_params['Content-Type'] = _default_content_type
2546
+
2547
+ # authentication setting
2548
+ _auth_settings: List[str] = [
2549
+ 'HTTPBearer'
2550
+ ]
2551
+
2552
+ return self.api_client.param_serialize(
2553
+ method='POST',
2554
+ resource_path='/api/v1/chorus-pro/structures/rechercher',
2555
+ path_params=_path_params,
2556
+ query_params=_query_params,
2557
+ header_params=_header_params,
2558
+ body=_body_params,
2559
+ post_params=_form_params,
2560
+ files=_files,
2561
+ auth_settings=_auth_settings,
2562
+ collection_formats=_collection_formats,
2563
+ _host=_host,
2564
+ _request_auth=_request_auth
2565
+ )
2566
+
2567
+
2568
+
2569
+
2570
+ @validate_call
2571
+ def recycler_facture_api_v1_chorus_pro_factures_recycler_post(
2572
+ self,
2573
+ body_recycler_facture_api_v1_chorus_pro_factures_recycler_post: BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost,
2574
+ _request_timeout: Union[
2575
+ None,
2576
+ Annotated[StrictFloat, Field(gt=0)],
2577
+ Tuple[
2578
+ Annotated[StrictFloat, Field(gt=0)],
2579
+ Annotated[StrictFloat, Field(gt=0)]
2580
+ ]
2581
+ ] = None,
2582
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2583
+ _content_type: Optional[StrictStr] = None,
2584
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2585
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2586
+ ) -> object:
2587
+ """Recycler une facture (Fournisseur)
2588
+
2589
+ Recycle une facture au statut A_RECYCLER en modifiant les données d'acheminement. **Statut requis** : A_RECYCLER **Champs modifiables** : - Destinataire (`idStructureCPP`) - Code service - Numéro d'engagement **Cas d'usage** : - Erreur de destinataire - Changement de service facturation - Mise à jour du numéro d'engagement **Payload exemple** : ```json { \"identifiantFactureCPP\": 12345, \"idStructureCPP\": 67890, \"codeService\": \"SERVICE_01\", \"numeroEngagement\": \"ENG2024001\" } ``` **Note** : La facture conserve son numéro et ses montants, seuls les champs d'acheminement changent.
2590
+
2591
+ :param body_recycler_facture_api_v1_chorus_pro_factures_recycler_post: (required)
2592
+ :type body_recycler_facture_api_v1_chorus_pro_factures_recycler_post: BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost
2593
+ :param _request_timeout: timeout setting for this request. If one
2594
+ number provided, it will be total request
2595
+ timeout. It can also be a pair (tuple) of
2596
+ (connection, read) timeouts.
2597
+ :type _request_timeout: int, tuple(int, int), optional
2598
+ :param _request_auth: set to override the auth_settings for an a single
2599
+ request; this effectively ignores the
2600
+ authentication in the spec for a single request.
2601
+ :type _request_auth: dict, optional
2602
+ :param _content_type: force content-type for the request.
2603
+ :type _content_type: str, Optional
2604
+ :param _headers: set to override the headers for a single
2605
+ request; this effectively ignores the headers
2606
+ in the spec for a single request.
2607
+ :type _headers: dict, optional
2608
+ :param _host_index: set to override the host_index for a single
2609
+ request; this effectively ignores the host_index
2610
+ in the spec for a single request.
2611
+ :type _host_index: int, optional
2612
+ :return: Returns the result object.
2613
+ """ # noqa: E501
2614
+
2615
+ _param = self._recycler_facture_api_v1_chorus_pro_factures_recycler_post_serialize(
2616
+ body_recycler_facture_api_v1_chorus_pro_factures_recycler_post=body_recycler_facture_api_v1_chorus_pro_factures_recycler_post,
2617
+ _request_auth=_request_auth,
2618
+ _content_type=_content_type,
2619
+ _headers=_headers,
2620
+ _host_index=_host_index
2621
+ )
2622
+
2623
+ _response_types_map: Dict[str, Optional[str]] = {
2624
+ '200': "object",
2625
+ '422': "HTTPValidationError",
2626
+ }
2627
+ response_data = self.api_client.call_api(
2628
+ *_param,
2629
+ _request_timeout=_request_timeout
2630
+ )
2631
+ response_data.read()
2632
+ return self.api_client.response_deserialize(
2633
+ response_data=response_data,
2634
+ response_types_map=_response_types_map,
2635
+ ).data
2636
+
2637
+
2638
+ @validate_call
2639
+ def recycler_facture_api_v1_chorus_pro_factures_recycler_post_with_http_info(
2640
+ self,
2641
+ body_recycler_facture_api_v1_chorus_pro_factures_recycler_post: BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost,
2642
+ _request_timeout: Union[
2643
+ None,
2644
+ Annotated[StrictFloat, Field(gt=0)],
2645
+ Tuple[
2646
+ Annotated[StrictFloat, Field(gt=0)],
2647
+ Annotated[StrictFloat, Field(gt=0)]
2648
+ ]
2649
+ ] = None,
2650
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2651
+ _content_type: Optional[StrictStr] = None,
2652
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2653
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2654
+ ) -> ApiResponse[object]:
2655
+ """Recycler une facture (Fournisseur)
2656
+
2657
+ Recycle une facture au statut A_RECYCLER en modifiant les données d'acheminement. **Statut requis** : A_RECYCLER **Champs modifiables** : - Destinataire (`idStructureCPP`) - Code service - Numéro d'engagement **Cas d'usage** : - Erreur de destinataire - Changement de service facturation - Mise à jour du numéro d'engagement **Payload exemple** : ```json { \"identifiantFactureCPP\": 12345, \"idStructureCPP\": 67890, \"codeService\": \"SERVICE_01\", \"numeroEngagement\": \"ENG2024001\" } ``` **Note** : La facture conserve son numéro et ses montants, seuls les champs d'acheminement changent.
2658
+
2659
+ :param body_recycler_facture_api_v1_chorus_pro_factures_recycler_post: (required)
2660
+ :type body_recycler_facture_api_v1_chorus_pro_factures_recycler_post: BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost
2661
+ :param _request_timeout: timeout setting for this request. If one
2662
+ number provided, it will be total request
2663
+ timeout. It can also be a pair (tuple) of
2664
+ (connection, read) timeouts.
2665
+ :type _request_timeout: int, tuple(int, int), optional
2666
+ :param _request_auth: set to override the auth_settings for an a single
2667
+ request; this effectively ignores the
2668
+ authentication in the spec for a single request.
2669
+ :type _request_auth: dict, optional
2670
+ :param _content_type: force content-type for the request.
2671
+ :type _content_type: str, Optional
2672
+ :param _headers: set to override the headers for a single
2673
+ request; this effectively ignores the headers
2674
+ in the spec for a single request.
2675
+ :type _headers: dict, optional
2676
+ :param _host_index: set to override the host_index for a single
2677
+ request; this effectively ignores the host_index
2678
+ in the spec for a single request.
2679
+ :type _host_index: int, optional
2680
+ :return: Returns the result object.
2681
+ """ # noqa: E501
2682
+
2683
+ _param = self._recycler_facture_api_v1_chorus_pro_factures_recycler_post_serialize(
2684
+ body_recycler_facture_api_v1_chorus_pro_factures_recycler_post=body_recycler_facture_api_v1_chorus_pro_factures_recycler_post,
2685
+ _request_auth=_request_auth,
2686
+ _content_type=_content_type,
2687
+ _headers=_headers,
2688
+ _host_index=_host_index
2689
+ )
2690
+
2691
+ _response_types_map: Dict[str, Optional[str]] = {
2692
+ '200': "object",
2693
+ '422': "HTTPValidationError",
2694
+ }
2695
+ response_data = self.api_client.call_api(
2696
+ *_param,
2697
+ _request_timeout=_request_timeout
2698
+ )
2699
+ response_data.read()
2700
+ return self.api_client.response_deserialize(
2701
+ response_data=response_data,
2702
+ response_types_map=_response_types_map,
2703
+ )
2704
+
2705
+
2706
+ @validate_call
2707
+ def recycler_facture_api_v1_chorus_pro_factures_recycler_post_without_preload_content(
2708
+ self,
2709
+ body_recycler_facture_api_v1_chorus_pro_factures_recycler_post: BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost,
2710
+ _request_timeout: Union[
2711
+ None,
2712
+ Annotated[StrictFloat, Field(gt=0)],
2713
+ Tuple[
2714
+ Annotated[StrictFloat, Field(gt=0)],
2715
+ Annotated[StrictFloat, Field(gt=0)]
2716
+ ]
2717
+ ] = None,
2718
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2719
+ _content_type: Optional[StrictStr] = None,
2720
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2721
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2722
+ ) -> RESTResponseType:
2723
+ """Recycler une facture (Fournisseur)
2724
+
2725
+ Recycle une facture au statut A_RECYCLER en modifiant les données d'acheminement. **Statut requis** : A_RECYCLER **Champs modifiables** : - Destinataire (`idStructureCPP`) - Code service - Numéro d'engagement **Cas d'usage** : - Erreur de destinataire - Changement de service facturation - Mise à jour du numéro d'engagement **Payload exemple** : ```json { \"identifiantFactureCPP\": 12345, \"idStructureCPP\": 67890, \"codeService\": \"SERVICE_01\", \"numeroEngagement\": \"ENG2024001\" } ``` **Note** : La facture conserve son numéro et ses montants, seuls les champs d'acheminement changent.
2726
+
2727
+ :param body_recycler_facture_api_v1_chorus_pro_factures_recycler_post: (required)
2728
+ :type body_recycler_facture_api_v1_chorus_pro_factures_recycler_post: BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost
2729
+ :param _request_timeout: timeout setting for this request. If one
2730
+ number provided, it will be total request
2731
+ timeout. It can also be a pair (tuple) of
2732
+ (connection, read) timeouts.
2733
+ :type _request_timeout: int, tuple(int, int), optional
2734
+ :param _request_auth: set to override the auth_settings for an a single
2735
+ request; this effectively ignores the
2736
+ authentication in the spec for a single request.
2737
+ :type _request_auth: dict, optional
2738
+ :param _content_type: force content-type for the request.
2739
+ :type _content_type: str, Optional
2740
+ :param _headers: set to override the headers for a single
2741
+ request; this effectively ignores the headers
2742
+ in the spec for a single request.
2743
+ :type _headers: dict, optional
2744
+ :param _host_index: set to override the host_index for a single
2745
+ request; this effectively ignores the host_index
2746
+ in the spec for a single request.
2747
+ :type _host_index: int, optional
2748
+ :return: Returns the result object.
2749
+ """ # noqa: E501
2750
+
2751
+ _param = self._recycler_facture_api_v1_chorus_pro_factures_recycler_post_serialize(
2752
+ body_recycler_facture_api_v1_chorus_pro_factures_recycler_post=body_recycler_facture_api_v1_chorus_pro_factures_recycler_post,
2753
+ _request_auth=_request_auth,
2754
+ _content_type=_content_type,
2755
+ _headers=_headers,
2756
+ _host_index=_host_index
2757
+ )
2758
+
2759
+ _response_types_map: Dict[str, Optional[str]] = {
2760
+ '200': "object",
2761
+ '422': "HTTPValidationError",
2762
+ }
2763
+ response_data = self.api_client.call_api(
2764
+ *_param,
2765
+ _request_timeout=_request_timeout
2766
+ )
2767
+ return response_data.response
2768
+
2769
+
2770
+ def _recycler_facture_api_v1_chorus_pro_factures_recycler_post_serialize(
2771
+ self,
2772
+ body_recycler_facture_api_v1_chorus_pro_factures_recycler_post,
2773
+ _request_auth,
2774
+ _content_type,
2775
+ _headers,
2776
+ _host_index,
2777
+ ) -> RequestSerialized:
2778
+
2779
+ _host = None
2780
+
2781
+ _collection_formats: Dict[str, str] = {
2782
+ }
2783
+
2784
+ _path_params: Dict[str, str] = {}
2785
+ _query_params: List[Tuple[str, str]] = []
2786
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2787
+ _form_params: List[Tuple[str, str]] = []
2788
+ _files: Dict[
2789
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2790
+ ] = {}
2791
+ _body_params: Optional[bytes] = None
2792
+
2793
+ # process the path parameters
2794
+ # process the query parameters
2795
+ # process the header parameters
2796
+ # process the form parameters
2797
+ # process the body parameter
2798
+ if body_recycler_facture_api_v1_chorus_pro_factures_recycler_post is not None:
2799
+ _body_params = body_recycler_facture_api_v1_chorus_pro_factures_recycler_post
2800
+
2801
+
2802
+ # set the HTTP header `Accept`
2803
+ if 'Accept' not in _header_params:
2804
+ _header_params['Accept'] = self.api_client.select_header_accept(
2805
+ [
2806
+ 'application/json'
2807
+ ]
2808
+ )
2809
+
2810
+ # set the HTTP header `Content-Type`
2811
+ if _content_type:
2812
+ _header_params['Content-Type'] = _content_type
2813
+ else:
2814
+ _default_content_type = (
2815
+ self.api_client.select_header_content_type(
2816
+ [
2817
+ 'application/json'
2818
+ ]
2819
+ )
2820
+ )
2821
+ if _default_content_type is not None:
2822
+ _header_params['Content-Type'] = _default_content_type
2823
+
2824
+ # authentication setting
2825
+ _auth_settings: List[str] = [
2826
+ 'HTTPBearer'
2827
+ ]
2828
+
2829
+ return self.api_client.param_serialize(
2830
+ method='POST',
2831
+ resource_path='/api/v1/chorus-pro/factures/recycler',
2832
+ path_params=_path_params,
2833
+ query_params=_query_params,
2834
+ header_params=_header_params,
2835
+ body=_body_params,
2836
+ post_params=_form_params,
2837
+ files=_files,
2838
+ auth_settings=_auth_settings,
2839
+ collection_formats=_collection_formats,
2840
+ _host=_host,
2841
+ _request_auth=_request_auth
2842
+ )
2843
+
2844
+
2845
+
2846
+
2847
+ @validate_call
2848
+ def soumettre_facture_api_v1_chorus_pro_factures_soumettre_post(
2849
+ self,
2850
+ soumettre_facture_request: SoumettreFactureRequest,
2851
+ _request_timeout: Union[
2852
+ None,
2853
+ Annotated[StrictFloat, Field(gt=0)],
2854
+ Tuple[
2855
+ Annotated[StrictFloat, Field(gt=0)],
2856
+ Annotated[StrictFloat, Field(gt=0)]
2857
+ ]
2858
+ ] = None,
2859
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2860
+ _content_type: Optional[StrictStr] = None,
2861
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2862
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2863
+ ) -> SoumettreFactureResponse:
2864
+ """Soumettre une facture à Chorus Pro
2865
+
2866
+ Soumet une facture électronique à une structure publique via Chorus Pro. **📋 Workflow complet** : 1. **Uploader le PDF Factur-X** via `/transverses/ajouter-fichier` → récupérer `pieceJointeId` 2. **Obtenir l'ID structure** via `/structures/rechercher` ou `/structures/obtenir-id-depuis-siret` 3. **Vérifier les paramètres obligatoires** via `/structures/consulter` 4. **Soumettre la facture** avec le `piece_jointe_principale_id` obtenu à l'étape 1 **Pré-requis** : 1. Avoir l'`id_structure_cpp` du destinataire (via `/structures/rechercher`) 2. Connaître les paramètres obligatoires (via `/structures/consulter`) : - Code service si `code_service_doit_etre_renseigne=true` - Numéro d'engagement si `numero_ej_doit_etre_renseigne=true` 3. Avoir uploadé le PDF Factur-X (via `/transverses/ajouter-fichier`) **Format attendu** : - `piece_jointe_principale_id` : ID retourné par `/transverses/ajouter-fichier` - Montants : Chaînes de caractères avec 2 décimales (ex: \"1250.50\") - Dates : Format ISO 8601 (YYYY-MM-DD) **Retour** : - `identifiant_facture_cpp` : ID Chorus Pro de la facture créée - `numero_flux_depot` : Numéro de suivi du dépôt **Statuts possibles après soumission** : - SOUMISE : En attente de validation - VALIDEE : Validée par le destinataire - REJETEE : Rejetée (erreur de données ou refus métier) - SUSPENDUE : En attente d'informations complémentaires **Note** : Utilisez `/factures/consulter` pour suivre l'évolution du statut.
2867
+
2868
+ :param soumettre_facture_request: (required)
2869
+ :type soumettre_facture_request: SoumettreFactureRequest
2870
+ :param _request_timeout: timeout setting for this request. If one
2871
+ number provided, it will be total request
2872
+ timeout. It can also be a pair (tuple) of
2873
+ (connection, read) timeouts.
2874
+ :type _request_timeout: int, tuple(int, int), optional
2875
+ :param _request_auth: set to override the auth_settings for an a single
2876
+ request; this effectively ignores the
2877
+ authentication in the spec for a single request.
2878
+ :type _request_auth: dict, optional
2879
+ :param _content_type: force content-type for the request.
2880
+ :type _content_type: str, Optional
2881
+ :param _headers: set to override the headers for a single
2882
+ request; this effectively ignores the headers
2883
+ in the spec for a single request.
2884
+ :type _headers: dict, optional
2885
+ :param _host_index: set to override the host_index for a single
2886
+ request; this effectively ignores the host_index
2887
+ in the spec for a single request.
2888
+ :type _host_index: int, optional
2889
+ :return: Returns the result object.
2890
+ """ # noqa: E501
2891
+
2892
+ _param = self._soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_serialize(
2893
+ soumettre_facture_request=soumettre_facture_request,
2894
+ _request_auth=_request_auth,
2895
+ _content_type=_content_type,
2896
+ _headers=_headers,
2897
+ _host_index=_host_index
2898
+ )
2899
+
2900
+ _response_types_map: Dict[str, Optional[str]] = {
2901
+ '200': "SoumettreFactureResponse",
2902
+ '422': "HTTPValidationError",
2903
+ }
2904
+ response_data = self.api_client.call_api(
2905
+ *_param,
2906
+ _request_timeout=_request_timeout
2907
+ )
2908
+ response_data.read()
2909
+ return self.api_client.response_deserialize(
2910
+ response_data=response_data,
2911
+ response_types_map=_response_types_map,
2912
+ ).data
2913
+
2914
+
2915
+ @validate_call
2916
+ def soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_with_http_info(
2917
+ self,
2918
+ soumettre_facture_request: SoumettreFactureRequest,
2919
+ _request_timeout: Union[
2920
+ None,
2921
+ Annotated[StrictFloat, Field(gt=0)],
2922
+ Tuple[
2923
+ Annotated[StrictFloat, Field(gt=0)],
2924
+ Annotated[StrictFloat, Field(gt=0)]
2925
+ ]
2926
+ ] = None,
2927
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2928
+ _content_type: Optional[StrictStr] = None,
2929
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2930
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2931
+ ) -> ApiResponse[SoumettreFactureResponse]:
2932
+ """Soumettre une facture à Chorus Pro
2933
+
2934
+ Soumet une facture électronique à une structure publique via Chorus Pro. **📋 Workflow complet** : 1. **Uploader le PDF Factur-X** via `/transverses/ajouter-fichier` → récupérer `pieceJointeId` 2. **Obtenir l'ID structure** via `/structures/rechercher` ou `/structures/obtenir-id-depuis-siret` 3. **Vérifier les paramètres obligatoires** via `/structures/consulter` 4. **Soumettre la facture** avec le `piece_jointe_principale_id` obtenu à l'étape 1 **Pré-requis** : 1. Avoir l'`id_structure_cpp` du destinataire (via `/structures/rechercher`) 2. Connaître les paramètres obligatoires (via `/structures/consulter`) : - Code service si `code_service_doit_etre_renseigne=true` - Numéro d'engagement si `numero_ej_doit_etre_renseigne=true` 3. Avoir uploadé le PDF Factur-X (via `/transverses/ajouter-fichier`) **Format attendu** : - `piece_jointe_principale_id` : ID retourné par `/transverses/ajouter-fichier` - Montants : Chaînes de caractères avec 2 décimales (ex: \"1250.50\") - Dates : Format ISO 8601 (YYYY-MM-DD) **Retour** : - `identifiant_facture_cpp` : ID Chorus Pro de la facture créée - `numero_flux_depot` : Numéro de suivi du dépôt **Statuts possibles après soumission** : - SOUMISE : En attente de validation - VALIDEE : Validée par le destinataire - REJETEE : Rejetée (erreur de données ou refus métier) - SUSPENDUE : En attente d'informations complémentaires **Note** : Utilisez `/factures/consulter` pour suivre l'évolution du statut.
2935
+
2936
+ :param soumettre_facture_request: (required)
2937
+ :type soumettre_facture_request: SoumettreFactureRequest
2938
+ :param _request_timeout: timeout setting for this request. If one
2939
+ number provided, it will be total request
2940
+ timeout. It can also be a pair (tuple) of
2941
+ (connection, read) timeouts.
2942
+ :type _request_timeout: int, tuple(int, int), optional
2943
+ :param _request_auth: set to override the auth_settings for an a single
2944
+ request; this effectively ignores the
2945
+ authentication in the spec for a single request.
2946
+ :type _request_auth: dict, optional
2947
+ :param _content_type: force content-type for the request.
2948
+ :type _content_type: str, Optional
2949
+ :param _headers: set to override the headers for a single
2950
+ request; this effectively ignores the headers
2951
+ in the spec for a single request.
2952
+ :type _headers: dict, optional
2953
+ :param _host_index: set to override the host_index for a single
2954
+ request; this effectively ignores the host_index
2955
+ in the spec for a single request.
2956
+ :type _host_index: int, optional
2957
+ :return: Returns the result object.
2958
+ """ # noqa: E501
2959
+
2960
+ _param = self._soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_serialize(
2961
+ soumettre_facture_request=soumettre_facture_request,
2962
+ _request_auth=_request_auth,
2963
+ _content_type=_content_type,
2964
+ _headers=_headers,
2965
+ _host_index=_host_index
2966
+ )
2967
+
2968
+ _response_types_map: Dict[str, Optional[str]] = {
2969
+ '200': "SoumettreFactureResponse",
2970
+ '422': "HTTPValidationError",
2971
+ }
2972
+ response_data = self.api_client.call_api(
2973
+ *_param,
2974
+ _request_timeout=_request_timeout
2975
+ )
2976
+ response_data.read()
2977
+ return self.api_client.response_deserialize(
2978
+ response_data=response_data,
2979
+ response_types_map=_response_types_map,
2980
+ )
2981
+
2982
+
2983
+ @validate_call
2984
+ def soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_without_preload_content(
2985
+ self,
2986
+ soumettre_facture_request: SoumettreFactureRequest,
2987
+ _request_timeout: Union[
2988
+ None,
2989
+ Annotated[StrictFloat, Field(gt=0)],
2990
+ Tuple[
2991
+ Annotated[StrictFloat, Field(gt=0)],
2992
+ Annotated[StrictFloat, Field(gt=0)]
2993
+ ]
2994
+ ] = None,
2995
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2996
+ _content_type: Optional[StrictStr] = None,
2997
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2998
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2999
+ ) -> RESTResponseType:
3000
+ """Soumettre une facture à Chorus Pro
3001
+
3002
+ Soumet une facture électronique à une structure publique via Chorus Pro. **📋 Workflow complet** : 1. **Uploader le PDF Factur-X** via `/transverses/ajouter-fichier` → récupérer `pieceJointeId` 2. **Obtenir l'ID structure** via `/structures/rechercher` ou `/structures/obtenir-id-depuis-siret` 3. **Vérifier les paramètres obligatoires** via `/structures/consulter` 4. **Soumettre la facture** avec le `piece_jointe_principale_id` obtenu à l'étape 1 **Pré-requis** : 1. Avoir l'`id_structure_cpp` du destinataire (via `/structures/rechercher`) 2. Connaître les paramètres obligatoires (via `/structures/consulter`) : - Code service si `code_service_doit_etre_renseigne=true` - Numéro d'engagement si `numero_ej_doit_etre_renseigne=true` 3. Avoir uploadé le PDF Factur-X (via `/transverses/ajouter-fichier`) **Format attendu** : - `piece_jointe_principale_id` : ID retourné par `/transverses/ajouter-fichier` - Montants : Chaînes de caractères avec 2 décimales (ex: \"1250.50\") - Dates : Format ISO 8601 (YYYY-MM-DD) **Retour** : - `identifiant_facture_cpp` : ID Chorus Pro de la facture créée - `numero_flux_depot` : Numéro de suivi du dépôt **Statuts possibles après soumission** : - SOUMISE : En attente de validation - VALIDEE : Validée par le destinataire - REJETEE : Rejetée (erreur de données ou refus métier) - SUSPENDUE : En attente d'informations complémentaires **Note** : Utilisez `/factures/consulter` pour suivre l'évolution du statut.
3003
+
3004
+ :param soumettre_facture_request: (required)
3005
+ :type soumettre_facture_request: SoumettreFactureRequest
3006
+ :param _request_timeout: timeout setting for this request. If one
3007
+ number provided, it will be total request
3008
+ timeout. It can also be a pair (tuple) of
3009
+ (connection, read) timeouts.
3010
+ :type _request_timeout: int, tuple(int, int), optional
3011
+ :param _request_auth: set to override the auth_settings for an a single
3012
+ request; this effectively ignores the
3013
+ authentication in the spec for a single request.
3014
+ :type _request_auth: dict, optional
3015
+ :param _content_type: force content-type for the request.
3016
+ :type _content_type: str, Optional
3017
+ :param _headers: set to override the headers for a single
3018
+ request; this effectively ignores the headers
3019
+ in the spec for a single request.
3020
+ :type _headers: dict, optional
3021
+ :param _host_index: set to override the host_index for a single
3022
+ request; this effectively ignores the host_index
3023
+ in the spec for a single request.
3024
+ :type _host_index: int, optional
3025
+ :return: Returns the result object.
3026
+ """ # noqa: E501
3027
+
3028
+ _param = self._soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_serialize(
3029
+ soumettre_facture_request=soumettre_facture_request,
3030
+ _request_auth=_request_auth,
3031
+ _content_type=_content_type,
3032
+ _headers=_headers,
3033
+ _host_index=_host_index
3034
+ )
3035
+
3036
+ _response_types_map: Dict[str, Optional[str]] = {
3037
+ '200': "SoumettreFactureResponse",
3038
+ '422': "HTTPValidationError",
3039
+ }
3040
+ response_data = self.api_client.call_api(
3041
+ *_param,
3042
+ _request_timeout=_request_timeout
3043
+ )
3044
+ return response_data.response
3045
+
3046
+
3047
+ def _soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_serialize(
3048
+ self,
3049
+ soumettre_facture_request,
3050
+ _request_auth,
3051
+ _content_type,
3052
+ _headers,
3053
+ _host_index,
3054
+ ) -> RequestSerialized:
3055
+
3056
+ _host = None
3057
+
3058
+ _collection_formats: Dict[str, str] = {
3059
+ }
3060
+
3061
+ _path_params: Dict[str, str] = {}
3062
+ _query_params: List[Tuple[str, str]] = []
3063
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3064
+ _form_params: List[Tuple[str, str]] = []
3065
+ _files: Dict[
3066
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3067
+ ] = {}
3068
+ _body_params: Optional[bytes] = None
3069
+
3070
+ # process the path parameters
3071
+ # process the query parameters
3072
+ # process the header parameters
3073
+ # process the form parameters
3074
+ # process the body parameter
3075
+ if soumettre_facture_request is not None:
3076
+ _body_params = soumettre_facture_request
3077
+
3078
+
3079
+ # set the HTTP header `Accept`
3080
+ if 'Accept' not in _header_params:
3081
+ _header_params['Accept'] = self.api_client.select_header_accept(
3082
+ [
3083
+ 'application/json'
3084
+ ]
3085
+ )
3086
+
3087
+ # set the HTTP header `Content-Type`
3088
+ if _content_type:
3089
+ _header_params['Content-Type'] = _content_type
3090
+ else:
3091
+ _default_content_type = (
3092
+ self.api_client.select_header_content_type(
3093
+ [
3094
+ 'application/json'
3095
+ ]
3096
+ )
3097
+ )
3098
+ if _default_content_type is not None:
3099
+ _header_params['Content-Type'] = _default_content_type
3100
+
3101
+ # authentication setting
3102
+ _auth_settings: List[str] = [
3103
+ 'HTTPBearer'
3104
+ ]
3105
+
3106
+ return self.api_client.param_serialize(
3107
+ method='POST',
3108
+ resource_path='/api/v1/chorus-pro/factures/soumettre',
3109
+ path_params=_path_params,
3110
+ query_params=_query_params,
3111
+ header_params=_header_params,
3112
+ body=_body_params,
3113
+ post_params=_form_params,
3114
+ files=_files,
3115
+ auth_settings=_auth_settings,
3116
+ collection_formats=_collection_formats,
3117
+ _host=_host,
3118
+ _request_auth=_request_auth
3119
+ )
3120
+
3121
+
3122
+
3123
+
3124
+ @validate_call
3125
+ def telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post(
3126
+ self,
3127
+ body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post: BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost,
3128
+ _request_timeout: Union[
3129
+ None,
3130
+ Annotated[StrictFloat, Field(gt=0)],
3131
+ Tuple[
3132
+ Annotated[StrictFloat, Field(gt=0)],
3133
+ Annotated[StrictFloat, Field(gt=0)]
3134
+ ]
3135
+ ] = None,
3136
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3137
+ _content_type: Optional[StrictStr] = None,
3138
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3139
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3140
+ ) -> object:
3141
+ """Télécharger un groupe de factures
3142
+
3143
+ Télécharge une ou plusieurs factures (max 10 recommandé) avec leurs pièces jointes. **Formats disponibles** : - PDF : Fichier PDF uniquement - XML : Fichier XML uniquement - ZIP : Archive contenant PDF + XML + pièces jointes **Taille maximale** : 120 Mo par téléchargement **Payload exemple** : ```json { \"listeIdentifiantsFactureCPP\": [12345, 12346], \"inclurePiecesJointes\": true, \"formatFichier\": \"ZIP\" } ``` **Retour** : Le fichier est encodé en base64 dans le champ `fichierBase64`. **Note** : Le flag `factureTelechargeeParDestinataire` est mis à jour automatiquement.
3144
+
3145
+ :param body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post: (required)
3146
+ :type body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post: BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost
3147
+ :param _request_timeout: timeout setting for this request. If one
3148
+ number provided, it will be total request
3149
+ timeout. It can also be a pair (tuple) of
3150
+ (connection, read) timeouts.
3151
+ :type _request_timeout: int, tuple(int, int), optional
3152
+ :param _request_auth: set to override the auth_settings for an a single
3153
+ request; this effectively ignores the
3154
+ authentication in the spec for a single request.
3155
+ :type _request_auth: dict, optional
3156
+ :param _content_type: force content-type for the request.
3157
+ :type _content_type: str, Optional
3158
+ :param _headers: set to override the headers for a single
3159
+ request; this effectively ignores the headers
3160
+ in the spec for a single request.
3161
+ :type _headers: dict, optional
3162
+ :param _host_index: set to override the host_index for a single
3163
+ request; this effectively ignores the host_index
3164
+ in the spec for a single request.
3165
+ :type _host_index: int, optional
3166
+ :return: Returns the result object.
3167
+ """ # noqa: E501
3168
+
3169
+ _param = self._telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_serialize(
3170
+ body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post=body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post,
3171
+ _request_auth=_request_auth,
3172
+ _content_type=_content_type,
3173
+ _headers=_headers,
3174
+ _host_index=_host_index
3175
+ )
3176
+
3177
+ _response_types_map: Dict[str, Optional[str]] = {
3178
+ '200': "object",
3179
+ '422': "HTTPValidationError",
3180
+ }
3181
+ response_data = self.api_client.call_api(
3182
+ *_param,
3183
+ _request_timeout=_request_timeout
3184
+ )
3185
+ response_data.read()
3186
+ return self.api_client.response_deserialize(
3187
+ response_data=response_data,
3188
+ response_types_map=_response_types_map,
3189
+ ).data
3190
+
3191
+
3192
+ @validate_call
3193
+ def telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_with_http_info(
3194
+ self,
3195
+ body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post: BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost,
3196
+ _request_timeout: Union[
3197
+ None,
3198
+ Annotated[StrictFloat, Field(gt=0)],
3199
+ Tuple[
3200
+ Annotated[StrictFloat, Field(gt=0)],
3201
+ Annotated[StrictFloat, Field(gt=0)]
3202
+ ]
3203
+ ] = None,
3204
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3205
+ _content_type: Optional[StrictStr] = None,
3206
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3207
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3208
+ ) -> ApiResponse[object]:
3209
+ """Télécharger un groupe de factures
3210
+
3211
+ Télécharge une ou plusieurs factures (max 10 recommandé) avec leurs pièces jointes. **Formats disponibles** : - PDF : Fichier PDF uniquement - XML : Fichier XML uniquement - ZIP : Archive contenant PDF + XML + pièces jointes **Taille maximale** : 120 Mo par téléchargement **Payload exemple** : ```json { \"listeIdentifiantsFactureCPP\": [12345, 12346], \"inclurePiecesJointes\": true, \"formatFichier\": \"ZIP\" } ``` **Retour** : Le fichier est encodé en base64 dans le champ `fichierBase64`. **Note** : Le flag `factureTelechargeeParDestinataire` est mis à jour automatiquement.
3212
+
3213
+ :param body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post: (required)
3214
+ :type body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post: BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost
3215
+ :param _request_timeout: timeout setting for this request. If one
3216
+ number provided, it will be total request
3217
+ timeout. It can also be a pair (tuple) of
3218
+ (connection, read) timeouts.
3219
+ :type _request_timeout: int, tuple(int, int), optional
3220
+ :param _request_auth: set to override the auth_settings for an a single
3221
+ request; this effectively ignores the
3222
+ authentication in the spec for a single request.
3223
+ :type _request_auth: dict, optional
3224
+ :param _content_type: force content-type for the request.
3225
+ :type _content_type: str, Optional
3226
+ :param _headers: set to override the headers for a single
3227
+ request; this effectively ignores the headers
3228
+ in the spec for a single request.
3229
+ :type _headers: dict, optional
3230
+ :param _host_index: set to override the host_index for a single
3231
+ request; this effectively ignores the host_index
3232
+ in the spec for a single request.
3233
+ :type _host_index: int, optional
3234
+ :return: Returns the result object.
3235
+ """ # noqa: E501
3236
+
3237
+ _param = self._telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_serialize(
3238
+ body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post=body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post,
3239
+ _request_auth=_request_auth,
3240
+ _content_type=_content_type,
3241
+ _headers=_headers,
3242
+ _host_index=_host_index
3243
+ )
3244
+
3245
+ _response_types_map: Dict[str, Optional[str]] = {
3246
+ '200': "object",
3247
+ '422': "HTTPValidationError",
3248
+ }
3249
+ response_data = self.api_client.call_api(
3250
+ *_param,
3251
+ _request_timeout=_request_timeout
3252
+ )
3253
+ response_data.read()
3254
+ return self.api_client.response_deserialize(
3255
+ response_data=response_data,
3256
+ response_types_map=_response_types_map,
3257
+ )
3258
+
3259
+
3260
+ @validate_call
3261
+ def telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_without_preload_content(
3262
+ self,
3263
+ body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post: BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost,
3264
+ _request_timeout: Union[
3265
+ None,
3266
+ Annotated[StrictFloat, Field(gt=0)],
3267
+ Tuple[
3268
+ Annotated[StrictFloat, Field(gt=0)],
3269
+ Annotated[StrictFloat, Field(gt=0)]
3270
+ ]
3271
+ ] = None,
3272
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3273
+ _content_type: Optional[StrictStr] = None,
3274
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3275
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3276
+ ) -> RESTResponseType:
3277
+ """Télécharger un groupe de factures
3278
+
3279
+ Télécharge une ou plusieurs factures (max 10 recommandé) avec leurs pièces jointes. **Formats disponibles** : - PDF : Fichier PDF uniquement - XML : Fichier XML uniquement - ZIP : Archive contenant PDF + XML + pièces jointes **Taille maximale** : 120 Mo par téléchargement **Payload exemple** : ```json { \"listeIdentifiantsFactureCPP\": [12345, 12346], \"inclurePiecesJointes\": true, \"formatFichier\": \"ZIP\" } ``` **Retour** : Le fichier est encodé en base64 dans le champ `fichierBase64`. **Note** : Le flag `factureTelechargeeParDestinataire` est mis à jour automatiquement.
3280
+
3281
+ :param body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post: (required)
3282
+ :type body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post: BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost
3283
+ :param _request_timeout: timeout setting for this request. If one
3284
+ number provided, it will be total request
3285
+ timeout. It can also be a pair (tuple) of
3286
+ (connection, read) timeouts.
3287
+ :type _request_timeout: int, tuple(int, int), optional
3288
+ :param _request_auth: set to override the auth_settings for an a single
3289
+ request; this effectively ignores the
3290
+ authentication in the spec for a single request.
3291
+ :type _request_auth: dict, optional
3292
+ :param _content_type: force content-type for the request.
3293
+ :type _content_type: str, Optional
3294
+ :param _headers: set to override the headers for a single
3295
+ request; this effectively ignores the headers
3296
+ in the spec for a single request.
3297
+ :type _headers: dict, optional
3298
+ :param _host_index: set to override the host_index for a single
3299
+ request; this effectively ignores the host_index
3300
+ in the spec for a single request.
3301
+ :type _host_index: int, optional
3302
+ :return: Returns the result object.
3303
+ """ # noqa: E501
3304
+
3305
+ _param = self._telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_serialize(
3306
+ body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post=body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post,
3307
+ _request_auth=_request_auth,
3308
+ _content_type=_content_type,
3309
+ _headers=_headers,
3310
+ _host_index=_host_index
3311
+ )
3312
+
3313
+ _response_types_map: Dict[str, Optional[str]] = {
3314
+ '200': "object",
3315
+ '422': "HTTPValidationError",
3316
+ }
3317
+ response_data = self.api_client.call_api(
3318
+ *_param,
3319
+ _request_timeout=_request_timeout
3320
+ )
3321
+ return response_data.response
3322
+
3323
+
3324
+ def _telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_serialize(
3325
+ self,
3326
+ body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post,
3327
+ _request_auth,
3328
+ _content_type,
3329
+ _headers,
3330
+ _host_index,
3331
+ ) -> RequestSerialized:
3332
+
3333
+ _host = None
3334
+
3335
+ _collection_formats: Dict[str, str] = {
3336
+ }
3337
+
3338
+ _path_params: Dict[str, str] = {}
3339
+ _query_params: List[Tuple[str, str]] = []
3340
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3341
+ _form_params: List[Tuple[str, str]] = []
3342
+ _files: Dict[
3343
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3344
+ ] = {}
3345
+ _body_params: Optional[bytes] = None
3346
+
3347
+ # process the path parameters
3348
+ # process the query parameters
3349
+ # process the header parameters
3350
+ # process the form parameters
3351
+ # process the body parameter
3352
+ if body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post is not None:
3353
+ _body_params = body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post
3354
+
3355
+
3356
+ # set the HTTP header `Accept`
3357
+ if 'Accept' not in _header_params:
3358
+ _header_params['Accept'] = self.api_client.select_header_accept(
3359
+ [
3360
+ 'application/json'
3361
+ ]
3362
+ )
3363
+
3364
+ # set the HTTP header `Content-Type`
3365
+ if _content_type:
3366
+ _header_params['Content-Type'] = _content_type
3367
+ else:
3368
+ _default_content_type = (
3369
+ self.api_client.select_header_content_type(
3370
+ [
3371
+ 'application/json'
3372
+ ]
3373
+ )
3374
+ )
3375
+ if _default_content_type is not None:
3376
+ _header_params['Content-Type'] = _default_content_type
3377
+
3378
+ # authentication setting
3379
+ _auth_settings: List[str] = [
3380
+ 'HTTPBearer'
3381
+ ]
3382
+
3383
+ return self.api_client.param_serialize(
3384
+ method='POST',
3385
+ resource_path='/api/v1/chorus-pro/factures/telecharger-groupe',
3386
+ path_params=_path_params,
3387
+ query_params=_query_params,
3388
+ header_params=_header_params,
3389
+ body=_body_params,
3390
+ post_params=_form_params,
3391
+ files=_files,
3392
+ auth_settings=_auth_settings,
3393
+ collection_formats=_collection_formats,
3394
+ _host=_host,
3395
+ _request_auth=_request_auth
3396
+ )
3397
+
3398
+
3399
+
3400
+
3401
+ @validate_call
3402
+ def traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post(
3403
+ self,
3404
+ body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post: BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost,
3405
+ _request_timeout: Union[
3406
+ None,
3407
+ Annotated[StrictFloat, Field(gt=0)],
3408
+ Tuple[
3409
+ Annotated[StrictFloat, Field(gt=0)],
3410
+ Annotated[StrictFloat, Field(gt=0)]
3411
+ ]
3412
+ ] = None,
3413
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3414
+ _content_type: Optional[StrictStr] = None,
3415
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3416
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3417
+ ) -> object:
3418
+ """Traiter une facture reçue (Destinataire)
3419
+
3420
+ Change le statut d'une facture reçue. **Statuts possibles** : - MISE_A_DISPOSITION : Facture acceptée - SUSPENDUE : En attente d'informations complémentaires (motif obligatoire) - REJETEE : Facture refusée (motif obligatoire) - MANDATEE : Facture mandatée - MISE_EN_PAIEMENT : Facture en cours de paiement - COMPTABILISEE : Facture comptabilisée - MISE_A_DISPOSITION_COMPTABLE : Mise à disposition comptable - A_RECYCLER : À recycler - COMPLETEE : Complétée - SERVICE-FAIT : Service fait - PRISE_EN_COMPTE_DESTINATAIRE : Prise en compte - TRANSMISE_MOA : Transmise à la MOA **Payload exemple** : ```json { \"identifiantFactureCPP\": 12345, \"nouveauStatut\": \"REJETEE\", \"motifRejet\": \"Facture en double\", \"commentaire\": \"Facture déjà reçue sous la référence ABC123\" } ``` **Règles** : - Un motif est **obligatoire** pour SUSPENDUE et REJETEE - Seuls certains statuts sont autorisés selon le statut actuel de la facture
3421
+
3422
+ :param body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post: (required)
3423
+ :type body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post: BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost
3424
+ :param _request_timeout: timeout setting for this request. If one
3425
+ number provided, it will be total request
3426
+ timeout. It can also be a pair (tuple) of
3427
+ (connection, read) timeouts.
3428
+ :type _request_timeout: int, tuple(int, int), optional
3429
+ :param _request_auth: set to override the auth_settings for an a single
3430
+ request; this effectively ignores the
3431
+ authentication in the spec for a single request.
3432
+ :type _request_auth: dict, optional
3433
+ :param _content_type: force content-type for the request.
3434
+ :type _content_type: str, Optional
3435
+ :param _headers: set to override the headers for a single
3436
+ request; this effectively ignores the headers
3437
+ in the spec for a single request.
3438
+ :type _headers: dict, optional
3439
+ :param _host_index: set to override the host_index for a single
3440
+ request; this effectively ignores the host_index
3441
+ in the spec for a single request.
3442
+ :type _host_index: int, optional
3443
+ :return: Returns the result object.
3444
+ """ # noqa: E501
3445
+
3446
+ _param = self._traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_serialize(
3447
+ body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post=body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post,
3448
+ _request_auth=_request_auth,
3449
+ _content_type=_content_type,
3450
+ _headers=_headers,
3451
+ _host_index=_host_index
3452
+ )
3453
+
3454
+ _response_types_map: Dict[str, Optional[str]] = {
3455
+ '200': "object",
3456
+ '422': "HTTPValidationError",
3457
+ }
3458
+ response_data = self.api_client.call_api(
3459
+ *_param,
3460
+ _request_timeout=_request_timeout
3461
+ )
3462
+ response_data.read()
3463
+ return self.api_client.response_deserialize(
3464
+ response_data=response_data,
3465
+ response_types_map=_response_types_map,
3466
+ ).data
3467
+
3468
+
3469
+ @validate_call
3470
+ def traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_with_http_info(
3471
+ self,
3472
+ body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post: BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost,
3473
+ _request_timeout: Union[
3474
+ None,
3475
+ Annotated[StrictFloat, Field(gt=0)],
3476
+ Tuple[
3477
+ Annotated[StrictFloat, Field(gt=0)],
3478
+ Annotated[StrictFloat, Field(gt=0)]
3479
+ ]
3480
+ ] = None,
3481
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3482
+ _content_type: Optional[StrictStr] = None,
3483
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3484
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3485
+ ) -> ApiResponse[object]:
3486
+ """Traiter une facture reçue (Destinataire)
3487
+
3488
+ Change le statut d'une facture reçue. **Statuts possibles** : - MISE_A_DISPOSITION : Facture acceptée - SUSPENDUE : En attente d'informations complémentaires (motif obligatoire) - REJETEE : Facture refusée (motif obligatoire) - MANDATEE : Facture mandatée - MISE_EN_PAIEMENT : Facture en cours de paiement - COMPTABILISEE : Facture comptabilisée - MISE_A_DISPOSITION_COMPTABLE : Mise à disposition comptable - A_RECYCLER : À recycler - COMPLETEE : Complétée - SERVICE-FAIT : Service fait - PRISE_EN_COMPTE_DESTINATAIRE : Prise en compte - TRANSMISE_MOA : Transmise à la MOA **Payload exemple** : ```json { \"identifiantFactureCPP\": 12345, \"nouveauStatut\": \"REJETEE\", \"motifRejet\": \"Facture en double\", \"commentaire\": \"Facture déjà reçue sous la référence ABC123\" } ``` **Règles** : - Un motif est **obligatoire** pour SUSPENDUE et REJETEE - Seuls certains statuts sont autorisés selon le statut actuel de la facture
3489
+
3490
+ :param body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post: (required)
3491
+ :type body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post: BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost
3492
+ :param _request_timeout: timeout setting for this request. If one
3493
+ number provided, it will be total request
3494
+ timeout. It can also be a pair (tuple) of
3495
+ (connection, read) timeouts.
3496
+ :type _request_timeout: int, tuple(int, int), optional
3497
+ :param _request_auth: set to override the auth_settings for an a single
3498
+ request; this effectively ignores the
3499
+ authentication in the spec for a single request.
3500
+ :type _request_auth: dict, optional
3501
+ :param _content_type: force content-type for the request.
3502
+ :type _content_type: str, Optional
3503
+ :param _headers: set to override the headers for a single
3504
+ request; this effectively ignores the headers
3505
+ in the spec for a single request.
3506
+ :type _headers: dict, optional
3507
+ :param _host_index: set to override the host_index for a single
3508
+ request; this effectively ignores the host_index
3509
+ in the spec for a single request.
3510
+ :type _host_index: int, optional
3511
+ :return: Returns the result object.
3512
+ """ # noqa: E501
3513
+
3514
+ _param = self._traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_serialize(
3515
+ body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post=body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post,
3516
+ _request_auth=_request_auth,
3517
+ _content_type=_content_type,
3518
+ _headers=_headers,
3519
+ _host_index=_host_index
3520
+ )
3521
+
3522
+ _response_types_map: Dict[str, Optional[str]] = {
3523
+ '200': "object",
3524
+ '422': "HTTPValidationError",
3525
+ }
3526
+ response_data = self.api_client.call_api(
3527
+ *_param,
3528
+ _request_timeout=_request_timeout
3529
+ )
3530
+ response_data.read()
3531
+ return self.api_client.response_deserialize(
3532
+ response_data=response_data,
3533
+ response_types_map=_response_types_map,
3534
+ )
3535
+
3536
+
3537
+ @validate_call
3538
+ def traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_without_preload_content(
3539
+ self,
3540
+ body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post: BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost,
3541
+ _request_timeout: Union[
3542
+ None,
3543
+ Annotated[StrictFloat, Field(gt=0)],
3544
+ Tuple[
3545
+ Annotated[StrictFloat, Field(gt=0)],
3546
+ Annotated[StrictFloat, Field(gt=0)]
3547
+ ]
3548
+ ] = None,
3549
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3550
+ _content_type: Optional[StrictStr] = None,
3551
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3552
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3553
+ ) -> RESTResponseType:
3554
+ """Traiter une facture reçue (Destinataire)
3555
+
3556
+ Change le statut d'une facture reçue. **Statuts possibles** : - MISE_A_DISPOSITION : Facture acceptée - SUSPENDUE : En attente d'informations complémentaires (motif obligatoire) - REJETEE : Facture refusée (motif obligatoire) - MANDATEE : Facture mandatée - MISE_EN_PAIEMENT : Facture en cours de paiement - COMPTABILISEE : Facture comptabilisée - MISE_A_DISPOSITION_COMPTABLE : Mise à disposition comptable - A_RECYCLER : À recycler - COMPLETEE : Complétée - SERVICE-FAIT : Service fait - PRISE_EN_COMPTE_DESTINATAIRE : Prise en compte - TRANSMISE_MOA : Transmise à la MOA **Payload exemple** : ```json { \"identifiantFactureCPP\": 12345, \"nouveauStatut\": \"REJETEE\", \"motifRejet\": \"Facture en double\", \"commentaire\": \"Facture déjà reçue sous la référence ABC123\" } ``` **Règles** : - Un motif est **obligatoire** pour SUSPENDUE et REJETEE - Seuls certains statuts sont autorisés selon le statut actuel de la facture
3557
+
3558
+ :param body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post: (required)
3559
+ :type body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post: BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost
3560
+ :param _request_timeout: timeout setting for this request. If one
3561
+ number provided, it will be total request
3562
+ timeout. It can also be a pair (tuple) of
3563
+ (connection, read) timeouts.
3564
+ :type _request_timeout: int, tuple(int, int), optional
3565
+ :param _request_auth: set to override the auth_settings for an a single
3566
+ request; this effectively ignores the
3567
+ authentication in the spec for a single request.
3568
+ :type _request_auth: dict, optional
3569
+ :param _content_type: force content-type for the request.
3570
+ :type _content_type: str, Optional
3571
+ :param _headers: set to override the headers for a single
3572
+ request; this effectively ignores the headers
3573
+ in the spec for a single request.
3574
+ :type _headers: dict, optional
3575
+ :param _host_index: set to override the host_index for a single
3576
+ request; this effectively ignores the host_index
3577
+ in the spec for a single request.
3578
+ :type _host_index: int, optional
3579
+ :return: Returns the result object.
3580
+ """ # noqa: E501
3581
+
3582
+ _param = self._traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_serialize(
3583
+ body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post=body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post,
3584
+ _request_auth=_request_auth,
3585
+ _content_type=_content_type,
3586
+ _headers=_headers,
3587
+ _host_index=_host_index
3588
+ )
3589
+
3590
+ _response_types_map: Dict[str, Optional[str]] = {
3591
+ '200': "object",
3592
+ '422': "HTTPValidationError",
3593
+ }
3594
+ response_data = self.api_client.call_api(
3595
+ *_param,
3596
+ _request_timeout=_request_timeout
3597
+ )
3598
+ return response_data.response
3599
+
3600
+
3601
+ def _traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_serialize(
3602
+ self,
3603
+ body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post,
3604
+ _request_auth,
3605
+ _content_type,
3606
+ _headers,
3607
+ _host_index,
3608
+ ) -> RequestSerialized:
3609
+
3610
+ _host = None
3611
+
3612
+ _collection_formats: Dict[str, str] = {
3613
+ }
3614
+
3615
+ _path_params: Dict[str, str] = {}
3616
+ _query_params: List[Tuple[str, str]] = []
3617
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3618
+ _form_params: List[Tuple[str, str]] = []
3619
+ _files: Dict[
3620
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3621
+ ] = {}
3622
+ _body_params: Optional[bytes] = None
3623
+
3624
+ # process the path parameters
3625
+ # process the query parameters
3626
+ # process the header parameters
3627
+ # process the form parameters
3628
+ # process the body parameter
3629
+ if body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post is not None:
3630
+ _body_params = body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post
3631
+
3632
+
3633
+ # set the HTTP header `Accept`
3634
+ if 'Accept' not in _header_params:
3635
+ _header_params['Accept'] = self.api_client.select_header_accept(
3636
+ [
3637
+ 'application/json'
3638
+ ]
3639
+ )
3640
+
3641
+ # set the HTTP header `Content-Type`
3642
+ if _content_type:
3643
+ _header_params['Content-Type'] = _content_type
3644
+ else:
3645
+ _default_content_type = (
3646
+ self.api_client.select_header_content_type(
3647
+ [
3648
+ 'application/json'
3649
+ ]
3650
+ )
3651
+ )
3652
+ if _default_content_type is not None:
3653
+ _header_params['Content-Type'] = _default_content_type
3654
+
3655
+ # authentication setting
3656
+ _auth_settings: List[str] = [
3657
+ 'HTTPBearer'
3658
+ ]
3659
+
3660
+ return self.api_client.param_serialize(
3661
+ method='POST',
3662
+ resource_path='/api/v1/chorus-pro/factures/traiter-facture-recue',
3663
+ path_params=_path_params,
3664
+ query_params=_query_params,
3665
+ header_params=_header_params,
3666
+ body=_body_params,
3667
+ post_params=_form_params,
3668
+ files=_files,
3669
+ auth_settings=_auth_settings,
3670
+ collection_formats=_collection_formats,
3671
+ _host=_host,
3672
+ _request_auth=_request_auth
3673
+ )
3674
+
3675
+
3676
+
3677
+
3678
+ @validate_call
3679
+ def valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post(
3680
+ self,
3681
+ body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post: BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost,
3682
+ _request_timeout: Union[
3683
+ None,
3684
+ Annotated[StrictFloat, Field(gt=0)],
3685
+ Tuple[
3686
+ Annotated[StrictFloat, Field(gt=0)],
3687
+ Annotated[StrictFloat, Field(gt=0)]
3688
+ ]
3689
+ ] = None,
3690
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3691
+ _content_type: Optional[StrictStr] = None,
3692
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3693
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3694
+ ) -> object:
3695
+ """Consulter une facture (Valideur)
3696
+
3697
+ Consulte facture (valideur).
3698
+
3699
+ :param body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post: (required)
3700
+ :type body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post: BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost
3701
+ :param _request_timeout: timeout setting for this request. If one
3702
+ number provided, it will be total request
3703
+ timeout. It can also be a pair (tuple) of
3704
+ (connection, read) timeouts.
3705
+ :type _request_timeout: int, tuple(int, int), optional
3706
+ :param _request_auth: set to override the auth_settings for an a single
3707
+ request; this effectively ignores the
3708
+ authentication in the spec for a single request.
3709
+ :type _request_auth: dict, optional
3710
+ :param _content_type: force content-type for the request.
3711
+ :type _content_type: str, Optional
3712
+ :param _headers: set to override the headers for a single
3713
+ request; this effectively ignores the headers
3714
+ in the spec for a single request.
3715
+ :type _headers: dict, optional
3716
+ :param _host_index: set to override the host_index for a single
3717
+ request; this effectively ignores the host_index
3718
+ in the spec for a single request.
3719
+ :type _host_index: int, optional
3720
+ :return: Returns the result object.
3721
+ """ # noqa: E501
3722
+
3723
+ _param = self._valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_serialize(
3724
+ body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post=body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post,
3725
+ _request_auth=_request_auth,
3726
+ _content_type=_content_type,
3727
+ _headers=_headers,
3728
+ _host_index=_host_index
3729
+ )
3730
+
3731
+ _response_types_map: Dict[str, Optional[str]] = {
3732
+ '200': "object",
3733
+ '422': "HTTPValidationError",
3734
+ }
3735
+ response_data = self.api_client.call_api(
3736
+ *_param,
3737
+ _request_timeout=_request_timeout
3738
+ )
3739
+ response_data.read()
3740
+ return self.api_client.response_deserialize(
3741
+ response_data=response_data,
3742
+ response_types_map=_response_types_map,
3743
+ ).data
3744
+
3745
+
3746
+ @validate_call
3747
+ def valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_with_http_info(
3748
+ self,
3749
+ body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post: BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost,
3750
+ _request_timeout: Union[
3751
+ None,
3752
+ Annotated[StrictFloat, Field(gt=0)],
3753
+ Tuple[
3754
+ Annotated[StrictFloat, Field(gt=0)],
3755
+ Annotated[StrictFloat, Field(gt=0)]
3756
+ ]
3757
+ ] = None,
3758
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3759
+ _content_type: Optional[StrictStr] = None,
3760
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3761
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3762
+ ) -> ApiResponse[object]:
3763
+ """Consulter une facture (Valideur)
3764
+
3765
+ Consulte facture (valideur).
3766
+
3767
+ :param body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post: (required)
3768
+ :type body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post: BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost
3769
+ :param _request_timeout: timeout setting for this request. If one
3770
+ number provided, it will be total request
3771
+ timeout. It can also be a pair (tuple) of
3772
+ (connection, read) timeouts.
3773
+ :type _request_timeout: int, tuple(int, int), optional
3774
+ :param _request_auth: set to override the auth_settings for an a single
3775
+ request; this effectively ignores the
3776
+ authentication in the spec for a single request.
3777
+ :type _request_auth: dict, optional
3778
+ :param _content_type: force content-type for the request.
3779
+ :type _content_type: str, Optional
3780
+ :param _headers: set to override the headers for a single
3781
+ request; this effectively ignores the headers
3782
+ in the spec for a single request.
3783
+ :type _headers: dict, optional
3784
+ :param _host_index: set to override the host_index for a single
3785
+ request; this effectively ignores the host_index
3786
+ in the spec for a single request.
3787
+ :type _host_index: int, optional
3788
+ :return: Returns the result object.
3789
+ """ # noqa: E501
3790
+
3791
+ _param = self._valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_serialize(
3792
+ body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post=body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post,
3793
+ _request_auth=_request_auth,
3794
+ _content_type=_content_type,
3795
+ _headers=_headers,
3796
+ _host_index=_host_index
3797
+ )
3798
+
3799
+ _response_types_map: Dict[str, Optional[str]] = {
3800
+ '200': "object",
3801
+ '422': "HTTPValidationError",
3802
+ }
3803
+ response_data = self.api_client.call_api(
3804
+ *_param,
3805
+ _request_timeout=_request_timeout
3806
+ )
3807
+ response_data.read()
3808
+ return self.api_client.response_deserialize(
3809
+ response_data=response_data,
3810
+ response_types_map=_response_types_map,
3811
+ )
3812
+
3813
+
3814
+ @validate_call
3815
+ def valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_without_preload_content(
3816
+ self,
3817
+ body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post: BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost,
3818
+ _request_timeout: Union[
3819
+ None,
3820
+ Annotated[StrictFloat, Field(gt=0)],
3821
+ Tuple[
3822
+ Annotated[StrictFloat, Field(gt=0)],
3823
+ Annotated[StrictFloat, Field(gt=0)]
3824
+ ]
3825
+ ] = None,
3826
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3827
+ _content_type: Optional[StrictStr] = None,
3828
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3829
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3830
+ ) -> RESTResponseType:
3831
+ """Consulter une facture (Valideur)
3832
+
3833
+ Consulte facture (valideur).
3834
+
3835
+ :param body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post: (required)
3836
+ :type body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post: BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost
3837
+ :param _request_timeout: timeout setting for this request. If one
3838
+ number provided, it will be total request
3839
+ timeout. It can also be a pair (tuple) of
3840
+ (connection, read) timeouts.
3841
+ :type _request_timeout: int, tuple(int, int), optional
3842
+ :param _request_auth: set to override the auth_settings for an a single
3843
+ request; this effectively ignores the
3844
+ authentication in the spec for a single request.
3845
+ :type _request_auth: dict, optional
3846
+ :param _content_type: force content-type for the request.
3847
+ :type _content_type: str, Optional
3848
+ :param _headers: set to override the headers for a single
3849
+ request; this effectively ignores the headers
3850
+ in the spec for a single request.
3851
+ :type _headers: dict, optional
3852
+ :param _host_index: set to override the host_index for a single
3853
+ request; this effectively ignores the host_index
3854
+ in the spec for a single request.
3855
+ :type _host_index: int, optional
3856
+ :return: Returns the result object.
3857
+ """ # noqa: E501
3858
+
3859
+ _param = self._valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_serialize(
3860
+ body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post=body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post,
3861
+ _request_auth=_request_auth,
3862
+ _content_type=_content_type,
3863
+ _headers=_headers,
3864
+ _host_index=_host_index
3865
+ )
3866
+
3867
+ _response_types_map: Dict[str, Optional[str]] = {
3868
+ '200': "object",
3869
+ '422': "HTTPValidationError",
3870
+ }
3871
+ response_data = self.api_client.call_api(
3872
+ *_param,
3873
+ _request_timeout=_request_timeout
3874
+ )
3875
+ return response_data.response
3876
+
3877
+
3878
+ def _valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_serialize(
3879
+ self,
3880
+ body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post,
3881
+ _request_auth,
3882
+ _content_type,
3883
+ _headers,
3884
+ _host_index,
3885
+ ) -> RequestSerialized:
3886
+
3887
+ _host = None
3888
+
3889
+ _collection_formats: Dict[str, str] = {
3890
+ }
3891
+
3892
+ _path_params: Dict[str, str] = {}
3893
+ _query_params: List[Tuple[str, str]] = []
3894
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3895
+ _form_params: List[Tuple[str, str]] = []
3896
+ _files: Dict[
3897
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3898
+ ] = {}
3899
+ _body_params: Optional[bytes] = None
3900
+
3901
+ # process the path parameters
3902
+ # process the query parameters
3903
+ # process the header parameters
3904
+ # process the form parameters
3905
+ # process the body parameter
3906
+ if body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post is not None:
3907
+ _body_params = body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post
3908
+
3909
+
3910
+ # set the HTTP header `Accept`
3911
+ if 'Accept' not in _header_params:
3912
+ _header_params['Accept'] = self.api_client.select_header_accept(
3913
+ [
3914
+ 'application/json'
3915
+ ]
3916
+ )
3917
+
3918
+ # set the HTTP header `Content-Type`
3919
+ if _content_type:
3920
+ _header_params['Content-Type'] = _content_type
3921
+ else:
3922
+ _default_content_type = (
3923
+ self.api_client.select_header_content_type(
3924
+ [
3925
+ 'application/json'
3926
+ ]
3927
+ )
3928
+ )
3929
+ if _default_content_type is not None:
3930
+ _header_params['Content-Type'] = _default_content_type
3931
+
3932
+ # authentication setting
3933
+ _auth_settings: List[str] = [
3934
+ 'HTTPBearer'
3935
+ ]
3936
+
3937
+ return self.api_client.param_serialize(
3938
+ method='POST',
3939
+ resource_path='/api/v1/chorus-pro/factures/valideur/consulter',
3940
+ path_params=_path_params,
3941
+ query_params=_query_params,
3942
+ header_params=_header_params,
3943
+ body=_body_params,
3944
+ post_params=_form_params,
3945
+ files=_files,
3946
+ auth_settings=_auth_settings,
3947
+ collection_formats=_collection_formats,
3948
+ _host=_host,
3949
+ _request_auth=_request_auth
3950
+ )
3951
+
3952
+
3953
+
3954
+
3955
+ @validate_call
3956
+ def valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post(
3957
+ self,
3958
+ body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post: BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost,
3959
+ _request_timeout: Union[
3960
+ None,
3961
+ Annotated[StrictFloat, Field(gt=0)],
3962
+ Tuple[
3963
+ Annotated[StrictFloat, Field(gt=0)],
3964
+ Annotated[StrictFloat, Field(gt=0)]
3965
+ ]
3966
+ ] = None,
3967
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3968
+ _content_type: Optional[StrictStr] = None,
3969
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3970
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3971
+ ) -> object:
3972
+ """Rechercher factures à valider (Valideur)
3973
+
3974
+ Recherche les factures en attente de validation par le valideur connecté. **Rôle** : Valideur dans le circuit de validation interne. **Filtres** : Dates, structure, service, etc.
3975
+
3976
+ :param body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post: (required)
3977
+ :type body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post: BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost
3978
+ :param _request_timeout: timeout setting for this request. If one
3979
+ number provided, it will be total request
3980
+ timeout. It can also be a pair (tuple) of
3981
+ (connection, read) timeouts.
3982
+ :type _request_timeout: int, tuple(int, int), optional
3983
+ :param _request_auth: set to override the auth_settings for an a single
3984
+ request; this effectively ignores the
3985
+ authentication in the spec for a single request.
3986
+ :type _request_auth: dict, optional
3987
+ :param _content_type: force content-type for the request.
3988
+ :type _content_type: str, Optional
3989
+ :param _headers: set to override the headers for a single
3990
+ request; this effectively ignores the headers
3991
+ in the spec for a single request.
3992
+ :type _headers: dict, optional
3993
+ :param _host_index: set to override the host_index for a single
3994
+ request; this effectively ignores the host_index
3995
+ in the spec for a single request.
3996
+ :type _host_index: int, optional
3997
+ :return: Returns the result object.
3998
+ """ # noqa: E501
3999
+
4000
+ _param = self._valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_serialize(
4001
+ body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post=body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post,
4002
+ _request_auth=_request_auth,
4003
+ _content_type=_content_type,
4004
+ _headers=_headers,
4005
+ _host_index=_host_index
4006
+ )
4007
+
4008
+ _response_types_map: Dict[str, Optional[str]] = {
4009
+ '200': "object",
4010
+ '422': "HTTPValidationError",
4011
+ }
4012
+ response_data = self.api_client.call_api(
4013
+ *_param,
4014
+ _request_timeout=_request_timeout
4015
+ )
4016
+ response_data.read()
4017
+ return self.api_client.response_deserialize(
4018
+ response_data=response_data,
4019
+ response_types_map=_response_types_map,
4020
+ ).data
4021
+
4022
+
4023
+ @validate_call
4024
+ def valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_with_http_info(
4025
+ self,
4026
+ body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post: BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost,
4027
+ _request_timeout: Union[
4028
+ None,
4029
+ Annotated[StrictFloat, Field(gt=0)],
4030
+ Tuple[
4031
+ Annotated[StrictFloat, Field(gt=0)],
4032
+ Annotated[StrictFloat, Field(gt=0)]
4033
+ ]
4034
+ ] = None,
4035
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4036
+ _content_type: Optional[StrictStr] = None,
4037
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4038
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4039
+ ) -> ApiResponse[object]:
4040
+ """Rechercher factures à valider (Valideur)
4041
+
4042
+ Recherche les factures en attente de validation par le valideur connecté. **Rôle** : Valideur dans le circuit de validation interne. **Filtres** : Dates, structure, service, etc.
4043
+
4044
+ :param body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post: (required)
4045
+ :type body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post: BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost
4046
+ :param _request_timeout: timeout setting for this request. If one
4047
+ number provided, it will be total request
4048
+ timeout. It can also be a pair (tuple) of
4049
+ (connection, read) timeouts.
4050
+ :type _request_timeout: int, tuple(int, int), optional
4051
+ :param _request_auth: set to override the auth_settings for an a single
4052
+ request; this effectively ignores the
4053
+ authentication in the spec for a single request.
4054
+ :type _request_auth: dict, optional
4055
+ :param _content_type: force content-type for the request.
4056
+ :type _content_type: str, Optional
4057
+ :param _headers: set to override the headers for a single
4058
+ request; this effectively ignores the headers
4059
+ in the spec for a single request.
4060
+ :type _headers: dict, optional
4061
+ :param _host_index: set to override the host_index for a single
4062
+ request; this effectively ignores the host_index
4063
+ in the spec for a single request.
4064
+ :type _host_index: int, optional
4065
+ :return: Returns the result object.
4066
+ """ # noqa: E501
4067
+
4068
+ _param = self._valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_serialize(
4069
+ body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post=body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post,
4070
+ _request_auth=_request_auth,
4071
+ _content_type=_content_type,
4072
+ _headers=_headers,
4073
+ _host_index=_host_index
4074
+ )
4075
+
4076
+ _response_types_map: Dict[str, Optional[str]] = {
4077
+ '200': "object",
4078
+ '422': "HTTPValidationError",
4079
+ }
4080
+ response_data = self.api_client.call_api(
4081
+ *_param,
4082
+ _request_timeout=_request_timeout
4083
+ )
4084
+ response_data.read()
4085
+ return self.api_client.response_deserialize(
4086
+ response_data=response_data,
4087
+ response_types_map=_response_types_map,
4088
+ )
4089
+
4090
+
4091
+ @validate_call
4092
+ def valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_without_preload_content(
4093
+ self,
4094
+ body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post: BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost,
4095
+ _request_timeout: Union[
4096
+ None,
4097
+ Annotated[StrictFloat, Field(gt=0)],
4098
+ Tuple[
4099
+ Annotated[StrictFloat, Field(gt=0)],
4100
+ Annotated[StrictFloat, Field(gt=0)]
4101
+ ]
4102
+ ] = None,
4103
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4104
+ _content_type: Optional[StrictStr] = None,
4105
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4106
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4107
+ ) -> RESTResponseType:
4108
+ """Rechercher factures à valider (Valideur)
4109
+
4110
+ Recherche les factures en attente de validation par le valideur connecté. **Rôle** : Valideur dans le circuit de validation interne. **Filtres** : Dates, structure, service, etc.
4111
+
4112
+ :param body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post: (required)
4113
+ :type body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post: BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost
4114
+ :param _request_timeout: timeout setting for this request. If one
4115
+ number provided, it will be total request
4116
+ timeout. It can also be a pair (tuple) of
4117
+ (connection, read) timeouts.
4118
+ :type _request_timeout: int, tuple(int, int), optional
4119
+ :param _request_auth: set to override the auth_settings for an a single
4120
+ request; this effectively ignores the
4121
+ authentication in the spec for a single request.
4122
+ :type _request_auth: dict, optional
4123
+ :param _content_type: force content-type for the request.
4124
+ :type _content_type: str, Optional
4125
+ :param _headers: set to override the headers for a single
4126
+ request; this effectively ignores the headers
4127
+ in the spec for a single request.
4128
+ :type _headers: dict, optional
4129
+ :param _host_index: set to override the host_index for a single
4130
+ request; this effectively ignores the host_index
4131
+ in the spec for a single request.
4132
+ :type _host_index: int, optional
4133
+ :return: Returns the result object.
4134
+ """ # noqa: E501
4135
+
4136
+ _param = self._valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_serialize(
4137
+ body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post=body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post,
4138
+ _request_auth=_request_auth,
4139
+ _content_type=_content_type,
4140
+ _headers=_headers,
4141
+ _host_index=_host_index
4142
+ )
4143
+
4144
+ _response_types_map: Dict[str, Optional[str]] = {
4145
+ '200': "object",
4146
+ '422': "HTTPValidationError",
4147
+ }
4148
+ response_data = self.api_client.call_api(
4149
+ *_param,
4150
+ _request_timeout=_request_timeout
4151
+ )
4152
+ return response_data.response
4153
+
4154
+
4155
+ def _valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_serialize(
4156
+ self,
4157
+ body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post,
4158
+ _request_auth,
4159
+ _content_type,
4160
+ _headers,
4161
+ _host_index,
4162
+ ) -> RequestSerialized:
4163
+
4164
+ _host = None
4165
+
4166
+ _collection_formats: Dict[str, str] = {
4167
+ }
4168
+
4169
+ _path_params: Dict[str, str] = {}
4170
+ _query_params: List[Tuple[str, str]] = []
4171
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4172
+ _form_params: List[Tuple[str, str]] = []
4173
+ _files: Dict[
4174
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4175
+ ] = {}
4176
+ _body_params: Optional[bytes] = None
4177
+
4178
+ # process the path parameters
4179
+ # process the query parameters
4180
+ # process the header parameters
4181
+ # process the form parameters
4182
+ # process the body parameter
4183
+ if body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post is not None:
4184
+ _body_params = body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post
4185
+
4186
+
4187
+ # set the HTTP header `Accept`
4188
+ if 'Accept' not in _header_params:
4189
+ _header_params['Accept'] = self.api_client.select_header_accept(
4190
+ [
4191
+ 'application/json'
4192
+ ]
4193
+ )
4194
+
4195
+ # set the HTTP header `Content-Type`
4196
+ if _content_type:
4197
+ _header_params['Content-Type'] = _content_type
4198
+ else:
4199
+ _default_content_type = (
4200
+ self.api_client.select_header_content_type(
4201
+ [
4202
+ 'application/json'
4203
+ ]
4204
+ )
4205
+ )
4206
+ if _default_content_type is not None:
4207
+ _header_params['Content-Type'] = _default_content_type
4208
+
4209
+ # authentication setting
4210
+ _auth_settings: List[str] = [
4211
+ 'HTTPBearer'
4212
+ ]
4213
+
4214
+ return self.api_client.param_serialize(
4215
+ method='POST',
4216
+ resource_path='/api/v1/chorus-pro/factures/valideur/rechercher',
4217
+ path_params=_path_params,
4218
+ query_params=_query_params,
4219
+ header_params=_header_params,
4220
+ body=_body_params,
4221
+ post_params=_form_params,
4222
+ files=_files,
4223
+ auth_settings=_auth_settings,
4224
+ collection_formats=_collection_formats,
4225
+ _host=_host,
4226
+ _request_auth=_request_auth
4227
+ )
4228
+
4229
+
4230
+
4231
+
4232
+ @validate_call
4233
+ def valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post(
4234
+ self,
4235
+ body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post: BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost,
4236
+ _request_timeout: Union[
4237
+ None,
4238
+ Annotated[StrictFloat, Field(gt=0)],
4239
+ Tuple[
4240
+ Annotated[StrictFloat, Field(gt=0)],
4241
+ Annotated[StrictFloat, Field(gt=0)]
4242
+ ]
4243
+ ] = None,
4244
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4245
+ _content_type: Optional[StrictStr] = None,
4246
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4247
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4248
+ ) -> object:
4249
+ """Valider ou refuser une facture (Valideur)
4250
+
4251
+ Valide ou refuse une facture en attente de validation. **Actions** : - Valider : La facture passe au statut suivant du circuit - Refuser : La facture est rejetée (motif obligatoire)
4252
+
4253
+ :param body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post: (required)
4254
+ :type body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post: BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost
4255
+ :param _request_timeout: timeout setting for this request. If one
4256
+ number provided, it will be total request
4257
+ timeout. It can also be a pair (tuple) of
4258
+ (connection, read) timeouts.
4259
+ :type _request_timeout: int, tuple(int, int), optional
4260
+ :param _request_auth: set to override the auth_settings for an a single
4261
+ request; this effectively ignores the
4262
+ authentication in the spec for a single request.
4263
+ :type _request_auth: dict, optional
4264
+ :param _content_type: force content-type for the request.
4265
+ :type _content_type: str, Optional
4266
+ :param _headers: set to override the headers for a single
4267
+ request; this effectively ignores the headers
4268
+ in the spec for a single request.
4269
+ :type _headers: dict, optional
4270
+ :param _host_index: set to override the host_index for a single
4271
+ request; this effectively ignores the host_index
4272
+ in the spec for a single request.
4273
+ :type _host_index: int, optional
4274
+ :return: Returns the result object.
4275
+ """ # noqa: E501
4276
+
4277
+ _param = self._valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_serialize(
4278
+ body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post=body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post,
4279
+ _request_auth=_request_auth,
4280
+ _content_type=_content_type,
4281
+ _headers=_headers,
4282
+ _host_index=_host_index
4283
+ )
4284
+
4285
+ _response_types_map: Dict[str, Optional[str]] = {
4286
+ '200': "object",
4287
+ '422': "HTTPValidationError",
4288
+ }
4289
+ response_data = self.api_client.call_api(
4290
+ *_param,
4291
+ _request_timeout=_request_timeout
4292
+ )
4293
+ response_data.read()
4294
+ return self.api_client.response_deserialize(
4295
+ response_data=response_data,
4296
+ response_types_map=_response_types_map,
4297
+ ).data
4298
+
4299
+
4300
+ @validate_call
4301
+ def valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_with_http_info(
4302
+ self,
4303
+ body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post: BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost,
4304
+ _request_timeout: Union[
4305
+ None,
4306
+ Annotated[StrictFloat, Field(gt=0)],
4307
+ Tuple[
4308
+ Annotated[StrictFloat, Field(gt=0)],
4309
+ Annotated[StrictFloat, Field(gt=0)]
4310
+ ]
4311
+ ] = None,
4312
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4313
+ _content_type: Optional[StrictStr] = None,
4314
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4315
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4316
+ ) -> ApiResponse[object]:
4317
+ """Valider ou refuser une facture (Valideur)
4318
+
4319
+ Valide ou refuse une facture en attente de validation. **Actions** : - Valider : La facture passe au statut suivant du circuit - Refuser : La facture est rejetée (motif obligatoire)
4320
+
4321
+ :param body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post: (required)
4322
+ :type body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post: BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost
4323
+ :param _request_timeout: timeout setting for this request. If one
4324
+ number provided, it will be total request
4325
+ timeout. It can also be a pair (tuple) of
4326
+ (connection, read) timeouts.
4327
+ :type _request_timeout: int, tuple(int, int), optional
4328
+ :param _request_auth: set to override the auth_settings for an a single
4329
+ request; this effectively ignores the
4330
+ authentication in the spec for a single request.
4331
+ :type _request_auth: dict, optional
4332
+ :param _content_type: force content-type for the request.
4333
+ :type _content_type: str, Optional
4334
+ :param _headers: set to override the headers for a single
4335
+ request; this effectively ignores the headers
4336
+ in the spec for a single request.
4337
+ :type _headers: dict, optional
4338
+ :param _host_index: set to override the host_index for a single
4339
+ request; this effectively ignores the host_index
4340
+ in the spec for a single request.
4341
+ :type _host_index: int, optional
4342
+ :return: Returns the result object.
4343
+ """ # noqa: E501
4344
+
4345
+ _param = self._valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_serialize(
4346
+ body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post=body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post,
4347
+ _request_auth=_request_auth,
4348
+ _content_type=_content_type,
4349
+ _headers=_headers,
4350
+ _host_index=_host_index
4351
+ )
4352
+
4353
+ _response_types_map: Dict[str, Optional[str]] = {
4354
+ '200': "object",
4355
+ '422': "HTTPValidationError",
4356
+ }
4357
+ response_data = self.api_client.call_api(
4358
+ *_param,
4359
+ _request_timeout=_request_timeout
4360
+ )
4361
+ response_data.read()
4362
+ return self.api_client.response_deserialize(
4363
+ response_data=response_data,
4364
+ response_types_map=_response_types_map,
4365
+ )
4366
+
4367
+
4368
+ @validate_call
4369
+ def valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_without_preload_content(
4370
+ self,
4371
+ body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post: BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost,
4372
+ _request_timeout: Union[
4373
+ None,
4374
+ Annotated[StrictFloat, Field(gt=0)],
4375
+ Tuple[
4376
+ Annotated[StrictFloat, Field(gt=0)],
4377
+ Annotated[StrictFloat, Field(gt=0)]
4378
+ ]
4379
+ ] = None,
4380
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4381
+ _content_type: Optional[StrictStr] = None,
4382
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4383
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4384
+ ) -> RESTResponseType:
4385
+ """Valider ou refuser une facture (Valideur)
4386
+
4387
+ Valide ou refuse une facture en attente de validation. **Actions** : - Valider : La facture passe au statut suivant du circuit - Refuser : La facture est rejetée (motif obligatoire)
4388
+
4389
+ :param body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post: (required)
4390
+ :type body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post: BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost
4391
+ :param _request_timeout: timeout setting for this request. If one
4392
+ number provided, it will be total request
4393
+ timeout. It can also be a pair (tuple) of
4394
+ (connection, read) timeouts.
4395
+ :type _request_timeout: int, tuple(int, int), optional
4396
+ :param _request_auth: set to override the auth_settings for an a single
4397
+ request; this effectively ignores the
4398
+ authentication in the spec for a single request.
4399
+ :type _request_auth: dict, optional
4400
+ :param _content_type: force content-type for the request.
4401
+ :type _content_type: str, Optional
4402
+ :param _headers: set to override the headers for a single
4403
+ request; this effectively ignores the headers
4404
+ in the spec for a single request.
4405
+ :type _headers: dict, optional
4406
+ :param _host_index: set to override the host_index for a single
4407
+ request; this effectively ignores the host_index
4408
+ in the spec for a single request.
4409
+ :type _host_index: int, optional
4410
+ :return: Returns the result object.
4411
+ """ # noqa: E501
4412
+
4413
+ _param = self._valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_serialize(
4414
+ body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post=body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post,
4415
+ _request_auth=_request_auth,
4416
+ _content_type=_content_type,
4417
+ _headers=_headers,
4418
+ _host_index=_host_index
4419
+ )
4420
+
4421
+ _response_types_map: Dict[str, Optional[str]] = {
4422
+ '200': "object",
4423
+ '422': "HTTPValidationError",
4424
+ }
4425
+ response_data = self.api_client.call_api(
4426
+ *_param,
4427
+ _request_timeout=_request_timeout
4428
+ )
4429
+ return response_data.response
4430
+
4431
+
4432
+ def _valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_serialize(
4433
+ self,
4434
+ body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post,
4435
+ _request_auth,
4436
+ _content_type,
4437
+ _headers,
4438
+ _host_index,
4439
+ ) -> RequestSerialized:
4440
+
4441
+ _host = None
4442
+
4443
+ _collection_formats: Dict[str, str] = {
4444
+ }
4445
+
4446
+ _path_params: Dict[str, str] = {}
4447
+ _query_params: List[Tuple[str, str]] = []
4448
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4449
+ _form_params: List[Tuple[str, str]] = []
4450
+ _files: Dict[
4451
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4452
+ ] = {}
4453
+ _body_params: Optional[bytes] = None
4454
+
4455
+ # process the path parameters
4456
+ # process the query parameters
4457
+ # process the header parameters
4458
+ # process the form parameters
4459
+ # process the body parameter
4460
+ if body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post is not None:
4461
+ _body_params = body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post
4462
+
4463
+
4464
+ # set the HTTP header `Accept`
4465
+ if 'Accept' not in _header_params:
4466
+ _header_params['Accept'] = self.api_client.select_header_accept(
4467
+ [
4468
+ 'application/json'
4469
+ ]
4470
+ )
4471
+
4472
+ # set the HTTP header `Content-Type`
4473
+ if _content_type:
4474
+ _header_params['Content-Type'] = _content_type
4475
+ else:
4476
+ _default_content_type = (
4477
+ self.api_client.select_header_content_type(
4478
+ [
4479
+ 'application/json'
4480
+ ]
4481
+ )
4482
+ )
4483
+ if _default_content_type is not None:
4484
+ _header_params['Content-Type'] = _default_content_type
4485
+
4486
+ # authentication setting
4487
+ _auth_settings: List[str] = [
4488
+ 'HTTPBearer'
4489
+ ]
4490
+
4491
+ return self.api_client.param_serialize(
4492
+ method='POST',
4493
+ resource_path='/api/v1/chorus-pro/factures/valideur/traiter',
4494
+ path_params=_path_params,
4495
+ query_params=_query_params,
4496
+ header_params=_header_params,
4497
+ body=_body_params,
4498
+ post_params=_form_params,
4499
+ files=_files,
4500
+ auth_settings=_auth_settings,
4501
+ collection_formats=_collection_formats,
4502
+ _host=_host,
4503
+ _request_auth=_request_auth
4504
+ )
4505
+
4506
+