<?php

namespace App\Services\Graph;

class GraphResponse
{
    public function __construct(
        public readonly bool $success,
        public readonly array $data = [],
        public readonly ?int $status = null,
        public readonly array $errors = [],
        public readonly array $warnings = [],
        public readonly array $meta = [],
    ) {}

    public function successful(): bool
    {
        return $this->success;
    }

    public function failed(): bool
    {
        return $this->success === false;
    }
}
