Class: VeteranVerification::Service
- Inherits:
-
Common::Client::Base
- Object
- Common::Client::Base
- VeteranVerification::Service
- Defined in:
- lib/lighthouse/veteran_verification/service.rb
Constant Summary collapse
- STATSD_KEY_PREFIX =
'api.veteran_verification'
Instance Method Summary collapse
- #get_rated_disabilities(icn, lighthouse_client_id = nil, lighthouse_rsa_key_path = nil, options = {}) ⇒ Object
- #handle_error(error, lighthouse_client_id, endpoint) ⇒ Object
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
Instance Method Details
#get_rated_disabilities(icn, lighthouse_client_id = nil, lighthouse_rsa_key_path = nil, options = {}) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/lighthouse/veteran_verification/service.rb', line 20 def get_rated_disabilities(icn, lighthouse_client_id = nil, lighthouse_rsa_key_path = nil, = {}) endpoint = 'disability_rating' config .get( "#{endpoint}/#{icn}", lighthouse_client_id, lighthouse_rsa_key_path, ) .body rescue => e handle_error(e, lighthouse_client_id, endpoint) end |
#handle_error(error, lighthouse_client_id, endpoint) ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/lighthouse/veteran_verification/service.rb', line 34 def handle_error(error, lighthouse_client_id, endpoint) Lighthouse::ServiceException.send_error( error, self.class.to_s.underscore, lighthouse_client_id, "#{config.base_api_path}/#{endpoint}" ) end |