| POST | /cmd/locations/devices/add |
|---|
namespace Betting.WebApi.ServiceModel
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
type DeviceUsageMode =
| ClerkServiced = 0
| Personal = 1
| SelfService = 2
| Unknown = -1
type DeviceUserInterface =
| Tablet = 0
| Kiosk = 1
| Default = 2
| Unknown = -1
[<AllowNullLiteral>]
type Ref() =
member val Id:String = null with get,set
member val Val:String = null with get,set
type DeviceManagement =
| Partner = 1
| Platform = 2
[<AllowNullLiteral>]
type DeviceProfile() =
member val UsageMode:DeviceUsageMode = new DeviceUsageMode() with get,set
member val UserInterface:DeviceUserInterface = new DeviceUserInterface() with get,set
member val Wallet:Ref = null with get,set
member val ManagedBy:Nullable<DeviceManagement> = new Nullable<DeviceManagement>() with get,set
[<AllowNullLiteral>]
type Device() =
member val Id:String = null with get,set
member val Name:String = null with get,set
member val IsActive:Boolean = new Boolean() with get,set
member val Profile:DeviceProfile = null with get,set
member val IntegrationsData:RecordDictionary<String, String> = null with get,set
[<AllowNullLiteral>]
type AddLocationDevice() =
member val Id:String = null with get,set
member val Device:Device = null with get,set
[<AllowNullLiteral>]
type RecordDictionary<TKey, TVal>() =
inherit Dictionary<TKey, TVal>()
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /cmd/locations/devices/add HTTP/1.1
Host: api.bettor.webhop.biz
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"id":"String","device":{"id":"String","name":"String","isActive":false,"profile":{"usageMode":0,"userInterface":0,"wallet":{"id":"String","val":"String"},"managedBy":0},"integrationsData":{"String":"String"}}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}