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

com.numeralasia.payment.model.midtrans.MidTransactionDetails Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.0.49
Show newest version
//
// 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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy