Class: Belvo::RiskInsights
Overview
RiskInsights contain relevant metrics about the credit risk of a Link
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(session) ⇒ RiskInsights
constructor
A new instance of RiskInsights.
-
#retrieve(link:, options: nil) ⇒ Hash
Retrieve risk insights information from a specific banking link.
Methods inherited from Resource
#clean, #delete, #detail, #list, #resume
Constructor Details
#initialize(session) ⇒ RiskInsights
Returns a new instance of RiskInsights.
397 398 399 400 |
# File 'lib/belvo/resources.rb', line 397 def initialize(session) super(session) @endpoint = 'api/risk-insights/' end |
Instance Method Details
#retrieve(link:, options: nil) ⇒ Hash
Retrieve risk insights information from a specific banking link
407 408 409 410 411 412 413 414 415 |
# File 'lib/belvo/resources.rb', line 407 def retrieve(link:, options: nil) = RiskInsightsOptions.from() body = { link: link, save_data: .save_data || true }.merge() body = clean body: body @session.post(@endpoint, body) end |