PHP 클래스 PayPal\Api\Webhook

One or more webhook objects.
상속: extends PayPal\Common\PayPalResourceModel
파일 보기 프로젝트 열기: paypal/rest-api-sdk-php 1 사용 예제들

공개 메소드들

메소드 설명
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