List all the items of a cart

REST: GET /order/cart/{cartId}/item
@param cartId [required] Cart identifier
178703
public ArrayList<Long> cart_cartId_item_GET(String cartId) throws IOException {
		String qPath = "/order/cart/{cartId}/item";
		StringBuilder sb = path(qPath, cartId);
		String resp = execN(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t5);
	}
1008229
def list_items(path_to_directory, pattern, wanted):
    """"""
    if not path_to_directory:
        return set()
    needed = make_needed(pattern, path_to_directory, wanted)
    return [os.path.join(path_to_directory, name)
            for name in _names_in_directory(path_to_directory)
            if needed(name)]
403278
@Override
	public List<CommerceWishListItem> findByCommerceWishListId(
		long commerceWishListId) {
		return findByCommerceWishListId(commerceWishListId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
961161
public function getItemsByOrderId($orderId)
    {
        $result = [];
        /* aliases and tables */
        $asOrder = 'sale';
        $asPvItem = 'pv';
        $tblOrder = [$asOrder => $this->resource->getTableName(Cfg::ENTITY_MAGE_SALES_ORDER_ITEM)];
        $tblPvItem = [$asPvItem => $this->resource->getTableName(Entity::ENTITY_NAME)];
        /* SELECT FROM sales_order_item */
        $query = $this->conn->select();
        $cols = [];
        $query->from($tblOrder, $cols);
        /* LEFT JOIN prxgt_pv_sale_item pwq */
        $on = $asPvItem . '.' . Entity::A_ITEM_REF . '=' . $asOrder . '.' . Cfg::E_SALE_ORDER_ITEM_A_ITEM_ID;
        $cols = '*'; // get all columns
        $query->joinLeft($tblPvItem, $on, $cols);
        /* WHERE */
        $where = $asOrder . '.' . Cfg::E_SALE_ORDER_ITEM_A_ORDER_ID . '=' . (int)$orderId;
        $query->where($where);
        /* fetch data */
        $rows = $this->conn->fetchAll($query);
        foreach ($rows as $row) {
            /** @var Entity $item */
            $item = new Entity($row);
            $result[$item->getItemRef()] = $item;
        }
        return $result;
    }
1119778
public OvhRule rules_GET(String cartId, Long itemId) throws IOException {
		String qPath = "/domain/rules";
		StringBuilder sb = path(qPath);
		query(sb, "cartId", cartId);
		query(sb, "itemId", itemId);
		String resp = execN(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhRule.class);
	}
987850
@Override
	public List<CommerceOrder> findByUserId(long userId) {
		return findByUserId(userId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
1206864
def get_basket_items(request):
    
    bid = basket_id(request)
    return BasketItem.objects.filter(basket_id=bid), bid
749198
@Override
	public List<CommerceOrder> findAll() {
		return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
1044350
public OvhCart cart_cartId_GET(String cartId) throws IOException {
		String qPath = "/order/cart/{cartId}";
		StringBuilder sb = path(qPath, cartId);
		String resp = execN(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhCart.class);
	}
1129934
@Override
	public List<CommerceOrderItem> findAll() {
		return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
336430
public function getById(CartId $cartId) : Cart
    {
        if (!array_key_exists((string) $cartId, $this->carts)) {
            throw CartNotFoundException::byId($cartId);
        }

        return $this->carts[(string) $cartId];
    }
124202
def fetch_order(self, order_id: str) -> Order:
        """"""
        return self._fetch(f'order id={order_id}', exc=OrderNotFound)(self._order)(order_id)
306472
public void cart_cartId_assign_POST(String cartId) throws IOException {
		String qPath = "/order/cart/{cartId}/assign";
		StringBuilder sb = path(qPath, cartId);
		exec(qPath, "POST", sb.toString(), null);
	}
850261
def dynamic_content_item_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/dynamic_content/items/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
1306355
public function items()
    {
        $sessionId = $this->getSessionId();
        $userId = $this->auth->id();
        $items = $this->cartItem->getWithBuilder($this->instance, $this->getSessionId(), $userId)->get();

        return $items->filter(function ($item) {
            // Remove CartItem if product not exists
            if (empty($item->product)) {
                $item->delete();

                return false;
            }

            return true;
        });
    }
1015872
public function addCartItem($cartId, $cartItem)
    {
        $cartItem['id'] = count(session($this->itemsKey)) + 1;

        session()->push($this->itemsKey, $cartItem);
    }
1155288
public function orderItemById($item_id, \WC_Abstract_Order $WC_Order = null)
    {
        if (!($item_id = (int) $item_id)) {
            return []; // Not possible.
        } elseif (!($WC_Order = $WC_Order ?: $this->orderByItemId($item_id))) {
            return []; // Not possible.
        }
        foreach ($WC_Order->get_items() as $_item_id => $_WC_Order_Item) {
            if ($_item_id === $item_id) {
                // WC 3.0+ uses `\WC_Order_Item`.
                // <https://docs.woocommerce.com/wc-apidocs/class-WC_Abstract_Order.html>
                // <https://docs.woocommerce.com/wc-apidocs/class-WC_Order_Item.html>
                return $_WC_Order_Item; // `\WC_Order_Item|array`.
            }
        } // unset($_item_id, $_WC_Order_Item); // Housekeeping.

        return []; // Failure.
    }