Betting.WebApi

<back to all web services

SubmitSlip

Requires Authentication
The following routes are available for this service:
POST/cmd/slips
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class SubmitSlip
    {
        public String id = null;
        public Ref bettor = null;
        public Origin origin = null;
        public ArrayList<BetRequest> betRequests = null;
        public HashMap<String,String> headerData = null;
        
        public String getId() { return id; }
        public SubmitSlip setId(String value) { this.id = value; return this; }
        public Ref getBettor() { return bettor; }
        public SubmitSlip setBettor(Ref value) { this.bettor = value; return this; }
        public Origin getOrigin() { return origin; }
        public SubmitSlip setOrigin(Origin value) { this.origin = value; return this; }
        public ArrayList<BetRequest> getBetRequests() { return betRequests; }
        public SubmitSlip setBetRequests(ArrayList<BetRequest> value) { this.betRequests = value; return this; }
        public HashMap<String,String> getHeaderData() { return headerData; }
        public SubmitSlip setHeaderData(HashMap<String,String> value) { this.headerData = 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 Origin
    {
        public BettingApp application = null;
        public String ip = null;
        public RefEx organization = null;
        public Ref region = null;
        public Ref locationGroup = null;
        public RefEx location = null;
        public RefEx device = null;
        public Ref clerk = null;
        
        public BettingApp getApplication() { return application; }
        public Origin setApplication(BettingApp value) { this.application = value; return this; }
        public String getIp() { return ip; }
        public Origin setIp(String value) { this.ip = value; return this; }
        public RefEx getOrganization() { return organization; }
        public Origin setOrganization(RefEx value) { this.organization = value; return this; }
        public Ref getRegion() { return region; }
        public Origin setRegion(Ref value) { this.region = value; return this; }
        public Ref getLocationGroup() { return locationGroup; }
        public Origin setLocationGroup(Ref value) { this.locationGroup = value; return this; }
        public RefEx getLocation() { return location; }
        public Origin setLocation(RefEx value) { this.location = value; return this; }
        public RefEx getDevice() { return device; }
        public Origin setDevice(RefEx value) { this.device = value; return this; }
        public Ref getClerk() { return clerk; }
        public Origin setClerk(Ref value) { this.clerk = value; return this; }
    }

    public static class BettingApp
    {
        public String name = null;
        public String version = null;
        
        public String getName() { return name; }
        public BettingApp setName(String value) { this.name = value; return this; }
        public String getVersion() { return version; }
        public BettingApp setVersion(String value) { this.version = value; return this; }
    }

    public static class RefEx extends Ref
    {
        public RecordDictionary<String, String> data = null;
        
        public RecordDictionary<String, String> getData() { return data; }
        public RefEx setData(RecordDictionary<String, String> value) { this.data = value; return this; }
    }

    public static class RecordDictionary<TKey, TVal> extends HashMap<TKey,TVal>
    {
        
    }

    public static class BetRequest
    {
        public String betId = null;
        public ProductInstanceRef productInstance = null;
        public HashMap<String,String> payload = null;
        public PayinRecap payinRecap = null;
        public PayoutRecap possiblePayoutRecap = null;
        
        public String getBetId() { return betId; }
        public BetRequest setBetId(String value) { this.betId = value; return this; }
        public ProductInstanceRef getProductInstance() { return productInstance; }
        public BetRequest setProductInstance(ProductInstanceRef value) { this.productInstance = value; return this; }
        public HashMap<String,String> getPayload() { return payload; }
        public BetRequest setPayload(HashMap<String,String> value) { this.payload = value; return this; }
        public PayinRecap getPayinRecap() { return payinRecap; }
        public BetRequest setPayinRecap(PayinRecap value) { this.payinRecap = value; return this; }
        public PayoutRecap getPossiblePayoutRecap() { return possiblePayoutRecap; }
        public BetRequest setPossiblePayoutRecap(PayoutRecap value) { this.possiblePayoutRecap = value; return this; }
    }

    public static class ProductInstanceRef
    {
        public String id = null;
        public String name = null;
        public String title = null;
        public ProductReference product = null;
        
        public String getId() { return id; }
        public ProductInstanceRef setId(String value) { this.id = value; return this; }
        public String getName() { return name; }
        public ProductInstanceRef setName(String value) { this.name = value; return this; }
        public String getTitle() { return title; }
        public ProductInstanceRef setTitle(String value) { this.title = value; return this; }
        public ProductReference getProduct() { return product; }
        public ProductInstanceRef setProduct(ProductReference value) { this.product = 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 PayinRecap
    {
        public String currency = null;
        public BigDecimal payin = null;
        public Ref payinTaxationPolicyRef = null;
        public BigDecimal taxAmount = null;
        public BigDecimal stake = null;
        
        public String getCurrency() { return currency; }
        public PayinRecap setCurrency(String value) { this.currency = value; return this; }
        public BigDecimal getPayin() { return payin; }
        public PayinRecap setPayin(BigDecimal value) { this.payin = value; return this; }
        public Ref getPayinTaxationPolicyRef() { return payinTaxationPolicyRef; }
        public PayinRecap setPayinTaxationPolicyRef(Ref value) { this.payinTaxationPolicyRef = value; return this; }
        public BigDecimal getTaxAmount() { return taxAmount; }
        public PayinRecap setTaxAmount(BigDecimal value) { this.taxAmount = value; return this; }
        public BigDecimal getStake() { return stake; }
        public PayinRecap setStake(BigDecimal value) { this.stake = value; return this; }
    }

    public static class PayoutRecap
    {
        public String currency = null;
        public BigDecimal winnings = null;
        public Ref winningsTaxationPolicyRef = null;
        public BigDecimal taxAmount = null;
        public BigDecimal payout = null;
        
        public String getCurrency() { return currency; }
        public PayoutRecap setCurrency(String value) { this.currency = value; return this; }
        public BigDecimal getWinnings() { return winnings; }
        public PayoutRecap setWinnings(BigDecimal value) { this.winnings = value; return this; }
        public Ref getWinningsTaxationPolicyRef() { return winningsTaxationPolicyRef; }
        public PayoutRecap setWinningsTaxationPolicyRef(Ref value) { this.winningsTaxationPolicyRef = value; return this; }
        public BigDecimal getTaxAmount() { return taxAmount; }
        public PayoutRecap setTaxAmount(BigDecimal value) { this.taxAmount = value; return this; }
        public BigDecimal getPayout() { return payout; }
        public PayoutRecap setPayout(BigDecimal value) { this.payout = value; return this; }
    }

}

Java SubmitSlip DTOs

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

HTTP + OTHER

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

POST /cmd/slips HTTP/1.1 
Host: api.sbbet.ath.cx 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":"String","bettor":{"id":"String","val":"String"},"origin":{"application":{"name":"String","version":"String"},"ip":"String","organization":{"data":{"String":"String"},"id":"String","val":"String"},"region":{"id":"String","val":"String"},"locationGroup":{"id":"String","val":"String"},"location":{"data":{"String":"String"},"id":"String","val":"String"},"device":{"data":{"String":"String"},"id":"String","val":"String"},"clerk":{"id":"String","val":"String"}},"betRequests":[{"betId":"String","productInstance":{"id":"String","name":"String","title":"String","product":{"id":"String","value":"String","category":"String","productProvider":{"id":"String","val":"String"}}},"payload":{"String":"String"},"payinRecap":{"currency":"String","payin":0,"payinTaxationPolicyRef":{"id":"String","val":"String"},"taxAmount":0,"stake":0},"possiblePayoutRecap":{"currency":"String","winnings":0,"winningsTaxationPolicyRef":{"id":"String","val":"String"},"taxAmount":0,"payout":0}}],"headerData":{"String":"String"}}
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"}}