<?php

declare(strict_types=1);

namespace Gls\GlsPoland\PrestaShop\Order\Exception;

final class OrderNotFoundException extends \RuntimeException
{
    private $orderId;

    public function __construct(int $orderId, string $message = '')
    {
        parent::__construct($message);
        $this->orderId = $orderId;
    }

    public static function create(int $orderId): self
    {
        return new self($orderId, sprintf('Order with ID %d does not exist.', $orderId));
    }

    public function getOrderId(): int
    {
        return $this->orderId;
    }
}
