| Requires any of the roles: | Admin, TeamAdmin, MobileApp, Admin, TeamAdmin, MobileApp | Requires any of the permissions: | ReadData, ReadData |
| POST | /OrderOwnerCards/previewDiscount |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports TicketUserServices.ServiceModel
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 OwnerCardsPreviewDiscountRequest
Public Sub New()
OwnerCardTypeIds = New List(Of Integer)
End Sub
Public Overridable Property Code As String
Public Overridable Property OwnerCardTypeIds As List(Of Integer)
Public Overridable Property FullPhoneNumber As String
Public Overridable Property IsSubscription As Nullable(Of Boolean)
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
End Namespace
VB.NET OwnerCardsPreviewDiscountRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /OrderOwnerCards/previewDiscount HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<OwnerCardsPreviewDiscountRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Code>String</Code>
<FullPhoneNumber>String</FullPhoneNumber>
<IsSubscription>false</IsSubscription>
<OwnerCardTypeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</OwnerCardTypeIds>
</OwnerCardsPreviewDiscountRequest>
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>