| Total Complexity | 3 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class Webhook extends Resource |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The Revolut merchant web-hook endpoint |
||
| 9 | * |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | const ENDPOINT = '/webhooks'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Set the web-hook |
||
| 16 | * |
||
| 17 | * @param string $url |
||
| 18 | * @return array The request body |
||
| 19 | * @throws \tbclla\RevolutMerchant\Exceptions\MerchantException |
||
| 20 | */ |
||
| 21 | public function set(string $url = null) |
||
| 26 | ] |
||
| 27 | ]); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Revoke the web-hook |
||
| 32 | * |
||
| 33 | * @return array The request body |
||
| 34 | * @throws \tbclla\RevolutMerchant\Exceptions\MerchantException |
||
| 35 | */ |
||
| 36 | public function revoke() |
||
| 37 | { |
||
| 38 | return $this->set(); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Retrieve the web-hooks |
||
| 43 | * |
||
| 44 | * @return array The request body |
||
| 45 | * @throws \tbclla\RevolutMerchant\Exceptions\MerchantException |
||
| 46 | */ |
||
| 47 | public function retrieve() |
||
| 50 | } |
||
| 51 | } |
||
| 52 |