| Requires any of the roles: | Admin, TeamAdmin | Requires the permission: | ReadData |
| POST | /OrderOwnerCards/upgrade/candidates | Live owner cards of a verified phone and the card types each may be upgraded to (rules U1-U10) |
|---|
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 OwnerCardsUpgradeCandidatesRequest
Public Overridable Property BuyerPhone As String
Public Overridable Property SourceOwnerCardId As Nullable(Of Integer)
End Class
Public Partial Class OwnerCardsUpgradeCandidatesResult
Inherits OwnerCardUpgradeResultBase
Public Sub New()
Cards = New List(Of OwnerCardUpgradeSource)
End Sub
Public Overridable Property Enabled As Boolean
Public Overridable Property Cards As List(Of OwnerCardUpgradeSource)
End Class
Public Partial Class OwnerCardUpgradeResultBase
Public Overridable Property StatusCode As Integer
Public Overridable Property Message As String
Public Overridable Property Reason As String
End Class
Public Partial Class OwnerCardUpgradeSource
Public Sub New()
Candidates = New List(Of OwnerCardUpgradeTarget)
End Sub
Public Overridable Property SourceOwnerCardId As Integer
Public Overridable Property OwnerId As Integer
Public Overridable Property OwnerCardTypeId As Integer
Public Overridable Property TypeName As String
Public Overridable Property PricePaid As Integer
Public Overridable Property CardPrice As Integer
Public Overridable Property CardValidFromUTC As Nullable(Of Date)
Public Overridable Property CardValidToUTC As Nullable(Of Date)
Public Overridable Property PaymentStatus As String
Public Overridable Property Eligible As Boolean
Public Overridable Property ReasonCode As Nullable(Of Integer)
Public Overridable Property Reason As String
Public Overridable Property Candidates As List(Of OwnerCardUpgradeTarget)
End Class
Public Partial Class OwnerCardUpgradeTarget
Public Overridable Property OwnerCardTypeId As Integer
Public Overridable Property Name As String
Public Overridable Property Description As String
Public Overridable Property ImageUrl As String
Public Overridable Property Price As Integer
Public Overridable Property Delta As Integer
Public Overridable Property ValidFromUTC As Date
Public Overridable Property ValidToUTC As Date
End Class
End Namespace
End Namespace
VB.NET OwnerCardsUpgradeCandidatesRequest 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/upgrade/candidates HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<OwnerCardsUpgradeCandidatesRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<BuyerPhone>String</BuyerPhone>
<SourceOwnerCardId>0</SourceOwnerCardId>
</OwnerCardsUpgradeCandidatesRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<OwnerCardsUpgradeCandidatesResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Message>String</Message>
<Reason>String</Reason>
<StatusCode>0</StatusCode>
<Cards>
<OwnerCardUpgradeSource>
<Candidates>
<OwnerCardUpgradeTarget>
<Delta>0</Delta>
<Description>String</Description>
<ImageUrl>String</ImageUrl>
<Name>String</Name>
<OwnerCardTypeId>0</OwnerCardTypeId>
<Price>0</Price>
<ValidFromUTC>0001-01-01T00:00:00</ValidFromUTC>
<ValidToUTC>0001-01-01T00:00:00</ValidToUTC>
</OwnerCardUpgradeTarget>
</Candidates>
<CardPrice>0</CardPrice>
<CardValidFromUTC>0001-01-01T00:00:00</CardValidFromUTC>
<CardValidToUTC>0001-01-01T00:00:00</CardValidToUTC>
<Eligible>false</Eligible>
<OwnerCardTypeId>0</OwnerCardTypeId>
<OwnerId>0</OwnerId>
<PaymentStatus>String</PaymentStatus>
<PricePaid>0</PricePaid>
<Reason>String</Reason>
<ReasonCode>0</ReasonCode>
<SourceOwnerCardId>0</SourceOwnerCardId>
<TypeName>String</TypeName>
</OwnerCardUpgradeSource>
</Cards>
<Enabled>false</Enabled>
</OwnerCardsUpgradeCandidatesResult>