CreateWebhook.php
2 years ago
DeleteWebhook.php
2 years ago
GenerateClientToken.php
2 years ago
GetAccessToken.php
2 years ago
UpdateWebhook.php
2 years ago
VerifyWebhookSignature.php
3 years ago
UpdateWebhook.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\PaymentGateways\PayPalCommerce\PayPalCheckoutSdk\Requests; |
| 4 | |
| 5 | use PayPalHttp\HttpRequest; |
| 6 | |
| 7 | /** |
| 8 | * Class UpdateWebhook. |
| 9 | * |
| 10 | * @since 2.32.0 |
| 11 | */ |
| 12 | class UpdateWebhook extends HttpRequest |
| 13 | { |
| 14 | /** |
| 15 | * @since 2.32.0 |
| 16 | * |
| 17 | * @param string $webhookId Webhook ID. |
| 18 | * @param array $requestBody Request body. |
| 19 | */ |
| 20 | public function __construct(string $webhookId, array $requestBody) |
| 21 | { |
| 22 | parent::__construct("/v1/notifications/webhooks/$webhookId", 'PATCH'); |
| 23 | |
| 24 | $this->headers['Content-Type'] = 'application/json'; |
| 25 | $this->body = wp_json_encode($requestBody); |
| 26 | } |
| 27 | } |
| 28 |