Class: InheritedProofing::MHV::Configuration

Inherits:
Common::Client::Configuration::REST show all
Defined in:
lib/inherited_proofing/mhv/configuration.rb

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 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

#app_tokenObject



20
21
22
# File 'lib/inherited_proofing/mhv/configuration.rb', line 20

def app_token
  Settings.mhv.inherited_proofing.app_token
end

#base_pathObject



8
9
10
# File 'lib/inherited_proofing/mhv/configuration.rb', line 8

def base_path
  Settings.mhv.inherited_proofing.base_path
end

#connectionObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/inherited_proofing/mhv/configuration.rb', line 28

def connection
  @connection ||= Faraday.new(
    base_path,
    headers: base_request_headers,
    request: request_options
  ) do |conn|
    conn.use :breakers
    conn.response :betamocks if Settings.mhv.inherited_proofing.mock
    conn.use Faraday::Response::RaiseError
    conn.response :snakecase
    conn.response :json, content_type: /\bjson$/
    conn.adapter Faraday.default_adapter
  end
end

#service_nameObject



24
25
26
# File 'lib/inherited_proofing/mhv/configuration.rb', line 24

def service_name
  'mhv_inherited_proofing'
end

#vacct_info_urlObject



16
17
18
# File 'lib/inherited_proofing/mhv/configuration.rb', line 16

def vacct_info_url
  "#{Settings.mhv.inherited_proofing.base_path}/mhvacctinfo"
end

#valid_id_urlObject



12
13
14
# File 'lib/inherited_proofing/mhv/configuration.rb', line 12

def valid_id_url
  "#{Settings.mhv.inherited_proofing.base_path}/validmhvid"
end