*/ abstract class BaseResponse implements ApiResponse { private $webhook = []; private $message; final private function __construct() { } public static function create(array $data): self { $model = new static(); $model->webhook = $data['webhook'] ?? []; $model->message = $data['message'] ?? ''; return $model; } public function getWebhookUrl(): ?string { return $this->webhook['url'] ?? null; } public function getMessage(): string { return $this->message; } }