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.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


open class PreviewDiscountRequest
{
    var code:String? = null
    var eventId:Int? = null
    var fullPhoneNumber:String? = null
    var orderDetails:ArrayList<TicketDetails> = ArrayList<TicketDetails>()
}

open class TicketDetails
{
    var id:Int? = null
    var ticketId:Int? = null
    var eventSeriesTicketType:Int? = null
    var eventSeriesOwnerTicketType:Int? = null
    var ticketPrice:BigDecimal? = null
    var totalPrice:BigDecimal? = null
    var count:Int? = null
    var ticketColor:String? = null
    var showUsedTickets:Boolean? = null
    var ticketName:String? = null
    var ticketDisplayString:String? = null
    var ticketDetailsTransferredFrom:Int? = null
    var teamPassId:Int? = null
    var isSpecialTicket:Boolean? = null
    var specialTicketId:String? = null
    var justChangedBySQL:Boolean? = null
    var sqlJustChangedTimeStamp:Date? = null
    var currency:String? = null
    var discountCode:String? = null
    var totalDiscount:BigDecimal? = null
    var totalAmountBeforeDiscount:BigDecimal? = null
    var ticketPriceBeforeDiscount:BigDecimal? = null
}

open class PreviewDiscountResult
{
    var status:String? = null
    var reason:String? = null
    var message:LocalizedMessage? = null
    var discountCodeId:Int? = null
    var discountCodeTypeId:Int? = null
    var discount:DiscountSummary? = null
    var lines:ArrayList<DiscountLineResult> = ArrayList<DiscountLineResult>()
    var subtotalBefore:BigDecimal? = null
    var subtotalAfter:BigDecimal? = null
    var totalSavings:BigDecimal? = null
    var currency:String? = null
    var statusCode:Int? = null
}

open class LocalizedMessage
{
    @SerializedName("is") var Is:String? = null
    var en:String? = null
}

open class DiscountSummary
{
    @SerializedName("type") var Type:String? = null
    var value:BigDecimal? = null
}

open class DiscountLineResult
{
    var ticketTypeId:Int? = null
    var count:Int? = null
    var applied:Boolean? = null
    var unitBefore:BigDecimal? = null
    var unitAfter:BigDecimal? = null
    var lineBefore:BigDecimal? = null
    var lineAfter:BigDecimal? = null
}

Kotlin PreviewDiscountRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

{"code":"String","eventId":0,"fullPhoneNumber":"String","orderDetails":[{"id":0,"ticketId":0,"eventSeriesTicketType":0,"eventSeriesOwnerTicketType":0,"ticketPrice":0,"totalPrice":0,"count":0,"ticketColor":"String","showUsedTickets":false,"ticketName":"String","ticketDisplayString":"String","ticketDetailsTransferredFrom":0,"teamPassId":0,"isSpecialTicket":false,"specialTicketId":"String","justChangedBySQL":false,"sqlJustChangedTimeStamp":"0001-01-01T00:00:00.0000000","currency":"String","discountCode":"String","totalDiscount":0,"totalAmountBeforeDiscount":0,"ticketPriceBeforeDiscount":0}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"status":"String","reason":"String","message":{"is":"String","en":"String"},"discountCodeId":0,"discountCodeTypeId":0,"discount":{"type":"String","value":0},"lines":[{"ticketTypeId":0,"count":0,"applied":false,"unitBefore":0,"unitAfter":0,"lineBefore":0,"lineAfter":0}],"subtotalBefore":0,"subtotalAfter":0,"totalSavings":0,"currency":"String","statusCode":0}