demarches-normaliennes/app/lib/api_entreprise/bilans_bdf_adapter.rb

24 lines
477 B
Ruby
Raw Normal View History

2020-08-05 18:40:47 +02:00
class APIEntreprise::BilansBdfAdapter < APIEntreprise::Adapter
def initialize(siret, procedure_id)
@siret = siret
2020-04-30 08:18:17 +02:00
@procedure_id = procedure_id
end
private
def get_resource
2020-08-05 18:40:47 +02:00
APIEntreprise::API.bilans_bdf(siren, @procedure_id)
2020-04-30 08:18:17 +02:00
end
def process_params
if data_source[:bilans].present?
{
entreprise_bilans_bdf: data_source[:bilans],
entreprise_bilans_bdf_monnaie: data_source[:monnaie]
}
else
{}
end
end
end