Six4Win.WebApi

<back to all web services

PlaceBet

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

public class dtos
{

    public static class PlaceBet
    {
        public String id = null;
        public String slipId = null;
        public Ref bettor = null;
        public Origin origin = null;
        public Date placedAt = null;
        public Integer ordinalOfAvailableRoundToAssignTo = null;
        public String content = null;
        public BigDecimal stake = null;
        public HashMap<String,String> payload = null;
        
        public String getId() { return id; }
        public PlaceBet setId(String value) { this.id = value; return this; }
        public String getSlipId() { return slipId; }
        public PlaceBet setSlipId(String value) { this.slipId = value; return this; }
        public Ref getBettor() { return bettor; }
        public PlaceBet setBettor(Ref value) { this.bettor = value; return this; }
        public Origin getOrigin() { return origin; }
        public PlaceBet setOrigin(Origin value) { this.origin = value; return this; }
        public Date getPlacedAt() { return placedAt; }
        public PlaceBet setPlacedAt(Date value) { this.placedAt = value; return this; }
        public Integer getOrdinalOfAvailableRoundToAssignTo() { return ordinalOfAvailableRoundToAssignTo; }
        public PlaceBet setOrdinalOfAvailableRoundToAssignTo(Integer value) { this.ordinalOfAvailableRoundToAssignTo = value; return this; }
        public String getContent() { return content; }
        public PlaceBet setContent(String value) { this.content = value; return this; }
        public BigDecimal getStake() { return stake; }
        public PlaceBet setStake(BigDecimal value) { this.stake = value; return this; }
        public HashMap<String,String> getPayload() { return payload; }
        public PlaceBet setPayload(HashMap<String,String> value) { this.payload = 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>
    {
        
    }

}

Java PlaceBet 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/bets HTTP/1.1 
Host: s4w2.api.bettor.cc 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id":"String","slipId":"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"}},"placedAt":"0001-01-01T00:00:00.0000000Z","ordinalOfAvailableRoundToAssignTo":0,"content":"String","stake":0,"payload":{"String":"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"}}