| All Verbs | /qry/accumulator |
|---|
import 'package:servicestack/servicestack.dart';
class Pool implements IConvertible
{
int? id;
String? name;
double? coefficient;
double? rtp;
double? threshold;
double? balance;
double? rrtp;
double? rBalance;
Pool({this.id,this.name,this.coefficient,this.rtp,this.threshold,this.balance,this.rrtp,this.rBalance});
Pool.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
coefficient = JsonConverters.toDouble(json['coefficient']);
rtp = JsonConverters.toDouble(json['rtp']);
threshold = JsonConverters.toDouble(json['threshold']);
balance = JsonConverters.toDouble(json['balance']);
rrtp = JsonConverters.toDouble(json['rrtp']);
rBalance = JsonConverters.toDouble(json['rBalance']);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'coefficient': coefficient,
'rtp': rtp,
'threshold': threshold,
'balance': balance,
'rrtp': rrtp,
'rBalance': rBalance
};
getTypeName() => "Pool";
TypeContext? context = _ctx;
}
class Accumulator implements IConvertible
{
List<Pool>? pools;
double? rtp;
Accumulator({this.pools,this.rtp});
Accumulator.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
pools = JsonConverters.fromJson(json['pools'],'List<Pool>',context!);
rtp = JsonConverters.toDouble(json['rtp']);
return this;
}
Map<String, dynamic> toJson() => {
'pools': JsonConverters.toJson(pools,'List<Pool>',context!),
'rtp': rtp
};
getTypeName() => "Accumulator";
TypeContext? context = _ctx;
}
class GetAccumulator implements IConvertible
{
GetAccumulator();
GetAccumulator.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetAccumulator";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 's4w2.api.bettor.cc', types: <String, TypeInfo> {
'Pool': TypeInfo(TypeOf.Class, create:() => Pool()),
'Accumulator': TypeInfo(TypeOf.Class, create:() => Accumulator()),
'List<Pool>': TypeInfo(TypeOf.Class, create:() => <Pool>[]),
'GetAccumulator': TypeInfo(TypeOf.Class, create:() => GetAccumulator()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/accumulator HTTP/1.1
Host: s4w2.api.bettor.cc
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetAccumulator 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
<Accumulator xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.ReadModel.BackOffice">
<Pools>
<Accumulator.Pool>
<Balance>0</Balance>
<Coefficient>0</Coefficient>
<Id>0</Id>
<Name>String</Name>
<RBalance>0</RBalance>
<RRTP>0</RRTP>
<RTP>0</RTP>
<Threshold>0</Threshold>
</Accumulator.Pool>
</Pools>
<RTP>0</RTP>
</Accumulator>