| Total Complexity | 2 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class Webhook extends Resource |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The enpoint for webhook requests |
||
| 9 | * |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | const ENDPOINT = '/webhook'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Create a webhook |
||
| 16 | * |
||
| 17 | * @see https://revolut-engineering.github.io/api-docs/business-api/#web-hooks-setting-up-a-web-hook Official API documentation |
||
| 18 | * @param string $url call back url of the client system, https is the supported protocol |
||
| 19 | * @return array The response body |
||
| 20 | * @throws \tbclla\Revolut\Exceptions\ApiException if the client responded with a 4xx-5xx response |
||
| 21 | * @throws \tbclla\Revolut\Exceptions\AppUnauthorizedException if the app needs to be re-authorized |
||
| 22 | */ |
||
| 23 | public function create(string $url) |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Delete the webhook |
||
| 30 | * |
||
| 31 | * @see https://revolut-engineering.github.io/api-docs/business-api/#web-hooks-deleting-a-web-hook Official API documentation |
||
| 32 | * @return void |
||
| 33 | * @throws \tbclla\Revolut\Exceptions\ApiException if the client responded with a 4xx-5xx response |
||
| 34 | * @throws \tbclla\Revolut\Exceptions\AppUnauthorizedException if the app needs to be re-authorized |
||
| 35 | */ |
||
| 36 | public function delete() : void |
||
| 41 |