2020-08-05 18:40:47 +02:00
|
|
|
class APIEntreprise::AttestationSocialeAdapter < APIEntreprise::Adapter
|
2020-05-14 14:41:54 +02:00
|
|
|
def initialize(siret, procedure_id)
|
|
|
|
@siret = siret
|
2020-04-27 18:09:00 +02:00
|
|
|
@procedure_id = procedure_id
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def get_resource
|
2022-07-20 14:52:17 +02:00
|
|
|
api(@procedure_id).attestation_sociale(siren)
|
2020-04-27 18:09:00 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def process_params
|
2023-05-22 14:56:40 +02:00
|
|
|
if data_source[:data] && data_source[:data][:document_url].present?
|
2020-04-27 18:09:00 +02:00
|
|
|
{
|
2023-05-22 14:56:40 +02:00
|
|
|
entreprise_attestation_sociale_url: data_source[:data][:document_url]
|
2020-04-27 18:09:00 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|