| Requires any of the roles: | Admin, TeamAdmin | Required permission: | Tickets.Add |
| POST | /GiftCard/Issue |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GiftCardIssueRequest
{
public Integer giftCardTypeId = null;
public Integer amountMinor = null;
public String code = null;
public Boolean activate = null;
public String buyerName = null;
public String buyerEmail = null;
public String buyerPhone = null;
public String recipientName = null;
public String idempotencyKey = null;
public String note = null;
public Integer getGiftCardTypeId() { return giftCardTypeId; }
public GiftCardIssueRequest setGiftCardTypeId(Integer value) { this.giftCardTypeId = value; return this; }
public Integer getAmountMinor() { return amountMinor; }
public GiftCardIssueRequest setAmountMinor(Integer value) { this.amountMinor = value; return this; }
public String getCode() { return code; }
public GiftCardIssueRequest setCode(String value) { this.code = value; return this; }
public Boolean isActivate() { return activate; }
public GiftCardIssueRequest setActivate(Boolean value) { this.activate = value; return this; }
public String getBuyerName() { return buyerName; }
public GiftCardIssueRequest setBuyerName(String value) { this.buyerName = value; return this; }
public String getBuyerEmail() { return buyerEmail; }
public GiftCardIssueRequest setBuyerEmail(String value) { this.buyerEmail = value; return this; }
public String getBuyerPhone() { return buyerPhone; }
public GiftCardIssueRequest setBuyerPhone(String value) { this.buyerPhone = value; return this; }
public String getRecipientName() { return recipientName; }
public GiftCardIssueRequest setRecipientName(String value) { this.recipientName = value; return this; }
public String getIdempotencyKey() { return idempotencyKey; }
public GiftCardIssueRequest setIdempotencyKey(String value) { this.idempotencyKey = value; return this; }
public String getNote() { return note; }
public GiftCardIssueRequest setNote(String value) { this.note = value; return this; }
}
public static class GiftCardIssueResult
{
public Boolean success = null;
public Integer giftCardId = null;
public String code = null;
public String codeLast4 = null;
public String status = null;
public Date expiresAt = null;
public String paymentId = null;
public Integer statusCode = null;
public String message = null;
public Boolean isSuccess() { return success; }
public GiftCardIssueResult setSuccess(Boolean value) { this.success = value; return this; }
public Integer getGiftCardId() { return giftCardId; }
public GiftCardIssueResult setGiftCardId(Integer value) { this.giftCardId = value; return this; }
public String getCode() { return code; }
public GiftCardIssueResult setCode(String value) { this.code = value; return this; }
public String getCodeLast4() { return codeLast4; }
public GiftCardIssueResult setCodeLast4(String value) { this.codeLast4 = value; return this; }
public String getStatus() { return status; }
public GiftCardIssueResult setStatus(String value) { this.status = value; return this; }
public Date getExpiresAt() { return expiresAt; }
public GiftCardIssueResult setExpiresAt(Date value) { this.expiresAt = value; return this; }
public String getPaymentId() { return paymentId; }
public GiftCardIssueResult setPaymentId(String value) { this.paymentId = value; return this; }
public Integer getStatusCode() { return statusCode; }
public GiftCardIssueResult setStatusCode(Integer value) { this.statusCode = value; return this; }
public String getMessage() { return message; }
public GiftCardIssueResult setMessage(String value) { this.message = value; return this; }
}
}
Java GiftCardIssueRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /GiftCard/Issue HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
giftCardTypeId: 0,
amountMinor: 0,
code: String,
activate: False,
buyerName: String,
buyerEmail: String,
buyerPhone: String,
recipientName: String,
idempotencyKey: String,
note: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
success: False,
giftCardId: 0,
code: String,
codeLast4: String,
status: String,
expiresAt: 0001-01-01,
paymentId: String,
statusCode: 0,
message: String
}