<?php

declare(strict_types=1);

namespace CloudXM\NFe\DTOs;

/**
 * Endpoints Config DTO
 * 
 * Represents API endpoints configuration
 */
class EndpointsConfig
{
    public function __construct(
        public string $invoices,
        public string $tenants
    ) {}

    /**
     * Create from API response array
     */
    public static function fromArray(array $data): self
    {
        return new self(
            invoices: $data['invoices'] ?? '/v1/invoices',
            tenants: $data['tenants'] ?? '/v1/tenants'
        );
    }
}
