2020-08-05 18:40:47 +02:00
|
|
|
class APIEntreprise::BilansBdfAdapter < APIEntreprise::Adapter
|
2020-05-14 14:41:54 +02:00
|
|
|
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
|