public function deleteLineItem($cartId, $lineItemId)
 {
     $cart = $this->getCart($cartId);
     $cartUpdateRequest = CartUpdateRequest::ofIdAndVersion($cart->getId(), $cart->getVersion());
     $cartUpdateRequest->addAction(CartRemoveLineItemAction::ofLineItemId($lineItemId));
     $this->profiler->enter($profile = new Profile('deleteLineItem'));
     $cartResponse = $cartUpdateRequest->executeWithClient($this->client);
     $this->profiler->leave($profile);
     $cart = $cartUpdateRequest->mapResponse($cartResponse);
     return $cart;
 }
 public function deleteLineItem($locale, $cartId, $lineItemId, $customerId = null)
 {
     $client = $this->getClient();
     $cart = $this->getCart($locale, $cartId, $customerId);
     $cartUpdateRequest = CartUpdateRequest::ofIdAndVersion($cart->getId(), $cart->getVersion());
     $cartUpdateRequest->addAction(CartRemoveLineItemAction::ofLineItemId($lineItemId));
     $cartResponse = $cartUpdateRequest->executeWithClient($client);
     $cart = $cartUpdateRequest->mapFromResponse($cartResponse, $this->getMapper($locale));
     $this->session->set(self::CART_ITEM_COUNT, $cart->getLineItemCount());
     return $cart;
 }