Class: DebtManagementCenter::DebtsConfiguration
Instance Attribute Summary
#base_request_headers, #open_timeout, #read_timeout, #request_types, #user_agent
Class Method Summary
collapse
Instance Method Summary
collapse
#breakers_error_threshold, #breakers_exception_handler, #breakers_matcher, #breakers_service, #create_new_breakers_service, #current_module, #request_options, #service_exception
Class Method Details
5
6
7
8
9
10
|
# File 'lib/debt_management_center/debts_configuration.rb', line 5
def self.
super.merge(
'client_id' => Settings.dmc.client_id,
'client_secret' => Settings.dmc.client_secret
)
end
|
Instance Method Details
#base_path ⇒ Object
16
17
18
|
# File 'lib/debt_management_center/debts_configuration.rb', line 16
def base_path
Settings.dmc.url
end
|
#connection ⇒ Object
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/debt_management_center/debts_configuration.rb', line 20
def connection
Faraday.new(base_path, headers: , request: request_options) do |f|
f.use :breakers
f.use Faraday::Response::RaiseError
f.request :json
f.response :betamocks if Settings.dmc.mock_debts
f.response :json
f.adapter Faraday.default_adapter
end
end
|
#service_name ⇒ Object
12
13
14
|
# File 'lib/debt_management_center/debts_configuration.rb', line 12
def service_name
'Debts'
end
|