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

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

There is a newer version: 1.14.0
Show newest version
// Generated by delombok at Wed Oct 12 18:15:55 CDT 2016
package com.paypal.api.payments;

import com.paypal.base.rest.PayPalModel;

public class CustomAmount extends PayPalModel {
	/**
	 * The custom amount label. Maximum length is 25 characters.
	 */
	private String label;
	/**
	 * The custom amount value. Valid range is from -999999.99 to 999999.99.
	 */
	private Currency amount;

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

	/**
	 * The custom amount label. Maximum length is 25 characters.
	 */
	@java.lang.SuppressWarnings("all")
	public String getLabel() {
		return this.label;
	}

	/**
	 * The custom amount value. Valid range is from -999999.99 to 999999.99.
	 */
	@java.lang.SuppressWarnings("all")
	public Currency getAmount() {
		return this.amount;
	}

	/**
	 * The custom amount label. Maximum length is 25 characters.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public CustomAmount setLabel(final String label) {
		this.label = label;
		return this;
	}

	/**
	 * The custom amount value. Valid range is from -999999.99 to 999999.99.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public CustomAmount setAmount(final Currency amount) {
		this.amount = amount;
		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 CustomAmount)) return false;
		final CustomAmount other = (CustomAmount) o;
		if (!other.canEqual((java.lang.Object) this)) return false;
		if (!super.equals(o)) return false;
		final java.lang.Object this$label = this.getLabel();
		final java.lang.Object other$label = other.getLabel();
		if (this$label == null ? other$label != null : !this$label.equals(other$label)) return false;
		final java.lang.Object this$amount = this.getAmount();
		final java.lang.Object other$amount = other.getAmount();
		if (this$amount == null ? other$amount != null : !this$amount.equals(other$amount)) return false;
		return true;
	}

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

	@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 $label = this.getLabel();
		result = result * PRIME + ($label == null ? 43 : $label.hashCode());
		final java.lang.Object $amount = this.getAmount();
		result = result * PRIME + ($amount == null ? 43 : $amount.hashCode());
		return result;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy