Class: EVSS::ClaimsService
- Inherits:
-
BaseService
- Object
- BaseService
- EVSS::ClaimsService
- Defined in:
- lib/evss/claims_service.rb
Constant Summary collapse
- API_VERSION =
Settings.evss.versions.claims
- BASE_URL =
"#{Settings.evss.url}/wss-claims-services-web-#{API_VERSION}/rest".freeze
- DEFAULT_TIMEOUT =
in seconds
55
Constants inherited from BaseService
Class Method Summary collapse
Instance Method Summary collapse
- #all_claims ⇒ Object
-
#find_claim_by_id(claim_id) ⇒ Hash
GETs a user’s claim information.
-
#find_claim_with_docs_by_id(claim_id) ⇒ Hash
GETs a user’s claim information with documents included.
-
#initialize(headers) ⇒ ClaimsService
constructor
A new instance of ClaimsService.
- #request_decision(claim_id) ⇒ Object
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(headers) ⇒ ClaimsService
Returns a new instance of ClaimsService.
11 12 13 14 |
# File 'lib/evss/claims_service.rb', line 11 def initialize(headers) super @use_mock = Settings.evss.mock_claims || false end |
Class Method Details
.breakers_service ⇒ Object
43 44 45 |
# File 'lib/evss/claims_service.rb', line 43 def self.breakers_service BaseService.create_breakers_service(name: 'EVSS/Claims', url: BASE_URL) end |
Instance Method Details
#all_claims ⇒ Object
16 17 18 |
# File 'lib/evss/claims_service.rb', line 16 def all_claims get 'vbaClaimStatusService/getClaims' end |
#find_claim_by_id(claim_id) ⇒ Hash
GETs a user’s claim information
24 25 26 |
# File 'lib/evss/claims_service.rb', line 24 def find_claim_by_id(claim_id) post 'vbaClaimStatusService/getClaimDetailById', { id: claim_id }.to_json end |
#find_claim_with_docs_by_id(claim_id) ⇒ Hash
GETs a user’s claim information with documents included
32 33 34 |
# File 'lib/evss/claims_service.rb', line 32 def find_claim_with_docs_by_id(claim_id) post 'vbaClaimStatusService/getClaimDetailWithDocsById', { id: claim_id }.to_json end |
#request_decision(claim_id) ⇒ Object
36 37 38 39 40 41 |
# File 'lib/evss/claims_service.rb', line 36 def request_decision(claim_id) post 'vbaClaimStatusService/set5103Waiver', { claimId: claim_id, systemName: SYSTEM_NAME }.to_json end |