Class: Fog::Billing::StormOnDemand::Invoices

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/storm_on_demand/models/billing/invoices.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



10
11
12
13
# File 'lib/fog/storm_on_demand/models/billing/invoices.rb', line 10

def all(options={})
  invoices = service.list_invoices(options).body['items']
  load(invoices)
end

#get(invoice_id) ⇒ Object



15
16
17
18
# File 'lib/fog/storm_on_demand/models/billing/invoices.rb', line 15

def get(invoice_id)
  invoice = service.get_invoice(:id => invoice_id).body
  new(invoice)
end

#nextObject



20
21
22
23
# File 'lib/fog/storm_on_demand/models/billing/invoices.rb', line 20

def next
  invoice = service.next_invoice.body
  new(invoice)
end