Class: Wes::Data::API::Model::Reward
- Defined in:
- lib/wes/data/api/model/reward.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Wes::Data::API::Model::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Wes::Data::API::Model::Base
Instance Method Details
#delete ⇒ Object
8 9 10 11 |
# File 'lib/wes/data/api/model/reward.rb', line 8 def delete route = [routes.reward, id].join("/") client.delete(route) end |
#update(changes) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/wes/data/api/model/reward.rb', line 13 def update(changes) route = [routes.reward, id].join("/") @attributes = client.put( route, @attributes.to_h.merge(changes) ).first self end |