TicketUserServices

<back to all web services

PreviewDiscountRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequires the permission:ReadData
The following routes are available for this service:
POST/ticketOrder/previewDiscount
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using TicketUserServices.ServiceModel;
using TicketUserServices.ServiceModel.Types;

namespace TicketUserServices.ServiceModel
{
    public partial class DiscountLineResult
    {
        public virtual int? TicketTypeId { get; set; }
        public virtual int Count { get; set; }
        public virtual bool Applied { get; set; }
        public virtual decimal UnitBefore { get; set; }
        public virtual decimal UnitAfter { get; set; }
        public virtual decimal LineBefore { get; set; }
        public virtual decimal LineAfter { get; set; }
    }

    public partial class DiscountSummary
    {
        public virtual string Type { get; set; }
        public virtual decimal Value { get; set; }
    }

    public partial class LocalizedMessage
    {
        public virtual string Is { get; set; }
        public virtual string En { get; set; }
    }

    public partial class PreviewDiscountRequest
    {
        public PreviewDiscountRequest()
        {
            OrderDetails = new List<TicketDetails>{};
        }

        public virtual string Code { get; set; }
        public virtual int? EventId { get; set; }
        public virtual string FullPhoneNumber { get; set; }
        public virtual List<TicketDetails> OrderDetails { get; set; }
    }

    public partial class PreviewDiscountResult
    {
        public PreviewDiscountResult()
        {
            Lines = new List<DiscountLineResult>{};
        }

        public virtual string Status { get; set; }
        public virtual string Reason { get; set; }
        public virtual LocalizedMessage Message { get; set; }
        public virtual int? DiscountCodeId { get; set; }
        public virtual int? DiscountCodeTypeId { get; set; }
        public virtual DiscountSummary Discount { get; set; }
        public virtual List<DiscountLineResult> Lines { get; set; }
        public virtual decimal SubtotalBefore { get; set; }
        public virtual decimal SubtotalAfter { get; set; }
        public virtual decimal TotalSavings { get; set; }
        public virtual string Currency { get; set; }
        public virtual int StatusCode { get; set; }
    }

}

namespace TicketUserServices.ServiceModel.Types
{
    public partial class TicketDetails
    {
        public virtual int ID { get; set; }
        public virtual int TicketId { get; set; }
        public virtual int? EventSeriesTicketType { get; set; }
        public virtual int? EventSeriesOwnerTicketType { get; set; }
        public virtual decimal TicketPrice { get; set; }
        public virtual decimal TotalPrice { get; set; }
        public virtual int Count { get; set; }
        public virtual string TicketColor { get; set; }
        public virtual bool? ShowUsedTickets { get; set; }
        public virtual string TicketName { get; set; }
        public virtual string TicketDisplayString { get; set; }
        public virtual int? TicketDetailsTransferredFrom { get; set; }
        public virtual int? TeamPassId { get; set; }
        public virtual bool? IsSpecialTicket { get; set; }
        public virtual string SpecialTicketId { get; set; }
        public virtual bool? JustChangedBySQL { get; set; }
        public virtual DateTime? SQLJustChangedTimeStamp { get; set; }
        public virtual string Currency { get; set; }
        public virtual string DiscountCode { get; set; }
        public virtual decimal? TotalDiscount { get; set; }
        public virtual decimal? TotalAmountBeforeDiscount { get; set; }
        public virtual decimal? TicketPriceBeforeDiscount { get; set; }
    }

}

C# PreviewDiscountRequest 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 /ticketOrder/previewDiscount HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<PreviewDiscountRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Code>String</Code>
  <EventId>0</EventId>
  <FullPhoneNumber>String</FullPhoneNumber>
  <OrderDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel.Types">
    <d2p1:TicketDetails>
      <d2p1:Count>0</d2p1:Count>
      <d2p1:Currency>String</d2p1:Currency>
      <d2p1:DiscountCode>String</d2p1:DiscountCode>
      <d2p1:EventSeriesOwnerTicketType>0</d2p1:EventSeriesOwnerTicketType>
      <d2p1:EventSeriesTicketType>0</d2p1:EventSeriesTicketType>
      <d2p1:ID>0</d2p1:ID>
      <d2p1:IsSpecialTicket>false</d2p1:IsSpecialTicket>
      <d2p1:JustChangedBySQL>false</d2p1:JustChangedBySQL>
      <d2p1:SQLJustChangedTimeStamp>0001-01-01T00:00:00</d2p1:SQLJustChangedTimeStamp>
      <d2p1:ShowUsedTickets>false</d2p1:ShowUsedTickets>
      <d2p1:SpecialTicketId>String</d2p1:SpecialTicketId>
      <d2p1:TeamPassId>0</d2p1:TeamPassId>
      <d2p1:TicketColor>String</d2p1:TicketColor>
      <d2p1:TicketDetailsTransferredFrom>0</d2p1:TicketDetailsTransferredFrom>
      <d2p1:TicketDisplayString>String</d2p1:TicketDisplayString>
      <d2p1:TicketId>0</d2p1:TicketId>
      <d2p1:TicketName>String</d2p1:TicketName>
      <d2p1:TicketPrice>0</d2p1:TicketPrice>
      <d2p1:TicketPriceBeforeDiscount>0</d2p1:TicketPriceBeforeDiscount>
      <d2p1:TotalAmountBeforeDiscount>0</d2p1:TotalAmountBeforeDiscount>
      <d2p1:TotalDiscount>0</d2p1:TotalDiscount>
      <d2p1:TotalPrice>0</d2p1:TotalPrice>
    </d2p1:TicketDetails>
  </OrderDetails>
</PreviewDiscountRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PreviewDiscountResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Currency>String</Currency>
  <Discount>
    <Type>String</Type>
    <Value>0</Value>
  </Discount>
  <DiscountCodeId>0</DiscountCodeId>
  <DiscountCodeTypeId>0</DiscountCodeTypeId>
  <Lines>
    <DiscountLineResult>
      <Applied>false</Applied>
      <Count>0</Count>
      <LineAfter>0</LineAfter>
      <LineBefore>0</LineBefore>
      <TicketTypeId>0</TicketTypeId>
      <UnitAfter>0</UnitAfter>
      <UnitBefore>0</UnitBefore>
    </DiscountLineResult>
  </Lines>
  <Message>
    <En>String</En>
    <Is>String</Is>
  </Message>
  <Reason>String</Reason>
  <Status>String</Status>
  <StatusCode>0</StatusCode>
  <SubtotalAfter>0</SubtotalAfter>
  <SubtotalBefore>0</SubtotalBefore>
  <TotalSavings>0</TotalSavings>
</PreviewDiscountResult>