Start line:  
End line:  

Snippet Preview

Snippet HTML Code

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

A list of Webhooks
	private List<Webhookwebhooks;

Default Constructor
	public WebhookList() {
	}


Setter for webhooks
	public WebhookList setWebhooks(List<Webhookwebhooks) {
		this. = webhooks;
		return this;
	}

Getter for webhooks
	public List<WebhookgetWebhooks() {
		return this.;
	}

Retrieves all Webhooks for the application associated with access token.

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

Retrieves all Webhooks for the application associated with access token.

Parameters:
apiContext com.paypal.base.rest.APIContext used for the API call.
Returns:
WebhookList
Throws:
com.paypal.base.rest.PayPalRESTException
	public WebhookList getAll(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());
		Object[] parameters = new Object[] {};
		String pattern = "v1/notifications/webhooks/";
		String resourcePath = RESTUtil.formatURIPath(patternparameters);
		String payLoad = "";
		return configureAndExecute(apiContext.resourcePathpayLoadWebhookList.class);
	}
New to GrepCode? Check out our FAQ X