Adds missing endpoints
This commit is contained in:
parent
ace365f89e
commit
9e323171fd
8 changed files with 451 additions and 3 deletions
73
src/Api/Tenancy/ContactAssignments.php
Normal file
73
src/Api/Tenancy/ContactAssignments.php
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
|
||||
namespace Hosterra\NetBox\Api\Tenancy;
|
||||
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ContactAssignments extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/tenancy/contact-assignments/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/tenancy/contact-assignments/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/tenancy/contact-assignments/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/tenancy/contact-assignments/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/tenancy/contact-assignments/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/tenancy/contact-assignments/" . $id . "/", $params);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue