1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/storm_on_demand/models/billing/invoices.rb

31 lines
616 B
Ruby
Raw Normal View History

require 'fog/core/collection'
require 'fog/storm_on_demand/models/billing/invoice'
module Fog
module Billing
class StormOnDemand
class Invoices < Fog::Collection
model Fog::Billing::StormOnDemand::Invoice
def all(options={})
invoices = service.list_invoices(options).body['items']
load(invoices)
end
def get(invoice_id)
invoice = service.get_invoice(:id => invoice_id).body
new(invoice)
end
def next
invoice = service.next_invoice.body
new(invoice)
end
end
end
end
end