Class: Kentaa::Api::Resources::Reward
- Inherits:
-
Object
- Object
- Kentaa::Api::Resources::Reward
- Defined in:
- lib/kentaa/api/resources/reward.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #amount ⇒ Object
- #ask_for_address? ⇒ Boolean
- #description ⇒ Object
- #id ⇒ Object
-
#initialize(data) ⇒ Reward
constructor
A new instance of Reward.
- #title ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(data) ⇒ Reward
Returns a new instance of Reward.
11 12 13 |
# File 'lib/kentaa/api/resources/reward.rb', line 11 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
9 10 11 |
# File 'lib/kentaa/api/resources/reward.rb', line 9 def data @data end |
Instance Method Details
#amount ⇒ Object
23 24 25 |
# File 'lib/kentaa/api/resources/reward.rb', line 23 def amount BigDecimal(data[:amount]) end |
#ask_for_address? ⇒ Boolean
35 36 37 |
# File 'lib/kentaa/api/resources/reward.rb', line 35 def ask_for_address? data[:ask_for_address] end |
#description ⇒ Object
31 32 33 |
# File 'lib/kentaa/api/resources/reward.rb', line 31 def description data[:description] end |
#id ⇒ Object
15 16 17 |
# File 'lib/kentaa/api/resources/reward.rb', line 15 def id data[:id] end |
#title ⇒ Object
27 28 29 |
# File 'lib/kentaa/api/resources/reward.rb', line 27 def title data[:title] end |
#type ⇒ Object
19 20 21 |
# File 'lib/kentaa/api/resources/reward.rb', line 19 def type data[:type] end |