| POST | /cmd/self-service-device-betting-sessions/issue |
|---|
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 Starnet.Common
Imports Betting.Common
Namespace Global
Namespace Betting.Common
Public Partial Class BettingApp
Public Overridable Property Name As String
Public Overridable Property Version As String
End Class
Public Enum IdentificationDocumentType
IdentityCard = 1
Passport = 2
End Enum
Public Partial Class Origin
Public Overridable Property Application As BettingApp
Public Overridable Property IP As String
Public Overridable Property Organization As RefEx
Public Overridable Property Region As Ref
Public Overridable Property LocationGroup As Ref
Public Overridable Property Location As RefEx
Public Overridable Property Device As RefEx
Public Overridable Property Clerk As Ref
End Class
Public Partial Class PatronIdentity
Public Overridable Property FullName As String
Public Overridable Property IdentificationNumber As String
Public Overridable Property IdentificationDocumentType As IdentificationDocumentType
End Class
End Namespace
Namespace Betting.WebApi.ServiceModel
Public Partial Class IssueSelfServiceDevice
Public Overridable Property SessionId As String
Public Overridable Property DeviceId As String
Public Overridable Property InitialCredit As Money
Public Overridable Property Patron As PatronIdentity
Public Overridable Property Origin As Origin
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 RecordDictionary(Of TKey, TVal)
Inherits Dictionary(Of TKey, TVal)
End Class
Public Partial Class Ref
Public Overridable Property Id As String
Public Overridable Property Val As String
End Class
Public Partial Class RefEx
Inherits Ref
Public Overridable Property Data As RecordDictionary(Of String, String)
End Class
End Namespace
End Namespace
VB.NET IssueSelfServiceDevice 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /cmd/self-service-device-betting-sessions/issue HTTP/1.1
Host: api.testenv.webhop.biz
Accept: application/json
Content-Type: application/json
Content-Length: length
{"sessionId":"String","deviceId":"String","initialCredit":{"amount":0,"currency":"String"},"patron":{"fullName":"String","identificationNumber":"String","identificationDocumentType":1},"origin":{"application":{"name":"String","version":"String"},"ip":"String","organization":{"data":{"String":"String"},"id":"String","val":"String"},"region":{"id":"String","val":"String"},"locationGroup":{"id":"String","val":"String"},"location":{"data":{"String":"String"},"id":"String","val":"String"},"device":{"data":{"String":"String"},"id":"String","val":"String"},"clerk":{"id":"String","val":"String"}}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}