class Belvo::Statement
A Statement
contains a resume of monthly Transactions inside an Account
.
Public Class Methods
new(session)
click to toggle source
Calls superclass method
Belvo::Resource::new
# File lib/belvo/resources.rb, line 268 def initialize(session) super(session) @endpoint = 'statements/' end
Public Instance Methods
retrieve(link:, account:, year:, month:, options: nil)
click to toggle source
Retrieve statements information from a specific banking link. @param link [String] Link
UUID @param year [Integer] @param month [Integer] @param options [StatementOptions] Configurable properties @return [Hash] created statement details @raise [RequestError] If response code is different than 2XX
# File lib/belvo/resources.rb, line 280 def retrieve(link:, account:, year:, month:, options: nil) options = StatementOptions.from(options) body = { link: link, account: account, year: year, month: month, token: options.token, save_data: options.save_data || true, attach_pdf: options.attach_pdf }.merge(options) body = clean body: body @session.post(@endpoint, body) end