Class: FactPulse::ChorusProApi

Inherits:
Object
  • Object
show all
Defined in:
lib/factpulse/api/chorus_pro_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ChorusProApi

Returns a new instance of ChorusProApi.



19
20
21
# File 'lib/factpulse/api/chorus_pro_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/factpulse/api/chorus_pro_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post(request_body, opts = {}) ⇒ Object

Ajouter une pièce jointe 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.

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


27
28
29
30
# File 'lib/factpulse/api/chorus_pro_api.rb', line 27

def ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post(request_body, opts = {})
  data, _status_code, _headers = ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_with_http_info(request_body, opts)
  data
end

#ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Ajouter une pièce jointe 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.

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/factpulse/api/chorus_pro_api.rb', line 37

def ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/transverses/ajouter-fichier'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#completer_facture_api_v1_chorus_pro_factures_completer_post(request_body, opts = {}) ⇒ Object

Compléter une facture suspendue (Fournisseur) 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.

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


95
96
97
98
# File 'lib/factpulse/api/chorus_pro_api.rb', line 95

def completer_facture_api_v1_chorus_pro_factures_completer_post(request_body, opts = {})
  data, _status_code, _headers = completer_facture_api_v1_chorus_pro_factures_completer_post_with_http_info(request_body, opts)
  data
end

#completer_facture_api_v1_chorus_pro_factures_completer_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Compléter une facture suspendue (Fournisseur) 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.

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/factpulse/api/chorus_pro_api.rb', line 105

def completer_facture_api_v1_chorus_pro_factures_completer_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.completer_facture_api_v1_chorus_pro_factures_completer_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.completer_facture_api_v1_chorus_pro_factures_completer_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/factures/completer'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.completer_facture_api_v1_chorus_pro_factures_completer_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#consulter_facture_api_v1_chorus_pro_factures_consulter_post(consulter_facture_request, opts = {}) ⇒ ConsulterFactureResponse

Consulter le statut d’une facture 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.

Parameters:

Returns:



163
164
165
166
# File 'lib/factpulse/api/chorus_pro_api.rb', line 163

def consulter_facture_api_v1_chorus_pro_factures_consulter_post(consulter_facture_request, opts = {})
  data, _status_code, _headers = consulter_facture_api_v1_chorus_pro_factures_consulter_post_with_http_info(consulter_facture_request, opts)
  data
end

#consulter_facture_api_v1_chorus_pro_factures_consulter_post_with_http_info(consulter_facture_request, opts = {}) ⇒ Array<(ConsulterFactureResponse, Integer, Hash)>

Consulter le statut d&#39;une facture 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.

Parameters:

Returns:

  • (Array<(ConsulterFactureResponse, Integer, Hash)>)

    ConsulterFactureResponse data, response status code and response headers



173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/factpulse/api/chorus_pro_api.rb', line 173

def consulter_facture_api_v1_chorus_pro_factures_consulter_post_with_http_info(consulter_facture_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.consulter_facture_api_v1_chorus_pro_factures_consulter_post ...'
  end
  # verify the required parameter 'consulter_facture_request' is set
  if @api_client.config.client_side_validation && consulter_facture_request.nil?
    fail ArgumentError, "Missing the required parameter 'consulter_facture_request' when calling ChorusProApi.consulter_facture_api_v1_chorus_pro_factures_consulter_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/factures/consulter'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(consulter_facture_request)

  # return_type
  return_type = opts[:debug_return_type] || 'ConsulterFactureResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.consulter_facture_api_v1_chorus_pro_factures_consulter_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#consulter_structure_api_v1_chorus_pro_structures_consulter_post(consulter_structure_request, opts = {}) ⇒ ConsulterStructureResponse

Consulter les détails d’une structure 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.

Parameters:

Returns:



231
232
233
234
# File 'lib/factpulse/api/chorus_pro_api.rb', line 231

def consulter_structure_api_v1_chorus_pro_structures_consulter_post(consulter_structure_request, opts = {})
  data, _status_code, _headers = consulter_structure_api_v1_chorus_pro_structures_consulter_post_with_http_info(consulter_structure_request, opts)
  data
end

#consulter_structure_api_v1_chorus_pro_structures_consulter_post_with_http_info(consulter_structure_request, opts = {}) ⇒ Array<(ConsulterStructureResponse, Integer, Hash)>

Consulter les détails d&#39;une structure 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.

Parameters:

Returns:

  • (Array<(ConsulterStructureResponse, Integer, Hash)>)

    ConsulterStructureResponse data, response status code and response headers



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# File 'lib/factpulse/api/chorus_pro_api.rb', line 241

def consulter_structure_api_v1_chorus_pro_structures_consulter_post_with_http_info(consulter_structure_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.consulter_structure_api_v1_chorus_pro_structures_consulter_post ...'
  end
  # verify the required parameter 'consulter_structure_request' is set
  if @api_client.config.client_side_validation && consulter_structure_request.nil?
    fail ArgumentError, "Missing the required parameter 'consulter_structure_request' when calling ChorusProApi.consulter_structure_api_v1_chorus_pro_structures_consulter_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/structures/consulter'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(consulter_structure_request)

  # return_type
  return_type = opts[:debug_return_type] || 'ConsulterStructureResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.consulter_structure_api_v1_chorus_pro_structures_consulter_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get(id_structure_cpp, opts = {}) ⇒ RechercherServicesResponse

Lister les services d’une structure 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)

Parameters:

  • id_structure_cpp (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



299
300
301
302
# File 'lib/factpulse/api/chorus_pro_api.rb', line 299

def lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get(id_structure_cpp, opts = {})
  data, _status_code, _headers = lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_with_http_info(id_structure_cpp, opts)
  data
end

#lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_with_http_info(id_structure_cpp, opts = {}) ⇒ Array<(RechercherServicesResponse, Integer, Hash)>

Lister les services d&#39;une structure 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)

Parameters:

  • id_structure_cpp (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RechercherServicesResponse, Integer, Hash)>)

    RechercherServicesResponse data, response status code and response headers



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/factpulse/api/chorus_pro_api.rb', line 309

def lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_with_http_info(id_structure_cpp, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get ...'
  end
  # verify the required parameter 'id_structure_cpp' is set
  if @api_client.config.client_side_validation && id_structure_cpp.nil?
    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"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/structures/{id_structure_cpp}/services'.sub('{' + 'id_structure_cpp' + '}', CGI.escape(id_structure_cpp.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'RechercherServicesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post(obtenir_id_chorus_pro_request, opts = {}) ⇒ ObtenirIdChorusProResponse

Utilitaire : Obtenir l’ID Chorus Pro depuis un SIRET **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.

Parameters:

Returns:



362
363
364
365
# File 'lib/factpulse/api/chorus_pro_api.rb', line 362

def obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post(obtenir_id_chorus_pro_request, opts = {})
  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)
  data
end

#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 = {}) ⇒ Array<(ObtenirIdChorusProResponse, Integer, Hash)>

Utilitaire : Obtenir l&#39;ID Chorus Pro depuis un SIRET **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.

Parameters:

Returns:

  • (Array<(ObtenirIdChorusProResponse, Integer, Hash)>)

    ObtenirIdChorusProResponse data, response status code and response headers



372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
# File 'lib/factpulse/api/chorus_pro_api.rb', line 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 = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post ...'
  end
  # verify the required parameter 'obtenir_id_chorus_pro_request' is set
  if @api_client.config.client_side_validation && obtenir_id_chorus_pro_request.nil?
    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"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/structures/obtenir-id-depuis-siret'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(obtenir_id_chorus_pro_request)

  # return_type
  return_type = opts[:debug_return_type] || 'ObtenirIdChorusProResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post(request_body, opts = {}) ⇒ Object

Rechercher factures reçues (Destinataire) 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.

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


430
431
432
433
# File 'lib/factpulse/api/chorus_pro_api.rb', line 430

def rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post(request_body, opts = {})
  data, _status_code, _headers = rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_with_http_info(request_body, opts)
  data
end

#rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Rechercher factures reçues (Destinataire) 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.

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/factpulse/api/chorus_pro_api.rb', line 440

def rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/factures/rechercher-destinataire'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post(request_body, opts = {}) ⇒ Object

Rechercher factures émises (Fournisseur) 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é

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


498
499
500
501
# File 'lib/factpulse/api/chorus_pro_api.rb', line 498

def rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post(request_body, opts = {})
  data, _status_code, _headers = rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_with_http_info(request_body, opts)
  data
end

#rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Rechercher factures émises (Fournisseur) 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é

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
# File 'lib/factpulse/api/chorus_pro_api.rb', line 508

def rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/factures/rechercher-fournisseur'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#rechercher_structures_api_v1_chorus_pro_structures_rechercher_post(rechercher_structure_request, opts = {}) ⇒ RechercherStructureResponse

Rechercher des structures Chorus Pro 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.

Parameters:

Returns:



566
567
568
569
# File 'lib/factpulse/api/chorus_pro_api.rb', line 566

def rechercher_structures_api_v1_chorus_pro_structures_rechercher_post(rechercher_structure_request, opts = {})
  data, _status_code, _headers = rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_with_http_info(rechercher_structure_request, opts)
  data
end

#rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_with_http_info(rechercher_structure_request, opts = {}) ⇒ Array<(RechercherStructureResponse, Integer, Hash)>

Rechercher des structures Chorus Pro 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.

Parameters:

Returns:

  • (Array<(RechercherStructureResponse, Integer, Hash)>)

    RechercherStructureResponse data, response status code and response headers



576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
# File 'lib/factpulse/api/chorus_pro_api.rb', line 576

def rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_with_http_info(rechercher_structure_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.rechercher_structures_api_v1_chorus_pro_structures_rechercher_post ...'
  end
  # verify the required parameter 'rechercher_structure_request' is set
  if @api_client.config.client_side_validation && rechercher_structure_request.nil?
    fail ArgumentError, "Missing the required parameter 'rechercher_structure_request' when calling ChorusProApi.rechercher_structures_api_v1_chorus_pro_structures_rechercher_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/structures/rechercher'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(rechercher_structure_request)

  # return_type
  return_type = opts[:debug_return_type] || 'RechercherStructureResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.rechercher_structures_api_v1_chorus_pro_structures_rechercher_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#recycler_facture_api_v1_chorus_pro_factures_recycler_post(request_body, opts = {}) ⇒ Object

Recycler une facture (Fournisseur) 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.

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


634
635
636
637
# File 'lib/factpulse/api/chorus_pro_api.rb', line 634

def recycler_facture_api_v1_chorus_pro_factures_recycler_post(request_body, opts = {})
  data, _status_code, _headers = recycler_facture_api_v1_chorus_pro_factures_recycler_post_with_http_info(request_body, opts)
  data
end

#recycler_facture_api_v1_chorus_pro_factures_recycler_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Recycler une facture (Fournisseur) 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.

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
# File 'lib/factpulse/api/chorus_pro_api.rb', line 644

def recycler_facture_api_v1_chorus_pro_factures_recycler_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.recycler_facture_api_v1_chorus_pro_factures_recycler_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.recycler_facture_api_v1_chorus_pro_factures_recycler_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/factures/recycler'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.recycler_facture_api_v1_chorus_pro_factures_recycler_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#soumettre_facture_api_v1_chorus_pro_factures_soumettre_post(soumettre_facture_request, opts = {}) ⇒ SoumettreFactureResponse

Soumettre une facture à Chorus Pro 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.

Parameters:

Returns:



702
703
704
705
# File 'lib/factpulse/api/chorus_pro_api.rb', line 702

def soumettre_facture_api_v1_chorus_pro_factures_soumettre_post(soumettre_facture_request, opts = {})
  data, _status_code, _headers = soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_with_http_info(soumettre_facture_request, opts)
  data
end

#soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_with_http_info(soumettre_facture_request, opts = {}) ⇒ Array<(SoumettreFactureResponse, Integer, Hash)>

Soumettre une facture à Chorus Pro 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.

Parameters:

Returns:

  • (Array<(SoumettreFactureResponse, Integer, Hash)>)

    SoumettreFactureResponse data, response status code and response headers



712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
# File 'lib/factpulse/api/chorus_pro_api.rb', line 712

def soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_with_http_info(soumettre_facture_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.soumettre_facture_api_v1_chorus_pro_factures_soumettre_post ...'
  end
  # verify the required parameter 'soumettre_facture_request' is set
  if @api_client.config.client_side_validation && soumettre_facture_request.nil?
    fail ArgumentError, "Missing the required parameter 'soumettre_facture_request' when calling ChorusProApi.soumettre_facture_api_v1_chorus_pro_factures_soumettre_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/factures/soumettre'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(soumettre_facture_request)

  # return_type
  return_type = opts[:debug_return_type] || 'SoumettreFactureResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.soumettre_facture_api_v1_chorus_pro_factures_soumettre_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post(request_body, opts = {}) ⇒ Object

Télécharger un groupe de factures 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.

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


770
771
772
773
# File 'lib/factpulse/api/chorus_pro_api.rb', line 770

def telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post(request_body, opts = {})
  data, _status_code, _headers = telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_with_http_info(request_body, opts)
  data
end

#telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Télécharger un groupe de factures 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.

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
# File 'lib/factpulse/api/chorus_pro_api.rb', line 780

def telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/factures/telecharger-groupe'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post(request_body, opts = {}) ⇒ Object

Traiter une facture reçue (Destinataire) 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

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


838
839
840
841
# File 'lib/factpulse/api/chorus_pro_api.rb', line 838

def traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post(request_body, opts = {})
  data, _status_code, _headers = traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_with_http_info(request_body, opts)
  data
end

#traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Traiter une facture reçue (Destinataire) 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

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
# File 'lib/factpulse/api/chorus_pro_api.rb', line 848

def traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/factures/traiter-facture-recue'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post(request_body, opts = {}) ⇒ Object

Consulter une facture (Valideur)

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


905
906
907
908
# File 'lib/factpulse/api/chorus_pro_api.rb', line 905

def valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post(request_body, opts = {})
  data, _status_code, _headers = valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_with_http_info(request_body, opts)
  data
end

#valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Consulter une facture (Valideur)

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
# File 'lib/factpulse/api/chorus_pro_api.rb', line 914

def valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/factures/valideur/consulter'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post(request_body, opts = {}) ⇒ Object

Rechercher factures à valider (Valideur) 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.

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


972
973
974
975
# File 'lib/factpulse/api/chorus_pro_api.rb', line 972

def valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post(request_body, opts = {})
  data, _status_code, _headers = valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_with_http_info(request_body, opts)
  data
end

#valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Rechercher factures à valider (Valideur) 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.

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
# File 'lib/factpulse/api/chorus_pro_api.rb', line 982

def valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/factures/valideur/rechercher'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post(request_body, opts = {}) ⇒ Object

Valider ou refuser une facture (Valideur) 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)

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


1040
1041
1042
1043
# File 'lib/factpulse/api/chorus_pro_api.rb', line 1040

def valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post(request_body, opts = {})
  data, _status_code, _headers = valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_with_http_info(request_body, opts)
  data
end

#valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Valider ou refuser une facture (Valideur) 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)

Parameters:

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
# File 'lib/factpulse/api/chorus_pro_api.rb', line 1050

def valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChorusProApi.valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post"
  end
  # resource path
  local_var_path = '/api/v1/chorus-pro/factures/valideur/traiter'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ChorusProApi.valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end