Class: Jirafe::Resource::Carts::Item
- Inherits:
-
Object
- Object
- Jirafe::Resource::Carts::Item
- Includes:
- DataHelper, Model
- Defined in:
- lib/jirafe/resource/carts/item.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#name ⇒ Object
Returns the value of attribute name.
-
#price ⇒ Object
Returns the value of attribute price.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#sku ⇒ Object
Returns the value of attribute sku.
Instance Method Summary collapse
Methods included from DataHelper
#format_amount, #format_discount_amount
Methods included from Model
#attributes, #attributes_for_change, #create, included, #initialize, #reinitialize, #update
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
7 8 9 |
# File 'lib/jirafe/resource/carts/item.rb', line 7 def category @category end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/jirafe/resource/carts/item.rb', line 7 def name @name end |
#price ⇒ Object
Returns the value of attribute price.
7 8 9 |
# File 'lib/jirafe/resource/carts/item.rb', line 7 def price @price end |
#quantity ⇒ Object
Returns the value of attribute quantity.
7 8 9 |
# File 'lib/jirafe/resource/carts/item.rb', line 7 def quantity @quantity end |
#sku ⇒ Object
Returns the value of attribute sku.
7 8 9 |
# File 'lib/jirafe/resource/carts/item.rb', line 7 def sku @sku end |
Instance Method Details
#data ⇒ Object
9 10 11 |
# File 'lib/jirafe/resource/carts/item.rb', line 9 def data [sku, name, category, format_amount(price), quantity] end |