Move the URL computation to a private method

This commit is contained in:
gregoirenovel 2018-03-15 14:17:57 +01:00
parent 94176f0b53
commit 51c030b945

View file

@ -34,11 +34,15 @@ class SIADE::API
verify_ssl_mode = OpenSSL::SSL::VERIFY_NONE
RestClient::Resource.new(
base_url + "/v2/" + resource_name + "/#{siret_or_siren}",
url(resource_name, siret_or_siren),
verify_ssl: verify_ssl_mode
).get(params: params)
end
def self.url(resource_name, siret_or_siren)
base_url + "/v2/" + resource_name + "/#{siret_or_siren}"
end
def self.mandatory_params(siret_or_siren, procedure_id)
{
context: "demarches-simplifiees.fr",