factpulse 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +28 -0
  3. data/Gemfile +9 -0
  4. data/Gemfile.lock +74 -0
  5. data/LICENSE +21 -0
  6. data/README.md +207 -0
  7. data/Rakefile +10 -0
  8. data/docs/AFNORPDPPAApi.md +69 -0
  9. data/docs/AFNORPDPPADirectoryServiceApi.md +1313 -0
  10. data/docs/AFNORPDPPAFlowServiceApi.md +258 -0
  11. data/docs/APIError.md +22 -0
  12. data/docs/AdresseElectronique.md +20 -0
  13. data/docs/AdressePostale.md +26 -0
  14. data/docs/CadreDeFacturation.md +22 -0
  15. data/docs/CategorieTVA.md +15 -0
  16. data/docs/CertificateInfoResponse.md +40 -0
  17. data/docs/ChorusProApi.md +1125 -0
  18. data/docs/ChorusProCredentials.md +26 -0
  19. data/docs/CodeCadreFacturation.md +15 -0
  20. data/docs/CodeRaisonReduction.md +15 -0
  21. data/docs/ConsulterFactureRequest.md +20 -0
  22. data/docs/ConsulterFactureResponse.md +34 -0
  23. data/docs/ConsulterStructureRequest.md +22 -0
  24. data/docs/ConsulterStructureResponse.md +34 -0
  25. data/docs/CredentialsAFNOR.md +22 -0
  26. data/docs/CredentialsChorusPro.md +26 -0
  27. data/docs/Destinataire.md +28 -0
  28. data/docs/Destination.md +79 -0
  29. data/docs/DestinationAFNOR.md +24 -0
  30. data/docs/DestinationChorusPro.md +20 -0
  31. data/docs/DonneesFactureSimplifiees.md +34 -0
  32. data/docs/ErrorLevel.md +15 -0
  33. data/docs/ErrorSource.md +15 -0
  34. data/docs/FactureEnrichieInfo.md +32 -0
  35. data/docs/FactureFacturX.md +46 -0
  36. data/docs/FormatSortie.md +15 -0
  37. data/docs/Fournisseur.md +36 -0
  38. data/docs/GenerateCertificateRequest.md +38 -0
  39. data/docs/GenerateCertificateResponse.md +32 -0
  40. data/docs/HTTPValidationError.md +18 -0
  41. data/docs/InformationSignatureAPI.md +28 -0
  42. data/docs/LigneDePoste.md +46 -0
  43. data/docs/LigneDePosteMontantRemiseHt.md +15 -0
  44. data/docs/LigneDePosteTauxTvaManuel.md +15 -0
  45. data/docs/LigneDeTVA.md +26 -0
  46. data/docs/ModeDepot.md +15 -0
  47. data/docs/ModePaiement.md +15 -0
  48. data/docs/MontantAPayer.md +15 -0
  49. data/docs/MontantBaseHt.md +15 -0
  50. data/docs/MontantHtTotal.md +15 -0
  51. data/docs/MontantRemiseGlobaleTtc.md +15 -0
  52. data/docs/MontantTotal.md +30 -0
  53. data/docs/MontantTotalAcompte.md +15 -0
  54. data/docs/MontantTotalLigneHt.md +15 -0
  55. data/docs/MontantTtcTotal.md +15 -0
  56. data/docs/MontantTva.md +15 -0
  57. data/docs/MontantTvaLigne.md +15 -0
  58. data/docs/MontantTvaTotal.md +15 -0
  59. data/docs/MontantUnitaireHt.md +15 -0
  60. data/docs/Note.md +20 -0
  61. data/docs/ObtenirIdChorusProRequest.md +22 -0
  62. data/docs/ObtenirIdChorusProResponse.md +24 -0
  63. data/docs/OptionsProcessing.md +24 -0
  64. data/docs/PDFFacturXInfo.md +22 -0
  65. data/docs/ParametresSignature.md +34 -0
  66. data/docs/ParametresStructure.md +22 -0
  67. data/docs/PieceJointeComplementaire.md +26 -0
  68. data/docs/ProfilAPI.md +15 -0
  69. data/docs/Quantite.md +15 -0
  70. data/docs/RechercherServicesResponse.md +24 -0
  71. data/docs/RechercherStructureRequest.md +26 -0
  72. data/docs/RechercherStructureResponse.md +24 -0
  73. data/docs/References.md +32 -0
  74. data/docs/ReponseTache.md +18 -0
  75. data/docs/ReponseValidationErreur.md +18 -0
  76. data/docs/ReponseValidationSucces.md +18 -0
  77. data/docs/ResultatAFNOR.md +26 -0
  78. data/docs/ResultatChorusPro.md +22 -0
  79. data/docs/ResultatValidationPDFAPI.md +62 -0
  80. data/docs/SantApi.md +131 -0
  81. data/docs/SchemeID.md +15 -0
  82. data/docs/ServiceStructure.md +24 -0
  83. data/docs/SignatureInfo.md +22 -0
  84. data/docs/SoumettreFactureCompleteRequest.md +26 -0
  85. data/docs/SoumettreFactureCompleteResponse.md +34 -0
  86. data/docs/SoumettreFactureRequest.md +46 -0
  87. data/docs/SoumettreFactureResponse.md +24 -0
  88. data/docs/StatutCelery.md +15 -0
  89. data/docs/StatutFacture.md +22 -0
  90. data/docs/StatutTache.md +22 -0
  91. data/docs/StructureInfo.md +26 -0
  92. data/docs/Tauxmanuel.md +15 -0
  93. data/docs/TraitementFactureApi.md +831 -0
  94. data/docs/TypeFacture.md +15 -0
  95. data/docs/TypeTVA.md +15 -0
  96. data/docs/Unite.md +15 -0
  97. data/docs/UtilisateurApi.md +74 -0
  98. data/docs/ValidationError.md +22 -0
  99. data/docs/ValidationErrorDetail.md +26 -0
  100. data/docs/ValidationErrorLocInner.md +15 -0
  101. data/factpulse.gemspec +39 -0
  102. data/git_push.sh +57 -0
  103. data/lib/factpulse/api/afnorpdppa_api.rb +79 -0
  104. data/lib/factpulse/api/afnorpdppa_directory_service_api.rb +1183 -0
  105. data/lib/factpulse/api/afnorpdppa_flow_service_api.rb +256 -0
  106. data/lib/factpulse/api/chorus_pro_api.rb +1103 -0
  107. data/lib/factpulse/api/sant_api.rb +136 -0
  108. data/lib/factpulse/api/traitement_facture_api.rb +835 -0
  109. data/lib/factpulse/api/utilisateur_api.rb +79 -0
  110. data/lib/factpulse/api_client.rb +397 -0
  111. data/lib/factpulse/api_error.rb +58 -0
  112. data/lib/factpulse/api_model_base.rb +88 -0
  113. data/lib/factpulse/configuration.rb +308 -0
  114. data/lib/factpulse/helpers/client.rb +300 -0
  115. data/lib/factpulse/helpers/exceptions.rb +21 -0
  116. data/lib/factpulse/helpers.rb +13 -0
  117. data/lib/factpulse/models/adresse_electronique.rb +196 -0
  118. data/lib/factpulse/models/adresse_postale.rb +189 -0
  119. data/lib/factpulse/models/api_error.rb +205 -0
  120. data/lib/factpulse/models/cadre_de_facturation.rb +207 -0
  121. data/lib/factpulse/models/categorie_tva.rb +47 -0
  122. data/lib/factpulse/models/certificate_info_response.rb +446 -0
  123. data/lib/factpulse/models/chorus_pro_credentials.rb +259 -0
  124. data/lib/factpulse/models/code_cadre_facturation.rb +42 -0
  125. data/lib/factpulse/models/code_raison_reduction.rb +45 -0
  126. data/lib/factpulse/models/consulter_facture_request.rb +176 -0
  127. data/lib/factpulse/models/consulter_facture_response.rb +261 -0
  128. data/lib/factpulse/models/consulter_structure_request.rb +188 -0
  129. data/lib/factpulse/models/consulter_structure_response.rb +261 -0
  130. data/lib/factpulse/models/credentials_afnor.rb +169 -0
  131. data/lib/factpulse/models/credentials_chorus_pro.rb +191 -0
  132. data/lib/factpulse/models/destinataire.rb +215 -0
  133. data/lib/factpulse/models/destination.rb +56 -0
  134. data/lib/factpulse/models/destination_afnor.rb +228 -0
  135. data/lib/factpulse/models/destination_chorus_pro.rb +194 -0
  136. data/lib/factpulse/models/donnees_facture_simplifiees.rb +342 -0
  137. data/lib/factpulse/models/error_level.rb +40 -0
  138. data/lib/factpulse/models/error_source.rb +46 -0
  139. data/lib/factpulse/models/facture_enrichie_info.rb +348 -0
  140. data/lib/factpulse/models/facture_factur_x.rb +443 -0
  141. data/lib/factpulse/models/format_sortie.rb +40 -0
  142. data/lib/factpulse/models/fournisseur.rb +271 -0
  143. data/lib/factpulse/models/generate_certificate_request.rb +323 -0
  144. data/lib/factpulse/models/generate_certificate_response.rb +254 -0
  145. data/lib/factpulse/models/http_validation_error.rb +149 -0
  146. data/lib/factpulse/models/information_signature_api.rb +216 -0
  147. data/lib/factpulse/models/ligne_de_poste.rb +390 -0
  148. data/lib/factpulse/models/ligne_de_poste_montant_remise_ht.rb +104 -0
  149. data/lib/factpulse/models/ligne_de_poste_taux_tva_manuel.rb +104 -0
  150. data/lib/factpulse/models/ligne_de_tva.rb +242 -0
  151. data/lib/factpulse/models/mode_depot.rb +41 -0
  152. data/lib/factpulse/models/mode_paiement.rb +44 -0
  153. data/lib/factpulse/models/montant_a_payer.rb +104 -0
  154. data/lib/factpulse/models/montant_base_ht.rb +104 -0
  155. data/lib/factpulse/models/montant_ht_total.rb +104 -0
  156. data/lib/factpulse/models/montant_remise_globale_ttc.rb +104 -0
  157. data/lib/factpulse/models/montant_total.rb +272 -0
  158. data/lib/factpulse/models/montant_total_acompte.rb +104 -0
  159. data/lib/factpulse/models/montant_total_ligne_ht.rb +104 -0
  160. data/lib/factpulse/models/montant_ttc_total.rb +104 -0
  161. data/lib/factpulse/models/montant_tva.rb +104 -0
  162. data/lib/factpulse/models/montant_tva_ligne.rb +104 -0
  163. data/lib/factpulse/models/montant_tva_total.rb +104 -0
  164. data/lib/factpulse/models/montant_unitaire_ht.rb +104 -0
  165. data/lib/factpulse/models/note.rb +175 -0
  166. data/lib/factpulse/models/obtenir_id_chorus_pro_request.rb +188 -0
  167. data/lib/factpulse/models/obtenir_id_chorus_pro_response.rb +230 -0
  168. data/lib/factpulse/models/options_processing.rb +207 -0
  169. data/lib/factpulse/models/parametres_signature.rb +235 -0
  170. data/lib/factpulse/models/parametres_structure.rb +175 -0
  171. data/lib/factpulse/models/pdf_factur_x_info.rb +205 -0
  172. data/lib/factpulse/models/piece_jointe_complementaire.rb +269 -0
  173. data/lib/factpulse/models/profil_api.rb +42 -0
  174. data/lib/factpulse/models/quantite.rb +104 -0
  175. data/lib/factpulse/models/rechercher_services_response.rb +214 -0
  176. data/lib/factpulse/models/rechercher_structure_request.rb +191 -0
  177. data/lib/factpulse/models/rechercher_structure_response.rb +216 -0
  178. data/lib/factpulse/models/references.rb +290 -0
  179. data/lib/factpulse/models/reponse_tache.rb +165 -0
  180. data/lib/factpulse/models/reponse_validation_erreur.rb +167 -0
  181. data/lib/factpulse/models/reponse_validation_succes.rb +165 -0
  182. data/lib/factpulse/models/resultat_afnor.rb +240 -0
  183. data/lib/factpulse/models/resultat_chorus_pro.rb +186 -0
  184. data/lib/factpulse/models/resultat_validation_pdfapi.rb +523 -0
  185. data/lib/factpulse/models/scheme_id.rb +43 -0
  186. data/lib/factpulse/models/service_structure.rb +247 -0
  187. data/lib/factpulse/models/signature_info.rb +186 -0
  188. data/lib/factpulse/models/soumettre_facture_complete_request.rb +239 -0
  189. data/lib/factpulse/models/soumettre_facture_complete_response.rb +355 -0
  190. data/lib/factpulse/models/soumettre_facture_request.rb +388 -0
  191. data/lib/factpulse/models/soumettre_facture_response.rb +213 -0
  192. data/lib/factpulse/models/statut_celery.rb +43 -0
  193. data/lib/factpulse/models/statut_facture.rb +203 -0
  194. data/lib/factpulse/models/statut_tache.rb +226 -0
  195. data/lib/factpulse/models/structure_info.rb +274 -0
  196. data/lib/factpulse/models/tauxmanuel.rb +104 -0
  197. data/lib/factpulse/models/type_facture.rb +40 -0
  198. data/lib/factpulse/models/type_tva.rb +42 -0
  199. data/lib/factpulse/models/unite.rb +44 -0
  200. data/lib/factpulse/models/validation_error.rb +218 -0
  201. data/lib/factpulse/models/validation_error_detail.rb +245 -0
  202. data/lib/factpulse/models/validation_error_loc_inner.rb +103 -0
  203. data/lib/factpulse/version.rb +15 -0
  204. data/lib/factpulse.rb +133 -0
  205. metadata +345 -0
@@ -0,0 +1,1103 @@
1
+ =begin
2
+ #API REST FactPulse
3
+
4
+ # API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }' ``` **Paramètre optionnel `client_uid` :** Pour sélectionner les credentials d'un client spécifique (PA/PDP, Chorus Pro, certificats de signature), ajoutez `client_uid` : ```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\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }' ``` Le `client_uid` sera inclus dans le JWT et permettra à l'API d'utiliser automatiquement : - Les credentials AFNOR/PDP configurés pour ce client - Les credentials Chorus Pro configurés pour ce client - Les certificats de signature électronique configurés pour ce client **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l'accès - ✅ Intégration facile dans n'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l'automatisation ### 📚 Documentation complète Pour plus d'informations sur l'authentification et l'utilisation de l'API : https://www.factpulse.fr/documentation-api/
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module FactPulse
16
+ class ChorusProApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Ajouter une pièce jointe
23
+ # 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.
24
+ # @param request_body [Hash<String, Object>]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [Object]
27
+ def ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post(request_body, opts = {})
28
+ data, _status_code, _headers = ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_with_http_info(request_body, opts)
29
+ data
30
+ end
31
+
32
+ # Ajouter une pièce jointe
33
+ # Ajoute une pièce jointe au compte utilisateur courant. **Taille max** : 10 Mo par fichier **Payload exemple** : &#x60;&#x60;&#x60;json { \&quot;pieceJointeFichier\&quot;: \&quot;JVBERi0xLjQKJeLjz9MKNSAwIG9iago8P...\&quot;, \&quot;pieceJointeNom\&quot;: \&quot;bon_commande.pdf\&quot;, \&quot;pieceJointeTypeMime\&quot;: \&quot;application/pdf\&quot;, \&quot;pieceJointeExtension\&quot;: \&quot;PDF\&quot; } &#x60;&#x60;&#x60; **Retour** : L&#39;ID de la pièce jointe (&#x60;pieceJointeIdFichier&#x60;) à utiliser ensuite dans &#x60;/factures/completer&#x60;. **Extensions acceptées** : PDF, JPG, PNG, ZIP, XML, etc.
34
+ # @param request_body [Hash<String, Object>]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
37
+ def ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_with_http_info(request_body, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post ...'
40
+ end
41
+ # verify the required parameter 'request_body' is set
42
+ if @api_client.config.client_side_validation && request_body.nil?
43
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post"
44
+ end
45
+ # resource path
46
+ local_var_path = '/api/v1/chorus-pro/transverses/ajouter-fichier'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'Object'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"ChorusProApi.ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: ChorusProApi#ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Compléter une facture suspendue (Fournisseur)
91
+ # 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.
92
+ # @param request_body [Hash<String, Object>]
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [Object]
95
+ def completer_facture_api_v1_chorus_pro_factures_completer_post(request_body, opts = {})
96
+ data, _status_code, _headers = completer_facture_api_v1_chorus_pro_factures_completer_post_with_http_info(request_body, opts)
97
+ data
98
+ end
99
+
100
+ # Compléter une facture suspendue (Fournisseur)
101
+ # 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** : &#x60;&#x60;&#x60;json { \&quot;identifiantFactureCPP\&quot;: 12345, \&quot;commentaire\&quot;: \&quot;Voici les justificatifs demandés\&quot;, \&quot;listePiecesJointes\&quot;: [ { \&quot;pieceJointeIdFichier\&quot;: 98765, \&quot;pieceJointeNom\&quot;: \&quot;bon_commande.pdf\&quot; } ] } &#x60;&#x60;&#x60; **Note** : Les pièces jointes doivent d&#39;abord être uploadées via &#x60;/transverses/ajouter-fichier&#x60;. **Après complétion** : La facture repasse au statut MISE_A_DISPOSITION.
102
+ # @param request_body [Hash<String, Object>]
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
105
+ def completer_facture_api_v1_chorus_pro_factures_completer_post_with_http_info(request_body, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.completer_facture_api_v1_chorus_pro_factures_completer_post ...'
108
+ end
109
+ # verify the required parameter 'request_body' is set
110
+ if @api_client.config.client_side_validation && request_body.nil?
111
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.completer_facture_api_v1_chorus_pro_factures_completer_post"
112
+ end
113
+ # resource path
114
+ local_var_path = '/api/v1/chorus-pro/factures/completer'
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
+ # HTTP header 'Content-Type'
124
+ content_type = @api_client.select_header_content_type(['application/json'])
125
+ if !content_type.nil?
126
+ header_params['Content-Type'] = content_type
127
+ end
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type] || 'Object'
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"ChorusProApi.completer_facture_api_v1_chorus_pro_factures_completer_post",
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type
149
+ )
150
+
151
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: ChorusProApi#completer_facture_api_v1_chorus_pro_factures_completer_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # Consulter le statut d'une facture
159
+ # 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.
160
+ # @param consulter_facture_request [ConsulterFactureRequest]
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [ConsulterFactureResponse]
163
+ def consulter_facture_api_v1_chorus_pro_factures_consulter_post(consulter_facture_request, opts = {})
164
+ data, _status_code, _headers = consulter_facture_api_v1_chorus_pro_factures_consulter_post_with_http_info(consulter_facture_request, opts)
165
+ data
166
+ end
167
+
168
+ # Consulter le statut d&#39;une facture
169
+ # Récupère les informations et le statut actuel d&#39;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&#39;usage** : - Suivre l&#39;évolution du traitement d&#39;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&#39;évolution du statut.
170
+ # @param consulter_facture_request [ConsulterFactureRequest]
171
+ # @param [Hash] opts the optional parameters
172
+ # @return [Array<(ConsulterFactureResponse, Integer, Hash)>] ConsulterFactureResponse data, response status code and response headers
173
+ def consulter_facture_api_v1_chorus_pro_factures_consulter_post_with_http_info(consulter_facture_request, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.consulter_facture_api_v1_chorus_pro_factures_consulter_post ...'
176
+ end
177
+ # verify the required parameter 'consulter_facture_request' is set
178
+ if @api_client.config.client_side_validation && consulter_facture_request.nil?
179
+ fail ArgumentError, "Missing the required parameter 'consulter_facture_request' when calling ChorusProApi.consulter_facture_api_v1_chorus_pro_factures_consulter_post"
180
+ end
181
+ # resource path
182
+ local_var_path = '/api/v1/chorus-pro/factures/consulter'
183
+
184
+ # query parameters
185
+ query_params = opts[:query_params] || {}
186
+
187
+ # header parameters
188
+ header_params = opts[:header_params] || {}
189
+ # HTTP header 'Accept' (if needed)
190
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
191
+ # HTTP header 'Content-Type'
192
+ content_type = @api_client.select_header_content_type(['application/json'])
193
+ if !content_type.nil?
194
+ header_params['Content-Type'] = content_type
195
+ end
196
+
197
+ # form parameters
198
+ form_params = opts[:form_params] || {}
199
+
200
+ # http body (model)
201
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(consulter_facture_request)
202
+
203
+ # return_type
204
+ return_type = opts[:debug_return_type] || 'ConsulterFactureResponse'
205
+
206
+ # auth_names
207
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
208
+
209
+ new_options = opts.merge(
210
+ :operation => :"ChorusProApi.consulter_facture_api_v1_chorus_pro_factures_consulter_post",
211
+ :header_params => header_params,
212
+ :query_params => query_params,
213
+ :form_params => form_params,
214
+ :body => post_body,
215
+ :auth_names => auth_names,
216
+ :return_type => return_type
217
+ )
218
+
219
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug "API called: ChorusProApi#consulter_facture_api_v1_chorus_pro_factures_consulter_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
222
+ end
223
+ return data, status_code, headers
224
+ end
225
+
226
+ # Consulter les détails d'une structure
227
+ # 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.
228
+ # @param consulter_structure_request [ConsulterStructureRequest]
229
+ # @param [Hash] opts the optional parameters
230
+ # @return [ConsulterStructureResponse]
231
+ def consulter_structure_api_v1_chorus_pro_structures_consulter_post(consulter_structure_request, opts = {})
232
+ data, _status_code, _headers = consulter_structure_api_v1_chorus_pro_structures_consulter_post_with_http_info(consulter_structure_request, opts)
233
+ data
234
+ end
235
+
236
+ # Consulter les détails d&#39;une structure
237
+ # Récupère les informations détaillées d&#39;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&#39;engagement sont requis pour soumettre une facture **Étape typique** : Appelée après &#x60;rechercher-structures&#x60; pour savoir quels champs sont obligatoires avant de soumettre une facture.
238
+ # @param consulter_structure_request [ConsulterStructureRequest]
239
+ # @param [Hash] opts the optional parameters
240
+ # @return [Array<(ConsulterStructureResponse, Integer, Hash)>] ConsulterStructureResponse data, response status code and response headers
241
+ def consulter_structure_api_v1_chorus_pro_structures_consulter_post_with_http_info(consulter_structure_request, opts = {})
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.consulter_structure_api_v1_chorus_pro_structures_consulter_post ...'
244
+ end
245
+ # verify the required parameter 'consulter_structure_request' is set
246
+ if @api_client.config.client_side_validation && consulter_structure_request.nil?
247
+ fail ArgumentError, "Missing the required parameter 'consulter_structure_request' when calling ChorusProApi.consulter_structure_api_v1_chorus_pro_structures_consulter_post"
248
+ end
249
+ # resource path
250
+ local_var_path = '/api/v1/chorus-pro/structures/consulter'
251
+
252
+ # query parameters
253
+ query_params = opts[:query_params] || {}
254
+
255
+ # header parameters
256
+ header_params = opts[:header_params] || {}
257
+ # HTTP header 'Accept' (if needed)
258
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
259
+ # HTTP header 'Content-Type'
260
+ content_type = @api_client.select_header_content_type(['application/json'])
261
+ if !content_type.nil?
262
+ header_params['Content-Type'] = content_type
263
+ end
264
+
265
+ # form parameters
266
+ form_params = opts[:form_params] || {}
267
+
268
+ # http body (model)
269
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(consulter_structure_request)
270
+
271
+ # return_type
272
+ return_type = opts[:debug_return_type] || 'ConsulterStructureResponse'
273
+
274
+ # auth_names
275
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
276
+
277
+ new_options = opts.merge(
278
+ :operation => :"ChorusProApi.consulter_structure_api_v1_chorus_pro_structures_consulter_post",
279
+ :header_params => header_params,
280
+ :query_params => query_params,
281
+ :form_params => form_params,
282
+ :body => post_body,
283
+ :auth_names => auth_names,
284
+ :return_type => return_type
285
+ )
286
+
287
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug "API called: ChorusProApi#consulter_structure_api_v1_chorus_pro_structures_consulter_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
290
+ end
291
+ return data, status_code, headers
292
+ end
293
+
294
+ # Lister les services d'une structure
295
+ # 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)
296
+ # @param id_structure_cpp [Integer]
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [RechercherServicesResponse]
299
+ def lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get(id_structure_cpp, opts = {})
300
+ data, _status_code, _headers = lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_with_http_info(id_structure_cpp, opts)
301
+ data
302
+ end
303
+
304
+ # Lister les services d&#39;une structure
305
+ # Récupère la liste des services actifs d&#39;une structure publique. **Cas d&#39;usage** : - Lister les services disponibles pour une administration - Vérifier qu&#39;un code service existe avant de soumettre une facture **Retour** : - Liste des services avec leur code, libellé et statut (actif/inactif)
306
+ # @param id_structure_cpp [Integer]
307
+ # @param [Hash] opts the optional parameters
308
+ # @return [Array<(RechercherServicesResponse, Integer, Hash)>] RechercherServicesResponse data, response status code and response headers
309
+ def lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_with_http_info(id_structure_cpp, opts = {})
310
+ if @api_client.config.debugging
311
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get ...'
312
+ end
313
+ # verify the required parameter 'id_structure_cpp' is set
314
+ if @api_client.config.client_side_validation && id_structure_cpp.nil?
315
+ fail ArgumentError, "Missing the required parameter 'id_structure_cpp' when calling ChorusProApi.lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get"
316
+ end
317
+ # resource path
318
+ local_var_path = '/api/v1/chorus-pro/structures/{id_structure_cpp}/services'.sub('{' + 'id_structure_cpp' + '}', CGI.escape(id_structure_cpp.to_s))
319
+
320
+ # query parameters
321
+ query_params = opts[:query_params] || {}
322
+
323
+ # header parameters
324
+ header_params = opts[:header_params] || {}
325
+ # HTTP header 'Accept' (if needed)
326
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
327
+
328
+ # form parameters
329
+ form_params = opts[:form_params] || {}
330
+
331
+ # http body (model)
332
+ post_body = opts[:debug_body]
333
+
334
+ # return_type
335
+ return_type = opts[:debug_return_type] || 'RechercherServicesResponse'
336
+
337
+ # auth_names
338
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
339
+
340
+ new_options = opts.merge(
341
+ :operation => :"ChorusProApi.lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get",
342
+ :header_params => header_params,
343
+ :query_params => query_params,
344
+ :form_params => form_params,
345
+ :body => post_body,
346
+ :auth_names => auth_names,
347
+ :return_type => return_type
348
+ )
349
+
350
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
351
+ if @api_client.config.debugging
352
+ @api_client.config.logger.debug "API called: ChorusProApi#lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
353
+ end
354
+ return data, status_code, headers
355
+ end
356
+
357
+ # Utilitaire : Obtenir l'ID Chorus Pro depuis un SIRET
358
+ # **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.
359
+ # @param obtenir_id_chorus_pro_request [ObtenirIdChorusProRequest]
360
+ # @param [Hash] opts the optional parameters
361
+ # @return [ObtenirIdChorusProResponse]
362
+ def obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post(obtenir_id_chorus_pro_request, opts = {})
363
+ data, _status_code, _headers = obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post_with_http_info(obtenir_id_chorus_pro_request, opts)
364
+ data
365
+ end
366
+
367
+ # Utilitaire : Obtenir l&#39;ID Chorus Pro depuis un SIRET
368
+ # **Utilitaire pratique** pour obtenir l&#39;ID Chorus Pro d&#39;une structure à partir de son SIRET. Cette fonction wrapper combine : 1. Recherche de la structure par SIRET 2. Extraction de l&#39;&#x60;id_structure_cpp&#x60; si une seule structure est trouvée **Retour** : - &#x60;id_structure_cpp&#x60; : ID Chorus Pro (0 si non trouvé ou si plusieurs résultats) - &#x60;designation_structure&#x60; : Nom de la structure (si trouvée) - &#x60;message&#x60; : Message explicatif **Cas d&#39;usage** : - Raccourci pour obtenir directement l&#39;ID Chorus Pro avant de soumettre une facture - Alternative simplifiée à &#x60;rechercher-structures&#x60; + extraction manuelle de l&#39;ID **Note** : Si plusieurs structures correspondent au SIRET (rare), retourne 0 et un message d&#39;erreur.
369
+ # @param obtenir_id_chorus_pro_request [ObtenirIdChorusProRequest]
370
+ # @param [Hash] opts the optional parameters
371
+ # @return [Array<(ObtenirIdChorusProResponse, Integer, Hash)>] ObtenirIdChorusProResponse data, response status code and response headers
372
+ def obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post_with_http_info(obtenir_id_chorus_pro_request, opts = {})
373
+ if @api_client.config.debugging
374
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post ...'
375
+ end
376
+ # verify the required parameter 'obtenir_id_chorus_pro_request' is set
377
+ if @api_client.config.client_side_validation && obtenir_id_chorus_pro_request.nil?
378
+ fail ArgumentError, "Missing the required parameter 'obtenir_id_chorus_pro_request' when calling ChorusProApi.obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post"
379
+ end
380
+ # resource path
381
+ local_var_path = '/api/v1/chorus-pro/structures/obtenir-id-depuis-siret'
382
+
383
+ # query parameters
384
+ query_params = opts[:query_params] || {}
385
+
386
+ # header parameters
387
+ header_params = opts[:header_params] || {}
388
+ # HTTP header 'Accept' (if needed)
389
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
390
+ # HTTP header 'Content-Type'
391
+ content_type = @api_client.select_header_content_type(['application/json'])
392
+ if !content_type.nil?
393
+ header_params['Content-Type'] = content_type
394
+ end
395
+
396
+ # form parameters
397
+ form_params = opts[:form_params] || {}
398
+
399
+ # http body (model)
400
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(obtenir_id_chorus_pro_request)
401
+
402
+ # return_type
403
+ return_type = opts[:debug_return_type] || 'ObtenirIdChorusProResponse'
404
+
405
+ # auth_names
406
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
407
+
408
+ new_options = opts.merge(
409
+ :operation => :"ChorusProApi.obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post",
410
+ :header_params => header_params,
411
+ :query_params => query_params,
412
+ :form_params => form_params,
413
+ :body => post_body,
414
+ :auth_names => auth_names,
415
+ :return_type => return_type
416
+ )
417
+
418
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
419
+ if @api_client.config.debugging
420
+ @api_client.config.logger.debug "API called: ChorusProApi#obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
421
+ end
422
+ return data, status_code, headers
423
+ end
424
+
425
+ # Rechercher factures reçues (Destinataire)
426
+ # 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.
427
+ # @param request_body [Hash<String, Object>]
428
+ # @param [Hash] opts the optional parameters
429
+ # @return [Object]
430
+ def rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post(request_body, opts = {})
431
+ data, _status_code, _headers = rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_with_http_info(request_body, opts)
432
+ data
433
+ end
434
+
435
+ # Rechercher factures reçues (Destinataire)
436
+ # 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** : &#x60;factureTelechargeeParDestinataire&#x60; permet de savoir si la facture a déjà été téléchargée.
437
+ # @param request_body [Hash<String, Object>]
438
+ # @param [Hash] opts the optional parameters
439
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
440
+ def rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_with_http_info(request_body, opts = {})
441
+ if @api_client.config.debugging
442
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post ...'
443
+ end
444
+ # verify the required parameter 'request_body' is set
445
+ if @api_client.config.client_side_validation && request_body.nil?
446
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post"
447
+ end
448
+ # resource path
449
+ local_var_path = '/api/v1/chorus-pro/factures/rechercher-destinataire'
450
+
451
+ # query parameters
452
+ query_params = opts[:query_params] || {}
453
+
454
+ # header parameters
455
+ header_params = opts[:header_params] || {}
456
+ # HTTP header 'Accept' (if needed)
457
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
458
+ # HTTP header 'Content-Type'
459
+ content_type = @api_client.select_header_content_type(['application/json'])
460
+ if !content_type.nil?
461
+ header_params['Content-Type'] = content_type
462
+ end
463
+
464
+ # form parameters
465
+ form_params = opts[:form_params] || {}
466
+
467
+ # http body (model)
468
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
469
+
470
+ # return_type
471
+ return_type = opts[:debug_return_type] || 'Object'
472
+
473
+ # auth_names
474
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
475
+
476
+ new_options = opts.merge(
477
+ :operation => :"ChorusProApi.rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post",
478
+ :header_params => header_params,
479
+ :query_params => query_params,
480
+ :form_params => form_params,
481
+ :body => post_body,
482
+ :auth_names => auth_names,
483
+ :return_type => return_type
484
+ )
485
+
486
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
487
+ if @api_client.config.debugging
488
+ @api_client.config.logger.debug "API called: ChorusProApi#rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
489
+ end
490
+ return data, status_code, headers
491
+ end
492
+
493
+ # Rechercher factures émises (Fournisseur)
494
+ # 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é
495
+ # @param request_body [Hash<String, Object>]
496
+ # @param [Hash] opts the optional parameters
497
+ # @return [Object]
498
+ def rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post(request_body, opts = {})
499
+ data, _status_code, _headers = rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_with_http_info(request_body, opts)
500
+ data
501
+ end
502
+
503
+ # Rechercher factures émises (Fournisseur)
504
+ # Recherche les factures émises par le fournisseur connecté. **Filtres disponibles** : - Numéro de facture - Dates (début/fin) - Statut - Structure destinataire - Montant **Cas d&#39;usage** : - Suivi des factures émises - Vérification des statuts - Export pour comptabilité
505
+ # @param request_body [Hash<String, Object>]
506
+ # @param [Hash] opts the optional parameters
507
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
508
+ def rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_with_http_info(request_body, opts = {})
509
+ if @api_client.config.debugging
510
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post ...'
511
+ end
512
+ # verify the required parameter 'request_body' is set
513
+ if @api_client.config.client_side_validation && request_body.nil?
514
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post"
515
+ end
516
+ # resource path
517
+ local_var_path = '/api/v1/chorus-pro/factures/rechercher-fournisseur'
518
+
519
+ # query parameters
520
+ query_params = opts[:query_params] || {}
521
+
522
+ # header parameters
523
+ header_params = opts[:header_params] || {}
524
+ # HTTP header 'Accept' (if needed)
525
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
526
+ # HTTP header 'Content-Type'
527
+ content_type = @api_client.select_header_content_type(['application/json'])
528
+ if !content_type.nil?
529
+ header_params['Content-Type'] = content_type
530
+ end
531
+
532
+ # form parameters
533
+ form_params = opts[:form_params] || {}
534
+
535
+ # http body (model)
536
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
537
+
538
+ # return_type
539
+ return_type = opts[:debug_return_type] || 'Object'
540
+
541
+ # auth_names
542
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
543
+
544
+ new_options = opts.merge(
545
+ :operation => :"ChorusProApi.rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post",
546
+ :header_params => header_params,
547
+ :query_params => query_params,
548
+ :form_params => form_params,
549
+ :body => post_body,
550
+ :auth_names => auth_names,
551
+ :return_type => return_type
552
+ )
553
+
554
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
555
+ if @api_client.config.debugging
556
+ @api_client.config.logger.debug "API called: ChorusProApi#rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
557
+ end
558
+ return data, status_code, headers
559
+ end
560
+
561
+ # Rechercher des structures Chorus Pro
562
+ # 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.
563
+ # @param rechercher_structure_request [RechercherStructureRequest]
564
+ # @param [Hash] opts the optional parameters
565
+ # @return [RechercherStructureResponse]
566
+ def rechercher_structures_api_v1_chorus_pro_structures_rechercher_post(rechercher_structure_request, opts = {})
567
+ data, _status_code, _headers = rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_with_http_info(rechercher_structure_request, opts)
568
+ data
569
+ end
570
+
571
+ # Rechercher des structures Chorus Pro
572
+ # Recherche des structures (entreprises, administrations) enregistrées sur Chorus Pro. **Cas d&#39;usage** : - Trouver l&#39;ID Chorus Pro d&#39;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&#39;identifiant - Structures privées uniquement **Étape typique** : Appelée avant &#x60;soumettre-facture&#x60; pour obtenir l&#39;&#x60;id_structure_cpp&#x60; du destinataire.
573
+ # @param rechercher_structure_request [RechercherStructureRequest]
574
+ # @param [Hash] opts the optional parameters
575
+ # @return [Array<(RechercherStructureResponse, Integer, Hash)>] RechercherStructureResponse data, response status code and response headers
576
+ def rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_with_http_info(rechercher_structure_request, opts = {})
577
+ if @api_client.config.debugging
578
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.rechercher_structures_api_v1_chorus_pro_structures_rechercher_post ...'
579
+ end
580
+ # verify the required parameter 'rechercher_structure_request' is set
581
+ if @api_client.config.client_side_validation && rechercher_structure_request.nil?
582
+ fail ArgumentError, "Missing the required parameter 'rechercher_structure_request' when calling ChorusProApi.rechercher_structures_api_v1_chorus_pro_structures_rechercher_post"
583
+ end
584
+ # resource path
585
+ local_var_path = '/api/v1/chorus-pro/structures/rechercher'
586
+
587
+ # query parameters
588
+ query_params = opts[:query_params] || {}
589
+
590
+ # header parameters
591
+ header_params = opts[:header_params] || {}
592
+ # HTTP header 'Accept' (if needed)
593
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
594
+ # HTTP header 'Content-Type'
595
+ content_type = @api_client.select_header_content_type(['application/json'])
596
+ if !content_type.nil?
597
+ header_params['Content-Type'] = content_type
598
+ end
599
+
600
+ # form parameters
601
+ form_params = opts[:form_params] || {}
602
+
603
+ # http body (model)
604
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(rechercher_structure_request)
605
+
606
+ # return_type
607
+ return_type = opts[:debug_return_type] || 'RechercherStructureResponse'
608
+
609
+ # auth_names
610
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
611
+
612
+ new_options = opts.merge(
613
+ :operation => :"ChorusProApi.rechercher_structures_api_v1_chorus_pro_structures_rechercher_post",
614
+ :header_params => header_params,
615
+ :query_params => query_params,
616
+ :form_params => form_params,
617
+ :body => post_body,
618
+ :auth_names => auth_names,
619
+ :return_type => return_type
620
+ )
621
+
622
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
623
+ if @api_client.config.debugging
624
+ @api_client.config.logger.debug "API called: ChorusProApi#rechercher_structures_api_v1_chorus_pro_structures_rechercher_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
625
+ end
626
+ return data, status_code, headers
627
+ end
628
+
629
+ # Recycler une facture (Fournisseur)
630
+ # 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.
631
+ # @param request_body [Hash<String, Object>]
632
+ # @param [Hash] opts the optional parameters
633
+ # @return [Object]
634
+ def recycler_facture_api_v1_chorus_pro_factures_recycler_post(request_body, opts = {})
635
+ data, _status_code, _headers = recycler_facture_api_v1_chorus_pro_factures_recycler_post_with_http_info(request_body, opts)
636
+ data
637
+ end
638
+
639
+ # Recycler une facture (Fournisseur)
640
+ # Recycle une facture au statut A_RECYCLER en modifiant les données d&#39;acheminement. **Statut requis** : A_RECYCLER **Champs modifiables** : - Destinataire (&#x60;idStructureCPP&#x60;) - Code service - Numéro d&#39;engagement **Cas d&#39;usage** : - Erreur de destinataire - Changement de service facturation - Mise à jour du numéro d&#39;engagement **Payload exemple** : &#x60;&#x60;&#x60;json { \&quot;identifiantFactureCPP\&quot;: 12345, \&quot;idStructureCPP\&quot;: 67890, \&quot;codeService\&quot;: \&quot;SERVICE_01\&quot;, \&quot;numeroEngagement\&quot;: \&quot;ENG2024001\&quot; } &#x60;&#x60;&#x60; **Note** : La facture conserve son numéro et ses montants, seuls les champs d&#39;acheminement changent.
641
+ # @param request_body [Hash<String, Object>]
642
+ # @param [Hash] opts the optional parameters
643
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
644
+ def recycler_facture_api_v1_chorus_pro_factures_recycler_post_with_http_info(request_body, opts = {})
645
+ if @api_client.config.debugging
646
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.recycler_facture_api_v1_chorus_pro_factures_recycler_post ...'
647
+ end
648
+ # verify the required parameter 'request_body' is set
649
+ if @api_client.config.client_side_validation && request_body.nil?
650
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.recycler_facture_api_v1_chorus_pro_factures_recycler_post"
651
+ end
652
+ # resource path
653
+ local_var_path = '/api/v1/chorus-pro/factures/recycler'
654
+
655
+ # query parameters
656
+ query_params = opts[:query_params] || {}
657
+
658
+ # header parameters
659
+ header_params = opts[:header_params] || {}
660
+ # HTTP header 'Accept' (if needed)
661
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
662
+ # HTTP header 'Content-Type'
663
+ content_type = @api_client.select_header_content_type(['application/json'])
664
+ if !content_type.nil?
665
+ header_params['Content-Type'] = content_type
666
+ end
667
+
668
+ # form parameters
669
+ form_params = opts[:form_params] || {}
670
+
671
+ # http body (model)
672
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
673
+
674
+ # return_type
675
+ return_type = opts[:debug_return_type] || 'Object'
676
+
677
+ # auth_names
678
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
679
+
680
+ new_options = opts.merge(
681
+ :operation => :"ChorusProApi.recycler_facture_api_v1_chorus_pro_factures_recycler_post",
682
+ :header_params => header_params,
683
+ :query_params => query_params,
684
+ :form_params => form_params,
685
+ :body => post_body,
686
+ :auth_names => auth_names,
687
+ :return_type => return_type
688
+ )
689
+
690
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
691
+ if @api_client.config.debugging
692
+ @api_client.config.logger.debug "API called: ChorusProApi#recycler_facture_api_v1_chorus_pro_factures_recycler_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
693
+ end
694
+ return data, status_code, headers
695
+ end
696
+
697
+ # Soumettre une facture à Chorus Pro
698
+ # 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.
699
+ # @param soumettre_facture_request [SoumettreFactureRequest]
700
+ # @param [Hash] opts the optional parameters
701
+ # @return [SoumettreFactureResponse]
702
+ def soumettre_facture_api_v1_chorus_pro_factures_soumettre_post(soumettre_facture_request, opts = {})
703
+ data, _status_code, _headers = soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_with_http_info(soumettre_facture_request, opts)
704
+ data
705
+ end
706
+
707
+ # Soumettre une facture à Chorus Pro
708
+ # Soumet une facture électronique à une structure publique via Chorus Pro. **📋 Workflow complet** : 1. **Uploader le PDF Factur-X** via &#x60;/transverses/ajouter-fichier&#x60; → récupérer &#x60;pieceJointeId&#x60; 2. **Obtenir l&#39;ID structure** via &#x60;/structures/rechercher&#x60; ou &#x60;/structures/obtenir-id-depuis-siret&#x60; 3. **Vérifier les paramètres obligatoires** via &#x60;/structures/consulter&#x60; 4. **Soumettre la facture** avec le &#x60;piece_jointe_principale_id&#x60; obtenu à l&#39;étape 1 **Pré-requis** : 1. Avoir l&#39;&#x60;id_structure_cpp&#x60; du destinataire (via &#x60;/structures/rechercher&#x60;) 2. Connaître les paramètres obligatoires (via &#x60;/structures/consulter&#x60;) : - Code service si &#x60;code_service_doit_etre_renseigne&#x3D;true&#x60; - Numéro d&#39;engagement si &#x60;numero_ej_doit_etre_renseigne&#x3D;true&#x60; 3. Avoir uploadé le PDF Factur-X (via &#x60;/transverses/ajouter-fichier&#x60;) **Format attendu** : - &#x60;piece_jointe_principale_id&#x60; : ID retourné par &#x60;/transverses/ajouter-fichier&#x60; - Montants : Chaînes de caractères avec 2 décimales (ex: \&quot;1250.50\&quot;) - Dates : Format ISO 8601 (YYYY-MM-DD) **Retour** : - &#x60;identifiant_facture_cpp&#x60; : ID Chorus Pro de la facture créée - &#x60;numero_flux_depot&#x60; : 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&#39;informations complémentaires **Note** : Utilisez &#x60;/factures/consulter&#x60; pour suivre l&#39;évolution du statut.
709
+ # @param soumettre_facture_request [SoumettreFactureRequest]
710
+ # @param [Hash] opts the optional parameters
711
+ # @return [Array<(SoumettreFactureResponse, Integer, Hash)>] SoumettreFactureResponse data, response status code and response headers
712
+ def soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_with_http_info(soumettre_facture_request, opts = {})
713
+ if @api_client.config.debugging
714
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.soumettre_facture_api_v1_chorus_pro_factures_soumettre_post ...'
715
+ end
716
+ # verify the required parameter 'soumettre_facture_request' is set
717
+ if @api_client.config.client_side_validation && soumettre_facture_request.nil?
718
+ fail ArgumentError, "Missing the required parameter 'soumettre_facture_request' when calling ChorusProApi.soumettre_facture_api_v1_chorus_pro_factures_soumettre_post"
719
+ end
720
+ # resource path
721
+ local_var_path = '/api/v1/chorus-pro/factures/soumettre'
722
+
723
+ # query parameters
724
+ query_params = opts[:query_params] || {}
725
+
726
+ # header parameters
727
+ header_params = opts[:header_params] || {}
728
+ # HTTP header 'Accept' (if needed)
729
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
730
+ # HTTP header 'Content-Type'
731
+ content_type = @api_client.select_header_content_type(['application/json'])
732
+ if !content_type.nil?
733
+ header_params['Content-Type'] = content_type
734
+ end
735
+
736
+ # form parameters
737
+ form_params = opts[:form_params] || {}
738
+
739
+ # http body (model)
740
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(soumettre_facture_request)
741
+
742
+ # return_type
743
+ return_type = opts[:debug_return_type] || 'SoumettreFactureResponse'
744
+
745
+ # auth_names
746
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
747
+
748
+ new_options = opts.merge(
749
+ :operation => :"ChorusProApi.soumettre_facture_api_v1_chorus_pro_factures_soumettre_post",
750
+ :header_params => header_params,
751
+ :query_params => query_params,
752
+ :form_params => form_params,
753
+ :body => post_body,
754
+ :auth_names => auth_names,
755
+ :return_type => return_type
756
+ )
757
+
758
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
759
+ if @api_client.config.debugging
760
+ @api_client.config.logger.debug "API called: ChorusProApi#soumettre_facture_api_v1_chorus_pro_factures_soumettre_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
761
+ end
762
+ return data, status_code, headers
763
+ end
764
+
765
+ # Télécharger un groupe de factures
766
+ # 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.
767
+ # @param request_body [Hash<String, Object>]
768
+ # @param [Hash] opts the optional parameters
769
+ # @return [Object]
770
+ def telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post(request_body, opts = {})
771
+ data, _status_code, _headers = telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_with_http_info(request_body, opts)
772
+ data
773
+ end
774
+
775
+ # Télécharger un groupe de factures
776
+ # 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** : &#x60;&#x60;&#x60;json { \&quot;listeIdentifiantsFactureCPP\&quot;: [12345, 12346], \&quot;inclurePiecesJointes\&quot;: true, \&quot;formatFichier\&quot;: \&quot;ZIP\&quot; } &#x60;&#x60;&#x60; **Retour** : Le fichier est encodé en base64 dans le champ &#x60;fichierBase64&#x60;. **Note** : Le flag &#x60;factureTelechargeeParDestinataire&#x60; est mis à jour automatiquement.
777
+ # @param request_body [Hash<String, Object>]
778
+ # @param [Hash] opts the optional parameters
779
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
780
+ def telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_with_http_info(request_body, opts = {})
781
+ if @api_client.config.debugging
782
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post ...'
783
+ end
784
+ # verify the required parameter 'request_body' is set
785
+ if @api_client.config.client_side_validation && request_body.nil?
786
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post"
787
+ end
788
+ # resource path
789
+ local_var_path = '/api/v1/chorus-pro/factures/telecharger-groupe'
790
+
791
+ # query parameters
792
+ query_params = opts[:query_params] || {}
793
+
794
+ # header parameters
795
+ header_params = opts[:header_params] || {}
796
+ # HTTP header 'Accept' (if needed)
797
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
798
+ # HTTP header 'Content-Type'
799
+ content_type = @api_client.select_header_content_type(['application/json'])
800
+ if !content_type.nil?
801
+ header_params['Content-Type'] = content_type
802
+ end
803
+
804
+ # form parameters
805
+ form_params = opts[:form_params] || {}
806
+
807
+ # http body (model)
808
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
809
+
810
+ # return_type
811
+ return_type = opts[:debug_return_type] || 'Object'
812
+
813
+ # auth_names
814
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
815
+
816
+ new_options = opts.merge(
817
+ :operation => :"ChorusProApi.telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post",
818
+ :header_params => header_params,
819
+ :query_params => query_params,
820
+ :form_params => form_params,
821
+ :body => post_body,
822
+ :auth_names => auth_names,
823
+ :return_type => return_type
824
+ )
825
+
826
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
827
+ if @api_client.config.debugging
828
+ @api_client.config.logger.debug "API called: ChorusProApi#telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
829
+ end
830
+ return data, status_code, headers
831
+ end
832
+
833
+ # Traiter une facture reçue (Destinataire)
834
+ # 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
835
+ # @param request_body [Hash<String, Object>]
836
+ # @param [Hash] opts the optional parameters
837
+ # @return [Object]
838
+ def traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post(request_body, opts = {})
839
+ data, _status_code, _headers = traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_with_http_info(request_body, opts)
840
+ data
841
+ end
842
+
843
+ # Traiter une facture reçue (Destinataire)
844
+ # Change le statut d&#39;une facture reçue. **Statuts possibles** : - MISE_A_DISPOSITION : Facture acceptée - SUSPENDUE : En attente d&#39;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** : &#x60;&#x60;&#x60;json { \&quot;identifiantFactureCPP\&quot;: 12345, \&quot;nouveauStatut\&quot;: \&quot;REJETEE\&quot;, \&quot;motifRejet\&quot;: \&quot;Facture en double\&quot;, \&quot;commentaire\&quot;: \&quot;Facture déjà reçue sous la référence ABC123\&quot; } &#x60;&#x60;&#x60; **Règles** : - Un motif est **obligatoire** pour SUSPENDUE et REJETEE - Seuls certains statuts sont autorisés selon le statut actuel de la facture
845
+ # @param request_body [Hash<String, Object>]
846
+ # @param [Hash] opts the optional parameters
847
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
848
+ def traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_with_http_info(request_body, opts = {})
849
+ if @api_client.config.debugging
850
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post ...'
851
+ end
852
+ # verify the required parameter 'request_body' is set
853
+ if @api_client.config.client_side_validation && request_body.nil?
854
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post"
855
+ end
856
+ # resource path
857
+ local_var_path = '/api/v1/chorus-pro/factures/traiter-facture-recue'
858
+
859
+ # query parameters
860
+ query_params = opts[:query_params] || {}
861
+
862
+ # header parameters
863
+ header_params = opts[:header_params] || {}
864
+ # HTTP header 'Accept' (if needed)
865
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
866
+ # HTTP header 'Content-Type'
867
+ content_type = @api_client.select_header_content_type(['application/json'])
868
+ if !content_type.nil?
869
+ header_params['Content-Type'] = content_type
870
+ end
871
+
872
+ # form parameters
873
+ form_params = opts[:form_params] || {}
874
+
875
+ # http body (model)
876
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
877
+
878
+ # return_type
879
+ return_type = opts[:debug_return_type] || 'Object'
880
+
881
+ # auth_names
882
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
883
+
884
+ new_options = opts.merge(
885
+ :operation => :"ChorusProApi.traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post",
886
+ :header_params => header_params,
887
+ :query_params => query_params,
888
+ :form_params => form_params,
889
+ :body => post_body,
890
+ :auth_names => auth_names,
891
+ :return_type => return_type
892
+ )
893
+
894
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
895
+ if @api_client.config.debugging
896
+ @api_client.config.logger.debug "API called: ChorusProApi#traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
897
+ end
898
+ return data, status_code, headers
899
+ end
900
+
901
+ # Consulter une facture (Valideur)
902
+ # @param request_body [Hash<String, Object>]
903
+ # @param [Hash] opts the optional parameters
904
+ # @return [Object]
905
+ def valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post(request_body, opts = {})
906
+ data, _status_code, _headers = valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_with_http_info(request_body, opts)
907
+ data
908
+ end
909
+
910
+ # Consulter une facture (Valideur)
911
+ # @param request_body [Hash<String, Object>]
912
+ # @param [Hash] opts the optional parameters
913
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
914
+ def valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_with_http_info(request_body, opts = {})
915
+ if @api_client.config.debugging
916
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post ...'
917
+ end
918
+ # verify the required parameter 'request_body' is set
919
+ if @api_client.config.client_side_validation && request_body.nil?
920
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post"
921
+ end
922
+ # resource path
923
+ local_var_path = '/api/v1/chorus-pro/factures/valideur/consulter'
924
+
925
+ # query parameters
926
+ query_params = opts[:query_params] || {}
927
+
928
+ # header parameters
929
+ header_params = opts[:header_params] || {}
930
+ # HTTP header 'Accept' (if needed)
931
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
932
+ # HTTP header 'Content-Type'
933
+ content_type = @api_client.select_header_content_type(['application/json'])
934
+ if !content_type.nil?
935
+ header_params['Content-Type'] = content_type
936
+ end
937
+
938
+ # form parameters
939
+ form_params = opts[:form_params] || {}
940
+
941
+ # http body (model)
942
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
943
+
944
+ # return_type
945
+ return_type = opts[:debug_return_type] || 'Object'
946
+
947
+ # auth_names
948
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
949
+
950
+ new_options = opts.merge(
951
+ :operation => :"ChorusProApi.valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post",
952
+ :header_params => header_params,
953
+ :query_params => query_params,
954
+ :form_params => form_params,
955
+ :body => post_body,
956
+ :auth_names => auth_names,
957
+ :return_type => return_type
958
+ )
959
+
960
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
961
+ if @api_client.config.debugging
962
+ @api_client.config.logger.debug "API called: ChorusProApi#valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
963
+ end
964
+ return data, status_code, headers
965
+ end
966
+
967
+ # Rechercher factures à valider (Valideur)
968
+ # 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.
969
+ # @param request_body [Hash<String, Object>]
970
+ # @param [Hash] opts the optional parameters
971
+ # @return [Object]
972
+ def valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post(request_body, opts = {})
973
+ data, _status_code, _headers = valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_with_http_info(request_body, opts)
974
+ data
975
+ end
976
+
977
+ # Rechercher factures à valider (Valideur)
978
+ # 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.
979
+ # @param request_body [Hash<String, Object>]
980
+ # @param [Hash] opts the optional parameters
981
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
982
+ def valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_with_http_info(request_body, opts = {})
983
+ if @api_client.config.debugging
984
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post ...'
985
+ end
986
+ # verify the required parameter 'request_body' is set
987
+ if @api_client.config.client_side_validation && request_body.nil?
988
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post"
989
+ end
990
+ # resource path
991
+ local_var_path = '/api/v1/chorus-pro/factures/valideur/rechercher'
992
+
993
+ # query parameters
994
+ query_params = opts[:query_params] || {}
995
+
996
+ # header parameters
997
+ header_params = opts[:header_params] || {}
998
+ # HTTP header 'Accept' (if needed)
999
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1000
+ # HTTP header 'Content-Type'
1001
+ content_type = @api_client.select_header_content_type(['application/json'])
1002
+ if !content_type.nil?
1003
+ header_params['Content-Type'] = content_type
1004
+ end
1005
+
1006
+ # form parameters
1007
+ form_params = opts[:form_params] || {}
1008
+
1009
+ # http body (model)
1010
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
1011
+
1012
+ # return_type
1013
+ return_type = opts[:debug_return_type] || 'Object'
1014
+
1015
+ # auth_names
1016
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
1017
+
1018
+ new_options = opts.merge(
1019
+ :operation => :"ChorusProApi.valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post",
1020
+ :header_params => header_params,
1021
+ :query_params => query_params,
1022
+ :form_params => form_params,
1023
+ :body => post_body,
1024
+ :auth_names => auth_names,
1025
+ :return_type => return_type
1026
+ )
1027
+
1028
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1029
+ if @api_client.config.debugging
1030
+ @api_client.config.logger.debug "API called: ChorusProApi#valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1031
+ end
1032
+ return data, status_code, headers
1033
+ end
1034
+
1035
+ # Valider ou refuser une facture (Valideur)
1036
+ # 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)
1037
+ # @param request_body [Hash<String, Object>]
1038
+ # @param [Hash] opts the optional parameters
1039
+ # @return [Object]
1040
+ def valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post(request_body, opts = {})
1041
+ data, _status_code, _headers = valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_with_http_info(request_body, opts)
1042
+ data
1043
+ end
1044
+
1045
+ # Valider ou refuser une facture (Valideur)
1046
+ # 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)
1047
+ # @param request_body [Hash<String, Object>]
1048
+ # @param [Hash] opts the optional parameters
1049
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
1050
+ def valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_with_http_info(request_body, opts = {})
1051
+ if @api_client.config.debugging
1052
+ @api_client.config.logger.debug 'Calling API: ChorusProApi.valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post ...'
1053
+ end
1054
+ # verify the required parameter 'request_body' is set
1055
+ if @api_client.config.client_side_validation && request_body.nil?
1056
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post"
1057
+ end
1058
+ # resource path
1059
+ local_var_path = '/api/v1/chorus-pro/factures/valideur/traiter'
1060
+
1061
+ # query parameters
1062
+ query_params = opts[:query_params] || {}
1063
+
1064
+ # header parameters
1065
+ header_params = opts[:header_params] || {}
1066
+ # HTTP header 'Accept' (if needed)
1067
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1068
+ # HTTP header 'Content-Type'
1069
+ content_type = @api_client.select_header_content_type(['application/json'])
1070
+ if !content_type.nil?
1071
+ header_params['Content-Type'] = content_type
1072
+ end
1073
+
1074
+ # form parameters
1075
+ form_params = opts[:form_params] || {}
1076
+
1077
+ # http body (model)
1078
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
1079
+
1080
+ # return_type
1081
+ return_type = opts[:debug_return_type] || 'Object'
1082
+
1083
+ # auth_names
1084
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
1085
+
1086
+ new_options = opts.merge(
1087
+ :operation => :"ChorusProApi.valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post",
1088
+ :header_params => header_params,
1089
+ :query_params => query_params,
1090
+ :form_params => form_params,
1091
+ :body => post_body,
1092
+ :auth_names => auth_names,
1093
+ :return_type => return_type
1094
+ )
1095
+
1096
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1097
+ if @api_client.config.debugging
1098
+ @api_client.config.logger.debug "API called: ChorusProApi#valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1099
+ end
1100
+ return data, status_code, headers
1101
+ end
1102
+ end
1103
+ end