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
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using TicketUserServices.ServiceModel;

namespace TicketUserServices.ServiceModel
{
    public partial class RefundOrderOutcome
    {
        public RefundOrderOutcome()
        {
            TicketTokenIds = new List<string>{};
            FreedSeatIds = new List<int>{};
        }

        public virtual string Status { get; set; }
        public virtual string PaymentReference { get; set; }
        public virtual string PaymentId { get; set; }
        public virtual int? EventId { get; set; }
        public virtual string EventName { get; set; }
        public virtual string HolderName { get; set; }
        public virtual string HolderEmail { get; set; }
        public virtual decimal AmountRefunded { get; set; }
        public virtual bool Partial { get; set; }
        public virtual List<string> TicketTokenIds { get; set; }
        public virtual List<int> FreedSeatIds { get; set; }
        public virtual string BorgunRefundTransactionId { get; set; }
        public virtual string Message { get; set; }
    }

    public partial class RefundRequest
    {
        public RefundRequest()
        {
            TicketTokenIds = new List<string>{};
            PaymentReferences = new List<string>{};
        }

        public virtual int? EventId { get; set; }
        public virtual bool RefundAllForEvent { get; set; }
        public virtual List<string> TicketTokenIds { get; set; }
        public virtual List<string> PaymentReferences { get; set; }
        public virtual string Reason { get; set; }
        public virtual int? UserId { get; set; }
    }

    public partial class RefundResult
    {
        public RefundResult()
        {
            Outcomes = new List<RefundOrderOutcome>{};
        }

        public virtual bool Success { get; set; }
        public virtual int StatusCode { get; set; }
        public virtual string Message { get; set; }
        public virtual int RefundedCount { get; set; }
        public virtual int SkippedCount { get; set; }
        public virtual int FailedCount { get; set; }
        public virtual decimal TotalRefunded { get; set; }
        public virtual List<RefundOrderOutcome> Outcomes { get; set; }
    }

}

C# 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>