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

<GetDeviceConfiguration xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Betting.WebApi.ServiceModel">
  <Id>String</Id>
</GetDeviceConfiguration>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<DeviceConfiguration xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Betting.ReadModel">
  <Currency xmlns:d2p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
    <d2p1:_x003C_Id_x003E_k__BackingField>String</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Val_x003E_k__BackingField>String</d2p1:_x003C_Val_x003E_k__BackingField>
  </Currency>
  <Id>String</Id>
  <IsActive>false</IsActive>
  <Language xmlns:d2p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
    <d2p1:_x003C_Id_x003E_k__BackingField>String</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Val_x003E_k__BackingField>String</d2p1:_x003C_Val_x003E_k__BackingField>
  </Language>
  <Location>
    <Address xmlns:d3p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
      <d3p1:City>String</d3p1:City>
      <d3p1:Country>
        <d3p1:_x003C_Id_x003E_k__BackingField>String</d3p1:_x003C_Id_x003E_k__BackingField>
        <d3p1:_x003C_Val_x003E_k__BackingField>String</d3p1:_x003C_Val_x003E_k__BackingField>
      </d3p1:Country>
      <d3p1:Data xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </d3p1:Data>
      <d3p1:GPS>
        <d3p1:Lat>0</d3p1:Lat>
        <d3p1:Lng>0</d3p1:Lng>
      </d3p1:GPS>
      <d3p1:PostalCode>String</d3p1:PostalCode>
      <d3p1:State>String</d3p1:State>
      <d3p1:Street>String</d3p1:Street>
    </Address>
    <Group xmlns:d3p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
      <d3p1:_x003C_Id_x003E_k__BackingField>String</d3p1:_x003C_Id_x003E_k__BackingField>
      <d3p1:_x003C_Val_x003E_k__BackingField>String</d3p1:_x003C_Val_x003E_k__BackingField>
    </Group>
    <Id>String</Id>
    <IntegrationsData xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </IntegrationsData>
    <Name>String</Name>
    <Region xmlns:d3p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
      <d3p1:_x003C_Id_x003E_k__BackingField>String</d3p1:_x003C_Id_x003E_k__BackingField>
      <d3p1:_x003C_Val_x003E_k__BackingField>String</d3p1:_x003C_Val_x003E_k__BackingField>
    </Region>
  </Location>
  <Name>String</Name>
  <Organization>
    <Address xmlns:d3p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
      <d3p1:City>String</d3p1:City>
      <d3p1:Country>
        <d3p1:_x003C_Id_x003E_k__BackingField>String</d3p1:_x003C_Id_x003E_k__BackingField>
        <d3p1:_x003C_Val_x003E_k__BackingField>String</d3p1:_x003C_Val_x003E_k__BackingField>
      </d3p1:Country>
      <d3p1:Data xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </d3p1:Data>
      <d3p1:GPS>
        <d3p1:Lat>0</d3p1:Lat>
        <d3p1:Lng>0</d3p1:Lng>
      </d3p1:GPS>
      <d3p1:PostalCode>String</d3p1:PostalCode>
      <d3p1:State>String</d3p1:State>
      <d3p1:Street>String</d3p1:Street>
    </Address>
    <Id>String</Id>
    <IntegrationsData xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </IntegrationsData>
    <Name>String</Name>
  </Organization>
  <ProductInstances xmlns:d2p1="http://schemas.datacontract.org/2004/07/Betting.Common">
    <d2p1:ProductInstanceRef>
      <d2p1:Id>String</d2p1:Id>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:Product>
        <d2p1:Category>String</d2p1:Category>
        <d2p1:Id>String</d2p1:Id>
        <d2p1:ProductProvider xmlns:d5p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
          <d5p1:_x003C_Id_x003E_k__BackingField>String</d5p1:_x003C_Id_x003E_k__BackingField>
          <d5p1:_x003C_Val_x003E_k__BackingField>String</d5p1:_x003C_Val_x003E_k__BackingField>
        </d2p1:ProductProvider>
        <d2p1:Value>String</d2p1:Value>
      </d2p1:Product>
      <d2p1:Title>String</d2p1:Title>
    </d2p1:ProductInstanceRef>
  </ProductInstances>
  <TimeZone xmlns:d2p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
    <d2p1:_x003C_Id_x003E_k__BackingField>String</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Val_x003E_k__BackingField>String</d2p1:_x003C_Val_x003E_k__BackingField>
  </TimeZone>
</DeviceConfiguration>