| GET | /posGroups | Get 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 PosGroup extends Scope implements IConvertible
{
/**
* Pos Group code
*/
// @ApiMember(Description="Pos Group code", IsRequired=true)
int? posGroupCode;
/**
* Pos Group Description
*/
// @ApiMember(Description="Pos Group Description", IsRequired=true)
String? posGroupDs;
/**
* Define if user is authorized to this pos group
*/
// @ApiMember(Description="Define if user is authorized to this pos group", IsRequired=true)
bool? isAuthorized;
PosGroup({this.posGroupCode,this.posGroupDs,this.isAuthorized});
PosGroup.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
posGroupCode = json['posGroupCode'];
posGroupDs = json['posGroupDs'];
isAuthorized = json['isAuthorized'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'posGroupCode': posGroupCode,
'posGroupDs': posGroupDs,
'isAuthorized': isAuthorized
});
getTypeName() => "PosGroup";
TypeContext? context = _ctx;
}
class GetPosGroupResponse extends ListBase<PosGroup> implements IConvertible
{
final List<PosGroup> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
PosGroup operator [](int index) => l[index];
void operator []=(int index, PosGroup value) { l[index] = value; }
GetPosGroupResponse();
GetPosGroupResponse.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetPosGroupResponse";
TypeContext? context = _ctx;
}
class GetPosGroup implements IConvertible
{
/**
* Brand Trigram
*/
// @ApiMember(Description="Brand Trigram", IsRequired=true)
String? brand;
/**
* Business Unit Code
*/
// @ApiMember(Description="Business Unit Code", IsRequired=true)
String? buCode;
GetPosGroup({this.brand,this.buCode});
GetPosGroup.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
brand = json['brand'];
buCode = json['buCode'];
return this;
}
Map<String, dynamic> toJson() => {
'brand': brand,
'buCode': buCode
};
getTypeName() => "GetPosGroup";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
'Scope': TypeInfo(TypeOf.Class, create:() => Scope()),
'PosGroup': TypeInfo(TypeOf.Class, create:() => PosGroup()),
'GetPosGroupResponse': TypeInfo(TypeOf.Class, create:() => GetPosGroupResponse()),
'GetPosGroup': TypeInfo(TypeOf.Class, create:() => GetPosGroup()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /posGroups HTTP/1.1 Host: dev-api-booster.richemont.com Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length []