Class: Jirafe::Callback::Events::Item
- Inherits:
-
Object
- Object
- Jirafe::Callback::Events::Item
- Includes:
- DataHelper, Model
- Defined in:
- lib/jirafe/callback/events/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/callback/events/item.rb', line 7 def category @category end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/jirafe/callback/events/item.rb', line 7 def name @name end |
#price ⇒ Object
Returns the value of attribute price.
7 8 9 |
# File 'lib/jirafe/callback/events/item.rb', line 7 def price @price end |
#quantity ⇒ Object
Returns the value of attribute quantity.
7 8 9 |
# File 'lib/jirafe/callback/events/item.rb', line 7 def quantity @quantity end |
#sku ⇒ Object
Returns the value of attribute sku.
7 8 9 |
# File 'lib/jirafe/callback/events/item.rb', line 7 def sku @sku end |
Instance Method Details
#data ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/jirafe/callback/events/item.rb', line 9 def data { "sku" => sku, "name" => name, "price" => format_amount(price), "quantity" => quantity, "category" => category } end |