| All Verbs | /qry/stats/clerkstats |
|---|
import 'package:servicestack/servicestack.dart';
class QueryRequest implements IConvertible
{
RecordDictionary<String,String> qry;
QueryRequest({this.qry});
QueryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
qry = JsonConverters.fromJson(json['qry'],'RecordDictionary<String,String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'qry': JsonConverters.toJson(qry,'RecordDictionary<String,String>',context!)
};
getTypeName() => "QueryRequest";
TypeContext? context = _ctx;
}
class PaginatedQueryRequest extends QueryRequest implements IConvertible
{
int currentPage = 0;
int pageSize = 0;
PaginatedQueryRequest({this.currentPage,this.pageSize});
PaginatedQueryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
currentPage = json['currentPage'];
pageSize = json['pageSize'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'currentPage': currentPage,
'pageSize': pageSize
});
getTypeName() => "PaginatedQueryRequest";
TypeContext? context = _ctx;
}
class FindClerkStats extends PaginatedQueryRequest implements IConvertible
{
FindClerkStats();
FindClerkStats.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() => "FindClerkStats";
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 ResponseMetrics implements IConvertible
{
int id = 0;
int rqc = 0;
int oc = 0;
int sc = 0;
int tc = 0;
int adr = 0;
ResponseMetrics({this.id,this.rqc,this.oc,this.sc,this.tc,this.adr});
ResponseMetrics.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
rqc = json['rqc'];
oc = json['oc'];
sc = json['sc'];
tc = json['tc'];
adr = json['adr'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'rqc': rqc,
'oc': oc,
'sc': sc,
'tc': tc,
'adr': adr
};
getTypeName() => "ResponseMetrics";
TypeContext? context = _ctx;
}
class PaginatedResult<T> implements IPaginatedResult, IConvertible
{
List<ResponseMetrics> data = [];
int currentPage = 0;
int pageSize = 0;
int totalItems = 0;
int totalPages = 0;
PaginatedResult({this.data,this.currentPage,this.pageSize,this.totalItems,this.totalPages});
PaginatedResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
data = JsonConverters.fromJson(json['data'],'List<ResponseMetrics>',context!);
currentPage = json['currentPage'];
pageSize = json['pageSize'];
totalItems = json['totalItems'];
totalPages = json['totalPages'];
return this;
}
Map<String, dynamic> toJson() => {
'data': JsonConverters.toJson(data,'List<ResponseMetrics>',context!),
'currentPage': currentPage,
'pageSize': pageSize,
'totalItems': totalItems,
'totalPages': totalPages
};
getTypeName() => "PaginatedResult<$T>";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bettor.webhop.biz', types: <String, TypeInfo> {
'QueryRequest': TypeInfo(TypeOf.Class, create:() => QueryRequest()),
'RecordDictionary<String,String>': TypeInfo(TypeOf.Class, create:() => RecordDictionary<String,String>()),
'PaginatedQueryRequest': TypeInfo(TypeOf.Class, create:() => PaginatedQueryRequest()),
'FindClerkStats': TypeInfo(TypeOf.Class, create:() => FindClerkStats()),
'RecordDictionary<TKey,TVal>': TypeInfo(TypeOf.GenericDef,create:() => RecordDictionary()),
'ResponseMetrics': TypeInfo(TypeOf.Class, create:() => ResponseMetrics()),
'PaginatedResult<T>': TypeInfo(TypeOf.Class, create:() => PaginatedResult<T>()),
'List<ResponseMetrics>': TypeInfo(TypeOf.Class, create:() => <ResponseMetrics>[]),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/stats/clerkstats HTTP/1.1
Host: api.bettor.webhop.biz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
currentPage: 0,
pageSize: 0,
qry:
{
String: String
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
data:
[
{
orgName: String,
locGroupName: String,
userId: 00000000000000000000000000000000,
username: String,
canceledCount: 0,
canceledAmount: 0,
payinCount: 0,
payinAmount: 0,
payoutCount: 0,
payoutAmount: 0,
balance: 0,
fullName: String,
locationId: 0,
locationName: String
}
],
currentPage: 0,
pageSize: 0,
totalItems: 0,
totalPages: 0
}