2020-04-27 18:09:00 +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
|
2020-05-14 14:41:54 +02:00
|
|
|
ApiEntreprise::API.attestation_sociale(siren, @procedure_id)
|
2020-04-27 18:09:00 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def process_params
|
|
|
|
if data_source[:url].present?
|
|
|
|
{
|
|
|
|
entreprise_attestation_sociale_url: data_source[:url]
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|