| Requires any of the roles: | Admin, TeamAdmin | Requires the permission: | Tickets.Add |
| POST | /refund/process |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class RefundRequest
{
public Integer eventId = null;
public Boolean refundAllForEvent = null;
public ArrayList<String> ticketTokenIds = null;
public ArrayList<String> paymentReferences = null;
public String reason = null;
public Integer userId = null;
public Integer getEventId() { return eventId; }
public RefundRequest setEventId(Integer value) { this.eventId = value; return this; }
public Boolean isRefundAllForEvent() { return refundAllForEvent; }
public RefundRequest setRefundAllForEvent(Boolean value) { this.refundAllForEvent = value; return this; }
public ArrayList<String> getTicketTokenIds() { return ticketTokenIds; }
public RefundRequest setTicketTokenIds(ArrayList<String> value) { this.ticketTokenIds = value; return this; }
public ArrayList<String> getPaymentReferences() { return paymentReferences; }
public RefundRequest setPaymentReferences(ArrayList<String> value) { this.paymentReferences = value; return this; }
public String getReason() { return reason; }
public RefundRequest setReason(String value) { this.reason = value; return this; }
public Integer getUserId() { return userId; }
public RefundRequest setUserId(Integer value) { this.userId = value; return this; }
}
public static class RefundResult
{
public Boolean success = null;
public Integer statusCode = null;
public String message = null;
public Integer refundedCount = null;
public Integer skippedCount = null;
public Integer failedCount = null;
public BigDecimal totalRefunded = null;
public ArrayList<RefundOrderOutcome> outcomes = null;
public Boolean isSuccess() { return success; }
public RefundResult setSuccess(Boolean value) { this.success = value; return this; }
public Integer getStatusCode() { return statusCode; }
public RefundResult setStatusCode(Integer value) { this.statusCode = value; return this; }
public String getMessage() { return message; }
public RefundResult setMessage(String value) { this.message = value; return this; }
public Integer getRefundedCount() { return refundedCount; }
public RefundResult setRefundedCount(Integer value) { this.refundedCount = value; return this; }
public Integer getSkippedCount() { return skippedCount; }
public RefundResult setSkippedCount(Integer value) { this.skippedCount = value; return this; }
public Integer getFailedCount() { return failedCount; }
public RefundResult setFailedCount(Integer value) { this.failedCount = value; return this; }
public BigDecimal getTotalRefunded() { return totalRefunded; }
public RefundResult setTotalRefunded(BigDecimal value) { this.totalRefunded = value; return this; }
public ArrayList<RefundOrderOutcome> getOutcomes() { return outcomes; }
public RefundResult setOutcomes(ArrayList<RefundOrderOutcome> value) { this.outcomes = value; return this; }
}
public static class RefundOrderOutcome
{
public String status = null;
public String paymentReference = null;
public String paymentId = null;
public Integer eventId = null;
public String eventName = null;
public String holderName = null;
public String holderEmail = null;
public BigDecimal amountRefunded = null;
public Boolean partial = null;
public ArrayList<String> ticketTokenIds = null;
public ArrayList<Integer> freedSeatIds = null;
public String borgunRefundTransactionId = null;
public String message = null;
public String getStatus() { return status; }
public RefundOrderOutcome setStatus(String value) { this.status = value; return this; }
public String getPaymentReference() { return paymentReference; }
public RefundOrderOutcome setPaymentReference(String value) { this.paymentReference = value; return this; }
public String getPaymentId() { return paymentId; }
public RefundOrderOutcome setPaymentId(String value) { this.paymentId = value; return this; }
public Integer getEventId() { return eventId; }
public RefundOrderOutcome setEventId(Integer value) { this.eventId = value; return this; }
public String getEventName() { return eventName; }
public RefundOrderOutcome setEventName(String value) { this.eventName = value; return this; }
public String getHolderName() { return holderName; }
public RefundOrderOutcome setHolderName(String value) { this.holderName = value; return this; }
public String getHolderEmail() { return holderEmail; }
public RefundOrderOutcome setHolderEmail(String value) { this.holderEmail = value; return this; }
public BigDecimal getAmountRefunded() { return amountRefunded; }
public RefundOrderOutcome setAmountRefunded(BigDecimal value) { this.amountRefunded = value; return this; }
public Boolean isPartial() { return partial; }
public RefundOrderOutcome setPartial(Boolean value) { this.partial = value; return this; }
public ArrayList<String> getTicketTokenIds() { return ticketTokenIds; }
public RefundOrderOutcome setTicketTokenIds(ArrayList<String> value) { this.ticketTokenIds = value; return this; }
public ArrayList<Integer> getFreedSeatIds() { return freedSeatIds; }
public RefundOrderOutcome setFreedSeatIds(ArrayList<Integer> value) { this.freedSeatIds = value; return this; }
public String getBorgunRefundTransactionId() { return borgunRefundTransactionId; }
public RefundOrderOutcome setBorgunRefundTransactionId(String value) { this.borgunRefundTransactionId = value; return this; }
public String getMessage() { return message; }
public RefundOrderOutcome setMessage(String value) { this.message = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /refund/process HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"eventId":0,"refundAllForEvent":false,"ticketTokenIds":["String"],"paymentReferences":["String"],"reason":"String","userId":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"success":false,"statusCode":0,"message":"String","refundedCount":0,"skippedCount":0,"failedCount":0,"totalRefunded":0,"outcomes":[{"status":"String","paymentReference":"String","paymentId":"String","eventId":0,"eventName":"String","holderName":"String","holderEmail":"String","amountRefunded":0,"partial":false,"ticketTokenIds":["String"],"freedSeatIds":[0],"borgunRefundTransactionId":"String","message":"String"}]}