-
-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathdividends.rb
More file actions
21 lines (20 loc) · 639 Bytes
/
dividends.rb
File metadata and controls
21 lines (20 loc) · 639 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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