public function getShipments($filter = null)
    {
        if (null === $filter) {
            return $this->shipments;
        }

        return $this->shipments->filter(function(ShipmentInterface $shipment) use ($filter) {
            return $filter xor $shipment->isReturn();
        });
    }