class Fastly::Service

def invoice(year=nil, month=nil)

Otherwise it returns the invoice for the current month so far.

If a year and month are passed in returns the invoice for that whole month.

Return a Invoice object representing the invoice for this service
def invoice(year=nil, month=nil)
  opts = { :service_id => self.id }
  unless year.nil? || month.nil?
    opts[:year]  = year
    opts[:month] = month
  end
  fetcher.get(Fastly::Invoice, opts)
end