| Total Complexity | 4 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class Customers extends ApiService { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param int $id |
||
| 18 | * @return Customer|null |
||
| 19 | * @throws ApiException |
||
| 20 | * @throws OAuthException |
||
| 21 | */ |
||
| 22 | public function fetch(int $id): ?Customer |
||
| 23 | { |
||
| 24 | /** @var Customer|null $fetch */ |
||
| 25 | $fetch = $this->_get('api/customers/customer' . $id); |
||
| 26 | return $fetch; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param array $data |
||
| 31 | * @return Customer|null |
||
| 32 | * @throws ApiException |
||
| 33 | * @throws OAuthException |
||
| 34 | */ |
||
| 35 | public function create(array $data): ?Customer |
||
| 36 | { |
||
| 37 | /** @var Customer|null $create */ |
||
| 38 | $create = $this->_post('api/customers/customer', $data); |
||
| 39 | return $create; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param int $id |
||
| 44 | * @param array $data |
||
| 45 | * @return Customer|null |
||
| 46 | * @throws ApiException |
||
| 47 | * @throws OAuthException |
||
| 48 | */ |
||
| 49 | public function update(int $id, array $data): ?Customer |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param string $search |
||
| 58 | * @return ListResource |
||
| 59 | */ |
||
| 60 | public function all(string $search = ''): ListResource { |
||
| 62 | } |
||
| 63 | } |
||
| 64 |