Class: Belvo::Income
Overview
A Income contains a resume of monthly Transactions inside an Account.
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(session) ⇒ Income
constructor
A new instance of Income.
-
#retrieve(link:, options: nil) ⇒ Hash
Retrieve incomes information from a specific banking link.
Methods inherited from Resource
#clean, #delete, #detail, #list, #resume
Constructor Details
#initialize(session) ⇒ Income
Returns a new instance of Income.
309 310 311 312 |
# File 'lib/belvo/resources.rb', line 309 def initialize(session) super(session) @endpoint = 'api/incomes/' end |
Instance Method Details
#retrieve(link:, options: nil) ⇒ Hash
Retrieve incomes information from a specific banking link.
319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/belvo/resources.rb', line 319 def retrieve(link:, options: nil) = IncomeOptions.from() body = { link: link, save_data: .save_data || true, date_from: .date_from, date_to: .date_to }.merge() body = clean body: body @session.post(@endpoint, body) end |