Booster.Microservices

<back to all web services

UserRequest

Requires Authentication
The following routes are available for this service:
GET/warranty/v1/user/{username*}
import 'package:servicestack/servicestack.dart';

class UserResponse implements IConvertible
{
    String? iss;
    List<String>? aud;
    String? sub;
    String? email;
    String? azp;
    List<String>? locale;
    String? exp;
    String? iat;
    String? time;

    UserResponse({this.iss,this.aud,this.sub,this.email,this.azp,this.locale,this.exp,this.iat,this.time});
    UserResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        iss = json['iss'];
        aud = JsonConverters.fromJson(json['aud'],'List<String>',context!);
        sub = json['sub'];
        email = json['email'];
        azp = json['azp'];
        locale = JsonConverters.fromJson(json['locale'],'List<String>',context!);
        exp = json['exp'];
        iat = json['iat'];
        time = json['time'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'iss': iss,
        'aud': JsonConverters.toJson(aud,'List<String>',context!),
        'sub': sub,
        'email': email,
        'azp': azp,
        'locale': JsonConverters.toJson(locale,'List<String>',context!),
        'exp': exp,
        'iat': iat,
        'time': time
    };

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

class UserRequest implements IConvertible
{
    String? username;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'qp_microservices_booster.richemont.com', types: <String, TypeInfo> {
    'UserResponse': TypeInfo(TypeOf.Class, create:() => UserResponse()),
    'UserRequest': TypeInfo(TypeOf.Class, create:() => UserRequest()),
});

Dart UserRequest 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 /warranty/v1/user/{username*} HTTP/1.1 
Host: qp-microservices-booster.richemont.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"iss":"String","aud":["String"],"sub":"String","email":"String","azp":"String","locale":["String"],"exp":"String","iat":"String","time":"String"}