Class: EVSS::PPIU::Configuration

Inherits:
Configuration show all
Defined in:
lib/evss/ppiu/configuration.rb

Overview

HTTP client configuration for the Service, sets the base path and a service name for breakers and metrics.

Instance Attribute Summary

Attributes inherited from Common::Client::Configuration::Base

#base_request_headers, #open_timeout, #read_timeout, #request_types, #user_agent

Instance Method Summary collapse

Methods inherited from Configuration

#cert?, #client_cert, #client_key, #connection, #root_ca, #set_evss_middlewares, #ssl_options

Methods inherited from Common::Client::Configuration::Base

#breakers_error_threshold, #breakers_exception_handler, #breakers_matcher, #breakers_service, #create_new_breakers_service, #request_options, #service_exception

Instance Method Details

#base_pathString

Returns Base path for PPIU URLs.

Returns:

  • (String)

    Base path for PPIU URLs.



16
17
18
# File 'lib/evss/ppiu/configuration.rb', line 16

def base_path
  "#{Settings.evss.url}/wss-ppiu-services-web/rest/ppiuServices/v1"
end

#mock_enabled?Boolean

Returns Should the service use mock data in lower environments.

Returns:

  • (Boolean)

    Should the service use mock data in lower environments.



30
31
32
# File 'lib/evss/ppiu/configuration.rb', line 30

def mock_enabled?
  Settings.evss.mock_ppiu || false
end

#service_nameString

Returns Service name to use in breakers and metrics.

Returns:

  • (String)

    Service name to use in breakers and metrics.



23
24
25
# File 'lib/evss/ppiu/configuration.rb', line 23

def service_name
  'EVSS/PPIU'
end