Class: Unit::Reward::GetRequest
- Inherits:
-
Object
- Object
- Unit::Reward::GetRequest
- Defined in:
- lib/unit/models/reward/get_request.rb
Instance Attribute Summary collapse
-
#include ⇒ Object
readonly
Returns the value of attribute include.
-
#reward_id ⇒ Object
readonly
Returns the value of attribute reward_id.
Instance Method Summary collapse
-
#initialize(reward_id, include = nil) ⇒ GetRequest
constructor
A new instance of GetRequest.
- #to_hash ⇒ Object
Constructor Details
#initialize(reward_id, include = nil) ⇒ GetRequest
Returns a new instance of GetRequest.
12 13 14 15 |
# File 'lib/unit/models/reward/get_request.rb', line 12 def initialize(reward_id, include = nil) @reward_id = reward_id @include = include end |
Instance Attribute Details
#include ⇒ Object (readonly)
Returns the value of attribute include.
8 9 10 |
# File 'lib/unit/models/reward/get_request.rb', line 8 def include @include end |
#reward_id ⇒ Object (readonly)
Returns the value of attribute reward_id.
8 9 10 |
# File 'lib/unit/models/reward/get_request.rb', line 8 def reward_id @reward_id end |
Instance Method Details
#to_hash ⇒ Object
17 18 19 |
# File 'lib/unit/models/reward/get_request.rb', line 17 def to_hash { include: include&.join(",") }.compact end |