2018-04-10 12:24:49 +02:00
|
|
|
class ApiEntrepriseService
|
2018-03-19 15:40:39 +01:00
|
|
|
def self.get_etablissement_params_for_siret(siret, procedure_id)
|
2018-03-19 14:44:47 +01:00
|
|
|
etablissement_params = ApiEntreprise::EtablissementAdapter.new(siret, procedure_id).to_params
|
2018-03-29 12:15:33 +02:00
|
|
|
entreprise_params = ApiEntreprise::EntrepriseAdapter.new(siret, procedure_id).to_params
|
2018-02-22 16:53:29 +01:00
|
|
|
|
2018-03-19 14:48:15 +01:00
|
|
|
if etablissement_params.present? && entreprise_params.present?
|
2018-03-19 14:46:47 +01:00
|
|
|
association_params = ApiEntreprise::RNAAdapter.new(siret, procedure_id).to_params
|
2018-03-19 15:43:15 +01:00
|
|
|
exercices_params = ApiEntreprise::ExercicesAdapter.new(siret, procedure_id).to_params
|
2018-02-22 16:53:29 +01:00
|
|
|
|
2018-12-24 16:46:11 +01:00
|
|
|
etablissement_params.merge(
|
|
|
|
entreprise_params,
|
|
|
|
association_params,
|
|
|
|
exercices_params
|
|
|
|
)
|
2018-02-22 16:53:29 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|