Class: EVSS::CommonService
- Inherits:
-
BaseService
- Object
- BaseService
- EVSS::CommonService
- Defined in:
- lib/evss/common_service.rb
Constant Summary collapse
- API_VERSION =
Settings.evss.versions.common
- BASE_URL =
"#{Settings.evss.url}/wss-common-services-web-#{API_VERSION}/rest/".freeze
Constants inherited from BaseService
BaseService::DEFAULT_TIMEOUT, BaseService::SYSTEM_NAME
Class Method Summary collapse
Instance Method Summary collapse
- #get_current_info ⇒ Object
- #get_rating_info ⇒ Object
-
#initialize(*args) ⇒ CommonService
constructor
A new instance of CommonService.
Methods inherited from BaseService
#base_url, #cert?, #client_cert, #client_key, #conn, create_breakers_service, #get, #post, #root_ca, #ssl_options, #timeout
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger, #set_sentry_metadata
Constructor Details
#initialize(*args) ⇒ CommonService
Returns a new instance of CommonService.
11 12 13 14 |
# File 'lib/evss/common_service.rb', line 11 def initialize(*args) super @use_mock = Settings.evss.mock_common_service || false end |
Class Method Details
.breakers_service ⇒ Object
27 28 29 |
# File 'lib/evss/common_service.rb', line 27 def self.breakers_service BaseService.create_breakers_service(name: 'EVSS/Common', url: BASE_URL) end |
Instance Method Details
#get_current_info ⇒ Object
16 17 18 |
# File 'lib/evss/common_service.rb', line 16 def get_current_info post 'vsoSearch/11.6/getCurrentInfo' end |
#get_rating_info ⇒ Object
20 21 22 23 24 25 |
# File 'lib/evss/common_service.rb', line 20 def msg_body = { 'participantId' => @headers['va_eauth_pid'] } headers = { 'Content-Type' => 'application/json' } raw_response = post 'ratingInfoService/11.6/findRatingInfoPID', msg_body.to_json, headers EVSS::DisabilityCompensationForm::RatingInfoResponse.new(raw_response.status, raw_response) end |