| All Verbs | /qry/rounds/integrity |
|---|
import 'package:servicestack/servicestack.dart';
class CheckStatus
{
static const CheckStatus Ok = const CheckStatus._(1);
static const CheckStatus Error = const CheckStatus._(2);
final int _value;
const CheckStatus._(this._value);
int get value => _value;
static List<CheckStatus> get values => const [Ok,Error];
}
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 JackPot5Winner implements IConvertible
{
String? betId;
int? nrOfCombinations;
double? winningsAmount;
Origin? origin;
Ref? bettor;
Map<String,String?>? payload;
JackPot5Winner({this.betId,this.nrOfCombinations,this.winningsAmount,this.origin,this.bettor,this.payload});
JackPot5Winner.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
betId = json['betId'];
nrOfCombinations = json['nrOfCombinations'];
winningsAmount = JsonConverters.toDouble(json['winningsAmount']);
origin = JsonConverters.fromJson(json['origin'],'Origin',context!);
bettor = JsonConverters.fromJson(json['bettor'],'Ref',context!);
payload = JsonConverters.toStringMap(json['payload']);
return this;
}
Map<String, dynamic> toJson() => {
'betId': betId,
'nrOfCombinations': nrOfCombinations,
'winningsAmount': winningsAmount,
'origin': JsonConverters.toJson(origin,'Origin',context!),
'bettor': JsonConverters.toJson(bettor,'Ref',context!),
'payload': payload
};
getTypeName() => "JackPot5Winner";
TypeContext? context = _ctx;
}
class Jackpot5Info implements IConvertible
{
bool? isHit;
double? amountAccumulated;
double? amountAwarded;
int? nrOfWinners;
List<JackPot5Winner>? jackPot5Winners;
Jackpot5Info({this.isHit,this.amountAccumulated,this.amountAwarded,this.nrOfWinners,this.jackPot5Winners});
Jackpot5Info.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
isHit = json['isHit'];
amountAccumulated = JsonConverters.toDouble(json['amountAccumulated']);
amountAwarded = JsonConverters.toDouble(json['amountAwarded']);
nrOfWinners = json['nrOfWinners'];
jackPot5Winners = JsonConverters.fromJson(json['jackPot5Winners'],'List<JackPot5Winner>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'isHit': isHit,
'amountAccumulated': amountAccumulated,
'amountAwarded': amountAwarded,
'nrOfWinners': nrOfWinners,
'jackPot5Winners': JsonConverters.toJson(jackPot5Winners,'List<JackPot5Winner>',context!)
};
getTypeName() => "Jackpot5Info";
TypeContext? context = _ctx;
}
class RoundIntegrityCheckResult implements IConvertible
{
CheckStatus? status;
double? extraWinnings;
int? betCount;
Jackpot5Info? jpInfo;
RoundIntegrityCheckResult({this.status,this.extraWinnings,this.betCount,this.jpInfo});
RoundIntegrityCheckResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
status = JsonConverters.fromJson(json['status'],'CheckStatus',context!);
extraWinnings = JsonConverters.toDouble(json['extraWinnings']);
betCount = json['betCount'];
jpInfo = JsonConverters.fromJson(json['jpInfo'],'Jackpot5Info',context!);
return this;
}
Map<String, dynamic> toJson() => {
'status': JsonConverters.toJson(status,'CheckStatus',context!),
'extraWinnings': extraWinnings,
'betCount': betCount,
'jpInfo': JsonConverters.toJson(jpInfo,'Jackpot5Info',context!)
};
getTypeName() => "RoundIntegrityCheckResult";
TypeContext? context = _ctx;
}
class GetRoundIntegrity implements IConvertible
{
String? roundId;
GetRoundIntegrity({this.roundId});
GetRoundIntegrity.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
roundId = json['roundId'];
return this;
}
Map<String, dynamic> toJson() => {
'roundId': roundId
};
getTypeName() => "GetRoundIntegrity";
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;
}
TypeContext _ctx = TypeContext(library: 's4w2.api.bettor.cc', types: <String, TypeInfo> {
'CheckStatus': TypeInfo(TypeOf.Enum, enumValues:CheckStatus.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()),
'JackPot5Winner': TypeInfo(TypeOf.Class, create:() => JackPot5Winner()),
'Jackpot5Info': TypeInfo(TypeOf.Class, create:() => Jackpot5Info()),
'List<JackPot5Winner>': TypeInfo(TypeOf.Class, create:() => <JackPot5Winner>[]),
'RoundIntegrityCheckResult': TypeInfo(TypeOf.Class, create:() => RoundIntegrityCheckResult()),
'GetRoundIntegrity': TypeInfo(TypeOf.Class, create:() => GetRoundIntegrity()),
'RecordDictionary<TKey,TVal>': TypeInfo(TypeOf.GenericDef,create:() => RecordDictionary()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/rounds/integrity HTTP/1.1
Host: s4w2.api.bettor.cc
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"roundId":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"status":1,"extraWinnings":0,"betCount":0,"jpInfo":{"isHit":false,"amountAccumulated":0,"amountAwarded":0,"nrOfWinners":0,"jackPot5Winners":[{"betId":"String","nrOfCombinations":0,"winningsAmount":0,"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"},"payload":{"String":"String"}}]}}