Class: Invoice

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/invoice.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fromObject

Returns the value of attribute from.



8
9
10
# File 'app/models/invoice.rb', line 8

def from
  @from
end

#priceObject

Returns the value of attribute price.



8
9
10
# File 'app/models/invoice.rb', line 8

def price
  @price
end

#subscriptionObject

Returns the value of attribute subscription.



8
9
10
# File 'app/models/invoice.rb', line 8

def subscription
  @subscription
end

#toObject

Returns the value of attribute to.



8
9
10
# File 'app/models/invoice.rb', line 8

def to
  @to
end

Instance Method Details

#amountObject



11
12
13
14
# File 'app/models/invoice.rb', line 11

def amount
  
  invoice_line_items.sum(:price)
end