Betting.WebApi

<back to all web services

InstallProductInstance

Requires Authentication
The following routes are available for this service:
POST/cmd/products/instances
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 InstallProductInstance
    {
        public String id = null;
        public String name = null;
        public String title = null;
        public ProductReference product = null;
        public Ref currency = null;
        public BettingPolicies bettingPolicies = null;
        public String apiUrl = null;
        public String backOfficeUrl = null;
        public String instanceUrl = null;
        public String feedPlayerUrl = null;
        
        public String getId() { return id; }
        public InstallProductInstance setId(String value) { this.id = value; return this; }
        public String getName() { return name; }
        public InstallProductInstance setName(String value) { this.name = value; return this; }
        public String getTitle() { return title; }
        public InstallProductInstance setTitle(String value) { this.title = value; return this; }
        public ProductReference getProduct() { return product; }
        public InstallProductInstance setProduct(ProductReference value) { this.product = value; return this; }
        public Ref getCurrency() { return currency; }
        public InstallProductInstance setCurrency(Ref value) { this.currency = value; return this; }
        public BettingPolicies getBettingPolicies() { return bettingPolicies; }
        public InstallProductInstance setBettingPolicies(BettingPolicies value) { this.bettingPolicies = value; return this; }
        public String getApiUrl() { return apiUrl; }
        public InstallProductInstance setApiUrl(String value) { this.apiUrl = value; return this; }
        public String getBackOfficeUrl() { return backOfficeUrl; }
        public InstallProductInstance setBackOfficeUrl(String value) { this.backOfficeUrl = value; return this; }
        public String getInstanceUrl() { return instanceUrl; }
        public InstallProductInstance setInstanceUrl(String value) { this.instanceUrl = value; return this; }
        public String getFeedPlayerUrl() { return feedPlayerUrl; }
        public InstallProductInstance setFeedPlayerUrl(String value) { this.feedPlayerUrl = value; return this; }
    }

    public static class ProductReference
    {
        public String id = null;
        public String value = null;
        public String category = null;
        public Ref productProvider = null;
        
        public String getId() { return id; }
        public ProductReference setId(String value) { this.id = value; return this; }
        public String getValue() { return value; }
        public ProductReference setValue(String value) { this.value = value; return this; }
        public String getCategory() { return category; }
        public ProductReference setCategory(String value) { this.category = value; return this; }
        public Ref getProductProvider() { return productProvider; }
        public ProductReference setProductProvider(Ref value) { this.productProvider = value; return this; }
    }

    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; }
    }

    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; }
    }

}

Java InstallProductInstance DTOs

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

HTTP + XML

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

POST /cmd/products/instances HTTP/1.1 
Host: api.sbbet.ath.cx 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<InstallProductInstance xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Betting.WebApi.ServiceModel">
  <ApiUrl>String</ApiUrl>
  <BackOfficeUrl>String</BackOfficeUrl>
  <BettingPolicies xmlns:d2p1="http://schemas.datacontract.org/2004/07/Betting.Common">
    <d2p1:PayinConstraints>
      <d2p1:PayinConstraint>
        <d2p1:Default xmlns:d5p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
          <d5p1:Amount>0</d5p1:Amount>
          <d5p1:Currency>String</d5p1:Currency>
        </d2p1:Default>
        <d2p1:Max xmlns:d5p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
          <d5p1:Amount>0</d5p1:Amount>
          <d5p1:Currency>String</d5p1:Currency>
        </d2p1:Max>
        <d2p1:Min xmlns:d5p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
          <d5p1:Amount>0</d5p1:Amount>
          <d5p1:Currency>String</d5p1:Currency>
        </d2p1:Min>
        <d2p1:Type>SingleBet</d2p1:Type>
        <d2p1:WarningThreshold xmlns:d5p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
          <d5p1:Amount>0</d5p1:Amount>
          <d5p1:Currency>String</d5p1:Currency>
        </d2p1:WarningThreshold>
      </d2p1:PayinConstraint>
    </d2p1:PayinConstraints>
    <d2p1:PayinTaxationPolicyId>String</d2p1:PayinTaxationPolicyId>
    <d2p1:WinningsCaps>
      <d2p1:WinningsCap>
        <d2p1:Cap xmlns:d5p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
          <d5p1:Amount>0</d5p1:Amount>
          <d5p1:Currency>String</d5p1:Currency>
        </d2p1:Cap>
        <d2p1:Type>SingleBet</d2p1:Type>
      </d2p1:WinningsCap>
    </d2p1:WinningsCaps>
    <d2p1:WinningsTaxationPolicyId>String</d2p1:WinningsTaxationPolicyId>
  </BettingPolicies>
  <Currency xmlns:d2p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
    <d2p1:_x003C_Id_x003E_k__BackingField>String</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Val_x003E_k__BackingField>String</d2p1:_x003C_Val_x003E_k__BackingField>
  </Currency>
  <FeedPlayerUrl>String</FeedPlayerUrl>
  <Id>String</Id>
  <InstanceUrl>String</InstanceUrl>
  <Name>String</Name>
  <Product xmlns:d2p1="http://schemas.datacontract.org/2004/07/Betting.Common">
    <d2p1:Category>String</d2p1:Category>
    <d2p1:Id>String</d2p1:Id>
    <d2p1:ProductProvider xmlns:d3p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
      <d3p1:_x003C_Id_x003E_k__BackingField>String</d3p1:_x003C_Id_x003E_k__BackingField>
      <d3p1:_x003C_Val_x003E_k__BackingField>String</d3p1:_x003C_Val_x003E_k__BackingField>
    </d2p1:ProductProvider>
    <d2p1:Value>String</d2p1:Value>
  </Product>
  <Title>String</Title>
</InstallProductInstance>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ResponseStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <ErrorCode>String</ErrorCode>
  <Message>String</Message>
  <StackTrace>String</StackTrace>
  <Errors>
    <ResponseError>
      <ErrorCode>String</ErrorCode>
      <FieldName>String</FieldName>
      <Message>String</Message>
      <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </Meta>
    </ResponseError>
  </Errors>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
</ResponseStatus>