Class: Kentaa::Api::Resources::Reward

Inherits:
Object
  • Object
show all
Defined in:
lib/kentaa/api/resources/reward.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (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

#amountObject



23
24
25
# File 'lib/kentaa/api/resources/reward.rb', line 23

def amount
  BigDecimal(data[:amount])
end

#ask_for_address?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/kentaa/api/resources/reward.rb', line 35

def ask_for_address?
  data[:ask_for_address]
end

#descriptionObject



31
32
33
# File 'lib/kentaa/api/resources/reward.rb', line 31

def description
  data[:description]
end

#idObject



15
16
17
# File 'lib/kentaa/api/resources/reward.rb', line 15

def id
  data[:id]
end

#titleObject



27
28
29
# File 'lib/kentaa/api/resources/reward.rb', line 27

def title
  data[:title]
end

#typeObject



19
20
21
# File 'lib/kentaa/api/resources/reward.rb', line 19

def type
  data[:type]
end