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

com.paypal.api.payments.ShippingCost 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 ShippingCost extends PayPalModel {
	/**
	 * The shipping cost, as an amount. Valid range is from 0 to 999999.99.
	 */
	private Currency amount;
	/**
	 * The tax percentage on the shipping amount.
	 */
	private Tax tax;

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

	/**
	 * The shipping cost, as an amount. Valid range is from 0 to 999999.99.
	 */
	@java.lang.SuppressWarnings("all")
	public Currency getAmount() {
		return this.amount;
	}

	/**
	 * The tax percentage on the shipping amount.
	 */
	@java.lang.SuppressWarnings("all")
	public Tax getTax() {
		return this.tax;
	}

	/**
	 * The shipping cost, as an amount. Valid range is from 0 to 999999.99.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public ShippingCost setAmount(final Currency amount) {
		this.amount = amount;
		return this;
	}

	/**
	 * The tax percentage on the shipping amount.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public ShippingCost setTax(final Tax tax) {
		this.tax = tax;
		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 ShippingCost)) return false;
		final ShippingCost other = (ShippingCost) o;
		if (!other.canEqual((java.lang.Object) this)) return false;
		if (!super.equals(o)) 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;
		final java.lang.Object this$tax = this.getTax();
		final java.lang.Object other$tax = other.getTax();
		if (this$tax == null ? other$tax != null : !this$tax.equals(other$tax)) return false;
		return true;
	}

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy