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

co.omise.models.Refund Maven / Gradle / Ivy

There is a newer version: 5.1.0
Show newest version
package co.omise.models;

import com.google.common.collect.ImmutableMap;
import okhttp3.FormBody;
import okhttp3.RequestBody;

/**
 * Represents Omise Refund object.
 *
 * @see Refunds API
 */
public class Refund extends Model {
    private long amount;
    private String currency;
    private String charge;
    private String transaction;

    public long getAmount() {
        return amount;
    }

    public void setAmount(long amount) {
        this.amount = amount;
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public String getCharge() {
        return charge;
    }

    public void setCharge(String charge) {
        this.charge = charge;
    }

    public String getTransaction() {
        return transaction;
    }

    public void setTransaction(String transaction) {
        this.transaction = transaction;
    }

    public static class Create extends Params {
        private long amount;

        public Create amount(long amount) {
            this.amount = amount;
            return this;
        }

        @Override
        public ImmutableMap query() {
            return null;
        }

        @Override
        public RequestBody body() {
            return new FormBody.Builder()
                    .add("amount", Long.toString(amount))
                    .build();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy