com.paypal.api.payments.ChargeModels 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
The newest version!
// Generated by delombok at Thu Nov 16 13:48:04 CST 2017
package com.paypal.api.payments;
import com.paypal.base.rest.PayPalModel;
public class ChargeModels extends PayPalModel {
/**
* Identifier of the charge model. 128 characters max.
*/
private String id;
/**
* Type of charge model. Allowed values: `SHIPPING`, `TAX`.
*/
private String type;
/**
* Specific amount for this charge model.
*/
private Currency amount;
/**
* Default Constructor
*/
public ChargeModels() {
}
/**
* Parameterized Constructor
*/
public ChargeModels(String type, Currency amount) {
this.type = type;
this.amount = amount;
}
/**
* Identifier of the charge model. 128 characters max.
*/
@java.lang.SuppressWarnings("all")
public String getId() {
return this.id;
}
/**
* Type of charge model. Allowed values: `SHIPPING`, `TAX`.
*/
@java.lang.SuppressWarnings("all")
public String getType() {
return this.type;
}
/**
* Specific amount for this charge model.
*/
@java.lang.SuppressWarnings("all")
public Currency getAmount() {
return this.amount;
}
/**
* Identifier of the charge model. 128 characters max.
* @return this
*/
@java.lang.SuppressWarnings("all")
public ChargeModels setId(final String id) {
this.id = id;
return this;
}
/**
* Type of charge model. Allowed values: `SHIPPING`, `TAX`.
* @return this
*/
@java.lang.SuppressWarnings("all")
public ChargeModels setType(final String type) {
this.type = type;
return this;
}
/**
* Specific amount for this charge model.
* @return this
*/
@java.lang.SuppressWarnings("all")
public ChargeModels 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 ChargeModels)) return false;
final ChargeModels other = (ChargeModels) o;
if (!other.canEqual((java.lang.Object) this)) return false;
if (!super.equals(o)) return false;
final java.lang.Object this$id = this.getId();
final java.lang.Object other$id = other.getId();
if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
final java.lang.Object this$type = this.getType();
final java.lang.Object other$type = other.getType();
if (this$type == null ? other$type != null : !this$type.equals(other$type)) 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 ChargeModels;
}
@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 $id = this.getId();
result = result * PRIME + ($id == null ? 43 : $id.hashCode());
final java.lang.Object $type = this.getType();
result = result * PRIME + ($type == null ? 43 : $type.hashCode());
final java.lang.Object $amount = this.getAmount();
result = result * PRIME + ($amount == null ? 43 : $amount.hashCode());
return result;
}
}