class Belvo::Account

An Account is the representation of a bank account inside a financial institution.

Public Class Methods

new(session) click to toggle source
Calls superclass method Belvo::Resource::new
# File lib/belvo/resources.rb, line 159
def initialize(session)
  super(session)
  @endpoint = 'accounts/'
end

Public Instance Methods

retrieve(link:, options: nil) click to toggle source

Retrieve accounts from an existing link @param link [String] Link UUID @param options [AccountOptions] Configurable properties @return [Hash] created accounts details @raise [RequestError] If response code is different than 2XX

# File lib/belvo/resources.rb, line 169
def retrieve(link:, options: nil)
  options = AccountOptions.from(options)
  body = {
    link: link,
    token: options.token,
    save_data: options.save_data || true
  }.merge(options)
  body = clean body: body
  @session.post(@endpoint, body)
end