Betting.WebApi

<back to all web services

SetBettingPoliciesConfig

Requires Authentication
The following routes are available for this service:
POST/cmd/bettingPolicies/config
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.Common
Imports Starnet.Common

Namespace Global

    Namespace Betting.Common

        Public Partial Class BettingPolicies
            Public Overridable Property PayinConstraints As RecordList(Of PayinConstraint)
            Public Overridable Property PayinTaxationPolicyId As String
            Public Overridable Property WinningsCaps As RecordList(Of WinningsCap)
            Public Overridable Property WinningsTaxationPolicyId As String
        End Class

        Public Partial Class PayinConstraint
            Public Overridable Property Type As PayinConstraintType
            Public Overridable Property Min As Money
            Public Overridable Property [Default] As Money
            Public Overridable Property WarningThreshold As Money
            Public Overridable Property Max As Money
        End Class

        Public Enum PayinConstraintType
            SingleBet = 0
            MultiBet = 1
            SystemBet = 2
        End Enum

        Public Partial Class WinningsCap
            Public Overridable Property Type As WinningsCapType
            Public Overridable Property Cap As Money
        End Class

        Public Enum WinningsCapType
            SingleBet = 0
            MultiBet = 1
            SystemBet = 2
        End Enum
    End Namespace

    Namespace Betting.WebApi.ServiceModel

        Public Partial Class SetBettingPoliciesConfig
            Public Overridable Property Id As String
            Public Overridable Property Policies As BettingPolicies
            Public Overridable Property ProductInstanceRef As Ref
            Public Overridable Property OwnerRef As Ref
            Public Overridable Property IsActive As Boolean
        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 SetBettingPoliciesConfig DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /cmd/bettingPolicies/config HTTP/1.1 
Host: api.sbbet.ath.cx 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	policies: 
	{
		payinConstraints: 
		[
			{
				type: 0,
				min: 
				{
					amount: 0,
					currency: String
				},
				default: 
				{
					amount: 0,
					currency: String
				},
				warningThreshold: 
				{
					amount: 0,
					currency: String
				},
				max: 
				{
					amount: 0,
					currency: String
				}
			}
		],
		payinTaxationPolicyId: String,
		winningsCaps: 
		[
			{
				type: 0,
				cap: 
				{
					amount: 0,
					currency: String
				}
			}
		],
		winningsTaxationPolicyId: String
	},
	productInstanceRef: 
	{
		id: String,
		val: String
	},
	ownerRef: 
	{
		id: String,
		val: String
	},
	isActive: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	errorCode: String,
	message: String,
	stackTrace: String,
	errors: 
	[
		{
			errorCode: String,
			fieldName: String,
			message: String,
			meta: 
			{
				String: String
			}
		}
	],
	meta: 
	{
		String: String
	}
}