Copied!

WebhookServiceInterface

WebhookServiceInterface.php : 21
Interface

Methods

publiccountDeliveries()

WebhookServiceInterface.php : 86
public countDeliveries(int $webhookId[, string|null $status = null ]) : int

Parameters

Name Type Default value Description
$webhookId int - -
$status string|null null -

Return values

int

Tags
Throws
UnauthorizedException

if the current user lacks the webhook/read policy.

publiccountWebhooks()

WebhookServiceInterface.php : 48
public countWebhooks() : int

Return values

int

Tags
Throws
UnauthorizedException

if the current user lacks the webhook/read policy.

publiccreateWebhook()

WebhookServiceInterface.php : 27
public createWebhook(WebhookCreateStruct $struct) : Webhook

Parameters

Name Type Default value Description
$struct WebhookCreateStruct - -

Return values

Webhook

Tags
Throws
UnauthorizedException

if the current user lacks the webhook/create policy.

Throws
ValidationFailedException

if the struct is invalid.

publicdeleteWebhook()

WebhookServiceInterface.php : 63
public deleteWebhook(int $id) : void

Parameters

Name Type Default value Description
$id int - -
Tags
Throws
UnauthorizedException

if the current user lacks the webhook/delete policy.

publicloadDeliveries()

WebhookServiceInterface.php : 76
public loadDeliveries(int $webhookId[, int|null $limit = null ][, int $offset = 0 ][, string|null $status = null ]) : array<string|int, WebhookDelivery>

Parameters

Name Type Default value Description
$webhookId int - -
$limit int|null null -
$offset int 0 -
$status string|null null -

Return values

array<string|int, WebhookDelivery>

Tags
Throws
UnauthorizedException

if the current user lacks the webhook/read policy.

publicloadDelivery()

WebhookServiceInterface.php : 95
public loadDelivery(string $id[, int|null $webhookId = null ]) : WebhookDelivery

Parameters

Name Type Default value Description
$id string - -
$webhookId int|null null -

Return values

WebhookDelivery

Tags
Throws
UnauthorizedException

if the current user lacks the webhook/read policy.

Throws
DeliveryNotFoundException

if no delivery exists under the given id, or it does not belong to the given webhook.

publicloadWebhook()

WebhookServiceInterface.php : 33
public loadWebhook(int $id) : Webhook

Parameters

Name Type Default value Description
$id int - -

Return values

Webhook

Tags
Throws
UnauthorizedException

if the current user lacks the webhook/read policy.

Throws
WebhookNotFoundException

if no webhook exists under the given id.

publicloadWebhooks()

WebhookServiceInterface.php : 40
public loadWebhooks([int|null $limit = null ][, int $offset = 0 ]) : array<string|int, Webhook>

Parameters

Name Type Default value Description
$limit int|null null -
$offset int 0 -

Return values

array<string|int, Webhook>

Tags
Throws
UnauthorizedException

if the current user lacks the webhook/read policy.

publicregenerateSecret()

WebhookServiceInterface.php : 69
public regenerateSecret(int $id) : Webhook

Parameters

Name Type Default value Description
$id int - -

Return values

Webhook

Tags
Throws
UnauthorizedException

if the current user lacks the webhook/update policy.

Throws
WebhookNotFoundException

if no webhook exists under the given id.

publicresendDelivery()

WebhookServiceInterface.php : 111
public resendDelivery(string $deliveryId[, int|null $webhookId = null ]) : WebhookDelivery

Parameters

Name Type Default value Description
$deliveryId string - -
$webhookId int|null null -

Return values

WebhookDelivery

Tags
Throws
UnauthorizedException

if the current user lacks the webhook/update policy.

Throws
DeliveryNotFoundException

if no delivery exists under the given id, or it does not belong to the given webhook.

publicsendTest()

WebhookServiceInterface.php : 105
public sendTest(int $id) : WebhookDelivery

Parameters

Name Type Default value Description
$id int - -

Return values

WebhookDelivery

Tags
Throws
UnauthorizedException

if the current user lacks the webhook/test policy.

Throws
WebhookNotFoundException

if no webhook exists under the given id.

Throws
InvalidWebhookException

if the webhook has no event types to send a test with.

publicupdateWebhook()

WebhookServiceInterface.php : 55
public updateWebhook(int $id, WebhookUpdateStruct $struct) : Webhook

Parameters

Name Type Default value Description
$id int - -
$struct WebhookUpdateStruct - -

Return values

Webhook

Tags
Throws
UnauthorizedException

if the current user lacks the webhook/update policy.

Throws
ValidationFailedException

if the struct is invalid.

Throws
WebhookNotFoundException

if no webhook exists under the given id.