Class: Rocket::Invoice::InvoiceProduct

Inherits:
Object
  • Object
show all
Defined in:
lib/rocket/invoice/invoice_product.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeInvoiceProduct

Returns a new instance of InvoiceProduct.



6
7
8
9
10
11
# File 'lib/rocket/invoice/invoice_product.rb', line 6

def initialize
  self.name = ''
  self.description = ''
  self.unity_price = BigDecimal.new('0.0')
  self.quantity = BigDecimal.new('0.0')
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/rocket/invoice/invoice_product.rb', line 4

def description
  @description
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/rocket/invoice/invoice_product.rb', line 4

def name
  @name
end

#quantityObject

Returns the value of attribute quantity.



4
5
6
# File 'lib/rocket/invoice/invoice_product.rb', line 4

def quantity
  @quantity
end

#unity_priceObject

Returns the value of attribute unity_price.



4
5
6
# File 'lib/rocket/invoice/invoice_product.rb', line 4

def unity_price
  @unity_price
end