All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.paypal.api.payments.WebhookList Maven / Gradle / Ivy

The newest version!
// Generated by delombok at Thu Nov 16 13:48:05 CST 2017
package com.paypal.api.payments;

import com.paypal.base.rest.*;
import java.util.List;

public class WebhookList extends PayPalResource {
	/**
	 * A list of webhooks.
	 */
	private List webhooks;

	/**
	 * Default Constructor
	 */
	public WebhookList() {
	}

	/**
	 * Retrieves all Webhooks for the application associated with access token.
	 * @deprecated Please use {@link #getAll(APIContext)} instead.
	 *
	 * @param accessToken
	 * Access Token used for the API call.
	 * @return WebhookList
	 * @throws PayPalRESTException
	 */
	public WebhookList getAll(String accessToken) throws PayPalRESTException {
		APIContext apiContext = new APIContext(accessToken);
		return getAll(apiContext);
	}

	/**
	 * Retrieves all Webhooks for the application associated with access token.
	 * @param apiContext
	 * {@link APIContext} used for the API call.
	 * @return WebhookList
	 * @throws PayPalRESTException
	 */
	public WebhookList getAll(APIContext apiContext) throws PayPalRESTException {
		Object[] parameters = new Object[] {};
		String pattern = "v1/notifications/webhooks/";
		String resourcePath = RESTUtil.formatURIPath(pattern, parameters);
		String payLoad = "";
		return configureAndExecute(apiContext, HttpMethod.GET, resourcePath, payLoad, WebhookList.class);
	}

	/**
	 * A list of webhooks.
	 */
	@java.lang.SuppressWarnings("all")
	public List getWebhooks() {
		return this.webhooks;
	}

	/**
	 * A list of webhooks.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public WebhookList setWebhooks(final List webhooks) {
		this.webhooks = webhooks;
		return this;
	}

	@java.lang.Override
	@java.lang.SuppressWarnings("all")
	public boolean equals(final java.lang.Object o) {
		if (o == this) return true;
		if (!(o instanceof WebhookList)) return false;
		final WebhookList other = (WebhookList) o;
		if (!other.canEqual((java.lang.Object) this)) return false;
		if (!super.equals(o)) return false;
		final java.lang.Object this$webhooks = this.getWebhooks();
		final java.lang.Object other$webhooks = other.getWebhooks();
		if (this$webhooks == null ? other$webhooks != null : !this$webhooks.equals(other$webhooks)) return false;
		return true;
	}

	@java.lang.SuppressWarnings("all")
	protected boolean canEqual(final java.lang.Object other) {
		return other instanceof WebhookList;
	}

	@java.lang.Override
	@java.lang.SuppressWarnings("all")
	public int hashCode() {
		final int PRIME = 59;
		int result = 1;
		result = result * PRIME + super.hashCode();
		final java.lang.Object $webhooks = this.getWebhooks();
		result = result * PRIME + ($webhooks == null ? 43 : $webhooks.hashCode());
		return result;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy