Move the URL computation to a private method
This commit is contained in:
parent
94176f0b53
commit
51c030b945
1 changed files with 5 additions and 1 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue