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

com.univapay.sdk.models.common.FlatFee Maven / Gradle / Ivy

There is a newer version: 0.2.35
Show newest version
package com.univapay.sdk.models.common;

import com.google.gson.annotations.SerializedName;
import java.math.BigInteger;

public class FlatFee {

  @SerializedName("amount")
  private BigInteger amount;

  @SerializedName("currency")
  private String currency;

  public BigInteger getAmount() {
    return amount;
  }

  public String getCurrency() {
    return currency;
  }

  public MoneyLike getMoney() {
    return new MoneyLike(amount, currency);
  }

  public FlatFee(BigInteger amount, String currency) {
    this.amount = amount;
    this.currency = currency;
  }

  @Override
  public boolean equals(Object obj) {
    Boolean equals;
    try {
      MoneyLike other = ((FlatFee) obj).getMoney();
      equals = other.equals(getMoney());
    } catch (Throwable t) {
      equals = false;
    }

    return equals;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy