Betting.WebApi

<back to all web services

GetSelfServiceDeviceBettingSession

Requires Authentication
The following routes are available for this service:
GET/qry/self-service-device-betting-sessions/{Id}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class GetSelfServiceDeviceBettingSession
    {
        public String id = null;
        
        public String getId() { return id; }
        public GetSelfServiceDeviceBettingSession setId(String value) { this.id = value; return this; }
    }

    public static class SelfServiceDeviceBettingSession
    {
        public String id = null;
        public Ref device = null;
        public Ref location = null;
        public SessionStatus status = null;
        public Date startedAt = null;
        public Ref issuedByClerk = null;
        public String patronName = null;
        public Money initialCredit = null;
        public RecordList<SessionTopUp> topUps = null;
        public String payoutId = null;
        public Money payout = null;
        public String rejectionReason = null;
        
        public String getId() { return id; }
        public SelfServiceDeviceBettingSession setId(String value) { this.id = value; return this; }
        public Ref getDevice() { return device; }
        public SelfServiceDeviceBettingSession setDevice(Ref value) { this.device = value; return this; }
        public Ref getLocation() { return location; }
        public SelfServiceDeviceBettingSession setLocation(Ref value) { this.location = value; return this; }
        public SessionStatus getStatus() { return status; }
        public SelfServiceDeviceBettingSession setStatus(SessionStatus value) { this.status = value; return this; }
        public Date getStartedAt() { return startedAt; }
        public SelfServiceDeviceBettingSession setStartedAt(Date value) { this.startedAt = value; return this; }
        public Ref getIssuedByClerk() { return issuedByClerk; }
        public SelfServiceDeviceBettingSession setIssuedByClerk(Ref value) { this.issuedByClerk = value; return this; }
        public String getPatronName() { return patronName; }
        public SelfServiceDeviceBettingSession setPatronName(String value) { this.patronName = value; return this; }
        public Money getInitialCredit() { return initialCredit; }
        public SelfServiceDeviceBettingSession setInitialCredit(Money value) { this.initialCredit = value; return this; }
        public RecordList<SessionTopUp> getTopUps() { return topUps; }
        public SelfServiceDeviceBettingSession setTopUps(RecordList<SessionTopUp> value) { this.topUps = value; return this; }
        public String getPayoutId() { return payoutId; }
        public SelfServiceDeviceBettingSession setPayoutId(String value) { this.payoutId = value; return this; }
        public Money getPayout() { return payout; }
        public SelfServiceDeviceBettingSession setPayout(Money value) { this.payout = value; return this; }
        public String getRejectionReason() { return rejectionReason; }
        public SelfServiceDeviceBettingSession setRejectionReason(String value) { this.rejectionReason = 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 enum SessionStatus
    {
        @SerializedName("1") Opening(1),
        @SerializedName("2") Open(2),
        @SerializedName("3") Ending(3),
        @SerializedName("4") Ended(4),
        @SerializedName("5") Rejected(5);

        private final int value;
        SessionStatus(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 RecordList<T> extends ArrayList<T>
    {
        
    }

    public static class SessionTopUp
    {
        public String id = null;
        public Money amount = null;
        public Ref clerk = null;
        public TopUpStatus status = null;
        public String failureReason = null;
        
        public String getId() { return id; }
        public SessionTopUp setId(String value) { this.id = value; return this; }
        public Money getAmount() { return amount; }
        public SessionTopUp setAmount(Money value) { this.amount = value; return this; }
        public Ref getClerk() { return clerk; }
        public SessionTopUp setClerk(Ref value) { this.clerk = value; return this; }
        public TopUpStatus getStatus() { return status; }
        public SessionTopUp setStatus(TopUpStatus value) { this.status = value; return this; }
        public String getFailureReason() { return failureReason; }
        public SessionTopUp setFailureReason(String value) { this.failureReason = value; return this; }
    }

    public static enum TopUpStatus
    {
        @SerializedName("1") Pending(1),
        @SerializedName("2") Completed(2),
        @SerializedName("3") Failed(3);

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

}

Java GetSelfServiceDeviceBettingSession 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.

GET /qry/self-service-device-betting-sessions/{Id} HTTP/1.1 
Host: api.testenv.webhop.biz 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":"String","device":{"id":"String","val":"String"},"location":{"id":"String","val":"String"},"status":1,"startedAt":"0001-01-01T00:00:00.0000000Z","issuedByClerk":{"id":"String","val":"String"},"patronName":"String","initialCredit":{"amount":0,"currency":"String"},"topUps":[{"id":"String","amount":{"amount":0,"currency":"String"},"clerk":{"id":"String","val":"String"},"status":1,"failureReason":"String"}],"payoutId":"String","payout":{"amount":0,"currency":"String"},"rejectionReason":"String"}