Betting.WebApi

<back to all web services

SetBettingPoliciesConfig

Requires Authentication
The following routes are available for this service:
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.*;

public class dtos
{

    public static class SetBettingPoliciesConfig
    {
        public String id = null;
        public BettingPolicies policies = null;
        public Ref productInstanceRef = null;
        public Ref ownerRef = null;
        public Boolean isActive = null;
        
        public String getId() { return id; }
        public SetBettingPoliciesConfig setId(String value) { this.id = value; return this; }
        public BettingPolicies getPolicies() { return policies; }
        public SetBettingPoliciesConfig setPolicies(BettingPolicies value) { this.policies = value; return this; }
        public Ref getProductInstanceRef() { return productInstanceRef; }
        public SetBettingPoliciesConfig setProductInstanceRef(Ref value) { this.productInstanceRef = value; return this; }
        public Ref getOwnerRef() { return ownerRef; }
        public SetBettingPoliciesConfig setOwnerRef(Ref value) { this.ownerRef = value; return this; }
        public Boolean getIsActive() { return isActive; }
        public SetBettingPoliciesConfig setIsActive(Boolean value) { this.isActive = value; return this; }
    }

    public static class BettingPolicies
    {
        public RecordList<PayinConstraint> payinConstraints = null;
        public String payinTaxationPolicyId = null;
        public RecordList<WinningsCap> winningsCaps = null;
        public String winningsTaxationPolicyId = null;
        
        public RecordList<PayinConstraint> getPayinConstraints() { return payinConstraints; }
        public BettingPolicies setPayinConstraints(RecordList<PayinConstraint> value) { this.payinConstraints = value; return this; }
        public String getPayinTaxationPolicyId() { return payinTaxationPolicyId; }
        public BettingPolicies setPayinTaxationPolicyId(String value) { this.payinTaxationPolicyId = value; return this; }
        public RecordList<WinningsCap> getWinningsCaps() { return winningsCaps; }
        public BettingPolicies setWinningsCaps(RecordList<WinningsCap> value) { this.winningsCaps = value; return this; }
        public String getWinningsTaxationPolicyId() { return winningsTaxationPolicyId; }
        public BettingPolicies setWinningsTaxationPolicyId(String value) { this.winningsTaxationPolicyId = value; return this; }
    }

    public static class RecordList<T> extends ArrayList<T>
    {
        
    }

    public static class PayinConstraint
    {
        public PayinConstraintType type = null;
        public Money min = null;
        @SerializedName("default") public Money Default = null;
        public Money warningThreshold = null;
        public Money max = null;
        
        public PayinConstraintType getType() { return type; }
        public PayinConstraint setType(PayinConstraintType value) { this.type = value; return this; }
        public Money getMin() { return min; }
        public PayinConstraint setMin(Money value) { this.min = value; return this; }
        public Money getDefault() { return Default; }
        public PayinConstraint setDefault(Money value) { this.Default = value; return this; }
        public Money getWarningThreshold() { return warningThreshold; }
        public PayinConstraint setWarningThreshold(Money value) { this.warningThreshold = value; return this; }
        public Money getMax() { return max; }
        public PayinConstraint setMax(Money value) { this.max = value; return this; }
    }

    public static enum PayinConstraintType
    {
        @SerializedName("0") SingleBet(0),
        @SerializedName("1") MultiBet(1),
        @SerializedName("2") SystemBet(2);

        private final int value;
        PayinConstraintType(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

    public static class Money
    {
        public BigDecimal amount = null;
        public String currency = null;
        
        public BigDecimal getAmount() { return amount; }
        public Money setAmount(BigDecimal value) { this.amount = value; return this; }
        public String getCurrency() { return currency; }
        public Money setCurrency(String value) { this.currency = value; return this; }
    }

    public static class WinningsCap
    {
        public WinningsCapType type = null;
        public Money cap = null;
        
        public WinningsCapType getType() { return type; }
        public WinningsCap setType(WinningsCapType value) { this.type = value; return this; }
        public Money getCap() { return cap; }
        public WinningsCap setCap(Money value) { this.cap = value; return this; }
    }

    public static enum WinningsCapType
    {
        @SerializedName("0") SingleBet(0),
        @SerializedName("1") MultiBet(1),
        @SerializedName("2") SystemBet(2);

        private final int value;
        WinningsCapType(final int intValue) { value = intValue; }
        public int getValue() { return value; }
    }

    public static class Ref
    {
        public String id = null;
        public String val = null;
        
        public String getId() { return id; }
        public Ref setId(String value) { this.id = value; return this; }
        public String getVal() { return val; }
        public Ref setVal(String value) { this.val = value; return this; }
    }

}

Java SetBettingPoliciesConfig 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

HTTP + JSON

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: application/json
Content-Type: application/json
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: application/json
Content-Length: length

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