Add a new variable to improve readability
This commit is contained in:
parent
3dd76c3d68
commit
8b46df3176
1 changed files with 6 additions and 4 deletions
|
@ -1,11 +1,13 @@
|
|||
class SIRETService
|
||||
def self.fetch(siret, dossier = nil)
|
||||
etablissement_params = ApiEntreprise::EtablissementAdapter.new(siret, dossier&.procedure_id).to_params
|
||||
entreprise_params = ApiEntreprise::EntrepriseAdapter.new(siren(siret), dossier&.procedure_id).to_params
|
||||
procedure_id = dossier&.procedure_id
|
||||
|
||||
etablissement_params = ApiEntreprise::EtablissementAdapter.new(siret, procedure_id).to_params
|
||||
entreprise_params = ApiEntreprise::EntrepriseAdapter.new(siren(siret), procedure_id).to_params
|
||||
|
||||
if etablissement_params.present? && entreprise_params.present?
|
||||
association = ApiEntreprise::RNAAdapter.new(siret, dossier&.procedure_id)
|
||||
exercices = ApiEntreprise::ExercicesAdapter.new(siret, dossier&.procedure_id)
|
||||
association = ApiEntreprise::RNAAdapter.new(siret, procedure_id)
|
||||
exercices = ApiEntreprise::ExercicesAdapter.new(siret, procedure_id)
|
||||
|
||||
params = etablissement_params
|
||||
.merge(entreprise_params.map { |k,v| ["entreprise_#{k}", v] }.to_h)
|
||||
|
|
Loading…
Reference in a new issue