| All Verbs | /qry/totals/cashbooks |
|---|
import 'package:servicestack/servicestack.dart';
class QueryRequest implements IConvertible
{
Map<String,String?>? qry = {};
QueryRequest({this.qry});
QueryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
qry = JsonConverters.toStringMap(json['qry']);
return this;
}
Map<String, dynamic> toJson() => {
'qry': qry
};
getTypeName() => "QueryRequest";
TypeContext? context = _ctx;
}
class PaginatedQueryRequest extends QueryRequest implements IConvertible
{
int? currentPage;
int? pageSize;
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 DailyLocationCashbookTotalEx implements IConvertible
{
String? id;
String? organization;
String? group;
String? location;
double? start;
double? deposit;
double? payin;
double? totalIn;
double? payout;
double? withdrawal;
double? totalOut;
double? balance;
DailyLocationCashbookTotalEx({this.id,this.organization,this.group,this.location,this.start,this.deposit,this.payin,this.totalIn,this.payout,this.withdrawal,this.totalOut,this.balance});
DailyLocationCashbookTotalEx.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
organization = json['organization'];
group = json['group'];
location = json['location'];
start = JsonConverters.toDouble(json['start']);
deposit = JsonConverters.toDouble(json['deposit']);
payin = JsonConverters.toDouble(json['payin']);
totalIn = JsonConverters.toDouble(json['totalIn']);
payout = JsonConverters.toDouble(json['payout']);
withdrawal = JsonConverters.toDouble(json['withdrawal']);
totalOut = JsonConverters.toDouble(json['totalOut']);
balance = JsonConverters.toDouble(json['balance']);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'organization': organization,
'group': group,
'location': location,
'start': start,
'deposit': deposit,
'payin': payin,
'totalIn': totalIn,
'payout': payout,
'withdrawal': withdrawal,
'totalOut': totalOut,
'balance': balance
};
getTypeName() => "DailyLocationCashbookTotalEx";
TypeContext? context = _ctx;
}
class FindDailyCashbookTotals extends PaginatedQueryRequest implements IConvertible
{
FindDailyCashbookTotals();
FindDailyCashbookTotals.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() => "FindDailyCashbookTotals";
TypeContext? context = _ctx;
}
class ResponseMetrics implements IConvertible
{
int? id;
int? rqc;
int? oc;
int? sc;
int? tc;
int? adr;
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;
int? pageSize;
int? totalItems;
int? totalPages;
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;
}
class PaginatedResultWithTotal<T> extends PaginatedResult<DailyLocationCashbookTotalEx> implements IConvertible
{
double? total;
PaginatedResultWithTotal({this.total});
PaginatedResultWithTotal.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
total = JsonConverters.toDouble(json['total']);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'total': total
});
getTypeName() => "PaginatedResultWithTotal<$T>";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.sbbet.ath.cx', types: <String, TypeInfo> {
'QueryRequest': TypeInfo(TypeOf.Class, create:() => QueryRequest()),
'PaginatedQueryRequest': TypeInfo(TypeOf.Class, create:() => PaginatedQueryRequest()),
'DailyLocationCashbookTotalEx': TypeInfo(TypeOf.Class, create:() => DailyLocationCashbookTotalEx()),
'FindDailyCashbookTotals': TypeInfo(TypeOf.Class, create:() => FindDailyCashbookTotals()),
'ResponseMetrics': TypeInfo(TypeOf.Class, create:() => ResponseMetrics()),
'PaginatedResult<T>': TypeInfo(TypeOf.Class, create:() => PaginatedResult<T>()),
'List<ResponseMetrics>': TypeInfo(TypeOf.Class, create:() => <ResponseMetrics>[]),
'PaginatedResultWithTotal<T>': TypeInfo(TypeOf.Class, create:() => PaginatedResultWithTotal<T>()),
});
Dart FindDailyCashbookTotals DTOs
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/totals/cashbooks HTTP/1.1
Host: api.sbbet.ath.cx
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"currentPage":0,"pageSize":0,"qry":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"total":0,"data":[{"id":"String","organization":"String","group":"String","location":"String","start":0,"deposit":0,"payin":0,"totalIn":0,"payout":0,"withdrawal":0,"totalOut":0,"balance":0}],"currentPage":0,"pageSize":0,"totalItems":0,"totalPages":0}