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

24 lines
478 B
Ruby
Raw Normal View History

2020-04-30 08:18:17 +02:00
class ApiEntreprise::BilansBdfAdapter < ApiEntreprise::Adapter
def initialize(siren, procedure_id)
@siren = siren
@procedure_id = procedure_id
end
private
def get_resource
ApiEntreprise::API.bilans_bdf(@siren, @procedure_id)
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