PHP Class PayPal\Api\Webhook

One or more webhook objects.
Inheritance: extends PayPal\Common\PayPalResourceModel
Afficher le fichier Open project: paypal/rest-api-sdk-php Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

addEventType() public méthode

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

create() public méthode

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
Résultat Webhook

delete() public méthode

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
Résultat boolean

get() public static méthode

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
Résultat Webhook

getAll() public static méthode

Retrieves all Webhooks for the application associated with access token.
Deprecation: 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
Résultat WebhookList

getAllWithParams() public static méthode

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
Résultat WebhookList

getEventTypes() public méthode

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[]
Résultat WebhookEventType[]

getId() public méthode

The ID of the webhook.
public getId ( ) : string
Résultat string

getUrl() public méthode

The URL that is configured to listen on localhost for incoming POST notification messages that contain event information.
public getUrl ( ) : string
Résultat string

removeEventType() public méthode

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

setEventTypes() public méthode

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() public méthode

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

setUrl() public méthode

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() public méthode

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
Résultat Webhook