| POST | /cmd/bettingPolicies/config |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
open class SetBettingPoliciesConfig
{
open var id:String? = null
open var policies:BettingPolicies? = null
open var productInstanceRef:Ref? = null
open var ownerRef:Ref? = null
open var isActive:Boolean? = null
}
open class BettingPolicies
{
open var payinConstraints:RecordList<PayinConstraint>? = null
open var payinTaxationPolicyId:String? = null
open var winningsCaps:RecordList<WinningsCap>? = null
open var winningsTaxationPolicyId:String? = null
}
open class RecordList<T> : ArrayList<T>()
{
}
open class PayinConstraint
{
@SerializedName("type") open var Type:PayinConstraintType? = null
open var min:Money? = null
@SerializedName("default") open var Default:Money? = null
open var warningThreshold:Money? = null
open var max:Money? = null
}
enum class PayinConstraintType(val value:Int)
{
@SerializedName("0") SingleBet(0),
@SerializedName("1") MultiBet(1),
@SerializedName("2") SystemBet(2),
}
open class Money
{
open var amount:BigDecimal? = null
open var currency:String? = null
}
open class WinningsCap
{
@SerializedName("type") open var Type:WinningsCapType? = null
open var cap:Money? = null
}
enum class WinningsCapType(val value:Int)
{
@SerializedName("0") SingleBet(0),
@SerializedName("1") MultiBet(1),
@SerializedName("2") SystemBet(2),
}
open class Ref
{
open var id:String? = null
@SerializedName("val") open var Val:String? = null
}
Kotlin SetBettingPoliciesConfig DTOs
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/bettingPolicies/config HTTP/1.1
Host: api.sbbet.ath.cx
Accept: text/jsonl
Content-Type: text/jsonl
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/jsonl
Content-Length: length
{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}