Class: Opensteam::InvoiceBase::Invoice
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Opensteam::InvoiceBase::Invoice
- Defined in:
- lib/opensteam/invoice_base.rb
Overview
Invoice Model
Instance Method Summary collapse
- #amount_in_cents ⇒ Object
-
#initialize(*args) ⇒ Invoice
constructor
A new instance of Invoice.
- #items ⇒ Object
Constructor Details
#initialize(*args) ⇒ Invoice
Returns a new instance of Invoice.
39 40 41 42 43 44 45 |
# File 'lib/opensteam/invoice_base.rb', line 39 def initialize(*args) super(*args) if order self.address = order.payment_address self.customer = order.customer end end |
Instance Method Details
#amount_in_cents ⇒ Object
48 49 50 |
# File 'lib/opensteam/invoice_base.rb', line 48 def amount_in_cents ( price * 100 ).to_i end |
#items ⇒ Object
53 |
# File 'lib/opensteam/invoice_base.rb', line 53 def items ; order_items ; end |