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

#handle_error, #headers, #initialize, #perform, #save_error_details, service_is_up?, #with_monitoring_and_error_handling

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

#increment, #increment_failure, #increment_total, #with_monitoring

Methods inherited from Common::Client::Base

#config, configuration, #connection, #delete, #get, #perform, #post, #put, #raise_backend_exception, #raise_not_authenticated, #request, #sanitize_headers!, #service_name

Methods included from SentryLogging

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

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