| Requires any of the roles: | Admin, TeamAdmin | Required permission: | Tickets.Add |
| PUT | /Webshop/Category |
|---|
import 'package:servicestack/servicestack.dart';
class WebshopCategory implements IConvertible
{
int? id;
int? ownerId;
// @StringLength(150)
String? name;
// @StringLength(150)
String? subName;
int? viewOrder;
int? legacyId;
DateTime? createdAt;
WebshopCategory({this.id,this.ownerId,this.name,this.subName,this.viewOrder,this.legacyId,this.createdAt});
WebshopCategory.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
ownerId = json['ownerId'];
name = json['name'];
subName = json['subName'];
viewOrder = json['viewOrder'];
legacyId = json['legacyId'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'ownerId': ownerId,
'name': name,
'subName': subName,
'viewOrder': viewOrder,
'legacyId': legacyId,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!)
};
getTypeName() => "WebshopCategory";
TypeContext? context = _ctx;
}
class WebshopCategoryResult implements IConvertible
{
WebshopCategory? item;
int? statusCode;
String? message;
WebshopCategoryResult({this.item,this.statusCode,this.message});
WebshopCategoryResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
item = JsonConverters.fromJson(json['item'],'WebshopCategory',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'item': JsonConverters.toJson(item,'WebshopCategory',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "WebshopCategoryResult";
TypeContext? context = _ctx;
}
class WebshopCategoryUpdateRequest implements IConvertible
{
WebshopCategory? item;
int? ownerId;
WebshopCategoryUpdateRequest({this.item,this.ownerId});
WebshopCategoryUpdateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
item = JsonConverters.fromJson(json['item'],'WebshopCategory',context!);
ownerId = json['ownerId'];
return this;
}
Map<String, dynamic> toJson() => {
'item': JsonConverters.toJson(item,'WebshopCategory',context!),
'ownerId': ownerId
};
getTypeName() => "WebshopCategoryUpdateRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'WebshopCategory': TypeInfo(TypeOf.Class, create:() => WebshopCategory()),
'WebshopCategoryResult': TypeInfo(TypeOf.Class, create:() => WebshopCategoryResult()),
'WebshopCategoryUpdateRequest': TypeInfo(TypeOf.Class, create:() => WebshopCategoryUpdateRequest()),
});
Dart WebshopCategoryUpdateRequest DTOs
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.
PUT /Webshop/Category HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
item:
{
id: 0,
ownerId: 0,
name: String,
subName: String,
viewOrder: 0,
legacyId: 0,
createdAt: 0001-01-01
},
ownerId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
item:
{
id: 0,
ownerId: 0,
name: String,
subName: String,
viewOrder: 0,
legacyId: 0,
createdAt: 0001-01-01
},
statusCode: 0,
message: String
}