Betting.WebApi

<back to all web services

FindDailyCashbookTotals

The following routes are available for this service:
All Verbs/qry/totals/cashbooks
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=0,this.pageSize=0});
    PaginatedQueryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        currentPage = json['currentPage'] ?? 0;
        pageSize = json['pageSize'] ?? 0;
        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 = 0;
    double deposit = 0;
    double payin = 0;
    double totalIn = 0;
    double payout = 0;
    double withdrawal = 0;
    double totalOut = 0;
    double balance = 0;

    DailyLocationCashbookTotalEx({this.id,this.organization,this.group,this.location,this.start=0,this.deposit=0,this.payin=0,this.totalIn=0,this.payout=0,this.withdrawal=0,this.totalOut=0,this.balance=0});
    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']) ?? 0;
        deposit = JsonConverters.toDouble(json['deposit']) ?? 0;
        payin = JsonConverters.toDouble(json['payin']) ?? 0;
        totalIn = JsonConverters.toDouble(json['totalIn']) ?? 0;
        payout = JsonConverters.toDouble(json['payout']) ?? 0;
        withdrawal = JsonConverters.toDouble(json['withdrawal']) ?? 0;
        totalOut = JsonConverters.toDouble(json['totalOut']) ?? 0;
        balance = JsonConverters.toDouble(json['balance']) ?? 0;
        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 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=0,this.rqc=0,this.oc=0,this.sc=0,this.tc=0,this.adr=0});
    ResponseMetrics.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'] ?? 0;
        rqc = json['rqc'] ?? 0;
        oc = json['oc'] ?? 0;
        sc = json['sc'] ?? 0;
        tc = json['tc'] ?? 0;
        adr = json['adr'] ?? 0;
        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=const [],this.currentPage=0,this.pageSize=0,this.totalItems=0,this.totalPages=0});
    PaginatedResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        data = JsonConverters.fromJson(json['data'],'List<ResponseMetrics>',context!) ?? [];
        currentPage = json['currentPage'] ?? 0;
        pageSize = json['pageSize'] ?? 0;
        totalItems = json['totalItems'] ?? 0;
        totalPages = json['totalPages'] ?? 0;
        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 = 0;

    PaginatedResultWithTotal({this.total=0});
    PaginatedResultWithTotal.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        total = JsonConverters.toDouble(json['total']) ?? 0;
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'total': total
    });

    getTypeName() => "PaginatedResultWithTotal<$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()),
    'DailyLocationCashbookTotalEx': TypeInfo(TypeOf.Class, create:() => DailyLocationCashbookTotalEx()),
    'FindDailyCashbookTotals': TypeInfo(TypeOf.Class, create:() => FindDailyCashbookTotals()),
    '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>[]),
    '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 .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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.bettor.webhop.biz 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"currentPage":0,"pageSize":0,"qry":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
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}