| 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 .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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/json
Content-Type: application/json
Content-Length: length
{"id":"String","name":"String","title":"String","product":{"id":"String","value":"String","category":"String","productProvider":{"id":"String","val":"String"}},"currency":{"id":"String","val":"String"},"bettingPolicies":{"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"},"apiUrl":"String","backOfficeUrl":"String","instanceUrl":"String","feedPlayerUrl":"String"}
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"}}