WebhookResponse
in package
Webhook metadata DTO returned by PDFGate webhook endpoints.
Table of Contents
Properties
- $createdAt : string|null
- $description : string|null
- $eventTypes : array<int, string>
- $id : string
- $secret : string|null
- $status : string
- $updatedAt : string|null
- $url : string
Methods
- __construct() : mixed
- fromArray() : self
- getCreatedAt() : string|null
- getDescription() : string|null
- getEventTypes() : array<int, string>
- getId() : string
- getSecret() : string|null
- Signing secret. Only returned once, when the webhook is created.
- getStatus() : string
- Returns one of the WebhookStatus constants.
- getUpdatedAt() : string|null
- getUrl() : string
- optionalString() : string|null
Properties
$createdAt
private
string|null
$createdAt
$description
private
string|null
$description
$eventTypes
private
array<int, string>
$eventTypes
One of the WebhookEventType constants each.
$id
private
string
$id
$secret
private
string|null
$secret
$status
private
string
$status
One of the WebhookStatus constants.
$updatedAt
private
string|null
$updatedAt
$url
private
string
$url
Methods
__construct()
public
__construct(string $id, string $url, array<int, string> $eventTypes, string $status[, string|null $description = null ][, string|null $secret = null ][, string|null $createdAt = null ][, string|null $updatedAt = null ]) : mixed
Parameters
- $id : string
- $url : string
- $eventTypes : array<int, string>
-
One of the WebhookEventType constants each.
- $status : string
-
One of the WebhookStatus constants.
- $description : string|null = null
- $secret : string|null = null
- $createdAt : string|null = null
- $updatedAt : string|null = null
fromArray()
public
static fromArray(array<string, mixed> $payload) : self
Parameters
- $payload : array<string, mixed>
Return values
selfgetCreatedAt()
public
getCreatedAt() : string|null
Return values
string|nullgetDescription()
public
getDescription() : string|null
Return values
string|nullgetEventTypes()
public
getEventTypes() : array<int, string>
Return values
array<int, string> —One of the WebhookEventType constants each.
getId()
public
getId() : string
Return values
stringgetSecret()
Signing secret. Only returned once, when the webhook is created.
public
getSecret() : string|null
Return values
string|nullgetStatus()
Returns one of the WebhookStatus constants.
public
getStatus() : string
Return values
stringgetUpdatedAt()
public
getUpdatedAt() : string|null
Return values
string|nullgetUrl()
public
getUrl() : string
Return values
stringoptionalString()
private
static optionalString(array<string, mixed> $payload, string $key) : string|null
Parameters
- $payload : array<string, mixed>
- $key : string