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
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class PreviewDiscountRequest
    {
        public String code = null;
        public Integer eventId = null;
        public String fullPhoneNumber = null;
        public ArrayList<TicketDetails> orderDetails = null;
        
        public String getCode() { return code; }
        public PreviewDiscountRequest setCode(String value) { this.code = value; return this; }
        public Integer getEventId() { return eventId; }
        public PreviewDiscountRequest setEventId(Integer value) { this.eventId = value; return this; }
        public String getFullPhoneNumber() { return fullPhoneNumber; }
        public PreviewDiscountRequest setFullPhoneNumber(String value) { this.fullPhoneNumber = value; return this; }
        public ArrayList<TicketDetails> getOrderDetails() { return orderDetails; }
        public PreviewDiscountRequest setOrderDetails(ArrayList<TicketDetails> value) { this.orderDetails = value; return this; }
    }

    public static class TicketDetails
    {
        public Integer id = null;
        public Integer ticketId = null;
        public Integer eventSeriesTicketType = null;
        public Integer eventSeriesOwnerTicketType = null;
        public BigDecimal ticketPrice = null;
        public BigDecimal totalPrice = null;
        public Integer count = null;
        public String ticketColor = null;
        public Boolean showUsedTickets = null;
        public String ticketName = null;
        public String ticketDisplayString = null;
        public Integer ticketDetailsTransferredFrom = null;
        public Integer teamPassId = null;
        public Boolean isSpecialTicket = null;
        public String specialTicketId = null;
        public Boolean justChangedBySQL = null;
        public Date sqlJustChangedTimeStamp = null;
        public String currency = null;
        public String discountCode = null;
        public BigDecimal totalDiscount = null;
        public BigDecimal totalAmountBeforeDiscount = null;
        public BigDecimal ticketPriceBeforeDiscount = null;
        
        public Integer getId() { return id; }
        public TicketDetails setId(Integer value) { this.id = value; return this; }
        public Integer getTicketId() { return ticketId; }
        public TicketDetails setTicketId(Integer value) { this.ticketId = value; return this; }
        public Integer getEventSeriesTicketType() { return eventSeriesTicketType; }
        public TicketDetails setEventSeriesTicketType(Integer value) { this.eventSeriesTicketType = value; return this; }
        public Integer getEventSeriesOwnerTicketType() { return eventSeriesOwnerTicketType; }
        public TicketDetails setEventSeriesOwnerTicketType(Integer value) { this.eventSeriesOwnerTicketType = value; return this; }
        public BigDecimal getTicketPrice() { return ticketPrice; }
        public TicketDetails setTicketPrice(BigDecimal value) { this.ticketPrice = value; return this; }
        public BigDecimal getTotalPrice() { return totalPrice; }
        public TicketDetails setTotalPrice(BigDecimal value) { this.totalPrice = value; return this; }
        public Integer getCount() { return count; }
        public TicketDetails setCount(Integer value) { this.count = value; return this; }
        public String getTicketColor() { return ticketColor; }
        public TicketDetails setTicketColor(String value) { this.ticketColor = value; return this; }
        public Boolean isShowUsedTickets() { return showUsedTickets; }
        public TicketDetails setShowUsedTickets(Boolean value) { this.showUsedTickets = value; return this; }
        public String getTicketName() { return ticketName; }
        public TicketDetails setTicketName(String value) { this.ticketName = value; return this; }
        public String getTicketDisplayString() { return ticketDisplayString; }
        public TicketDetails setTicketDisplayString(String value) { this.ticketDisplayString = value; return this; }
        public Integer getTicketDetailsTransferredFrom() { return ticketDetailsTransferredFrom; }
        public TicketDetails setTicketDetailsTransferredFrom(Integer value) { this.ticketDetailsTransferredFrom = value; return this; }
        public Integer getTeamPassId() { return teamPassId; }
        public TicketDetails setTeamPassId(Integer value) { this.teamPassId = value; return this; }
        public Boolean getIsSpecialTicket() { return isSpecialTicket; }
        public TicketDetails setIsSpecialTicket(Boolean value) { this.isSpecialTicket = value; return this; }
        public String getSpecialTicketId() { return specialTicketId; }
        public TicketDetails setSpecialTicketId(String value) { this.specialTicketId = value; return this; }
        public Boolean isJustChangedBySQL() { return justChangedBySQL; }
        public TicketDetails setJustChangedBySQL(Boolean value) { this.justChangedBySQL = value; return this; }
        public Date getSqlJustChangedTimeStamp() { return sqlJustChangedTimeStamp; }
        public TicketDetails setSqlJustChangedTimeStamp(Date value) { this.sqlJustChangedTimeStamp = value; return this; }
        public String getCurrency() { return currency; }
        public TicketDetails setCurrency(String value) { this.currency = value; return this; }
        public String getDiscountCode() { return discountCode; }
        public TicketDetails setDiscountCode(String value) { this.discountCode = value; return this; }
        public BigDecimal getTotalDiscount() { return totalDiscount; }
        public TicketDetails setTotalDiscount(BigDecimal value) { this.totalDiscount = value; return this; }
        public BigDecimal getTotalAmountBeforeDiscount() { return totalAmountBeforeDiscount; }
        public TicketDetails setTotalAmountBeforeDiscount(BigDecimal value) { this.totalAmountBeforeDiscount = value; return this; }
        public BigDecimal getTicketPriceBeforeDiscount() { return ticketPriceBeforeDiscount; }
        public TicketDetails setTicketPriceBeforeDiscount(BigDecimal value) { this.ticketPriceBeforeDiscount = value; return this; }
    }

    public static class PreviewDiscountResult
    {
        public String status = null;
        public String reason = null;
        public LocalizedMessage message = null;
        public Integer discountCodeId = null;
        public Integer discountCodeTypeId = null;
        public DiscountSummary discount = null;
        public ArrayList<DiscountLineResult> lines = null;
        public BigDecimal subtotalBefore = null;
        public BigDecimal subtotalAfter = null;
        public BigDecimal totalSavings = null;
        public String currency = null;
        public Integer statusCode = null;
        
        public String getStatus() { return status; }
        public PreviewDiscountResult setStatus(String value) { this.status = value; return this; }
        public String getReason() { return reason; }
        public PreviewDiscountResult setReason(String value) { this.reason = value; return this; }
        public LocalizedMessage getMessage() { return message; }
        public PreviewDiscountResult setMessage(LocalizedMessage value) { this.message = value; return this; }
        public Integer getDiscountCodeId() { return discountCodeId; }
        public PreviewDiscountResult setDiscountCodeId(Integer value) { this.discountCodeId = value; return this; }
        public Integer getDiscountCodeTypeId() { return discountCodeTypeId; }
        public PreviewDiscountResult setDiscountCodeTypeId(Integer value) { this.discountCodeTypeId = value; return this; }
        public DiscountSummary getDiscount() { return discount; }
        public PreviewDiscountResult setDiscount(DiscountSummary value) { this.discount = value; return this; }
        public ArrayList<DiscountLineResult> getLines() { return lines; }
        public PreviewDiscountResult setLines(ArrayList<DiscountLineResult> value) { this.lines = value; return this; }
        public BigDecimal getSubtotalBefore() { return subtotalBefore; }
        public PreviewDiscountResult setSubtotalBefore(BigDecimal value) { this.subtotalBefore = value; return this; }
        public BigDecimal getSubtotalAfter() { return subtotalAfter; }
        public PreviewDiscountResult setSubtotalAfter(BigDecimal value) { this.subtotalAfter = value; return this; }
        public BigDecimal getTotalSavings() { return totalSavings; }
        public PreviewDiscountResult setTotalSavings(BigDecimal value) { this.totalSavings = value; return this; }
        public String getCurrency() { return currency; }
        public PreviewDiscountResult setCurrency(String value) { this.currency = value; return this; }
        public Integer getStatusCode() { return statusCode; }
        public PreviewDiscountResult 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; }
    }

    public static class DiscountSummary
    {
        public String type = null;
        public BigDecimal value = null;
        
        public String getType() { return type; }
        public DiscountSummary setType(String value) { this.type = value; return this; }
        public BigDecimal getValue() { return value; }
        public DiscountSummary setValue(BigDecimal value) { this.value = value; return this; }
    }

    public static class DiscountLineResult
    {
        public Integer ticketTypeId = null;
        public Integer count = null;
        public Boolean applied = null;
        public BigDecimal unitBefore = null;
        public BigDecimal unitAfter = null;
        public BigDecimal lineBefore = null;
        public BigDecimal lineAfter = null;
        
        public Integer getTicketTypeId() { return ticketTypeId; }
        public DiscountLineResult setTicketTypeId(Integer value) { this.ticketTypeId = value; return this; }
        public Integer getCount() { return count; }
        public DiscountLineResult setCount(Integer value) { this.count = value; return this; }
        public Boolean isApplied() { return applied; }
        public DiscountLineResult setApplied(Boolean value) { this.applied = value; return this; }
        public BigDecimal getUnitBefore() { return unitBefore; }
        public DiscountLineResult setUnitBefore(BigDecimal value) { this.unitBefore = value; return this; }
        public BigDecimal getUnitAfter() { return unitAfter; }
        public DiscountLineResult setUnitAfter(BigDecimal value) { this.unitAfter = value; return this; }
        public BigDecimal getLineBefore() { return lineBefore; }
        public DiscountLineResult setLineBefore(BigDecimal value) { this.lineBefore = value; return this; }
        public BigDecimal getLineAfter() { return lineAfter; }
        public DiscountLineResult setLineAfter(BigDecimal value) { this.lineAfter = value; return this; }
    }

}

Java 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>