Class: Maestrano::Account::Bill

Inherits:
Maestrano::API::Resource show all
Includes:
Maestrano::API::Operation::Create, Maestrano::API::Operation::List
Defined in:
lib/maestrano/account/bill.rb

Instance Attribute Summary

Attributes inherited from Maestrano::API::Object

#api_token

Instance Method Summary collapse

Methods included from Maestrano::API::Operation::Create

included

Methods included from Maestrano::API::Operation::List

included

Methods inherited from Maestrano::API::Resource

class_name, #refresh, retrieve, underscore, url, #url

Methods inherited from Maestrano::API::Object

#[], #[]=, #_dump, _load, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #respond_to?, #to_hash, #to_json, #to_s, #values

Methods included from Preset

included

Constructor Details

This class inherits a constructor from Maestrano::API::Object

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Maestrano::API::Object

Instance Method Details

#cancelObject



7
8
9
10
11
# File 'lib/maestrano/account/bill.rb', line 7

def cancel
  response, api_token = Maestrano::API::Operation::Base[self.class.preset].request(:delete, url, @api_token)
  refresh_from(response, api_token)
  self
end