Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions common/src/main/java/net/buycraft/plugin/data/GiftCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.google.gson.annotations.SerializedName;

import java.math.BigDecimal;
import java.util.Date;

public final class GiftCard {

Expand All @@ -12,6 +13,10 @@ public final class GiftCard {
private final String note;
@SerializedName("void")
private final boolean isVoid = false;
@SerializedName("created_at")
private final Date createdDate = null;
@SerializedName("expires_at")
private final Date expiresDate = null;

GiftCard(BigDecimal amount, String note) {
this.balance = new Balance(amount);
Expand Down Expand Up @@ -42,6 +47,10 @@ public boolean isVoid() {
return isVoid;
}

public Date getCreatedDate() { return createdDate; }

public Date getExpiresDate() { return expiresDate; }

public static final class Balance {

private final BigDecimal starting;
Expand Down