com.paypal.api.payments
Class EventType

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

public class EventType
extends Object


Constructor Summary
EventType()
          Default Constructor
EventType(String name)
          Parameterized Constructor
 
Method Summary
static EventTypeList availableEventTypes(APIContext apiContext)
          Retrieves the master list of available Webhooks events-types resources for any webhook to subscribe to.
static EventTypeList availableEventTypes(String accessToken)
          Retrieves the master list of available Webhooks events-types resources for any webhook to subscribe to.
 String getDescription()
          Getter for description
static String getLastRequest()
          Returns the last request sent to the Service
static String getLastResponse()
          Returns the last response returned by the Service
 String getName()
          Getter for name
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
 EventType setDescription(String description)
          Setter for description
 EventType setName(String name)
          Setter for name
static EventTypeList subscribedEventTypes(APIContext apiContext, String webhookId)
          Retrieves the list of events-types subscribed by the given Webhook.
static EventTypeList subscribedEventTypes(String accessToken, String webhookId)
          Retrieves the list of events-types subscribed by the given Webhook.
 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

EventType

public EventType()
Default Constructor


EventType

public EventType(String name)
Parameterized 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

setName

public EventType setName(String name)
Setter for name


getName

public String getName()
Getter for name


setDescription

public EventType setDescription(String description)
Setter for description


getDescription

public String getDescription()
Getter for description


subscribedEventTypes

public static EventTypeList subscribedEventTypes(String accessToken,
                                                 String webhookId)
                                          throws PayPalRESTException
Retrieves the list of events-types subscribed by the given Webhook.

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

subscribedEventTypes

public static EventTypeList subscribedEventTypes(APIContext apiContext,
                                                 String webhookId)
                                          throws PayPalRESTException
Retrieves the list of events-types subscribed by the given Webhook.

Parameters:
apiContext - APIContext used for the API call.
webhookId - String
Returns:
EventTypeList
Throws:
PayPalRESTException

availableEventTypes

public static EventTypeList availableEventTypes(String accessToken)
                                         throws PayPalRESTException
Retrieves the master list of available Webhooks events-types resources for any webhook to subscribe to.

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

availableEventTypes

public static EventTypeList availableEventTypes(APIContext apiContext)
                                         throws PayPalRESTException
Retrieves the master list of available Webhooks events-types resources for any webhook to subscribe to.

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