forked from dblock/iex-ruby-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdividends.rb
24 lines (22 loc) · 935 Bytes
/
dividends.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true
# https://iexcloud.io/docs/api/#dividends-basic
module IEX
module Resources
class Dividends < Resource
property 'amount' # Refers to the payment amount
property 'currency' # Currency of the dividend
property 'date' # The date field of the time series as epoch timestamp
property 'flag' # The payment type.
property 'declared_date', from: 'declaredDate' # Refers to the dividend declaration date
property 'description' # Description of the dividend event
property 'ex_date', from: 'exDate' # Refers to the dividend ex-date
property 'frequency' # Frequency of the dividend
property 'payment_date', from: 'paymentDate' # Refers to the payment date
property 'record_date', from: 'recordDate' # Refers to the dividend record date
def initialize data
super
self['date'] = Time.at date / 1_000
end
end
end
end