class InvoiceItem < ActiveRecord::Base belongs_to :invoice belongs_to :subscription has_one :invoice_item end