Class: Belvo::Statement
Overview
A Statement contains a resume of monthly Transactions inside an Account.
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(session) ⇒ Statement
constructor
A new instance of Statement.
-
#retrieve(link:, account:, year:, month:, options: nil) ⇒ Hash
Retrieve statements information from a specific banking link.
Methods inherited from Resource
#clean, #delete, #detail, #list, #resume
Constructor Details
#initialize(session) ⇒ Statement
Returns a new instance of Statement.
279 280 281 282 |
# File 'lib/belvo/resources.rb', line 279 def initialize(session) super(session) @endpoint = 'api/statements/' end |
Instance Method Details
#retrieve(link:, account:, year:, month:, options: nil) ⇒ Hash
Retrieve statements information from a specific banking link.
291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/belvo/resources.rb', line 291 def retrieve(link:, account:, year:, month:, options: nil) = StatementOptions.from() body = { link: link, account: account, year: year, month: month, token: .token, save_data: .save_data || true, attach_pdf: .attach_pdf }.merge() body = clean body: body @session.post(@endpoint, body) end |