| GET | /qry/self-service-device-betting-sessions/{Id} |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Betting.WebApi.ServiceModel
Imports Betting.ReadModel
Imports Starnet.Common
Imports Betting.Common
Namespace Global
Namespace Betting.Common
Public Enum SessionStatus
Opening = 1
Open = 2
Ending = 3
Ended = 4
Rejected = 5
End Enum
End Namespace
Namespace Betting.ReadModel
Public Partial Class SelfServiceDeviceBettingSession
Public Overridable Property Id As String
Public Overridable Property Device As Ref
Public Overridable Property Location As Ref
Public Overridable Property Status As SessionStatus
Public Overridable Property StartedAt As Date
Public Overridable Property IssuedByClerk As Ref
Public Overridable Property PatronName As String
Public Overridable Property InitialCredit As Money
Public Overridable Property TopUps As RecordList(Of SessionTopUp)
Public Overridable Property PayoutId As String
Public Overridable Property Payout As Money
Public Overridable Property RejectionReason As String
End Class
Public Partial Class SessionTopUp
Public Overridable Property Id As String
Public Overridable Property Amount As Money
Public Overridable Property Clerk As Ref
Public Overridable Property Status As TopUpStatus
Public Overridable Property FailureReason As String
End Class
Public Enum TopUpStatus
Pending = 1
Completed = 2
Failed = 3
End Enum
End Namespace
Namespace Betting.WebApi.ServiceModel
Public Partial Class GetSelfServiceDeviceBettingSession
Public Overridable Property Id As String
End Class
End Namespace
Namespace Starnet.Common
Public Partial Class Money
Public Overridable Property Amount As Decimal
Public Overridable Property Currency As String
End Class
Public Partial Class RecordList(Of T)
Inherits List(Of T)
End Class
Public Partial Class Ref
Public Overridable Property Id As String
Public Overridable Property Val As String
End Class
End Namespace
End Namespace
VB.NET GetSelfServiceDeviceBettingSession 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.
GET /qry/self-service-device-betting-sessions/{Id} HTTP/1.1
Host: api.testenv.webhop.biz
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: String,
device:
{
id: String,
val: String
},
location:
{
id: String,
val: String
},
status: 1,
startedAt: 0001-01-01,
issuedByClerk:
{
id: String,
val: String
},
patronName: String,
initialCredit:
{
amount: 0,
currency: String
},
topUps:
[
{
id: String,
amount:
{
amount: 0,
currency: String
},
clerk:
{
id: String,
val: String
},
status: 1,
failureReason: String
}
],
payoutId: String,
payout:
{
amount: 0,
currency: String
},
rejectionReason: String
}