Requires any of the roles: | bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read |
GET | /administrators/roles | Get all administrator roles avaialble | This all roles available for the administrator. |
---|
import 'package:servicestack/servicestack.dart';
// @ValidateRequest(Validator="IsAuthenticated")
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
class CompanyUserRolesQuery implements IConvertible
{
CompanyUserRolesQuery();
CompanyUserRolesQuery.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "CompanyUserRolesQuery";
TypeContext? context = _ctx;
}
class AccessKeyTypeResponse implements IConvertible
{
int? Id;
String? KeyType;
String? Description;
AccessKeyTypeResponse({this.Id,this.KeyType,this.Description});
AccessKeyTypeResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
KeyType = json['KeyType'];
Description = json['Description'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'KeyType': KeyType,
'Description': Description
};
getTypeName() => "AccessKeyTypeResponse";
TypeContext? context = _ctx;
}
// @DataContract
class QueryResponse<AccessKeyTypeResponse> implements IConvertible
{
// @DataMember(Order=1)
int? Offset;
// @DataMember(Order=2)
int? Total;
// @DataMember(Order=3)
List<AccessKeyTypeResponse>? Results;
// @DataMember(Order=4)
Map<String,String?>? Meta;
// @DataMember(Order=5)
ResponseStatus? ResponseStatus;
QueryResponse({this.Offset,this.Total,this.Results,this.Meta,this.ResponseStatus});
QueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Offset = json['Offset'];
Total = json['Total'];
Results = JsonConverters.fromJson(json['Results'],'List<${runtimeGenericTypeDefs(this,[0]).join(",")}>',context!);
Meta = JsonConverters.toStringMap(json['Meta']);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Offset': Offset,
'Total': Total,
'Results': JsonConverters.toJson(Results,'List<AccessKeyTypeResponse>',context!),
'Meta': Meta,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "QueryResponse<$AccessKeyTypeResponse>";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
'CompanyUserRolesQuery': TypeInfo(TypeOf.Class, create:() => CompanyUserRolesQuery()),
'AccessKeyTypeResponse': TypeInfo(TypeOf.Class, create:() => AccessKeyTypeResponse()),
'QueryResponse<AccessKeyTypeResponse>': TypeInfo(TypeOf.Class, create:() => QueryResponse<AccessKeyTypeResponse>()),
});
Dart CompanyUserRolesQuery DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /administrators/roles HTTP/1.1 Host: api.bokamera.se Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Offset":0,"Total":0,"Results":[{"Name":"String","Description":"String"}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}