Class: Belvo::Account
Overview
An Account is the representation of a bank account inside a financial institution.
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(session) ⇒ Account
constructor
A new instance of Account.
-
#retrieve(link:, options: nil) ⇒ Hash
Retrieve accounts from an existing link.
Methods inherited from Resource
#clean, #delete, #detail, #list, #resume
Constructor Details
#initialize(session) ⇒ Account
Returns a new instance of Account.
159 160 161 162 |
# File 'lib/belvo/resources.rb', line 159 def initialize(session) super(session) @endpoint = 'api/accounts/' end |
Instance Method Details
#retrieve(link:, options: nil) ⇒ Hash
Retrieve accounts from an existing link
169 170 171 172 173 174 175 176 177 178 |
# File 'lib/belvo/resources.rb', line 169 def retrieve(link:, options: nil) = AccountOptions.from() body = { link: link, token: .token, save_data: .save_data || true }.merge() body = clean body: body @session.post(@endpoint, body) end |