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

com.paypal.api.payments.Currency 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 Currency extends PayPalModel {
	/**
	 * 3 letter currency code as defined by ISO 4217.
	 */
	private String currency;
	/**
	 * amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code.
	 */
	private String value;

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

	/**
	 * Parameterized Constructor
	 */
	public Currency(String currency, String value) {
		this.currency = currency;
		this.value = value;
	}

	/**
	 * 3 letter currency code as defined by ISO 4217.
	 */
	@java.lang.SuppressWarnings("all")
	public String getCurrency() {
		return this.currency;
	}

	/**
	 * amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code.
	 */
	@java.lang.SuppressWarnings("all")
	public String getValue() {
		return this.value;
	}

	/**
	 * 3 letter currency code as defined by ISO 4217.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public Currency setCurrency(final String currency) {
		this.currency = currency;
		return this;
	}

	/**
	 * amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public Currency setValue(final String value) {
		this.value = value;
		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 Currency)) return false;
		final Currency other = (Currency) o;
		if (!other.canEqual((java.lang.Object) this)) return false;
		if (!super.equals(o)) return false;
		final java.lang.Object this$currency = this.getCurrency();
		final java.lang.Object other$currency = other.getCurrency();
		if (this$currency == null ? other$currency != null : !this$currency.equals(other$currency)) return false;
		final java.lang.Object this$value = this.getValue();
		final java.lang.Object other$value = other.getValue();
		if (this$value == null ? other$value != null : !this$value.equals(other$value)) return false;
		return true;
	}

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

	@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 $currency = this.getCurrency();
		result = result * PRIME + ($currency == null ? 43 : $currency.hashCode());
		final java.lang.Object $value = this.getValue();
		result = result * PRIME + ($value == null ? 43 : $value.hashCode());
		return result;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy