<?php

namespace App\Services\Notifications;

class NotificationDeliveryResult
{
    public function __construct(
        public readonly bool $success,
        public readonly ?string $response = null,
        public readonly ?string $error = null,
    ) {}

    public static function delivered(?string $response = null): self
    {
        return new self(true, $response, null);
    }

    public static function failed(string $error, ?string $response = null): self
    {
        return new self(false, $response, $error);
    }
}
