Sha256: dad0d3fe260fa64b45c7fce4128e9ab354c95725da49db3ba875543e03996323

Contents?: true

Size: 656 Bytes

Versions: 4

Compression:

Stored size: 656 Bytes

Contents

module IEX
  module Resources
    class Company < Resource
      property 'symbol' # stock ticker
      property 'company_name', from: 'companyName' # company name
      property 'exchange' # primary listings exchange
      property 'industry'
      property 'website'
      property 'description'
      property 'ceo', from: 'CEO'
      property 'issue_type', from: 'issueType' # common issue type of the stock
      property 'sector'

      def self.get(symbol)
        new IEX::Api::Company.get(symbol)
      rescue Faraday::ResourceNotFound => e
        raise IEX::Errors::SymbolNotFoundError.new(symbol, e.response[:body])
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
iex-ruby-client-0.3.3 lib/iex/resources/company.rb
iex-ruby-client-0.3.2 lib/iex/resources/company.rb
iex-ruby-client-0.3.1 lib/iex/resources/company.rb
iex-ruby-client-0.3.0 lib/iex/resources/company.rb