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

com.paypal.api.payments.InstallmentOption 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 InstallmentOption extends PayPalModel {
	/**
	 * Number of installments
	 */
	private int term;
	/**
	 * Monthly payment
	 */
	private Currency monthlyPayment;
	/**
	 * Discount amount applied to the payment, if any
	 */
	private Currency discountAmount;
	/**
	 * Discount percentage applied to the payment, if any
	 */
	private Percentage discountPercentage;

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

	/**
	 * Parameterized Constructor
	 */
	public InstallmentOption(int term, Currency monthlyPayment) {
		this.term = term;
		this.monthlyPayment = monthlyPayment;
	}

	/**
	 * Number of installments
	 */
	@java.lang.SuppressWarnings("all")
	public int getTerm() {
		return this.term;
	}

	/**
	 * Monthly payment
	 */
	@java.lang.SuppressWarnings("all")
	public Currency getMonthlyPayment() {
		return this.monthlyPayment;
	}

	/**
	 * Discount amount applied to the payment, if any
	 */
	@java.lang.SuppressWarnings("all")
	public Currency getDiscountAmount() {
		return this.discountAmount;
	}

	/**
	 * Discount percentage applied to the payment, if any
	 */
	@java.lang.SuppressWarnings("all")
	public Percentage getDiscountPercentage() {
		return this.discountPercentage;
	}

	/**
	 * Number of installments
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public InstallmentOption setTerm(final int term) {
		this.term = term;
		return this;
	}

	/**
	 * Monthly payment
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public InstallmentOption setMonthlyPayment(final Currency monthlyPayment) {
		this.monthlyPayment = monthlyPayment;
		return this;
	}

	/**
	 * Discount amount applied to the payment, if any
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public InstallmentOption setDiscountAmount(final Currency discountAmount) {
		this.discountAmount = discountAmount;
		return this;
	}

	/**
	 * Discount percentage applied to the payment, if any
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public InstallmentOption setDiscountPercentage(final Percentage discountPercentage) {
		this.discountPercentage = discountPercentage;
		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 InstallmentOption)) return false;
		final InstallmentOption other = (InstallmentOption) o;
		if (!other.canEqual((java.lang.Object) this)) return false;
		if (!super.equals(o)) return false;
		if (this.getTerm() != other.getTerm()) return false;
		final java.lang.Object this$monthlyPayment = this.getMonthlyPayment();
		final java.lang.Object other$monthlyPayment = other.getMonthlyPayment();
		if (this$monthlyPayment == null ? other$monthlyPayment != null : !this$monthlyPayment.equals(other$monthlyPayment)) return false;
		final java.lang.Object this$discountAmount = this.getDiscountAmount();
		final java.lang.Object other$discountAmount = other.getDiscountAmount();
		if (this$discountAmount == null ? other$discountAmount != null : !this$discountAmount.equals(other$discountAmount)) return false;
		final java.lang.Object this$discountPercentage = this.getDiscountPercentage();
		final java.lang.Object other$discountPercentage = other.getDiscountPercentage();
		if (this$discountPercentage == null ? other$discountPercentage != null : !this$discountPercentage.equals(other$discountPercentage)) return false;
		return true;
	}

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

	@java.lang.Override
	@java.lang.SuppressWarnings("all")
	public int hashCode() {
		final int PRIME = 59;
		int result = 1;
		result = result * PRIME + super.hashCode();
		result = result * PRIME + this.getTerm();
		final java.lang.Object $monthlyPayment = this.getMonthlyPayment();
		result = result * PRIME + ($monthlyPayment == null ? 43 : $monthlyPayment.hashCode());
		final java.lang.Object $discountAmount = this.getDiscountAmount();
		result = result * PRIME + ($discountAmount == null ? 43 : $discountAmount.hashCode());
		final java.lang.Object $discountPercentage = this.getDiscountPercentage();
		result = result * PRIME + ($discountPercentage == null ? 43 : $discountPercentage.hashCode());
		return result;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy