| Requires any of the roles: | Admin, TeamAdmin | Required permission: | Tickets.Add |
| POST | /GiftCard/RefundCredit |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GiftCardRefundCreditRequest
{
public Integer giftCardId = null;
public String code = null;
public Integer amountMinor = null;
public String orderPaymentReference = null;
public String idempotencyKey = null;
public String note = null;
public Integer getGiftCardId() { return giftCardId; }
public GiftCardRefundCreditRequest setGiftCardId(Integer value) { this.giftCardId = value; return this; }
public String getCode() { return code; }
public GiftCardRefundCreditRequest setCode(String value) { this.code = value; return this; }
public Integer getAmountMinor() { return amountMinor; }
public GiftCardRefundCreditRequest setAmountMinor(Integer value) { this.amountMinor = value; return this; }
public String getOrderPaymentReference() { return orderPaymentReference; }
public GiftCardRefundCreditRequest setOrderPaymentReference(String value) { this.orderPaymentReference = value; return this; }
public String getIdempotencyKey() { return idempotencyKey; }
public GiftCardRefundCreditRequest setIdempotencyKey(String value) { this.idempotencyKey = value; return this; }
public String getNote() { return note; }
public GiftCardRefundCreditRequest setNote(String value) { this.note = value; return this; }
}
public static class GiftCardRedeemResult
{
public Boolean ok = null;
public String reason = null;
public LocalizedMessage message = null;
public Integer redeemedAmountMinor = null;
public Integer newBalanceMinor = null;
public Integer transactionId = null;
public String settlementTag = null;
public Integer statusCode = null;
public Boolean isOk() { return ok; }
public GiftCardRedeemResult setOk(Boolean value) { this.ok = value; return this; }
public String getReason() { return reason; }
public GiftCardRedeemResult setReason(String value) { this.reason = value; return this; }
public LocalizedMessage getMessage() { return message; }
public GiftCardRedeemResult setMessage(LocalizedMessage value) { this.message = value; return this; }
public Integer getRedeemedAmountMinor() { return redeemedAmountMinor; }
public GiftCardRedeemResult setRedeemedAmountMinor(Integer value) { this.redeemedAmountMinor = value; return this; }
public Integer getNewBalanceMinor() { return newBalanceMinor; }
public GiftCardRedeemResult setNewBalanceMinor(Integer value) { this.newBalanceMinor = value; return this; }
public Integer getTransactionId() { return transactionId; }
public GiftCardRedeemResult setTransactionId(Integer value) { this.transactionId = value; return this; }
public String getSettlementTag() { return settlementTag; }
public GiftCardRedeemResult setSettlementTag(String value) { this.settlementTag = value; return this; }
public Integer getStatusCode() { return statusCode; }
public GiftCardRedeemResult setStatusCode(Integer value) { this.statusCode = value; return this; }
}
public static class LocalizedMessage
{
public String is = null;
public String en = null;
public String getIs() { return is; }
public LocalizedMessage setIs(String value) { this.is = value; return this; }
public String getEn() { return en; }
public LocalizedMessage setEn(String value) { this.en = value; return this; }
}
}
Java GiftCardRefundCreditRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /GiftCard/RefundCredit HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GiftCardRefundCreditRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<AmountMinor>0</AmountMinor>
<Code>String</Code>
<GiftCardId>0</GiftCardId>
<IdempotencyKey>String</IdempotencyKey>
<Note>String</Note>
<OrderPaymentReference>String</OrderPaymentReference>
</GiftCardRefundCreditRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GiftCardRedeemResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Message>
<En>String</En>
<Is>String</Is>
</Message>
<NewBalanceMinor>0</NewBalanceMinor>
<Ok>false</Ok>
<Reason>String</Reason>
<RedeemedAmountMinor>0</RedeemedAmountMinor>
<SettlementTag>String</SettlementTag>
<StatusCode>0</StatusCode>
<TransactionId>0</TransactionId>
</GiftCardRedeemResult>