Class: Belvo::InvestmentsPortfolio
- Defined in:
- lib/belvo/resources.rb
Overview
A InvestmentsPortfolio is a comprehensive view of your user’s current investment holdings
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(session) ⇒ InvestmentsPortfolio
constructor
A new instance of InvestmentsPortfolio.
-
#retrieve(link:, options: nil) ⇒ Hash
Retrieve investments portfolios from an existing link.
Methods inherited from Resource
#clean, #delete, #detail, #list, #resume
Constructor Details
#initialize(session) ⇒ InvestmentsPortfolio
Returns a new instance of InvestmentsPortfolio.
630 631 632 633 |
# File 'lib/belvo/resources.rb', line 630 def initialize(session) super(session) @endpoint = 'investments/portfolios/' end |
Instance Method Details
#retrieve(link:, options: nil) ⇒ Hash
Retrieve investments portfolios from an existing link
640 641 642 643 644 645 646 647 648 649 |
# File 'lib/belvo/resources.rb', line 640 def retrieve(link:, options: nil) = InvestmentsPortfolioOptions.from() body = { link: link, token: .token, save_data: .save_data || true }.merge() body = clean body: body @session.post(@endpoint, body) end |