| Required roles: | Manager, Employee |
import 'package:servicestack/servicestack.dart';
// @ValidateRequest(Validator="HasRole(`Manager`)")
// @ValidateRequest(Validator="HasRole(`Employee`)")
class DeleteBooking implements IDeleteDb<Booking>, IConvertible
{
int? id;
List<int>? ids;
DeleteBooking({this.id,this.ids});
DeleteBooking.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
ids = JsonConverters.fromJson(json['ids'],'List<int>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'ids': JsonConverters.toJson(ids,'List<int>',context!)
};
getTypeName() => "DeleteBooking";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'vue_spa.web_templates.io', types: <String, TypeInfo> {
'DeleteBooking': TypeInfo(TypeOf.Class, create:() => DeleteBooking()),
});
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.
POST /jsonl/oneway/DeleteBooking HTTP/1.1
Host: vue-spa.web-templates.io
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"id":0,"ids":[0]}