Sha256: ead59a40af0438105fcedd3fe08228f1f1ef6f606b27aadc425b51d43b346c36

Contents?: true

Size: 439 Bytes

Versions: 6

Compression:

Stored size: 439 Bytes

Contents

module IEX
  module Endpoints
    module BalanceSheet
      def balance_sheet(symbol, options = {})
        (get("stock/#{symbol}/balance-sheet", { token: publishable_token }.merge(options))['balancesheet'] || []).map do |data|
          IEX::Resources::BalanceSheet.new(data)
        end
      rescue Faraday::ResourceNotFound => e
        raise IEX::Errors::SymbolNotFoundError.new(symbol, e.response[:body])
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
iex-ruby-client-2.1.0 lib/iex/endpoints/balance_sheet.rb
iex-ruby-client-2.0.0 lib/iex/endpoints/balance_sheet.rb
iex-ruby-client-1.6.0 lib/iex/endpoints/balance_sheet.rb
iex-ruby-client-1.5.0 lib/iex/endpoints/balance_sheet.rb
iex-ruby-client-1.4.1 lib/iex/endpoints/balance_sheet.rb
iex-ruby-client-1.4.0 lib/iex/endpoints/balance_sheet.rb