netbox-php/src/Api/DCIM/RearPortTemplates.php
2024-02-12 10:46:19 +01:00

62 lines
1.4 KiB
PHP

<?php
namespace Hosterra\NetBox\Api\DCIM;
use GuzzleHttp\Exception\GuzzleException;
use Hosterra\NetBox\Api\AbstractApi;
class RearPortTemplates extends AbstractApi
{
/**
* @param array $params
* @return array
* @throws GuzzleException
*/
public function add(array $params = []): array
{
return $this->post("/dcim/rear-port-templates/", $params);
}
/**
* @param int $id
* @param array $params
* @return bool
* @throws GuzzleException
*/
public function remove(int $id, array $params = []): bool
{
return $this->delete("/dcim/rear-port-templates/" . $id . "/", $params);
}
/**
* @param int $id
* @param array $params
* @return array
* @throws GuzzleException
*/
public function edit(int $id, array $params = []): array
{
return $this->put("/dcim/rear-port-templates/" . $id . "/", $params);
}
/**
* @param array $params
* @return mixed
* @throws GuzzleException
*/
public function list(array $params = [])
{
return $this->get("/dcim/rear-port-templates/", $params);
}
/**
* @param int $id
* @param array $params
* @return mixed
* @throws GuzzleException
*/
public function show(int $id, array $params = [])
{
return $this->get("/dcim/rear-port-templates/" . $id . "/", $params);
}
}