| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Requires the permission: | ReadData |
| POST | /ticketOrder/previewDiscount |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports TicketUserServices.ServiceModel
Imports TicketUserServices.ServiceModel.Types
Namespace Global
Namespace TicketUserServices.ServiceModel
Public Partial Class DiscountLineResult
Public Overridable Property TicketTypeId As Nullable(Of Integer)
Public Overridable Property Count As Integer
Public Overridable Property Applied As Boolean
Public Overridable Property UnitBefore As Decimal
Public Overridable Property UnitAfter As Decimal
Public Overridable Property LineBefore As Decimal
Public Overridable Property LineAfter As Decimal
End Class
Public Partial Class DiscountSummary
Public Overridable Property Type As String
Public Overridable Property Value As Decimal
End Class
Public Partial Class LocalizedMessage
Public Overridable Property [Is] As String
Public Overridable Property En As String
End Class
Public Partial Class PreviewDiscountRequest
Public Sub New()
OrderDetails = New List(Of TicketDetails)
End Sub
Public Overridable Property Code As String
Public Overridable Property EventId As Nullable(Of Integer)
Public Overridable Property FullPhoneNumber As String
Public Overridable Property OrderDetails As List(Of TicketDetails)
End Class
Public Partial Class PreviewDiscountResult
Public Sub New()
Lines = New List(Of DiscountLineResult)
End Sub
Public Overridable Property Status As String
Public Overridable Property Reason As String
Public Overridable Property Message As LocalizedMessage
Public Overridable Property DiscountCodeId As Nullable(Of Integer)
Public Overridable Property DiscountCodeTypeId As Nullable(Of Integer)
Public Overridable Property Discount As DiscountSummary
Public Overridable Property Lines As List(Of DiscountLineResult)
Public Overridable Property SubtotalBefore As Decimal
Public Overridable Property SubtotalAfter As Decimal
Public Overridable Property TotalSavings As Decimal
Public Overridable Property Currency As String
Public Overridable Property StatusCode As Integer
End Class
End Namespace
Namespace TicketUserServices.ServiceModel.Types
Public Partial Class TicketDetails
Public Overridable Property ID As Integer
Public Overridable Property TicketId As Integer
Public Overridable Property EventSeriesTicketType As Nullable(Of Integer)
Public Overridable Property EventSeriesOwnerTicketType As Nullable(Of Integer)
Public Overridable Property TicketPrice As Decimal
Public Overridable Property TotalPrice As Decimal
Public Overridable Property Count As Integer
Public Overridable Property TicketColor As String
Public Overridable Property ShowUsedTickets As Nullable(Of Boolean)
Public Overridable Property TicketName As String
Public Overridable Property TicketDisplayString As String
Public Overridable Property TicketDetailsTransferredFrom As Nullable(Of Integer)
Public Overridable Property TeamPassId As Nullable(Of Integer)
Public Overridable Property IsSpecialTicket As Nullable(Of Boolean)
Public Overridable Property SpecialTicketId As String
Public Overridable Property JustChangedBySQL As Nullable(Of Boolean)
Public Overridable Property SQLJustChangedTimeStamp As Nullable(Of Date)
Public Overridable Property Currency As String
Public Overridable Property DiscountCode As String
Public Overridable Property TotalDiscount As Nullable(Of Decimal)
Public Overridable Property TotalAmountBeforeDiscount As Nullable(Of Decimal)
Public Overridable Property TicketPriceBeforeDiscount As Nullable(Of Decimal)
End Class
End Namespace
End Namespace
VB.NET PreviewDiscountRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
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-01,
currency: String,
discountCode: String,
totalDiscount: 0,
totalAmountBeforeDiscount: 0,
ticketPriceBeforeDiscount: 0
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
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
}