Six4Win.WebApi

<back to all web services

GetLocalCodePotAccumulations

The following routes are available for this service:
All Verbs/qry/lcp/accumulations
import 'package:servicestack/servicestack.dart';

class ThresholdInterval implements IConvertible
{
    double? start;
    double? end;

    ThresholdInterval({this.start,this.end});
    ThresholdInterval.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        start = JsonConverters.toDouble(json['start']);
        end = JsonConverters.toDouble(json['end']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'start': start,
        'end': end
    };

    getTypeName() => "ThresholdInterval";
    TypeContext? context = _ctx;
}

class LCPConfiguration implements IConvertible
{
    bool? isActive;
    ThresholdInterval? interval;
    double? pct;

    LCPConfiguration({this.isActive,this.interval,this.pct});
    LCPConfiguration.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        isActive = json['isActive'];
        interval = JsonConverters.fromJson(json['interval'],'ThresholdInterval',context!);
        pct = JsonConverters.toDouble(json['pct']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'isActive': isActive,
        'interval': JsonConverters.toJson(interval,'ThresholdInterval',context!),
        'pct': pct
    };

    getTypeName() => "LCPConfiguration";
    TypeContext? context = _ctx;
}

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 WinnerByCode implements IConvertible
{
    String? roundId;
    DateTime? drawnAtUtc;
    String? slipId;
    String? betId;
    String? code;
    double? amount;
    Origin? origin;
    Ref? bettor;
    String? locationAddressOrBettorInfo;

    WinnerByCode({this.roundId,this.drawnAtUtc,this.slipId,this.betId,this.code,this.amount,this.origin,this.bettor,this.locationAddressOrBettorInfo});
    WinnerByCode.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        roundId = json['roundId'];
        drawnAtUtc = JsonConverters.fromJson(json['drawnAtUtc'],'DateTime',context!);
        slipId = json['slipId'];
        betId = json['betId'];
        code = json['code'];
        amount = JsonConverters.toDouble(json['amount']);
        origin = JsonConverters.fromJson(json['origin'],'Origin',context!);
        bettor = JsonConverters.fromJson(json['bettor'],'Ref',context!);
        locationAddressOrBettorInfo = json['locationAddressOrBettorInfo'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'roundId': roundId,
        'drawnAtUtc': JsonConverters.toJson(drawnAtUtc,'DateTime',context!),
        'slipId': slipId,
        'betId': betId,
        'code': code,
        'amount': amount,
        'origin': JsonConverters.toJson(origin,'Origin',context!),
        'bettor': JsonConverters.toJson(bettor,'Ref',context!),
        'locationAddressOrBettorInfo': locationAddressOrBettorInfo
    };

    getTypeName() => "WinnerByCode";
    TypeContext? context = _ctx;
}

class LCPAccumulation implements IConvertible
{
    String? locId;
    String? locName;
    double? amount;
    double? threshold;
    LCPConfiguration? cfg;
    List<WinnerByCode>? winners;

    LCPAccumulation({this.locId,this.locName,this.amount,this.threshold,this.cfg,this.winners});
    LCPAccumulation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        locId = json['locId'];
        locName = json['locName'];
        amount = JsonConverters.toDouble(json['amount']);
        threshold = JsonConverters.toDouble(json['threshold']);
        cfg = JsonConverters.fromJson(json['cfg'],'LCPConfiguration',context!);
        winners = JsonConverters.fromJson(json['winners'],'List<WinnerByCode>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'locId': locId,
        'locName': locName,
        'amount': amount,
        'threshold': threshold,
        'cfg': JsonConverters.toJson(cfg,'LCPConfiguration',context!),
        'winners': JsonConverters.toJson(winners,'List<WinnerByCode>',context!)
    };

    getTypeName() => "LCPAccumulation";
    TypeContext? context = _ctx;
}

class LocalCodePotAccumulations implements IConvertible
{
    String? id;
    Map<String,LCPAccumulation?>? accumulations;
    String? currentRoundId;
    String? inertCode;

    LocalCodePotAccumulations({this.id,this.accumulations,this.currentRoundId,this.inertCode});
    LocalCodePotAccumulations.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        accumulations = JsonConverters.fromJson(json['accumulations'],'Map<String,LCPAccumulation?>',context!);
        currentRoundId = json['currentRoundId'];
        inertCode = json['inertCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'accumulations': JsonConverters.toJson(accumulations,'Map<String,LCPAccumulation?>',context!),
        'currentRoundId': currentRoundId,
        'inertCode': inertCode
    };

    getTypeName() => "LocalCodePotAccumulations";
    TypeContext? context = _ctx;
}

class GetLocalCodePotAccumulations implements IConvertible
{
    GetLocalCodePotAccumulations();
    GetLocalCodePotAccumulations.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "GetLocalCodePotAccumulations";
    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> {
    'ThresholdInterval': TypeInfo(TypeOf.Class, create:() => ThresholdInterval()),
    'LCPConfiguration': TypeInfo(TypeOf.Class, create:() => LCPConfiguration()),
    '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()),
    'WinnerByCode': TypeInfo(TypeOf.Class, create:() => WinnerByCode()),
    'LCPAccumulation': TypeInfo(TypeOf.Class, create:() => LCPAccumulation()),
    'List<WinnerByCode>': TypeInfo(TypeOf.Class, create:() => <WinnerByCode>[]),
    'LocalCodePotAccumulations': TypeInfo(TypeOf.Class, create:() => LocalCodePotAccumulations()),
    'Map<String,LCPAccumulation?>': TypeInfo(TypeOf.Class, create:() => Map<String,LCPAccumulation?>()),
    'GetLocalCodePotAccumulations': TypeInfo(TypeOf.Class, create:() => GetLocalCodePotAccumulations()),
    'RecordDictionary<TKey,TVal>': TypeInfo(TypeOf.GenericDef,create:() => RecordDictionary()),
});

Dart GetLocalCodePotAccumulations DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /qry/lcp/accumulations HTTP/1.1 
Host: s4w2.api.bettor.cc 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GetLocalCodePotAccumulations 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

<LocalCodePotAccumulations xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.ReadModel">
  <Accumulations xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringLCPAccumulationQC5r2uXE>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/Six4Win">
        <d4p1:Amount>0</d4p1:Amount>
        <d4p1:Cfg>
          <d4p1:Interval>
            <d4p1:End>0</d4p1:End>
            <d4p1:Start>0</d4p1:Start>
          </d4p1:Interval>
          <d4p1:IsActive>false</d4p1:IsActive>
          <d4p1:Pct>0</d4p1:Pct>
        </d4p1:Cfg>
        <d4p1:LocId>String</d4p1:LocId>
        <d4p1:LocName>String</d4p1:LocName>
        <d4p1:Threshold>0</d4p1:Threshold>
        <d4p1:Winners xmlns:d5p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
          <d5p1:_array />
          <d5p1:_head>0</d5p1:_head>
          <d5p1:_size>0</d5p1:_size>
          <d5p1:_tail>0</d5p1:_tail>
          <d5p1:_version>0</d5p1:_version>
        </d4p1:Winners>
      </d2p1:Value>
    </d2p1:KeyValueOfstringLCPAccumulationQC5r2uXE>
  </Accumulations>
  <CurrentRoundId>String</CurrentRoundId>
  <Id>String</Id>
  <InertCode>String</InertCode>
</LocalCodePotAccumulations>