| All Verbs | /SetPositions |
|---|
import 'package:servicestack/servicestack.dart';
class Position implements IConvertible
{
int? ID;
String? Key;
int? Pixel;
int? Width;
int? AreaID;
String? AreaLabel;
String? Label;
int? StockroomID;
Position({this.ID,this.Key,this.Pixel,this.Width,this.AreaID,this.AreaLabel,this.Label,this.StockroomID});
Position.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ID = json['ID'];
Key = json['Key'];
Pixel = json['Pixel'];
Width = json['Width'];
AreaID = json['AreaID'];
AreaLabel = json['AreaLabel'];
Label = json['Label'];
StockroomID = json['StockroomID'];
return this;
}
Map<String, dynamic> toJson() => {
'ID': ID,
'Key': Key,
'Pixel': Pixel,
'Width': Width,
'AreaID': AreaID,
'AreaLabel': AreaLabel,
'Label': Label,
'StockroomID': StockroomID
};
getTypeName() => "Position";
TypeContext? context = _ctx;
}
class SetPositions implements IConvertible
{
/**
* Key identifying a location
*/
// @ApiMember(Description="Key identifying a location", IsRequired=true)
List<Position>? Positions = [];
/**
* Optional: name of the stockroom where the position is located
*/
// @ApiMember(Description="Optional: name of the stockroom where the position is located")
String? StockroomName;
/**
* Optional: overwrite existing positions defined with the same key: Yes by default
*/
// @ApiMember(Description="Optional: overwrite existing positions defined with the same key: Yes by default")
bool? Overwrite;
SetPositions({this.Positions,this.StockroomName,this.Overwrite});
SetPositions.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Positions = JsonConverters.fromJson(json['Positions'],'List<Position>',context!);
StockroomName = json['StockroomName'];
Overwrite = json['Overwrite'];
return this;
}
Map<String, dynamic> toJson() => {
'Positions': JsonConverters.toJson(Positions,'List<Position>',context!),
'StockroomName': StockroomName,
'Overwrite': Overwrite
};
getTypeName() => "SetPositions";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'clouddemo.pickeos.com', types: <String, TypeInfo> {
'Position': TypeInfo(TypeOf.Class, create:() => Position()),
'SetPositions': TypeInfo(TypeOf.Class, create:() => SetPositions()),
'List<Position>': TypeInfo(TypeOf.Class, create:() => <Position>[]),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /SetPositions HTTP/1.1
Host: clouddemo.pickeos.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Positions:
[
{
ID: 0,
Key: String,
Pixel: 0,
Width: 0,
AreaID: 0,
AreaLabel: String,
Label: String,
StockroomID: 0
}
],
StockroomName: String,
Overwrite: False
}