co.omise.models.Refund Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of omise-java Show documentation
Show all versions of omise-java Show documentation
Java bindings for the Omise API
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();
}
}
}