com.paypal.api.payments
Class Webhook

java.lang.Object
  extended by com.paypal.api.payments.Webhook

public class Webhook
extends Object


Constructor Summary
Webhook()
          Default Constructor
Webhook(String url, List<EventType> eventTypes)
          Parameterized Constructor
 
Method Summary
 Webhook create(APIContext apiContext, Webhook webhook)
          Creates the Webhook for the application associated with the access token.
 Webhook create(String accessToken, Webhook webhook)
          Creates the Webhook for the application associated with the access token.
 void delete(APIContext apiContext, String webhookId)
          Deletes the Webhook identified by webhook_id for the application associated with access token.
 void delete(String accessToken, String webhookId)
          Deletes the Webhook identified by webhook_id for the application associated with access token.
 Webhook get(APIContext apiContext, String webhookId)
          Retrieves the Webhook identified by webhook_id for the application associated with access token.
 Webhook get(String accessToken, String webhookId)
          Retrieves the Webhook identified by webhook_id for the application associated with access token.
 List<EventType> getEventTypes()
          Getter for eventTypes
 String getId()
          Getter for id
 List<Links> getLinks()
          Getter for links
 String getUrl()
          Getter for url
 Webhook setEventTypes(List<EventType> eventTypes)
          Setter for eventTypes
 Webhook setId(String id)
          Setter for id
 Webhook setLinks(List<Links> links)
          Setter for links
 Webhook setUrl(String url)
          Setter for url
 String toJSON()
          Returns a JSON string corresponding to object state
 String toString()
           
 Webhook update(APIContext apiContext, String webhookId, String patchRequest)
          Updates the Webhook identified by webhook_id for the application associated with access token.
 Webhook update(String accessToken, String webhookId, String patchRequest)
          Updates the Webhook identified by webhook_id for the application associated with access token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Webhook

public Webhook()
Default Constructor


Webhook

public Webhook(String url,
               List<EventType> eventTypes)
Parameterized Constructor

Method Detail

setId

public Webhook setId(String id)
Setter for id


getId

public String getId()
Getter for id


setUrl

public Webhook setUrl(String url)
Setter for url


getUrl

public String getUrl()
Getter for url


setEventTypes

public Webhook setEventTypes(List<EventType> eventTypes)
Setter for eventTypes


getEventTypes

public List<EventType> getEventTypes()
Getter for eventTypes


setLinks

public Webhook setLinks(List<Links> links)
Setter for links


getLinks

public List<Links> getLinks()
Getter for links


create

public Webhook create(String accessToken,
                      Webhook webhook)
               throws PayPalRESTException
Creates the Webhook for the application associated with the access token.

Parameters:
accessToken - Access Token used for the API call.
webhook - Webhook Request
Returns:
Webhook
Throws:
PayPalRESTException

create

public Webhook create(APIContext apiContext,
                      Webhook webhook)
               throws PayPalRESTException
Creates the Webhook for the application associated with the access token.

Parameters:
apiContext - APIContext used for the API call.
webhook - Webhook Request
Returns:
Webhook
Throws:
PayPalRESTException

get

public Webhook get(String accessToken,
                   String webhookId)
            throws PayPalRESTException
Retrieves the Webhook identified by webhook_id for the application associated with access token.

Parameters:
accessToken - Access Token used for the API call.
webhookId - Identifier of the webhook
Returns:
Webhook
Throws:
PayPalRESTException

get

public Webhook get(APIContext apiContext,
                   String webhookId)
            throws PayPalRESTException
Retrieves the Webhook identified by webhook_id for the application associated with access token.

Parameters:
apiContext - APIContext used for the API call.
webhookId - Identifier of the webhook
patchRequest - patchRequest
Returns:
Webhook
Throws:
PayPalRESTException

update

public Webhook update(String accessToken,
                      String webhookId,
                      String patchRequest)
               throws PayPalRESTException
Updates the Webhook identified by webhook_id for the application associated with access token.

Parameters:
accessToken - Access Token used for the API call.
webhookId - Identifier of the webhook
patchRequest - patchRequest
Returns:
Webhook
Throws:
PayPalRESTException

update

public Webhook update(APIContext apiContext,
                      String webhookId,
                      String patchRequest)
               throws PayPalRESTException
Updates the Webhook identified by webhook_id for the application associated with access token.

Parameters:
apiContext - APIContext used for the API call.
webhookId - Identifier of the webhook
Returns:
Webhook
Throws:
PayPalRESTException

delete

public void delete(String accessToken,
                   String webhookId)
            throws PayPalRESTException
Deletes the Webhook identified by webhook_id for the application associated with access token.

Parameters:
accessToken - Access Token used for the API call.
webhookId - Identifier of the webhook
Throws:
PayPalRESTException

delete

public void delete(APIContext apiContext,
                   String webhookId)
            throws PayPalRESTException
Deletes the Webhook identified by webhook_id for the application associated with access token.

Parameters:
apiContext - APIContext used for the API call.
webhookId - Identifier of the webhook
Throws:
PayPalRESTException

toJSON

public String toJSON()
Returns a JSON string corresponding to object state

Returns:
JSON representation

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015. All Rights Reserved.