com.paypal.api.payments
Class Event

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

public class Event
extends Object


Constructor Summary
Event()
          Default Constructor
 
Method Summary
static Event get(APIContext apiContext, String eventId)
          Retrieves the Webhooks event resource identified by event_id.
static Event get(String accessToken, String eventId)
          Retrieves the Webhooks event resource identified by event_id.
 String getCreateTime()
          Getter for createTime
 String getEventType()
          Getter for eventType
 String getId()
          Getter for id
static String getLastRequest()
          Returns the last request sent to the Service
static String getLastResponse()
          Returns the last response returned by the Service
 List<Links> getLinks()
          Getter for links
 Object getResource()
          Getter for resource
 String getResourceType()
          Getter for resourceType
 String getSummary()
          Getter for summary
static void initConfig(File file)
          Initialize using a File(Properties file)
static void initConfig(InputStream is)
          Initialize using InputStream(of a Properties file)
static void initConfig(Properties properties)
          Initialize using Properties
static EventList list(APIContext apiContext, String queryParams)
          Retrieves the list of Webhooks events resources for the application associated with token.
static EventList list(String accessToken, String queryParams)
          Retrieves the list of Webhooks events resources for the application associated with token.
 Event resend(APIContext apiContext)
          Resends the Webhooks event resource identified by event_id.
 Event resend(String accessToken)
          Resends the Webhooks event resource identified by event_id.
 Event setCreateTime(String createTime)
          Setter for createTime
 Event setEventType(String eventType)
          Setter for eventType
 Event setId(String id)
          Setter for id
 Event setLinks(List<Links> links)
          Setter for links
 Event setResource(Object resource)
          Setter for resource
 Event setResourceType(String resourceType)
          Setter for resourceType
 Event setSummary(String summary)
          Setter for summary
 String toJSON()
          Returns a JSON string corresponding to object state
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Event

public Event()
Default Constructor

Method Detail

getLastRequest

public static String getLastRequest()
Returns the last request sent to the Service

Returns:
Last request sent to the server

getLastResponse

public static String getLastResponse()
Returns the last response returned by the Service

Returns:
Last response got from the Service

initConfig

public static void initConfig(InputStream is)
                       throws PayPalRESTException
Initialize using InputStream(of a Properties file)

Parameters:
is - InputStream
Throws:
PayPalRESTException

initConfig

public static void initConfig(File file)
                       throws PayPalRESTException
Initialize using a File(Properties file)

Parameters:
file - File object of a properties entity
Throws:
PayPalRESTException

initConfig

public static void initConfig(Properties properties)
Initialize using Properties

Parameters:
properties - Properties object

setId

public Event setId(String id)
Setter for id


getId

public String getId()
Getter for id


setCreateTime

public Event setCreateTime(String createTime)
Setter for createTime


getCreateTime

public String getCreateTime()
Getter for createTime


setResourceType

public Event setResourceType(String resourceType)
Setter for resourceType


getResourceType

public String getResourceType()
Getter for resourceType


setEventType

public Event setEventType(String eventType)
Setter for eventType


getEventType

public String getEventType()
Getter for eventType


setSummary

public Event setSummary(String summary)
Setter for summary


getSummary

public String getSummary()
Getter for summary


setResource

public Event setResource(Object resource)
Setter for resource


getResource

public Object getResource()
Getter for resource


setLinks

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


getLinks

public List<Links> getLinks()
Getter for links


get

public static Event get(String accessToken,
                        String eventId)
                 throws PayPalRESTException
Retrieves the Webhooks event resource identified by event_id. Can be used to retrieve the payload for an event.

Parameters:
accessToken - Access Token used for the API call.
eventId - String
Returns:
Event
Throws:
PayPalRESTException

get

public static Event get(APIContext apiContext,
                        String eventId)
                 throws PayPalRESTException
Retrieves the Webhooks event resource identified by event_id. Can be used to retrieve the payload for an event.

Parameters:
apiContext - APIContext used for the API call.
eventId - String
Returns:
Event
Throws:
PayPalRESTException

resend

public Event resend(String accessToken)
             throws PayPalRESTException
Resends the Webhooks event resource identified by event_id.

Parameters:
accessToken - Access Token used for the API call.
Returns:
Event
Throws:
PayPalRESTException

resend

public Event resend(APIContext apiContext)
             throws PayPalRESTException
Resends the Webhooks event resource identified by event_id.

Parameters:
apiContext - APIContext used for the API call.
Returns:
Event
Throws:
PayPalRESTException

list

public static EventList list(String accessToken,
                             String queryParams)
                      throws PayPalRESTException
Retrieves the list of Webhooks events resources for the application associated with token. The developers can use it to see list of past webhooks events.

Parameters:
accessToken - Access Token used for the API call.
Returns:
EventList
Throws:
PayPalRESTException

list

public static EventList list(APIContext apiContext,
                             String queryParams)
                      throws PayPalRESTException
Retrieves the list of Webhooks events resources for the application associated with token. The developers can use it to see list of past webhooks events.

Parameters:
apiContext - APIContext used for the API call.
Returns:
EventList
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.