| Total Complexity | 3 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class Catalog extends Client |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Get services of "I'am operator" by page number (first page by default) |
||
| 15 | * |
||
| 16 | * @link https://api.u-on.ru/{key}/bcard-bonus-by-card/{id}.{_format} |
||
| 17 | * @param int $page - Unique card ID |
||
| 18 | * @return array|false |
||
| 19 | */ |
||
| 20 | public function get($page = 1) |
||
| 21 | { |
||
| 22 | $endpoint = '/catalog-service/' . $page; |
||
| 23 | return $this->doRequest('get', $endpoint); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Create services of "I'am operator" |
||
| 28 | * |
||
| 29 | * @link https://api.u-on.ru/{key}/bcard-activate/create.{_format} |
||
| 30 | * @param array $parameters - List of parameters [s_id ...] |
||
| 31 | * @return array|false |
||
| 32 | */ |
||
| 33 | public function create(array $parameters) |
||
| 34 | { |
||
| 35 | $endpoint = '/catalog-service/create'; |
||
| 36 | return $this->doRequest('post', $endpoint, $parameters); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Update services of "I'am operator" |
||
| 41 | * |
||
| 42 | * @link https://api.u-on.ru/{key}/catalog-service/update/{id}.{_format} |
||
| 43 | * @param int $id - Unique ID of element |
||
| 44 | * @param array $parameters - List of parameters [s_id ...] |
||
| 45 | * @return array|false |
||
| 46 | */ |
||
| 47 | public function update($id, array $parameters) |
||
| 51 | } |
||
| 52 | |||
| 53 | } |
||
| 54 |