com.numeralasia.payment.model.midtrans.MidTransactionDetails Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of payment-model Show documentation
Show all versions of payment-model Show documentation
Payment-Model
Model Class for representating an object for payment through midtrans, this is used for accessing model api if you use Numeral Asia payment service
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.numeralasia.payment.model.midtrans;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
@Data
public class MidTransactionDetails {
@JsonProperty("order_id")
String orderId;
@JsonProperty("gross_amount")
Long grossAmount;
public MidTransactionDetails() {
}
public MidTransactionDetails(String orderId, Long grossAmount) {
this.orderId = orderId;
this.grossAmount = grossAmount;
}
public boolean equals(Object o) {
if (this == o) {
return true;
} else if (o != null && this.getClass() == o.getClass()) {
MidTransactionDetails that = (MidTransactionDetails)o;
if (this.grossAmount != null) {
if (!this.grossAmount.equals(that.grossAmount)) {
return false;
}
} else if (that.grossAmount != null) {
return false;
}
if (this.orderId != null) {
if (this.orderId.equals(that.orderId)) {
return true;
}
} else if (that.orderId == null) {
return true;
}
return false;
} else {
return false;
}
}
public int hashCode() {
int result = this.orderId != null ? this.orderId.hashCode() : 0;
result = 31 * result + (this.grossAmount != null ? this.grossAmount.hashCode() : 0);
return result;
}
}