Class: SolidusDrip::ShopperActivity::Order
- Defined in:
- lib/solidus_drip/shopper_activity/order.rb
Instance Attribute Summary collapse
-
#order ⇒ Object
Returns the value of attribute order.
Attributes inherited from Base
Instance Method Summary collapse
-
#cart_activity(action) ⇒ Object
Cart Activity helps identify cart abandonment.
-
#initialize(order) ⇒ Order
constructor
ShopperActivity::Order relies on order data to be useful.
-
#order_activity(action) ⇒ Object
Order Activity helps identify a user’s lifetime value by tracking the values.
Constructor Details
#initialize(order) ⇒ Order
ShopperActivity::Order relies on order data to be useful. We call super to initialize the client and then we set the order attribute to be used in the API calls.
15 16 17 18 |
# File 'lib/solidus_drip/shopper_activity/order.rb', line 15 def initialize(order) super @order = order end |
Instance Attribute Details
#order ⇒ Object
Returns the value of attribute order.
6 7 8 |
# File 'lib/solidus_drip/shopper_activity/order.rb', line 6 def order @order end |
Instance Method Details
#cart_activity(action) ⇒ Object
Cart Activity helps identify cart abandonment.
26 27 28 29 30 31 |
# File 'lib/solidus_drip/shopper_activity/order.rb', line 26 def cart_activity(action) response = client.create_cart_activity_event(cart_data(action)) handle_error_response(response) if !response.success? response.success? end |
#order_activity(action) ⇒ Object
Order Activity helps identify a user’s lifetime value by tracking the values
40 41 42 43 44 45 |
# File 'lib/solidus_drip/shopper_activity/order.rb', line 40 def order_activity(action) response = client.create_order_activity_event(order_data(action)) handle_error_response(response) if !response.success? response.success? end |