Shipment/Gateway/AbstractGateway.php
protected function clearShipment(Shipment\ShipmentInterface $shipment)
    {
        if (empty($shipment->getTrackingNumber()) && !$shipment->hasLabels()) {
            return false;
        }

        $shipment->setTrackingNumber(null);

        foreach ($shipment->getLabels() as $label) {
            $shipment->removeLabel($label);
        }

        return true;
    }
protected function clearShipment(Shipment\ShipmentInterface $shipment)
    {
        if (empty($shipment->getTrackingNumber()) && !$shipment->hasLabels()) {
            return false;
        }

        $shipment->setTrackingNumber(null);

        foreach ($shipment->getLabels() as $label) {
            $shipment->removeLabel($label);
        }

        return true;
    }
Clears the shipment data.

@param Shipment\ShipmentInterface $shipment

@return bool