Sha256: 194caf0a4b789acabb429baf2075cc6d2dedb0ae8cd87ba21f8af3d8e4209675

Contents?: true

Size: 639 Bytes

Versions: 13

Compression:

Stored size: 639 Bytes

Contents

module IEX
  module Resources
    class Dividends < Resource
      property 'ex_date', from: 'exDate'
      property 'payment_date', from: 'paymentDate'
      property 'record_date', from: 'recordDate'
      property 'declared_date', from: 'declaredDate'
      property 'amount'
      property 'amount_dollar'
      property 'currency'
      property 'description'
      property 'frequency'

      def initialize(data)
        super
        # TODO: require Hashie >= 2.5.8, see https://github.com/intridea/hashie/pull/457
        self['amount_dollar'] = Resource.to_dollar(amount: amount, ignore_cents: false)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
iex-ruby-client-2.1.0 lib/iex/resources/dividends.rb
iex-ruby-client-2.0.0 lib/iex/resources/dividends.rb
iex-ruby-client-1.6.0 lib/iex/resources/dividends.rb
iex-ruby-client-1.5.0 lib/iex/resources/dividends.rb
iex-ruby-client-1.4.1 lib/iex/resources/dividends.rb
iex-ruby-client-1.4.0 lib/iex/resources/dividends.rb
iex-ruby-client-1.3.0 lib/iex/resources/dividends.rb
iex-ruby-client-1.2.0 lib/iex/resources/dividends.rb
iex-ruby-client-1.1.2 lib/iex/resources/dividends.rb
iex-ruby-client-1.1.1 lib/iex/resources/dividends.rb
iex-ruby-client-1.1.0 lib/iex/resources/dividends.rb
iex-ruby-client-1.0.1 lib/iex/resources/dividends.rb
iex-ruby-client-1.0.0 lib/iex/resources/dividends.rb