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

com.paypal.api.payments.RefundDetail 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 RefundDetail extends PayPalModel {
	/**
	 * The PayPal refund type. Indicates whether refund was paid in invoicing flow through PayPal or externally. In the case of mark-as-refunded API, the supported refund type is `EXTERNAL`. For backward compatability, the `PAYPAL` refund type is still supported.
	 */
	private String type;
	/**
	 * The PayPal refund transaction ID. Required with the `PAYPAL` refund type.
	 */
	private String transactionId;
	/**
	 * Date on which the invoice was refunded. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
	 */
	private String date;
	/**
	 * Optional note associated with the refund.
	 */
	private String note;
	/**
	 * Amount to be recorded as refund against invoice. If this field is not passed, the total invoice paid amount is recorded as refund.
	 */
	private Currency amount;

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

	/**
	 * Parameterized Constructor
	 */
	public RefundDetail(String type) {
		this.type = type;
	}

	/**
	 * The PayPal refund type. Indicates whether refund was paid in invoicing flow through PayPal or externally. In the case of mark-as-refunded API, the supported refund type is `EXTERNAL`. For backward compatability, the `PAYPAL` refund type is still supported.
	 */
	@java.lang.SuppressWarnings("all")
	public String getType() {
		return this.type;
	}

	/**
	 * The PayPal refund transaction ID. Required with the `PAYPAL` refund type.
	 */
	@java.lang.SuppressWarnings("all")
	public String getTransactionId() {
		return this.transactionId;
	}

	/**
	 * Date on which the invoice was refunded. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
	 */
	@java.lang.SuppressWarnings("all")
	public String getDate() {
		return this.date;
	}

	/**
	 * Optional note associated with the refund.
	 */
	@java.lang.SuppressWarnings("all")
	public String getNote() {
		return this.note;
	}

	/**
	 * Amount to be recorded as refund against invoice. If this field is not passed, the total invoice paid amount is recorded as refund.
	 */
	@java.lang.SuppressWarnings("all")
	public Currency getAmount() {
		return this.amount;
	}

	/**
	 * The PayPal refund type. Indicates whether refund was paid in invoicing flow through PayPal or externally. In the case of mark-as-refunded API, the supported refund type is `EXTERNAL`. For backward compatability, the `PAYPAL` refund type is still supported.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public RefundDetail setType(final String type) {
		this.type = type;
		return this;
	}

	/**
	 * The PayPal refund transaction ID. Required with the `PAYPAL` refund type.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public RefundDetail setTransactionId(final String transactionId) {
		this.transactionId = transactionId;
		return this;
	}

	/**
	 * Date on which the invoice was refunded. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public RefundDetail setDate(final String date) {
		this.date = date;
		return this;
	}

	/**
	 * Optional note associated with the refund.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public RefundDetail setNote(final String note) {
		this.note = note;
		return this;
	}

	/**
	 * Amount to be recorded as refund against invoice. If this field is not passed, the total invoice paid amount is recorded as refund.
	 * @return this
	 */
	@java.lang.SuppressWarnings("all")
	public RefundDetail 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 RefundDetail)) return false;
		final RefundDetail other = (RefundDetail) o;
		if (!other.canEqual((java.lang.Object) this)) return false;
		if (!super.equals(o)) 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$transactionId = this.getTransactionId();
		final java.lang.Object other$transactionId = other.getTransactionId();
		if (this$transactionId == null ? other$transactionId != null : !this$transactionId.equals(other$transactionId)) return false;
		final java.lang.Object this$date = this.getDate();
		final java.lang.Object other$date = other.getDate();
		if (this$date == null ? other$date != null : !this$date.equals(other$date)) return false;
		final java.lang.Object this$note = this.getNote();
		final java.lang.Object other$note = other.getNote();
		if (this$note == null ? other$note != null : !this$note.equals(other$note)) 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 RefundDetail;
	}

	@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 $type = this.getType();
		result = result * PRIME + ($type == null ? 43 : $type.hashCode());
		final java.lang.Object $transactionId = this.getTransactionId();
		result = result * PRIME + ($transactionId == null ? 43 : $transactionId.hashCode());
		final java.lang.Object $date = this.getDate();
		result = result * PRIME + ($date == null ? 43 : $date.hashCode());
		final java.lang.Object $note = this.getNote();
		result = result * PRIME + ($note == null ? 43 : $note.hashCode());
		final java.lang.Object $amount = this.getAmount();
		result = result * PRIME + ($amount == null ? 43 : $amount.hashCode());
		return result;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy