| GET | /roles | Get user if exists and is not disabled |
|---|
import 'package:servicestack/servicestack.dart';
class Roles implements IConvertible
{
/**
* Role Code
*/
// @ApiMember(Description="Role Code", IsRequired=true)
String? roleCode;
/**
* Role Description
*/
// @ApiMember(Description="Role Description", IsRequired=true)
String? roleDs;
/**
* Role Type
*/
// @ApiMember(Description="Role Type", IsRequired=true)
int? roleType;
Roles({this.roleCode,this.roleDs,this.roleType});
Roles.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
roleCode = json['roleCode'];
roleDs = json['roleDs'];
roleType = json['roleType'];
return this;
}
Map<String, dynamic> toJson() => {
'roleCode': roleCode,
'roleDs': roleDs,
'roleType': roleType
};
getTypeName() => "Roles";
TypeContext? context = _ctx;
}
class GetRolesResponse extends ListBase<Roles> implements IConvertible
{
final List<Roles> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
Roles operator [](int index) => l[index];
void operator []=(int index, Roles value) { l[index] = value; }
GetRolesResponse();
GetRolesResponse.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetRolesResponse";
TypeContext? context = _ctx;
}
class GetRoles implements IConvertible
{
/**
* User type id
*/
// @ApiMember(Description="User type id", IsRequired=true)
String? type;
GetRoles({this.type});
GetRoles.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
type = json['type'];
return this;
}
Map<String, dynamic> toJson() => {
'type': type
};
getTypeName() => "GetRoles";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
'Roles': TypeInfo(TypeOf.Class, create:() => Roles()),
'GetRolesResponse': TypeInfo(TypeOf.Class, create:() => GetRolesResponse()),
'GetRoles': TypeInfo(TypeOf.Class, create:() => GetRoles()),
});
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /roles HTTP/1.1 Host: dev-api-booster.richemont.com Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length []