class Alphavantage::Fundamental

Constants

FUNCTIONS

Public Class Methods

new(symbol:) click to toggle source
# File lib/alphavantage/fundamental.rb, line 11
def initialize(symbol:)
  @symbol = symbol
end

Public Instance Methods

balance_sheet() click to toggle source
# File lib/alphavantage/fundamental.rb, line 27
def balance_sheet
  response(FUNCTIONS[__method__]).annual_reports
end
cash_flow() click to toggle source
# File lib/alphavantage/fundamental.rb, line 31
def cash_flow
  response(FUNCTIONS[__method__]).annual_reports
end
earnings() click to toggle source
# File lib/alphavantage/fundamental.rb, line 19
def earnings
  response(FUNCTIONS[__method__]).annual_earnings
end
income_statement() click to toggle source
# File lib/alphavantage/fundamental.rb, line 23
def income_statement
  response(FUNCTIONS[__method__]).annual_reports
end
overview() click to toggle source
# File lib/alphavantage/fundamental.rb, line 15
def overview
  response(FUNCTIONS[__method__])
end

Private Instance Methods

response(function) click to toggle source
# File lib/alphavantage/fundamental.rb, line 37
def response(function)
  Client.get(params: { function: function, symbol: @symbol })
end