-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathPointsOfService.php
More file actions
44 lines (36 loc) · 1 KB
/
PointsOfService.php
File metadata and controls
44 lines (36 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
namespace Imper86\PhpAllegroApi\Resource;
use Psr\Http\Message\ResponseInterface;
class PointsOfService extends AbstractResource
{
/**
* @param mixed[] $body
* @return ResponseInterface
*/
public function post(array $body): ResponseInterface
{
return $this->apiPost('/points-of-service', $body);
}
/**
* @param string|null $id
* @param string[]|null $query
* @return ResponseInterface
*/
public function get(?string $id, ?array $query = null): ResponseInterface
{
return $this->apiGet(sprintf('/points-of-service%s', $id ? "/{$id}" : ''), $query);
}
/**
* @param string $id
* @param mixed[] $body
* @return ResponseInterface
*/
public function put(string $id, array $body): ResponseInterface
{
return $this->apiPut("/points-of-service/{$id}", $body);
}
public function delete(string $id): ResponseInterface
{
return $this->apiDelete("/points-of-service/{$id}");
}
}