Betting.WebApi

<back to all web services

GetDeviceConfiguration

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

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 ProductReference implements IConvertible
{
    String? id;
    String? value;
    String? category;
    Ref? productProvider;

    ProductReference({this.id,this.value,this.category,this.productProvider});
    ProductReference.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        value = json['value'];
        category = json['category'];
        productProvider = JsonConverters.fromJson(json['productProvider'],'Ref',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'value': value,
        'category': category,
        'productProvider': JsonConverters.toJson(productProvider,'Ref',context!)
    };

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

class ProductInstanceRef implements IConvertible
{
    String? id;
    String? name;
    String? title;
    ProductReference? product;

    ProductInstanceRef({this.id,this.name,this.title,this.product});
    ProductInstanceRef.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        title = json['title'];
        product = JsonConverters.fromJson(json['product'],'ProductReference',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'title': title,
        'product': JsonConverters.toJson(product,'ProductReference',context!)
    };

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

class GPSCoordinates implements IConvertible
{
    double? lat;
    double? lng;

    GPSCoordinates({this.lat,this.lng});
    GPSCoordinates.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'lat': lat,
        'lng': lng
    };

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

class Address implements IConvertible
{
    String? street;
    String? city;
    String? state;
    String? postalCode;
    Ref? country;
    GPSCoordinates? gps;
    RecordDictionary<String,String>? data;

    Address({this.street,this.city,this.state,this.postalCode,this.country,this.gps,this.data});
    Address.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        street = json['street'];
        city = json['city'];
        state = json['state'];
        postalCode = json['postalCode'];
        country = JsonConverters.fromJson(json['country'],'Ref',context!);
        gps = JsonConverters.fromJson(json['gps'],'GPSCoordinates',context!);
        data = JsonConverters.fromJson(json['data'],'RecordDictionary<String,String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'street': street,
        'city': city,
        'state': state,
        'postalCode': postalCode,
        'country': JsonConverters.toJson(country,'Ref',context!),
        'gps': JsonConverters.toJson(gps,'GPSCoordinates',context!),
        'data': JsonConverters.toJson(data,'RecordDictionary<String,String>',context!)
    };

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

class LocationRef implements IConvertible
{
    String? id;
    String? name;
    Ref? group;
    Ref? region;
    Address? address;
    RecordDictionary<String,String>? integrationsData;

    LocationRef({this.id,this.name,this.group,this.region,this.address,this.integrationsData});
    LocationRef.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        group = JsonConverters.fromJson(json['group'],'Ref',context!);
        region = JsonConverters.fromJson(json['region'],'Ref',context!);
        address = JsonConverters.fromJson(json['address'],'Address',context!);
        integrationsData = JsonConverters.fromJson(json['integrationsData'],'RecordDictionary<String,String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'group': JsonConverters.toJson(group,'Ref',context!),
        'region': JsonConverters.toJson(region,'Ref',context!),
        'address': JsonConverters.toJson(address,'Address',context!),
        'integrationsData': JsonConverters.toJson(integrationsData,'RecordDictionary<String,String>',context!)
    };

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

class OrganizationRef implements IConvertible
{
    String? id;
    String? name;
    Address? address;
    RecordDictionary<String,String>? integrationsData;

    OrganizationRef({this.id,this.name,this.address,this.integrationsData});
    OrganizationRef.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        address = JsonConverters.fromJson(json['address'],'Address',context!);
        integrationsData = JsonConverters.fromJson(json['integrationsData'],'RecordDictionary<String,String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'address': JsonConverters.toJson(address,'Address',context!),
        'integrationsData': JsonConverters.toJson(integrationsData,'RecordDictionary<String,String>',context!)
    };

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

class DeviceConfiguration implements IConvertible
{
    String? id;
    String? name;
    bool? isActive;
    RecordList<ProductInstanceRef>? productInstances;
    Ref? timeZone;
    Ref? currency;
    Ref? language;
    LocationRef? location;
    OrganizationRef? organization;

    DeviceConfiguration({this.id,this.name,this.isActive,this.productInstances,this.timeZone,this.currency,this.language,this.location,this.organization});
    DeviceConfiguration.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        isActive = json['isActive'];
        productInstances = JsonConverters.fromJson(json['productInstances'],'RecordList<ProductInstanceRef>',context!);
        timeZone = JsonConverters.fromJson(json['timeZone'],'Ref',context!);
        currency = JsonConverters.fromJson(json['currency'],'Ref',context!);
        language = JsonConverters.fromJson(json['language'],'Ref',context!);
        location = JsonConverters.fromJson(json['location'],'LocationRef',context!);
        organization = JsonConverters.fromJson(json['organization'],'OrganizationRef',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'isActive': isActive,
        'productInstances': JsonConverters.toJson(productInstances,'RecordList<ProductInstanceRef>',context!),
        'timeZone': JsonConverters.toJson(timeZone,'Ref',context!),
        'currency': JsonConverters.toJson(currency,'Ref',context!),
        'language': JsonConverters.toJson(language,'Ref',context!),
        'location': JsonConverters.toJson(location,'LocationRef',context!),
        'organization': JsonConverters.toJson(organization,'OrganizationRef',context!)
    };

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

class GetDeviceConfiguration implements IConvertible
{
    String? id;

    GetDeviceConfiguration({this.id});
    GetDeviceConfiguration.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        return this;
    }

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

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

class RecordList<T> extends ListBase<T> implements IConvertible
{
    final List<T> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    T operator [](int index) => l[index];
    void operator []=(int index, T value) { l[index] = value; }
    RecordList();
    RecordList.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "RecordList<$T>";
    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: 'api.sbbet.ath.cx', types: <String, TypeInfo> {
    'Ref': TypeInfo(TypeOf.Class, create:() => Ref()),
    'ProductReference': TypeInfo(TypeOf.Class, create:() => ProductReference()),
    'ProductInstanceRef': TypeInfo(TypeOf.Class, create:() => ProductInstanceRef()),
    'GPSCoordinates': TypeInfo(TypeOf.Class, create:() => GPSCoordinates()),
    'Address': TypeInfo(TypeOf.Class, create:() => Address()),
    'RecordDictionary<String,String>': TypeInfo(TypeOf.Class, create:() => RecordDictionary<String,String>()),
    'LocationRef': TypeInfo(TypeOf.Class, create:() => LocationRef()),
    'OrganizationRef': TypeInfo(TypeOf.Class, create:() => OrganizationRef()),
    'DeviceConfiguration': TypeInfo(TypeOf.Class, create:() => DeviceConfiguration()),
    'RecordList<ProductInstanceRef>': TypeInfo(TypeOf.Class, create:() => RecordList<ProductInstanceRef>()),
    'GetDeviceConfiguration': TypeInfo(TypeOf.Class, create:() => GetDeviceConfiguration()),
    'RecordList<T>': TypeInfo(TypeOf.GenericDef,create:() => RecordList()),
    'RecordDictionary<TKey,TVal>': TypeInfo(TypeOf.GenericDef,create:() => RecordDictionary()),
});

Dart GetDeviceConfiguration 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/configurations/devices HTTP/1.1 
Host: api.sbbet.ath.cx 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":"String","name":"String","isActive":false,"productInstances":[{"id":"String","name":"String","title":"String","product":{"id":"String","value":"String","category":"String","productProvider":{"id":"String","val":"String"}}}],"timeZone":{"id":"String","val":"String"},"currency":{"id":"String","val":"String"},"language":{"id":"String","val":"String"},"location":{"id":"String","name":"String","group":{"id":"String","val":"String"},"region":{"id":"String","val":"String"},"address":{"street":"String","city":"String","state":"String","postalCode":"String","country":{"id":"String","val":"String"},"gps":{"lat":0,"lng":0},"data":{"String":"String"}},"integrationsData":{"String":"String"}},"organization":{"id":"String","name":"String","address":{"street":"String","city":"String","state":"String","postalCode":"String","country":{"id":"String","val":"String"},"gps":{"lat":0,"lng":0},"data":{"String":"String"}},"integrationsData":{"String":"String"}}}