Common/Preparer/SalePreparer.php
protected function purge(ShipmentInterface $shipment)
    {
        foreach ($shipment->getItems() as $item) {
            if (0 == $item->getAvailable()) {
                $shipment->removeItem($item);
            }
        }
    }
protected function purge(ShipmentInterface $shipment)
    {
        foreach ($shipment->getItems() as $item) {
            if (0 == $item->getAvailable()) {
                $shipment->removeItem($item);
            }
        }
    }
Purges the shipment by removing items which are not available.

@param ShipmentInterface $shipment