TicketUserServices

<back to all web services

RefundRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequires the permission:Tickets.Add
The following routes are available for this service:
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; }
    }

}

Java RefundRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<RefundRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <EventId>0</EventId>
  <PaymentReferences xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </PaymentReferences>
  <Reason>String</Reason>
  <RefundAllForEvent>false</RefundAllForEvent>
  <TicketTokenIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </TicketTokenIds>
  <UserId>0</UserId>
</RefundRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<RefundResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <FailedCount>0</FailedCount>
  <Message>String</Message>
  <Outcomes>
    <RefundOrderOutcome>
      <AmountRefunded>0</AmountRefunded>
      <BorgunRefundTransactionId>String</BorgunRefundTransactionId>
      <EventId>0</EventId>
      <EventName>String</EventName>
      <FreedSeatIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>0</d4p1:int>
      </FreedSeatIds>
      <HolderEmail>String</HolderEmail>
      <HolderName>String</HolderName>
      <Message>String</Message>
      <Partial>false</Partial>
      <PaymentId>String</PaymentId>
      <PaymentReference>String</PaymentReference>
      <Status>String</Status>
      <TicketTokenIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </TicketTokenIds>
    </RefundOrderOutcome>
  </Outcomes>
  <RefundedCount>0</RefundedCount>
  <SkippedCount>0</SkippedCount>
  <StatusCode>0</StatusCode>
  <Success>false</Success>
  <TotalRefunded>0</TotalRefunded>
</RefundResult>