Six4Win.WebApi

<back to all web services

GetSuperWinConfiguration

The following routes are available for this service:
All Verbs/qry/super-win/config
import 'package:servicestack/servicestack.dart';

class SuperWinPoolState
{
    static const SuperWinPoolState Idle = const SuperWinPoolState._(0);
    static const SuperWinPoolState Accumulating = const SuperWinPoolState._(1);
    static const SuperWinPoolState Awarding = const SuperWinPoolState._(2);

    final int _value;
    const SuperWinPoolState._(this._value);
    int get value => _value;
    static List<SuperWinPoolState> get values => const [Idle,Accumulating,Awarding];
}

class BettingApp implements IConvertible
{
    String? name;
    String? version;

    BettingApp({this.name,this.version});
    BettingApp.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        version = json['version'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'version': version
    };

    getTypeName() => "BettingApp";
    TypeContext? context = _ctx;
}

class Ref implements IConvertible
{
    String? id;
    String? val;

    Ref({this.id,this.val});
    Ref.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        val = json['val'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'val': val
    };

    getTypeName() => "Ref";
    TypeContext? context = _ctx;
}

class RefEx extends Ref implements IConvertible
{
    RecordDictionary<String,String>? data;

    RefEx({this.data});
    RefEx.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        data = JsonConverters.fromJson(json['data'],'RecordDictionary<String,String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'data': JsonConverters.toJson(data,'RecordDictionary<String,String>',context!)
    });

    getTypeName() => "RefEx";
    TypeContext? context = _ctx;
}

class Origin implements IConvertible
{
    BettingApp? application;
    String? ip;
    RefEx? organization;
    Ref? region;
    Ref? locationGroup;
    RefEx? location;
    RefEx? device;
    Ref? clerk;

    Origin({this.application,this.ip,this.organization,this.region,this.locationGroup,this.location,this.device,this.clerk});
    Origin.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        application = JsonConverters.fromJson(json['application'],'BettingApp',context!);
        ip = json['ip'];
        organization = JsonConverters.fromJson(json['organization'],'RefEx',context!);
        region = JsonConverters.fromJson(json['region'],'Ref',context!);
        locationGroup = JsonConverters.fromJson(json['locationGroup'],'Ref',context!);
        location = JsonConverters.fromJson(json['location'],'RefEx',context!);
        device = JsonConverters.fromJson(json['device'],'RefEx',context!);
        clerk = JsonConverters.fromJson(json['clerk'],'Ref',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'application': JsonConverters.toJson(application,'BettingApp',context!),
        'ip': ip,
        'organization': JsonConverters.toJson(organization,'RefEx',context!),
        'region': JsonConverters.toJson(region,'Ref',context!),
        'locationGroup': JsonConverters.toJson(locationGroup,'Ref',context!),
        'location': JsonConverters.toJson(location,'RefEx',context!),
        'device': JsonConverters.toJson(device,'RefEx',context!),
        'clerk': JsonConverters.toJson(clerk,'Ref',context!)
    };

    getTypeName() => "Origin";
    TypeContext? context = _ctx;
}

class SuperWinWinner implements IConvertible
{
    bool? isDrawn;
    DateTime? drawnAtUtc;
    String? roundId;
    String? betId;
    String? slipId;
    Origin? origin;
    Ref? bettor;
    String? code;
    double? amount;
    String? locationAddressOrBettorInfo;

    SuperWinWinner({this.isDrawn,this.drawnAtUtc,this.roundId,this.betId,this.slipId,this.origin,this.bettor,this.code,this.amount,this.locationAddressOrBettorInfo});
    SuperWinWinner.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        isDrawn = json['isDrawn'];
        drawnAtUtc = JsonConverters.fromJson(json['drawnAtUtc'],'DateTime',context!);
        roundId = json['roundId'];
        betId = json['betId'];
        slipId = json['slipId'];
        origin = JsonConverters.fromJson(json['origin'],'Origin',context!);
        bettor = JsonConverters.fromJson(json['bettor'],'Ref',context!);
        code = json['code'];
        amount = JsonConverters.toDouble(json['amount']);
        locationAddressOrBettorInfo = json['locationAddressOrBettorInfo'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'isDrawn': isDrawn,
        'drawnAtUtc': JsonConverters.toJson(drawnAtUtc,'DateTime',context!),
        'roundId': roundId,
        'betId': betId,
        'slipId': slipId,
        'origin': JsonConverters.toJson(origin,'Origin',context!),
        'bettor': JsonConverters.toJson(bettor,'Ref',context!),
        'code': code,
        'amount': amount,
        'locationAddressOrBettorInfo': locationAddressOrBettorInfo
    };

    getTypeName() => "SuperWinWinner";
    TypeContext? context = _ctx;
}

class SuperWinPrize implements IConvertible
{
    int? id;
    double? amount;
    DateTime? scheduledAt;
    SuperWinWinner? winner;

    SuperWinPrize({this.id,this.amount,this.scheduledAt,this.winner});
    SuperWinPrize.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        amount = JsonConverters.toDouble(json['amount']);
        scheduledAt = JsonConverters.fromJson(json['scheduledAt'],'DateTime',context!);
        winner = JsonConverters.fromJson(json['winner'],'SuperWinWinner',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'amount': amount,
        'scheduledAt': JsonConverters.toJson(scheduledAt,'DateTime',context!),
        'winner': JsonConverters.toJson(winner,'SuperWinWinner',context!)
    };

    getTypeName() => "SuperWinPrize";
    TypeContext? context = _ctx;
}

class SuperWinPool implements IConvertible
{
    int? id;
    SuperWinPoolState? state;
    double? amount;
    RecordList<SuperWinPrize>? schedule;

    SuperWinPool({this.id,this.state,this.amount,this.schedule});
    SuperWinPool.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        state = JsonConverters.fromJson(json['state'],'SuperWinPoolState',context!);
        amount = JsonConverters.toDouble(json['amount']);
        schedule = JsonConverters.fromJson(json['schedule'],'RecordList<SuperWinPrize>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'state': JsonConverters.toJson(state,'SuperWinPoolState',context!),
        'amount': amount,
        'schedule': JsonConverters.toJson(schedule,'RecordList<SuperWinPrize>',context!)
    };

    getTypeName() => "SuperWinPool";
    TypeContext? context = _ctx;
}

class SuperWinState implements IConvertible
{
    String? currentDate;
    double? availableAmount;
    RecordDictionary<int,SuperWinPool>? pools;

    SuperWinState({this.currentDate,this.availableAmount,this.pools});
    SuperWinState.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        currentDate = json['currentDate'];
        availableAmount = JsonConverters.toDouble(json['availableAmount']);
        pools = JsonConverters.fromJson(json['pools'],'RecordDictionary<int,SuperWinPool>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'currentDate': currentDate,
        'availableAmount': availableAmount,
        'pools': JsonConverters.toJson(pools,'RecordDictionary<int,SuperWinPool>',context!)
    };

    getTypeName() => "SuperWinState";
    TypeContext? context = _ctx;
}

class SuperWinStateDoc implements IConvertible
{
    String? id;
    SuperWinState? state;

    SuperWinStateDoc({this.id,this.state});
    SuperWinStateDoc.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        state = JsonConverters.fromJson(json['state'],'SuperWinState',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'state': JsonConverters.toJson(state,'SuperWinState',context!)
    };

    getTypeName() => "SuperWinStateDoc";
    TypeContext? context = _ctx;
}

class GetSuperWinConfiguration implements IConvertible
{
    GetSuperWinConfiguration();
    GetSuperWinConfiguration.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "GetSuperWinConfiguration";
    TypeContext? context = _ctx;
}

class RecordDictionary<TKey,TVal> extends Map<TKey,TVal?> implements IConvertible
{
    RecordDictionary();
    RecordDictionary.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "RecordDictionary<$TKey,$TVal>";
    TypeContext? context = _ctx;
}

class RecordList<T> extends ListBase<T> implements IConvertible
{
    final List<T> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    T operator [](int index) => l[index];
    void operator []=(int index, T value) { l[index] = value; }
    RecordList();
    RecordList.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "RecordList<$T>";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 's4w1.api.meridian.ath.cx', types: <String, TypeInfo> {
    'SuperWinPoolState': TypeInfo(TypeOf.Enum, enumValues:SuperWinPoolState.values),
    'BettingApp': TypeInfo(TypeOf.Class, create:() => BettingApp()),
    'Ref': TypeInfo(TypeOf.Class, create:() => Ref()),
    'RefEx': TypeInfo(TypeOf.Class, create:() => RefEx()),
    'RecordDictionary<String,String>': TypeInfo(TypeOf.Class, create:() => RecordDictionary<String,String>()),
    'Origin': TypeInfo(TypeOf.Class, create:() => Origin()),
    'SuperWinWinner': TypeInfo(TypeOf.Class, create:() => SuperWinWinner()),
    'SuperWinPrize': TypeInfo(TypeOf.Class, create:() => SuperWinPrize()),
    'SuperWinPool': TypeInfo(TypeOf.Class, create:() => SuperWinPool()),
    'RecordList<SuperWinPrize>': TypeInfo(TypeOf.Class, create:() => RecordList<SuperWinPrize>()),
    'SuperWinState': TypeInfo(TypeOf.Class, create:() => SuperWinState()),
    'RecordDictionary<int,SuperWinPool>': TypeInfo(TypeOf.Class, create:() => RecordDictionary<int,SuperWinPool>()),
    'SuperWinStateDoc': TypeInfo(TypeOf.Class, create:() => SuperWinStateDoc()),
    'GetSuperWinConfiguration': TypeInfo(TypeOf.Class, create:() => GetSuperWinConfiguration()),
    'RecordDictionary<TKey,TVal>': TypeInfo(TypeOf.GenericDef,create:() => RecordDictionary()),
    'RecordList<T>': TypeInfo(TypeOf.GenericDef,create:() => RecordList()),
});

Dart GetSuperWinConfiguration 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 /qry/super-win/config HTTP/1.1 
Host: s4w1.api.meridian.ath.cx 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GetSuperWinConfiguration xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.WebApi.ServiceModel" />
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SuperWinStateDoc xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.ReadModel">
  <Id>String</Id>
  <State xmlns:d2p1="http://schemas.datacontract.org/2004/07/Six4Win">
    <d2p1:AvailableAmount>0</d2p1:AvailableAmount>
    <d2p1:CurrentDate>String</d2p1:CurrentDate>
    <d2p1:Pools xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfintSuperWinPoolQC5r2uXE>
        <d3p1:Key>0</d3p1:Key>
        <d3p1:Value>
          <d2p1:Amount>0</d2p1:Amount>
          <d2p1:Id>0</d2p1:Id>
          <d2p1:Schedule>
            <d2p1:SuperWinPrize>
              <d2p1:Amount>0</d2p1:Amount>
              <d2p1:Id>0</d2p1:Id>
              <d2p1:ScheduledAt>0001-01-01T00:00:00</d2p1:ScheduledAt>
              <d2p1:Winner>
                <d2p1:Amount>0</d2p1:Amount>
                <d2p1:BetId>String</d2p1:BetId>
                <d2p1:Bettor xmlns:d9p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                  <d9p1:_x003C_Id_x003E_k__BackingField>String</d9p1:_x003C_Id_x003E_k__BackingField>
                  <d9p1:_x003C_Val_x003E_k__BackingField>String</d9p1:_x003C_Val_x003E_k__BackingField>
                </d2p1:Bettor>
                <d2p1:Code>String</d2p1:Code>
                <d2p1:DrawnAtUtc>0001-01-01T00:00:00</d2p1:DrawnAtUtc>
                <d2p1:IsDrawn>false</d2p1:IsDrawn>
                <d2p1:LocationAddressOrBettorInfo>String</d2p1:LocationAddressOrBettorInfo>
                <d2p1:Origin xmlns:d9p1="http://schemas.datacontract.org/2004/07/Betting.Common">
                  <d9p1:Application>
                    <d9p1:Name>String</d9p1:Name>
                    <d9p1:Version>String</d9p1:Version>
                  </d9p1:Application>
                  <d9p1:Clerk xmlns:d10p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                    <d10p1:_x003C_Id_x003E_k__BackingField>String</d10p1:_x003C_Id_x003E_k__BackingField>
                    <d10p1:_x003C_Val_x003E_k__BackingField>String</d10p1:_x003C_Val_x003E_k__BackingField>
                  </d9p1:Clerk>
                  <d9p1:Device xmlns:d10p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                    <d10p1:_x003C_Id_x003E_k__BackingField>String</d10p1:_x003C_Id_x003E_k__BackingField>
                    <d10p1:_x003C_Val_x003E_k__BackingField>String</d10p1:_x003C_Val_x003E_k__BackingField>
                    <d10p1:_x003C_Data_x003E_k__BackingField>
                      <d3p1:KeyValueOfstringstring>
                        <d3p1:Key>String</d3p1:Key>
                        <d3p1:Value>String</d3p1:Value>
                      </d3p1:KeyValueOfstringstring>
                    </d10p1:_x003C_Data_x003E_k__BackingField>
                  </d9p1:Device>
                  <d9p1:IP>String</d9p1:IP>
                  <d9p1:Location xmlns:d10p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                    <d10p1:_x003C_Id_x003E_k__BackingField>String</d10p1:_x003C_Id_x003E_k__BackingField>
                    <d10p1:_x003C_Val_x003E_k__BackingField>String</d10p1:_x003C_Val_x003E_k__BackingField>
                    <d10p1:_x003C_Data_x003E_k__BackingField>
                      <d3p1:KeyValueOfstringstring>
                        <d3p1:Key>String</d3p1:Key>
                        <d3p1:Value>String</d3p1:Value>
                      </d3p1:KeyValueOfstringstring>
                    </d10p1:_x003C_Data_x003E_k__BackingField>
                  </d9p1:Location>
                  <d9p1:LocationGroup xmlns:d10p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                    <d10p1:_x003C_Id_x003E_k__BackingField>String</d10p1:_x003C_Id_x003E_k__BackingField>
                    <d10p1:_x003C_Val_x003E_k__BackingField>String</d10p1:_x003C_Val_x003E_k__BackingField>
                  </d9p1:LocationGroup>
                  <d9p1:Organization xmlns:d10p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                    <d10p1:_x003C_Id_x003E_k__BackingField>String</d10p1:_x003C_Id_x003E_k__BackingField>
                    <d10p1:_x003C_Val_x003E_k__BackingField>String</d10p1:_x003C_Val_x003E_k__BackingField>
                    <d10p1:_x003C_Data_x003E_k__BackingField>
                      <d3p1:KeyValueOfstringstring>
                        <d3p1:Key>String</d3p1:Key>
                        <d3p1:Value>String</d3p1:Value>
                      </d3p1:KeyValueOfstringstring>
                    </d10p1:_x003C_Data_x003E_k__BackingField>
                  </d9p1:Organization>
                  <d9p1:Region xmlns:d10p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                    <d10p1:_x003C_Id_x003E_k__BackingField>String</d10p1:_x003C_Id_x003E_k__BackingField>
                    <d10p1:_x003C_Val_x003E_k__BackingField>String</d10p1:_x003C_Val_x003E_k__BackingField>
                  </d9p1:Region>
                </d2p1:Origin>
                <d2p1:RoundId>String</d2p1:RoundId>
                <d2p1:SlipId>String</d2p1:SlipId>
              </d2p1:Winner>
            </d2p1:SuperWinPrize>
          </d2p1:Schedule>
          <d2p1:State>Idle</d2p1:State>
        </d3p1:Value>
      </d3p1:KeyValueOfintSuperWinPoolQC5r2uXE>
    </d2p1:Pools>
  </State>
</SuperWinStateDoc>