api_entreprise: raise on network error
This commit is contained in:
parent
7c1c61248e
commit
ad4a89f0f6
7 changed files with 50 additions and 9 deletions
|
@ -1,4 +1,11 @@
|
|||
class ApiEntrepriseService
|
||||
# Retrieve all informations we can get about a SIRET.
|
||||
#
|
||||
# Returns nil if the SIRET is unknown; and nested params
|
||||
# suitable for being saved into a Etablissement object otherwise.
|
||||
#
|
||||
# Raises a RestClient::RequestFailed exception on transcient errors
|
||||
# (timeout, 5XX HTTP error code, etc.)
|
||||
def self.get_etablissement_params_for_siret(siret, procedure_id)
|
||||
etablissement_params = ApiEntreprise::EtablissementAdapter.new(siret, procedure_id).to_params
|
||||
entreprise_params = ApiEntreprise::EntrepriseAdapter.new(siret, procedure_id).to_params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue