| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Required permission: | Tickets.Add |
| POST | /EventSeats/CreateSeats |
|---|
import 'package:servicestack/servicestack.dart';
class EventSeatsCreateResult implements IConvertible
{
int? statusCode;
String? message;
List<String>? skippedTicketTypes;
EventSeatsCreateResult({this.statusCode,this.message,this.skippedTicketTypes});
EventSeatsCreateResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
statusCode = json['statusCode'];
message = json['message'];
skippedTicketTypes = JsonConverters.fromJson(json['skippedTicketTypes'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'statusCode': statusCode,
'message': message,
'skippedTicketTypes': JsonConverters.toJson(skippedTicketTypes,'List<String>',context!)
};
getTypeName() => "EventSeatsCreateResult";
TypeContext? context = _ctx;
}
class EventSeatsCreateRequest implements IConvertible
{
int? eventId;
int? templateId;
List<int>? includedOwnerTicketTypeIds;
EventSeatsCreateRequest({this.eventId,this.templateId,this.includedOwnerTicketTypeIds});
EventSeatsCreateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
eventId = json['eventId'];
templateId = json['templateId'];
includedOwnerTicketTypeIds = JsonConverters.fromJson(json['includedOwnerTicketTypeIds'],'List<int>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'eventId': eventId,
'templateId': templateId,
'includedOwnerTicketTypeIds': JsonConverters.toJson(includedOwnerTicketTypeIds,'List<int>',context!)
};
getTypeName() => "EventSeatsCreateRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'EventSeatsCreateResult': TypeInfo(TypeOf.Class, create:() => EventSeatsCreateResult()),
'EventSeatsCreateRequest': TypeInfo(TypeOf.Class, create:() => EventSeatsCreateRequest()),
});
Dart EventSeatsCreateRequest 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.
POST /EventSeats/CreateSeats HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
eventId: 0,
templateId: 0,
includedOwnerTicketTypeIds:
[
0
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
statusCode: 0,
message: String,
skippedTicketTypes:
[
String
]
}