public function setDeliveryOptions(DeliveryOptions $deliveryOptions): Letter
    {
        if ($this->envelope && $this->envelope->isNormalLetter()) {
            throw new LogicException('Delivery options are not supported for non-printed letters.');
        }

        $this->deliveryOptions = $deliveryOptions;

        return $this;
    }
public function setDeliveryOptions(DeliveryOptions $deliveryOptions): Letter
    {
        if ($this->envelope && $this->envelope->isNormalLetter()) {
            throw new LogicException('Delivery options are not supported for non-printed letters.');
        }

        $this->deliveryOptions = $deliveryOptions;

        return $this;
    }
public function setDeliveryOptions ( DeliveryOptions $ deliveryOptions ) : Letter { if ( $ this -> envelope && $ this -> envelope -> isNormalLetter ( ) ) { throw new LogicException ( 'Delivery options are not supported for non-printed letters.' ) ; } $ this -> deliveryOptions = $ deliveryOptions ; return $ this ; }
Set the delivery options

@param DeliveryOptions $deliveryOptions

@return self
@throws LogicException If the letter isn't a hybrid (printed) letter
Set the delivery options