protected function getSaleFromShipment(ShipmentInterface $shipment)
    {
        if (null === $sale = $shipment->getSale()) {
            $cs = $this->persistenceHelper->getChangeSet($shipment, $this->getSalePropertyPath());
            if (!empty($cs)) {
                $sale = $cs[0];
            }
        }

        if (!$sale instanceof SaleInterface) {
            throw new RuntimeException("Failed to retrieve shipment's sale.");
        }

        return $sale;
    }
protected function getSaleFromShipment(ShipmentInterface $shipment)
    {
        if (null === $sale = $shipment->getSale()) {
            $cs = $this->persistenceHelper->getChangeSet($shipment, $this->getSalePropertyPath());
            if (!empty($cs)) {
                $sale = $cs[0];
            }
        }

        if (!$sale instanceof SaleInterface) {
            throw new RuntimeException("Failed to retrieve shipment's sale.");
        }

        return $sale;
    }
Returns the shipment's sale.

@param ShipmentInterface $shipment

@return SaleInterface|ShipmentSubjectInterface