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

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

<SelfServiceDeviceBettingSession xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Betting.ReadModel">
  <Device 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>
  </Device>
  <Id>String</Id>
  <InitialCredit xmlns:d2p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
    <d2p1:Amount>0</d2p1:Amount>
    <d2p1:Currency>String</d2p1:Currency>
  </InitialCredit>
  <IssuedByClerk 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>
  </IssuedByClerk>
  <Location 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>
  </Location>
  <PatronName>String</PatronName>
  <Payout xmlns:d2p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
    <d2p1:Amount>0</d2p1:Amount>
    <d2p1:Currency>String</d2p1:Currency>
  </Payout>
  <PayoutId>String</PayoutId>
  <RejectionReason>String</RejectionReason>
  <StartedAt>0001-01-01T00:00:00</StartedAt>
  <Status>Opening</Status>
  <TopUps>
    <SessionTopUp>
      <Amount xmlns:d4p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
        <d4p1:Amount>0</d4p1:Amount>
        <d4p1:Currency>String</d4p1:Currency>
      </Amount>
      <Clerk xmlns:d4p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
        <d4p1:_x003C_Id_x003E_k__BackingField>String</d4p1:_x003C_Id_x003E_k__BackingField>
        <d4p1:_x003C_Val_x003E_k__BackingField>String</d4p1:_x003C_Val_x003E_k__BackingField>
      </Clerk>
      <FailureReason>String</FailureReason>
      <Id>String</Id>
      <Status>Pending</Status>
    </SessionTopUp>
  </TopUps>
</SelfServiceDeviceBettingSession>