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.
152 153 154 155 |
# File 'lib/belvo/resources.rb', line 152 def initialize(session) super(session) @endpoint = 'api/accounts/' end |
Instance Method Details
#retrieve(link:, options: nil) ⇒ Hash
Retrieve accounts from an existing link
162 163 164 165 166 167 168 169 170 171 |
# File 'lib/belvo/resources.rb', line 162 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 |