Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.paypal.api.payments;
  
  import java.util.HashMap;
  import java.util.List;
  
 
 public class Event  extends PayPalResource {

Identifier of the Webhooks event resource.
 
 	private String id;

Time the resource was created.
 
 	private String createTime;

Name of the resource contained in resource element.
 
 	private String resourceType;

Name of the event type that occurred on resource, identified by data_resource element, to trigger the Webhooks event.
 
 	private String eventType;

A summary description of the event. E.g. A successful payment authorization was created for $$
 
 	private String summary;

This contains the resource that is identified by resource_type element.
 
 	private Object resource;

Hateoas links.
 
 	private List<Linkslinks;

Default Constructor
 
 	public Event() {
 	}


Setter for id
 
 	public Event setId(String id) {
 		this. = id;
 		return this;
 	}

Getter for id
 
 	public String getId() {
 		return this.;
 	}


Setter for createTime
 
 	public Event setCreateTime(String createTime) {
 		this. = createTime;
 		return this;
 	}

Getter for createTime
 
 	public String getCreateTime() {
 		return this.;
 	}


Setter for resourceType
 
 	public Event setResourceType(String resourceType) {
 		this. = resourceType;
 		return this;
 	}

Getter for resourceType
	public String getResourceType() {
		return this.;
	}


Setter for eventType
	public Event setEventType(String eventType) {
		this. = eventType;
		return this;
	}

Getter for eventType
	public String getEventType() {
		return this.;
	}


Setter for summary
	public Event setSummary(String summary) {
		this. = summary;
		return this;
	}

Getter for summary
	public String getSummary() {
		return this.;
	}


Setter for resource
	public Event setResource(Object resource) {
		this. = resource;
		return this;
	}

Getter for resource
	public Object getResource() {
		return this.;
	}


Setter for links
	public Event setLinks(List<Linkslinks) {
		this. = links;
		return this;
	}

Getter for links
	public List<LinksgetLinks() {
		return this.;
	}


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:
com.paypal.base.rest.PayPalRESTException
	public static Event get(String accessTokenString eventIdthrows PayPalRESTException {
		APIContext apiContext = new APIContext(accessToken);
		return get(apiContexteventId);
	}

Retrieves the Webhooks event resource identified by event_id. Can be used to retrieve the payload for an event.

Parameters:
apiContext com.paypal.base.rest.APIContext used for the API call.
eventId String
Returns:
Event
Throws:
com.paypal.base.rest.PayPalRESTException
	public static Event get(APIContext apiContextString eventIdthrows PayPalRESTException {
		if (apiContext == null) {
			throw new IllegalArgumentException("APIContext cannot be null");
		}
		if (apiContext.getAccessToken() == null || apiContext.getAccessToken().trim().length() <= 0) {
			throw new IllegalArgumentException("AccessToken cannot be null or empty");
		}
		if (apiContext.getHTTPHeaders() == null) {
			apiContext.setHTTPHeaders(new HashMap<StringString>());
		}
		apiContext.setSdkVersion(new SDKVersionImpl());
		if (eventId == null) {
			throw new IllegalArgumentException("eventId cannot be null");
		}
		Object[] parameters = new Object[] {eventId};
		String pattern = "v1/notifications/webhooks-events/{0}";
		String resourcePath = RESTUtil.formatURIPath(patternparameters);
		String payLoad = "";
		return configureAndExecute(apiContext.resourcePathpayLoadEvent.class);
	}


Resends the Webhooks event resource identified by event_id.

Parameters:
accessToken Access Token used for the API call.
Returns:
Event
Throws:
com.paypal.base.rest.PayPalRESTException
	public Event resend(String accessTokenthrows PayPalRESTException {
		APIContext apiContext = new APIContext(accessToken);
		return resend(apiContext);
	}

Resends the Webhooks event resource identified by event_id.

Parameters:
apiContext com.paypal.base.rest.APIContext used for the API call.
Returns:
Event
Throws:
com.paypal.base.rest.PayPalRESTException
	public Event resend(APIContext apiContextthrows PayPalRESTException {
		if (apiContext == null) {
			throw new IllegalArgumentException("APIContext cannot be null");
		}
		if (apiContext.getAccessToken() == null || apiContext.getAccessToken().trim().length() <= 0) {
			throw new IllegalArgumentException("AccessToken cannot be null or empty");
		}
		if (apiContext.getHTTPHeaders() == null) {
			apiContext.setHTTPHeaders(new HashMap<StringString>());
		}
		apiContext.setSdkVersion(new SDKVersionImpl());
		if (this.getId() == null) {
			throw new IllegalArgumentException("Id cannot be null");
		}
		Object[] parameters = new Object[] {this.getId()};
		String pattern = "v1/notifications/webhooks-events/{0}/resend";
		String resourcePath = RESTUtil.formatURIPath(patternparameters);
		String payLoad = "";
		return configureAndExecute(apiContext.resourcePathpayLoadEvent.class);
	}


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:
com.paypal.base.rest.PayPalRESTException
	public static EventList list(String accessTokenString queryParamsthrows PayPalRESTException {
		APIContext apiContext = new APIContext(accessToken);
		return list(apiContextqueryParams);
	}

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 com.paypal.base.rest.APIContext used for the API call.
Returns:
EventList
Throws:
com.paypal.base.rest.PayPalRESTException
	public static EventList list(APIContext apiContextString queryParamsthrows PayPalRESTException {
		if (apiContext == null) {
			throw new IllegalArgumentException("APIContext cannot be null");
		}
		if (apiContext.getAccessToken() == null || apiContext.getAccessToken().trim().length() <= 0) {
			throw new IllegalArgumentException("AccessToken cannot be null or empty");
		}
		if (apiContext.getHTTPHeaders() == null) {
			apiContext.setHTTPHeaders(new HashMap<StringString>());
		}
		apiContext.setSdkVersion(new SDKVersionImpl());
		String resourcePath = "v1/notifications/webhooks-events" + queryParams;
		String payLoad = "";
		return configureAndExecute(apiContext.resourcePathpayLoadEventList.class);
	}
New to GrepCode? Check out our FAQ X