Module: PublicOrders
- Included in:
- PublicEcommerce
- Defined in:
- lib/pub/ecommerce/orders.rb
Instance Method Summary collapse
-
#add_item_to_shopping_cart(data, options = nil) ⇒ Object
Add Item To Shopping Cart.
-
#get_my_shopping_cart(options = nil) ⇒ Object
Get My Shopping Cart.
Instance Method Details
#add_item_to_shopping_cart(data, options = nil) ⇒ Object
Add Item To Shopping Cart.
Add an item into a shopping cart.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
quantity: 1,
sku_id: 1,
price_list_id: 1
}
@data = @mints_ pub.add_item_to_shopping_cart(data)
28 29 30 |
# File 'lib/pub/ecommerce/orders.rb', line 28 def add_item_to_shopping_cart(data, = nil) @client.raw('post', '/ecommerce/shopping-cart', , data_transform(data)) end |
#get_my_shopping_cart(options = nil) ⇒ Object
Get My Shopping Cart.
Get a collection of items in the shopping cart.
Example
@data = @mints_ pub.get_my_shopping_cart
10 11 12 |
# File 'lib/pub/ecommerce/orders.rb', line 10 def get_my_shopping_cart( = nil) @client.raw('get', '/ecommerce/my-shopping-cart', , nil) end |