Six4Win.WebApi

<back to all web services

GetSuperWinAccumulations

The following routes are available for this service:
All Verbs/qry/super-win/accumulations
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 GetSuperWinAccumulations implements IConvertible
{
    GetSuperWinAccumulations();
    GetSuperWinAccumulations.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "GetSuperWinAccumulations";
    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: 's4w2.api.bettor.cc', 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()),
    'GetSuperWinAccumulations': TypeInfo(TypeOf.Class, create:() => GetSuperWinAccumulations()),
    'RecordDictionary<TKey,TVal>': TypeInfo(TypeOf.GenericDef,create:() => RecordDictionary()),
    'RecordList<T>': TypeInfo(TypeOf.GenericDef,create:() => RecordList()),
});

Dart GetSuperWinAccumulations DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /qry/super-win/accumulations HTTP/1.1 
Host: s4w2.api.bettor.cc 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	state: 
	{
		currentDate: String,
		availableAmount: 0,
		pools: 
		{
			0: 
			{
				id: 0,
				state: 0,
				amount: 0,
				schedule: 
				[
					{
						id: 0,
						amount: 0,
						scheduledAt: 0001-01-01,
						winner: 
						{
							isDrawn: False,
							drawnAtUtc: 0001-01-01,
							roundId: String,
							betId: String,
							slipId: 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
								}
							},
							bettor: 
							{
								id: String,
								val: String
							},
							code: String,
							amount: 0,
							locationAddressOrBettorInfo: String
						}
					}
				]
			}
		}
	}
}