C# Class PayPal.Api.Webhook

A REST API webhook resource object.

See PayPal Developer documentation for more information.

Inheritance: PayPalRelationalObject
ファイルを表示 Open project: paypal/PayPal-NET-SDK Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Create ( APIContext apiContext ) : Webhook

Subscribes your webhook listener to events. A successful call returns a [`webhook`](/docs/api/webhooks/#definition-webhook) object, which includes the webhook ID for later use.

Create ( APIContext apiContext, Webhook webhook ) : Webhook

Creates the Webhook for the application associated with the access token.

Delete ( APIContext apiContext ) : void

Deletes a webhook, by ID.

Delete ( APIContext apiContext, string webhookId ) : void

Deletes a webhook, by ID.

Get ( APIContext apiContext, string webhookId ) : Webhook

Shows details for a webhook, by ID.

GetAll ( APIContext apiContext, string anchorType = null ) : WebhookList

Lists all webhooks for an app.

Update ( APIContext apiContext, PatchRequest patchRequest ) : 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.

Update ( APIContext apiContext, string webhookId, PatchRequest patchRequest ) : Webhook

Updates the Webhook identified by webhook_id for the application associated with access token.

Method Details

Create() public method

Subscribes your webhook listener to events. A successful call returns a [`webhook`](/docs/api/webhooks/#definition-webhook) object, which includes the webhook ID for later use.
public Create ( APIContext apiContext ) : Webhook
apiContext APIContext APIContext used for the API call.
return Webhook

Create() public static method

Creates the Webhook for the application associated with the access token.
public static Create ( APIContext apiContext, Webhook webhook ) : Webhook
apiContext APIContext APIContext used for the API call.
webhook Webhook object to be created.
return Webhook

Delete() public method

Deletes a webhook, by ID.
public Delete ( APIContext apiContext ) : void
apiContext APIContext APIContext used for the API call.
return void

Delete() public static method

Deletes a webhook, by ID.
public static Delete ( APIContext apiContext, string webhookId ) : void
apiContext APIContext APIContext used for the API call.
webhookId string The ID of the webhook to delete.
return void

Get() public static method

Shows details for a webhook, by ID.
public static Get ( APIContext apiContext, string webhookId ) : Webhook
apiContext APIContext APIContext used for the API call.
webhookId string The ID of the webhook for which to show details.
return Webhook

GetAll() public static method

Lists all webhooks for an app.
public static GetAll ( APIContext apiContext, string anchorType = null ) : WebhookList
apiContext APIContext APIContext used for the API call.
anchorType string Filters the response by an entity type, `anchor_id`. Value is `APPLICATION` or `ACCOUNT`. Default is `APPLICATION`.
return WebhookList

Update() public method

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 ( APIContext apiContext, PatchRequest patchRequest ) : Webhook
apiContext APIContext APIContext used for the API call.
patchRequest PatchRequest PatchRequest
return Webhook

Update() public static method

Updates the Webhook identified by webhook_id for the application associated with access token.
public static Update ( APIContext apiContext, string webhookId, PatchRequest patchRequest ) : Webhook
apiContext APIContext APIContext used for the API call.
webhookId string ID of the webhook to be updated.
patchRequest PatchRequest PatchRequest
return Webhook