Richemont.Booster2.PublicApi

<back to all web services

GetUserAuth

Requires Authentication
The following routes are available for this service:
GET/user/{userId}/authorizeGet user if exists and is not disabled
import 'package:servicestack/servicestack.dart';

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

    /**
    * List of Pos Group - in case of internal user
    */
    // @ApiMember(Description="List of Pos Group - in case of internal user")
    List<int>? posGroups;

    /**
    * Pos Code - in case of external users
    */
    // @ApiMember(Description="Pos Code - in case of external users")
    String? posCode;

    /**
    * List of user roles
    */
    // @ApiMember(Description="List of user roles", IsRequired=true)
    List<String>? roles;

    Auth({this.brand,this.posGroups,this.posCode,this.roles});
    Auth.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        brand = json['brand'];
        posGroups = JsonConverters.fromJson(json['posGroups'],'List<int>',context!);
        posCode = json['posCode'];
        roles = JsonConverters.fromJson(json['roles'],'List<String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'brand': brand,
        'posGroups': JsonConverters.toJson(posGroups,'List<int>',context!),
        'posCode': posCode,
        'roles': JsonConverters.toJson(roles,'List<String>',context!)
    };

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

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

    Map<String, dynamic> toJson() => {};
    getTypeName() => "GetUserAuthResponse";
    TypeContext? context = _ctx;
}

class GetUserAuth implements IConvertible
{
    /**
    * User's UserID
    */
    // @ApiMember(Description="User's UserID", IsRequired=true)
    String? userId;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'Auth': TypeInfo(TypeOf.Class, create:() => Auth()),
    'GetUserAuthResponse': TypeInfo(TypeOf.Class, create:() => GetUserAuthResponse()),
    'GetUserAuth': TypeInfo(TypeOf.Class, create:() => GetUserAuth()),
});

Dart GetUserAuth DTOs

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

HTTP + OTHER

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

GET /user/{userId}/authorize HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

[]