Class: SweetTooth::Spending

Inherits:
APIResource show all
Includes:
APIOperations::Create
Defined in:
lib/sweettooth/spending.rb

Instance Attribute Summary

Attributes inherited from SweetToothObject

#api_key

Instance Method Summary collapse

Methods included from APIOperations::Create

included

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

#cancelObject



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_urlObject



11
12
13
# File 'lib/sweettooth/spending.rb', line 11

def cancel_url
  url + '/cancel'
end