Beispiel #1
0
        public async Task <IActionResult> RemoveItemFromBasket(int basketid, [FromBody] BasketRemoveItemRequest request)
        {
            await _basketService.RemoveItemFromBasket(basketid, request.ProductId);

            return(Ok(new BasketRemoveItemResponse()
            {
                Success = true
            }));
        }
Beispiel #2
0
 /// <summary>
 /// Removes a specific item from a basket
 /// </summary>
 /// <param name="basketId">Basket ID</param>
 /// <param name="itemRequest">Object with details for the item to be removed</param>
 /// <returns>ction success response</returns>
 public async Task <BasketRemoveItemResponse> RemoveBasketItem(int basketId, BasketRemoveItemRequest itemRequest)
 {
     return(await new ApiHttpClient(_baseAddress).PostAsJsonAsync <BasketRemoveItemResponse>(UriHelpers.RemoveBasketItemUri(basketId), itemRequest));
 }