Class: BenefitsReferenceData::Service
- Inherits:
-
Common::Client::Base
- Object
- Common::Client::Base
- BenefitsReferenceData::Service
- Defined in:
- lib/lighthouse/benefits_reference_data/service.rb
Overview
Proxy Service for the Lighthouse Benefits Reference Data API.
Constant Summary collapse
- STATSD_KEY_PREFIX =
ap @configuration.base_request_headers; exit
'api.benefits_reference_data'
Instance Method Summary collapse
-
#get_data(path:, params: {}) ⇒ Faraday::Response
Hit a Benefits Reference Data End-point.
Methods included from Common::Client::Concerns::Monitoring
#increment, #increment_failure, #increment_total, #with_monitoring
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger, #set_sentry_metadata
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
Instance Method Details
#get_data(path:, params: {}) ⇒ Faraday::Response
Hit a Benefits Reference Data End-point
33 34 35 36 37 38 39 40 41 |
# File 'lib/lighthouse/benefits_reference_data/service.rb', line 33 def get_data(path:, params: {}) headers = config.base_request_headers begin response = perform :get, path, params, headers rescue => e raise BenefitsReferenceData::ServiceException.new(e), 'Lighthouse Error' end response end |