netbox-php/src/Api/Tenancy/Tenants.php
2021-10-27 14:14:25 -04:00

58 lines
1.2 KiB
PHP

<?php
namespace wickedsoft\NetBox\Api\Tenancy;
use wickedsoft\NetBox\Api\AbstractApi;
class Tenants extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/tenancy/tenants/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function remove($id, $params=[])
{
return $this->delete("/tenancy/tenants/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/tenancy/tenants/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/tenancy/tenants/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/tenancy/tenants/".$id."/", $params);
}
}