| Total Complexity | 4 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class AccountsApi extends AbstractApi |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $apiUri = 'https://my.incapsula.com/api/prov/v1'; |
||
| 13 | |||
| 14 | public function delete(string $subAccountId): array |
||
| 15 | { |
||
| 16 | return $this->client->send(sprintf('%s/subaccounts/delete', $this->apiUri), [ |
||
| 17 | 'sub_account_id' => $subAccountId, |
||
| 18 | ]); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function add(string $subAccountName): array |
||
| 22 | { |
||
| 23 | return $this->client->send(sprintf('%s/subaccounts/add', $this->apiUri), [ |
||
| 24 | 'sub_account_name' => $subAccountName, |
||
| 25 | ]); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function list(int $pageSize = 50, int $pageNum = 0): array |
||
| 33 | ]); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getLoginToken(string $accountId): array |
||
| 43 |