Betting.WebApi

<back to all web services

IssueSelfServiceDevice

Requires Authentication
The following routes are available for this service:
POST/cmd/self-service-device-betting-sessions/issue
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class IssueSelfServiceDevice
    {
        public String sessionId = null;
        public String deviceId = null;
        public Money initialCredit = null;
        public PatronIdentity patron = null;
        public Origin origin = null;
        
        public String getSessionId() { return sessionId; }
        public IssueSelfServiceDevice setSessionId(String value) { this.sessionId = value; return this; }
        public String getDeviceId() { return deviceId; }
        public IssueSelfServiceDevice setDeviceId(String value) { this.deviceId = value; return this; }
        public Money getInitialCredit() { return initialCredit; }
        public IssueSelfServiceDevice setInitialCredit(Money value) { this.initialCredit = value; return this; }
        public PatronIdentity getPatron() { return patron; }
        public IssueSelfServiceDevice setPatron(PatronIdentity value) { this.patron = value; return this; }
        public Origin getOrigin() { return origin; }
        public IssueSelfServiceDevice setOrigin(Origin value) { this.origin = value; return this; }
    }

    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 PatronIdentity
    {
        public String fullName = null;
        public String identificationNumber = null;
        public IdentificationDocumentType identificationDocumentType = null;
        
        public String getFullName() { return fullName; }
        public PatronIdentity setFullName(String value) { this.fullName = value; return this; }
        public String getIdentificationNumber() { return identificationNumber; }
        public PatronIdentity setIdentificationNumber(String value) { this.identificationNumber = value; return this; }
        public IdentificationDocumentType getIdentificationDocumentType() { return identificationDocumentType; }
        public PatronIdentity setIdentificationDocumentType(IdentificationDocumentType value) { this.identificationDocumentType = value; return this; }
    }

    public static enum IdentificationDocumentType
    {
        @SerializedName("1") IdentityCard(1),
        @SerializedName("2") Passport(2);

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

    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 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 RecordDictionary<TKey, TVal> extends HashMap<TKey,TVal>
    {
        
    }

}

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

POST /cmd/self-service-device-betting-sessions/issue HTTP/1.1 
Host: api.testenv.webhop.biz 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<IssueSelfServiceDevice xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Betting.WebApi.ServiceModel">
  <DeviceId>String</DeviceId>
  <InitialCredit xmlns:d2p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
    <d2p1:Amount>0</d2p1:Amount>
    <d2p1:Currency>String</d2p1:Currency>
  </InitialCredit>
  <Origin xmlns:d2p1="http://schemas.datacontract.org/2004/07/Betting.Common">
    <d2p1:Application>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:Version>String</d2p1:Version>
    </d2p1:Application>
    <d2p1:Clerk xmlns:d3p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
      <d3p1:_x003C_Id_x003E_k__BackingField>String</d3p1:_x003C_Id_x003E_k__BackingField>
      <d3p1:_x003C_Val_x003E_k__BackingField>String</d3p1:_x003C_Val_x003E_k__BackingField>
    </d2p1:Clerk>
    <d2p1:Device xmlns:d3p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
      <d3p1:_x003C_Id_x003E_k__BackingField>String</d3p1:_x003C_Id_x003E_k__BackingField>
      <d3p1:_x003C_Val_x003E_k__BackingField>String</d3p1:_x003C_Val_x003E_k__BackingField>
      <d3p1:_x003C_Data_x003E_k__BackingField xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </d3p1:_x003C_Data_x003E_k__BackingField>
    </d2p1:Device>
    <d2p1:IP>String</d2p1:IP>
    <d2p1:Location xmlns:d3p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
      <d3p1:_x003C_Id_x003E_k__BackingField>String</d3p1:_x003C_Id_x003E_k__BackingField>
      <d3p1:_x003C_Val_x003E_k__BackingField>String</d3p1:_x003C_Val_x003E_k__BackingField>
      <d3p1:_x003C_Data_x003E_k__BackingField xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </d3p1:_x003C_Data_x003E_k__BackingField>
    </d2p1:Location>
    <d2p1:LocationGroup xmlns:d3p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
      <d3p1:_x003C_Id_x003E_k__BackingField>String</d3p1:_x003C_Id_x003E_k__BackingField>
      <d3p1:_x003C_Val_x003E_k__BackingField>String</d3p1:_x003C_Val_x003E_k__BackingField>
    </d2p1:LocationGroup>
    <d2p1:Organization xmlns:d3p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
      <d3p1:_x003C_Id_x003E_k__BackingField>String</d3p1:_x003C_Id_x003E_k__BackingField>
      <d3p1:_x003C_Val_x003E_k__BackingField>String</d3p1:_x003C_Val_x003E_k__BackingField>
      <d3p1:_x003C_Data_x003E_k__BackingField xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </d3p1:_x003C_Data_x003E_k__BackingField>
    </d2p1:Organization>
    <d2p1:Region xmlns:d3p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
      <d3p1:_x003C_Id_x003E_k__BackingField>String</d3p1:_x003C_Id_x003E_k__BackingField>
      <d3p1:_x003C_Val_x003E_k__BackingField>String</d3p1:_x003C_Val_x003E_k__BackingField>
    </d2p1:Region>
  </Origin>
  <Patron xmlns:d2p1="http://schemas.datacontract.org/2004/07/Betting.Common">
    <d2p1:FullName>String</d2p1:FullName>
    <d2p1:IdentificationDocumentType>IdentityCard</d2p1:IdentificationDocumentType>
    <d2p1:IdentificationNumber>String</d2p1:IdentificationNumber>
  </Patron>
  <SessionId>String</SessionId>
</IssueSelfServiceDevice>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ResponseStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <ErrorCode>String</ErrorCode>
  <Message>String</Message>
  <StackTrace>String</StackTrace>
  <Errors>
    <ResponseError>
      <ErrorCode>String</ErrorCode>
      <FieldName>String</FieldName>
      <Message>String</Message>
      <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </Meta>
    </ResponseError>
  </Errors>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
</ResponseStatus>