public class Webhook extends PayPalResource
| Constructor and Description |
|---|
Webhook()
Default Constructor
|
Webhook(java.lang.String url,
java.util.List<EventType> eventTypes)
Parameterized Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(java.lang.Object other) |
Webhook |
create(APIContext apiContext,
Webhook webhook)
Subscribes your webhook listener to events.
|
Webhook |
create(java.lang.String accessToken,
Webhook webhook)
Deprecated.
Please use
create(APIContext, Webhook) instead. |
void |
delete(APIContext apiContext,
java.lang.String webhookId)
Deletes a webhook, by ID.
|
void |
delete(java.lang.String accessToken,
java.lang.String webhookId)
Deprecated.
Please use
delete(APIContext, String) instead. |
boolean |
equals(java.lang.Object o) |
Webhook |
get(APIContext apiContext,
java.lang.String webhookId)
Shows details for a webhook, by ID.
|
Webhook |
get(java.lang.String accessToken,
java.lang.String webhookId)
Deprecated.
Please use
get(APIContext, String) instead. |
java.util.List<EventType> |
getEventTypes()
A list of up to ten events to which to subscribe your webhook.
|
java.lang.String |
getId()
The ID of the webhook.
|
java.util.List<Links> |
getLinks()
The HATEOAS links related to this call.
|
java.lang.String |
getUrl()
The URL that is configured to listen on `localhost` for incoming `POST` notification messages that contain event information.
|
int |
hashCode() |
Webhook |
setEventTypes(java.util.List<EventType> eventTypes)
A list of up to ten events to which to subscribe your webhook.
|
Webhook |
setId(java.lang.String id)
The ID of the webhook.
|
Webhook |
setLinks(java.util.List<Links> links)
The HATEOAS links related to this call.
|
Webhook |
setUrl(java.lang.String url)
The URL that is configured to listen on `localhost` for incoming `POST` notification messages that contain event information.
|
Webhook |
update(APIContext apiContext,
java.lang.String webhookId,
java.lang.String patchRequest)
Replaces webhook fields with new values.
|
Webhook |
update(java.lang.String accessToken,
java.lang.String webhookId,
java.lang.String patchRequest)
Deprecated.
Please use
update(APIContext, String, String) instead. |
configureAndExecute, configureAndExecute, configureAndExecute, configureAndExecute, createAPICallPreHandler, getClientCredential, getClientID, getClientSecret, getConfigurations, getCredential, getLastRequest, getLastResponse, getOAuthTokenCredential, initConfig, initConfig, initConfig, initializeToDefaulttoJSON, toStringpublic Webhook()
public Webhook(java.lang.String url,
java.util.List<EventType> eventTypes)
@Deprecated public Webhook create(java.lang.String accessToken, Webhook webhook) throws PayPalRESTException
create(APIContext, Webhook) instead.accessToken - Access Token used for the API call.webhook - Webhook requestPayPalRESTExceptionpublic Webhook create(APIContext apiContext, Webhook webhook) throws PayPalRESTException
apiContext - APIContext used for the API call.webhook - Webhook requestPayPalRESTException@Deprecated public Webhook get(java.lang.String accessToken, java.lang.String webhookId) throws PayPalRESTException
get(APIContext, String) instead.accessToken - Access Token used for the API call.webhookId - Identifier of the webhookPayPalRESTExceptionpublic Webhook get(APIContext apiContext, java.lang.String webhookId) throws PayPalRESTException
apiContext - APIContext used for the API call.webhookId - Identifier of the webhookPayPalRESTException@Deprecated public Webhook update(java.lang.String accessToken, java.lang.String webhookId, java.lang.String patchRequest) throws PayPalRESTException
update(APIContext, String, String) instead.accessToken - Access Token used for the API call.webhookId - Identifier of the webhookpatchRequest - patchRequestPayPalRESTExceptionpublic Webhook update(APIContext apiContext, java.lang.String webhookId, java.lang.String patchRequest) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTException@Deprecated
public void delete(java.lang.String accessToken,
java.lang.String webhookId)
throws PayPalRESTException
delete(APIContext, String) instead.accessToken - Access Token used for the API call.webhookId - Identifier of the webhookPayPalRESTExceptionpublic void delete(APIContext apiContext, java.lang.String webhookId) throws PayPalRESTException
apiContext - APIContext used for the API call.webhookId - Identifier of the webhookPayPalRESTExceptionpublic java.lang.String getId()
public java.lang.String getUrl()
public java.util.List<EventType> getEventTypes()
public java.util.List<Links> getLinks()
public Webhook setId(java.lang.String id)
public Webhook setUrl(java.lang.String url)
public Webhook setEventTypes(java.util.List<EventType> eventTypes)
public Webhook setLinks(java.util.List<Links> links)
public boolean equals(java.lang.Object o)
equals in class PayPalModelprotected boolean canEqual(java.lang.Object other)
canEqual in class PayPalModelpublic int hashCode()
hashCode in class PayPalModel