Class: Octobat::SelfBillingInvoice
- Inherits:
-
APIResource
- Object
- OctobatObject
- APIResource
- Octobat::SelfBillingInvoice
- Extended by:
- APIOperations::List
- Includes:
- APIOperations::Create, APIOperations::Update
- Defined in:
- lib/octobat/self_billing_invoice.rb
Instance Attribute Summary
Attributes inherited from OctobatObject
Instance Method Summary collapse
- #cancel(params = {}, opts = {}) ⇒ Object
- #confirm(params = {}, opts = {}) ⇒ Object
- #delete(params = {}, opts = {}) ⇒ Object
- #purchase_items(params = {}, opts = {}) ⇒ Object
- #send_by_email(params = {}, opts = {}) ⇒ Object
Methods included from APIOperations::List
Methods included from APIOperations::Update
#save, #serialize_metadata, #serialize_params
Methods included from APIOperations::Create
Methods inherited from APIResource
class_name, #refresh, retrieve, url, #url
Methods inherited from OctobatObject
#[], #[]=, #_dump, _load, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #respond_to?, #to_hash, #to_json, #to_s, #values
Constructor Details
This class inherits a constructor from Octobat::OctobatObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Octobat::OctobatObject
Instance Method Details
#cancel(params = {}, opts = {}) ⇒ Object
41 42 43 44 |
# File 'lib/octobat/self_billing_invoice.rb', line 41 def cancel(params = {}, opts = {}) response, api_key = Octobat.request(:patch, cancel_url, @api_key, params, opts) refresh_from(response, api_key) end |
#confirm(params = {}, opts = {}) ⇒ Object
36 37 38 39 |
# File 'lib/octobat/self_billing_invoice.rb', line 36 def confirm(params = {}, opts = {}) response, api_key = Octobat.request(:patch, confirm_url, @api_key, params, opts) refresh_from(response, api_key) end |
#delete(params = {}, opts = {}) ⇒ Object
46 47 48 49 |
# File 'lib/octobat/self_billing_invoice.rb', line 46 def delete(params = {}, opts = {}) response, api_key = Octobat.request(:delete, url, @api_key, params, opts) refresh_from(response, api_key) end |
#purchase_items(params = {}, opts = {}) ⇒ Object
51 52 53 |
# File 'lib/octobat/self_billing_invoice.rb', line 51 def purchase_items(params = {}, opts = {}) PurchaseItem.list(params.merge({ :self_billing_invoice => id }), {api_key: @api_key}.merge(opts)) end |