Richemont.Booster2.PublicApi

<back to all web services

GetPosBrand

Requires Authentication
The following routes are available for this service:
GET/security/posGet the list of pos groups where user is authorized
import 'package:servicestack/servicestack.dart';

class Scope implements IConvertible
{
    /**
    * Scope Code - combination of BU / Brand
    */
    // @ApiMember(Description="Scope Code - combination of BU / Brand", IsRequired=true)
    String scopeCode = "";

    /**
    * Business Unit Code
    */
    // @ApiMember(Description="Business Unit Code", IsRequired=true)
    String buCode = "";

    /**
    * Brand Trigram
    */
    // @ApiMember(Description="Brand Trigram", IsRequired=true)
    String brand = "";

    /**
    * Description of the combination
    */
    // @ApiMember(Description="Description of the combination", IsRequired=true)
    String description = "";

    Scope({this.scopeCode="",this.buCode="",this.brand="",this.description=""});
    Scope.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        scopeCode = json['scopeCode'] ?? "";
        buCode = json['buCode'] ?? "";
        brand = json['brand'] ?? "";
        description = json['description'] ?? "";
        return this;
    }

    Map<String, dynamic> toJson() => {
        'scopeCode': scopeCode,
        'buCode': buCode,
        'brand': brand,
        'description': description
    };

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

class PosBrand extends Scope implements IConvertible
{
    /**
    * Pos code
    */
    // @ApiMember(Description="Pos code", IsRequired=true)
    String posCode = "";

    /**
    * Pos name
    */
    // @ApiMember(Description="Pos name", IsRequired=true)
    String name = "";

    /**
    * Pos city
    */
    // @ApiMember(Description="Pos city", IsRequired=true)
    String city = "";

    /**
    * Pos address
    */
    // @ApiMember(Description="Pos address", IsRequired=true)
    String address = "";

    /**
    * Pos country
    */
    // @ApiMember(Description="Pos country", IsRequired=true)
    String country = "";

    PosBrand({this.posCode="",this.name="",this.city="",this.address="",this.country=""});
    PosBrand.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        posCode = json['posCode'] ?? "";
        name = json['name'] ?? "";
        city = json['city'] ?? "";
        address = json['address'] ?? "";
        country = json['country'] ?? "";
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'posCode': posCode,
        'name': name,
        'city': city,
        'address': address,
        'country': country
    });

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

class GetPosBrandResponse implements IConvertible
{
    /**
    * Index of the result set returnedr
    */
    // @ApiMember(Description="Index of the result set returnedr", IsRequired=true)
    int page = 0;

    /**
    * Size of the result set returned
    */
    // @ApiMember(Description="Size of the result set returned", IsRequired=true)
    int items = 0;

    /**
    * Total amount of pages / result sets
    */
    // @ApiMember(Description="Total amount of pages / result sets", IsRequired=true)
    int totalPages = 0;

    /**
    * Total amount of results
    */
    // @ApiMember(Description="Total amount of results", IsRequired=true)
    int totalResults = 0;

    /**
    * List of Users
    */
    // @ApiMember(Description="List of Users", IsRequired=true)
    List<PosBrand>? elements;

    GetPosBrandResponse({this.page=0,this.items=0,this.totalPages=0,this.totalResults=0,this.elements});
    GetPosBrandResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        page = json['page'] ?? 0;
        items = json['items'] ?? 0;
        totalPages = json['totalPages'] ?? 0;
        totalResults = json['totalResults'] ?? 0;
        elements = JsonConverters.fromJson(json['elements'],'List<PosBrand>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'page': page,
        'items': items,
        'totalPages': totalPages,
        'totalResults': totalResults,
        'elements': JsonConverters.toJson(elements,'List<PosBrand>',context!)
    };

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

class GetPosBrand implements IPagedRequest, IConvertible
{
    /**
    * Brand Trigram
    */
    // @ApiMember(Description="Brand Trigram", IsRequired=true)
    String brand = "";

    /**
    * Mnemonic Code to Check
    */
    // @ApiMember(Description="Mnemonic Code to Check")
    String? mnemonicCode;

    /**
    * Business Unit Code
    */
    // @ApiMember(Description="Business Unit Code")
    String? buCode;

    /**
    * Index of the result set returned
    */
    // @ApiMember(Description="Index of the result set returned", IsRequired=true)
    int page = 0;

    /**
    * Size of the result set returned
    */
    // @ApiMember(Description="Size of the result set returned", IsRequired=true)
    int items = 0;

    /**
    * Omit precise record count - save on performance
    */
    // @ApiMember(Description="Omit precise record count - save on performance")
    bool? noCount;

    /**
    * Sorting expression
    */
    // @ApiMember(Description="Sorting expression")
    String? sortBy;

    GetPosBrand({this.brand="",this.mnemonicCode,this.buCode,this.page=0,this.items=0,this.noCount,this.sortBy});
    GetPosBrand.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        brand = json['brand'] ?? "";
        mnemonicCode = json['mnemonicCode'];
        buCode = json['buCode'];
        page = json['page'] ?? 0;
        items = json['items'] ?? 0;
        noCount = json['noCount'];
        sortBy = json['sortBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'brand': brand,
        'mnemonicCode': mnemonicCode,
        'buCode': buCode,
        'page': page,
        'items': items,
        'noCount': noCount,
        'sortBy': sortBy
    };

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

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'Scope': TypeInfo(TypeOf.Class, create:() => Scope()),
    'PosBrand': TypeInfo(TypeOf.Class, create:() => PosBrand()),
    'GetPosBrandResponse': TypeInfo(TypeOf.Class, create:() => GetPosBrandResponse()),
    'List<PosBrand>': TypeInfo(TypeOf.Class, create:() => <PosBrand>[]),
    'GetPosBrand': TypeInfo(TypeOf.Class, create:() => GetPosBrand()),
});

Dart GetPosBrand 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.

GET /security/pos HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"page":0,"items":0,"totalPages":0,"totalResults":0}