Method: ASIN::Client#update_items

Defined in:
lib/asin/client.rb

#update_items(cart, *items) ⇒ Object

Performs an CartModify REST call against the Amazon API.

Expects a cart created with create_cart and one ore more Item-Hashes to modify and returns an updated cart:

cart = update_items(cart, {:cart_item_id => cart.items.first.CartItemId, :quantity => 7})

Options:

Additional parameters for the API call like this:

update_items(cart, {:cart_item_id => cart.items.first.CartItemId, :action => :SaveForLater}, {:cart_item_id => cart.items.first.CartItemId, :quantity => 7})

Have a look at the different cart item operation values on the Amazon-Documentation



196
197
198
# File 'lib/asin/client.rb', line 196

def update_items(cart, *items)
  cart(:CartModify, create_item_params(items).merge({:CartId => cart.cart_id, :HMAC => cart.hmac}))
end