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

28 lines
574 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
api(@procedure_id).bilans_bdf(siren)
2020-04-30 08:18:17 +02:00
end
def process_params
2023-05-28 13:10:18 +02:00
Sentry.with_scope do |scope|
data = data_source[:data]
scope.set_tags(siret: @siret)
scope.set_extras(source: data)
result = {}
if data
result[:entreprise_bilans_bdf] = data
result[:entreprise_bilans_bdf_monnaie] = 'euros'
end
result
2020-04-30 08:18:17 +02:00
end
end
end