Class: Cetustek::Models::InvoiceItem
- Inherits:
-
Object
- Object
- Cetustek::Models::InvoiceItem
- Defined in:
- lib/cetustek/models/invoice_data.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
-
#unit_price ⇒ Object
readonly
Returns the value of attribute unit_price.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ InvoiceItem
constructor
A new instance of InvoiceItem.
Constructor Details
#initialize(attributes = {}) ⇒ InvoiceItem
Returns a new instance of InvoiceItem.
33 34 35 36 37 38 |
# File 'lib/cetustek/models/invoice_data.rb', line 33 def initialize(attributes = {}) @code = attributes[:code] @name = attributes[:name] @quantity = attributes[:quantity] @unit_price = attributes[:unit_price] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
31 32 33 |
# File 'lib/cetustek/models/invoice_data.rb', line 31 def code @code end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
31 32 33 |
# File 'lib/cetustek/models/invoice_data.rb', line 31 def name @name end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
31 32 33 |
# File 'lib/cetustek/models/invoice_data.rb', line 31 def quantity @quantity end |
#unit_price ⇒ Object (readonly)
Returns the value of attribute unit_price.
31 32 33 |
# File 'lib/cetustek/models/invoice_data.rb', line 31 def unit_price @unit_price end |