TicketUserServices

<back to all web services

CalculateDiscountPricesRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequires the permission:ReadData
The following routes are available for this service:
GET POST/ticketOrder/CalculatePrices
import Foundation
import ServiceStack

public class CalculateDiscountPricesRequest : Codable
{
    public var discountCode:String?
    public var fullPhoneNumber:String?
    public var eventId:Int?
    public var orderDetails:[TicketDetails] = []

    required public init(){}
}

public class TicketDetails : Codable
{
    public var id:Int?
    public var ticketId:Int?
    public var eventSeriesTicketType:Int?
    public var eventSeriesOwnerTicketType:Int?
    public var ticketPrice:Double?
    public var totalPrice:Double?
    public var count:Int?
    public var ticketColor:String?
    public var showUsedTickets:Bool?
    public var ticketName:String?
    public var ticketDisplayString:String?
    public var ticketDetailsTransferredFrom:Int?
    public var teamPassId:Int?
    public var isSpecialTicket:Bool?
    public var specialTicketId:String?
    public var justChangedBySQL:Bool?
    public var sqlJustChangedTimeStamp:Date?
    public var currency:String?
    public var discountCode:String?
    public var totalDiscount:Double?
    public var totalAmountBeforeDiscount:Double?
    public var ticketPriceBeforeDiscount:Double?

    required public init(){}
}

public class CalculateDiscountPricesResult : Codable
{
    public var orderDetails:[TicketDetails] = []
    public var statusCode:Int?
    public var message:String?

    required public init(){}
}


Swift CalculateDiscountPricesRequest 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/CalculatePrices HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"discountCode":"String","fullPhoneNumber":"String","eventId":0,"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

{"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}],"statusCode":0,"message":"String"}