com.paypal.api.payments.Cost Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rest-api-sdk Show documentation
Show all versions of rest-api-sdk Show documentation
PayPal SDK for integrating with the REST APIs
// 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 Cost extends PayPalModel {
/**
* Cost in percent. Range of 0 to 100.
*/
private float percent;
/**
* The cost, as an amount. Valid range is from 0 to 1,000,000.
*/
private Currency amount;
/**
* Default Constructor
*/
public Cost() {
}
/**
* Cost in percent. Range of 0 to 100.
*/
@java.lang.SuppressWarnings("all")
public float getPercent() {
return this.percent;
}
/**
* The cost, as an amount. Valid range is from 0 to 1,000,000.
*/
@java.lang.SuppressWarnings("all")
public Currency getAmount() {
return this.amount;
}
/**
* Cost in percent. Range of 0 to 100.
* @return this
*/
@java.lang.SuppressWarnings("all")
public Cost setPercent(final float percent) {
this.percent = percent;
return this;
}
/**
* The cost, as an amount. Valid range is from 0 to 1,000,000.
* @return this
*/
@java.lang.SuppressWarnings("all")
public Cost 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 Cost)) return false;
final Cost other = (Cost) o;
if (!other.canEqual((java.lang.Object) this)) return false;
if (!super.equals(o)) return false;
if (java.lang.Float.compare(this.getPercent(), other.getPercent()) != 0) 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 Cost;
}
@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 + java.lang.Float.floatToIntBits(this.getPercent());
final java.lang.Object $amount = this.getAmount();
result = result * PRIME + ($amount == null ? 43 : $amount.hashCode());
return result;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy