class Fastly

def get_invoice(year = nil, month = nil)

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

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

Return an Invoice object
def get_invoice(year = nil, month = nil)
  opts = { customer_id: current_customer.id }
  if year.nil? || month.nil?
    opts[:mtd] = true
  else
    opts[:year]  = year
    opts[:month] = month
  end
  get(Invoice, opts)
end