Class: EVSS::ReferenceData::Service

Inherits:
Service show all
Defined in:
lib/evss/reference_data/service.rb

Constant Summary

Constants inherited from Service

Service::STATSD_KEY_PREFIX

Instance Attribute Summary

Attributes inherited from Service

#transaction_id

Instance Method Summary collapse

Methods inherited from Service

#headers, #initialize, #perform, service_is_up?

Methods included from Common::Client::Concerns::Monitoring

#with_monitoring

Methods inherited from Common::Client::Base

configuration, #raise_backend_exception

Methods included from SentryLogging

#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger

Constructor Details

This class inherits a constructor from EVSS::Service

Instance Method Details

#get_countriesEVSS::PCIUAddress::CountriesResponse

Creates an object containing an array of country names

Returns:



19
20
21
22
23
24
# File 'lib/evss/reference_data/service.rb', line 19

def get_countries
  with_monitoring_and_error_handling do
    raw_response = perform(:get, 'countries')
    EVSS::PCIUAddress::CountriesResponse.new(raw_response.status, raw_response)
  end
end

#get_separation_locationsObject



38
39
40
41
42
43
# File 'lib/evss/reference_data/service.rb', line 38

def get_separation_locations
  with_monitoring_and_error_handling do
    raw_response = perform(:get, 'intakesites')
    EVSS::ReferenceData::IntakeSitesResponse.new(raw_response.status, raw_response)
  end
end

#get_statesEVSS::PCIUAddress::StatesResponse

Creates an object containing an array of state names

Returns:



31
32
33
34
35
36
# File 'lib/evss/reference_data/service.rb', line 31

def get_states
  with_monitoring_and_error_handling do
    raw_response = perform(:get, 'states')
    EVSS::PCIUAddress::StatesResponse.new(raw_response.status, raw_response)
  end
end