Class: SweetTooth::Spending
- Inherits:
-
APIResource
- Object
- SweetToothObject
- APIResource
- SweetTooth::Spending
- Includes:
- APIOperations::Create
- Defined in:
- lib/sweettooth/spending.rb
Instance Attribute Summary
Attributes inherited from SweetToothObject
Instance Method Summary collapse
Methods included from APIOperations::Create
Methods inherited from APIResource
class_name, class_name_plural, #refresh, retrieve, #url, url
Methods inherited from SweetToothObject
#[], #[]=, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #to_hash, #to_json, #to_s, #values
Constructor Details
This class inherits a constructor from SweetTooth::SweetToothObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class SweetTooth::SweetToothObject
Instance Method Details
#cancel ⇒ Object
5 6 7 8 9 |
# File 'lib/sweettooth/spending.rb', line 5 def cancel() response, api_key = SweetTooth.request(:post, cancel_url, @api_key) refresh_from(response, api_key) self end |
#cancel_url ⇒ Object
11 12 13 |
# File 'lib/sweettooth/spending.rb', line 11 def cancel_url url + '/cancel' end |