PHP Класс PayPal\Api\Webhook

One or more webhook objects.
Наследование: extends PayPal\Common\PayPalResourceModel
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
addEventType ( WebhookEventType $webhookEventType ) Append EventTypes to the list.
create ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Webhook Subscribes your webhook listener to events. A successful call returns a webhook object, which includes the webhook ID for later use.
delete ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : boolean Deletes a webhook, by ID.
get ( string $webhookId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Webhook Shows details for a webhook, by ID.
getAll ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : WebhookList Retrieves all Webhooks for the application associated with access token.
getAllWithParams ( array $params = [], ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : WebhookList Lists all webhooks for an app.
getEventTypes ( ) : WebhookEventType[] A list of up to ten events to which to subscribe your webhook. To subscribe to all events including new events as they are added, specify the asterisk (*) wildcard. To replace the event_types array, specify the * wildcard. To see all supported events, list available events.
getId ( ) : string The ID of the webhook.
getUrl ( ) : string The URL that is configured to listen on localhost for incoming POST notification messages that contain event information.
removeEventType ( WebhookEventType $webhookEventType ) Remove EventTypes from the list.
setEventTypes ( WebhookEventType[] $event_types ) A list of up to ten events to which to subscribe your webhook. To subscribe to all events including new events as they are added, specify the asterisk (*) wildcard. To replace the event_types array, specify the * wildcard. To see all supported events, list available events.
setId ( string $id ) The ID of the webhook.
setUrl ( string $url ) The URL that is configured to listen on localhost for incoming POST notification messages that contain event information.
update ( PatchRequest $patchRequest, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Webhook Replaces webhook fields with new values. Pass a json_patch object with replace operation and path, which is /url for a URL or /event_types for events. The value is either the URL or a list of events.

Описание методов

addEventType() публичный Метод

Append EventTypes to the list.
public addEventType ( WebhookEventType $webhookEventType )
$webhookEventType WebhookEventType

create() публичный Метод

Subscribes your webhook listener to events. A successful call returns a webhook object, which includes the webhook ID for later use.
public create ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Webhook
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPalRestCall is the Rest Call Service that is used to make rest calls
Результат Webhook

delete() публичный Метод

Deletes a webhook, by ID.
public delete ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : boolean
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPalRestCall is the Rest Call Service that is used to make rest calls
Результат boolean

get() публичный статический Метод

Shows details for a webhook, by ID.
public static get ( string $webhookId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Webhook
$webhookId string
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPalRestCall is the Rest Call Service that is used to make rest calls
Результат Webhook

getAll() публичный статический Метод

Retrieves all Webhooks for the application associated with access token.
Устаревший: Please use Webhook#getAllWithParams instead.
public static getAll ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : WebhookList
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPalRestCall is the Rest Call Service that is used to make rest calls
Результат WebhookList

getAllWithParams() публичный статический Метод

Lists all webhooks for an app.
public static getAllWithParams ( array $params = [], ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : WebhookList
$params array
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPalRestCall is the Rest Call Service that is used to make rest calls
Результат WebhookList

getEventTypes() публичный Метод

A list of up to ten events to which to subscribe your webhook. To subscribe to all events including new events as they are added, specify the asterisk (*) wildcard. To replace the event_types array, specify the * wildcard. To see all supported events, list available events.
public getEventTypes ( ) : WebhookEventType[]
Результат WebhookEventType[]

getId() публичный Метод

The ID of the webhook.
public getId ( ) : string
Результат string

getUrl() публичный Метод

The URL that is configured to listen on localhost for incoming POST notification messages that contain event information.
public getUrl ( ) : string
Результат string

removeEventType() публичный Метод

Remove EventTypes from the list.
public removeEventType ( WebhookEventType $webhookEventType )
$webhookEventType WebhookEventType

setEventTypes() публичный Метод

A list of up to ten events to which to subscribe your webhook. To subscribe to all events including new events as they are added, specify the asterisk (*) wildcard. To replace the event_types array, specify the * wildcard. To see all supported events, list available events.
public setEventTypes ( WebhookEventType[] $event_types )
$event_types WebhookEventType[]

setId() публичный Метод

The ID of the webhook.
public setId ( string $id )
$id string

setUrl() публичный Метод

The URL that is configured to listen on localhost for incoming POST notification messages that contain event information.
public setUrl ( string $url )
$url string

update() публичный Метод

Replaces webhook fields with new values. Pass a json_patch object with replace operation and path, which is /url for a URL or /event_types for events. The value is either the URL or a list of events.
public update ( PatchRequest $patchRequest, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Webhook
$patchRequest PatchRequest
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPalRestCall is the Rest Call Service that is used to make rest calls
Результат Webhook