<?php

namespace Cobblestone\CcLogin\Service;

use Cobblestone\CcLogin\Helper\TenantCollection;

class TenantService extends AbstractCCService
{
    /**
     * @param int $assetPeytzId
     * @param string $xApiKey
     * @return TenantCollection
     */
    public function getTenantsForAsset(int $assetPeytzId, string $xApiKey): TenantCollection
    {
        $tenants = new TenantCollection($this->callApi( "/tenants/$assetPeytzId", [
            "x-api-key: $xApiKey"
        ]));

        return $tenants;
    }
}