Class: InheritedProofing::MHV::Configuration
Instance Attribute Summary
#base_request_headers, #open_timeout, #read_timeout, #request_types, #user_agent
Instance Method Summary
collapse
#breakers_error_threshold, #breakers_exception_handler, #breakers_matcher, #breakers_service, #create_new_breakers_service, #request_options, #service_exception
Instance Method Details
#app_token ⇒ Object
20
21
22
|
# File 'lib/inherited_proofing/mhv/configuration.rb', line 20
def app_token
Settings.mhv.inherited_proofing.app_token
end
|
#base_path ⇒ Object
8
9
10
|
# File 'lib/inherited_proofing/mhv/configuration.rb', line 8
def base_path
Settings.mhv.inherited_proofing.base_path
end
|
#connection ⇒ Object
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: ,
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_name ⇒ Object
24
25
26
|
# File 'lib/inherited_proofing/mhv/configuration.rb', line 24
def service_name
'mhv_inherited_proofing'
end
|
#vacct_info_url ⇒ Object
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_url ⇒ Object
12
13
14
|
# File 'lib/inherited_proofing/mhv/configuration.rb', line 12
def valid_id_url
"#{Settings.mhv.inherited_proofing.base_path}/validmhvid"
end
|