Module: Isaca::Request::ExplicitCountries
- Defined in:
- lib/isaca/requests/explicit_countries.rb
Overview
Class used to fetch the explicit countries recognized by ISACA. Explicit countries are countries that require consent for marketing.
Class Method Summary collapse
-
.get ⇒ Isaca::Model::Countries
Method used to fetch all of the ExplicitCountries.
-
.send_request ⇒ Faraday::Response
Method used to send the request – exists for easy testing purposes.
Class Method Details
.get ⇒ Isaca::Model::Countries
Method used to fetch all of the ExplicitCountries.
9 10 11 12 |
# File 'lib/isaca/requests/explicit_countries.rb', line 9 def self.get response = self.send_request Isaca::Model::Countries.new(JSON.parse(response.body, symbolize_names: true)) end |
.send_request ⇒ Faraday::Response
Method used to send the request – exists for easy testing purposes.
19 20 21 22 23 24 |
# File 'lib/isaca/requests/explicit_countries.rb', line 19 def self.send_request Isaca::Request.get do |request| uri = URI(Isaca.configuration.url) request.path = "#{uri.scheme}://#{uri.hostname}:#{uri.port}/isacaservices/explicitcountries.json" end end |