| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Requires the permission: | ReadData |
| POST | /EventSeatingFindAndReserve | Find best available seats and reserve them atomically |
|---|
import 'package:servicestack/servicestack.dart';
class FoundSeat implements IConvertible
{
int? id;
String? name;
String? rowName;
String? sectionName;
int? sectionId;
FoundSeat({this.id,this.name,this.rowName,this.sectionName,this.sectionId});
FoundSeat.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
rowName = json['rowName'];
sectionName = json['sectionName'];
sectionId = json['sectionId'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'rowName': rowName,
'sectionName': sectionName,
'sectionId': sectionId
};
getTypeName() => "FoundSeat";
TypeContext? context = _ctx;
}
class EventSeatingFindAndReserveResult implements IConvertible
{
int? statusCode;
String? message;
String? reservationTokenId;
int? totalCandidates;
List<FoundSeat>? seats;
EventSeatingFindAndReserveResult({this.statusCode,this.message,this.reservationTokenId,this.totalCandidates,this.seats});
EventSeatingFindAndReserveResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
statusCode = json['statusCode'];
message = json['message'];
reservationTokenId = json['reservationTokenId'];
totalCandidates = json['totalCandidates'];
seats = JsonConverters.fromJson(json['seats'],'List<FoundSeat>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'statusCode': statusCode,
'message': message,
'reservationTokenId': reservationTokenId,
'totalCandidates': totalCandidates,
'seats': JsonConverters.toJson(seats,'List<FoundSeat>',context!)
};
getTypeName() => "EventSeatingFindAndReserveResult";
TypeContext? context = _ctx;
}
class RequestSignature implements IConvertible
{
String? systemId;
String? systemSecret;
String? signature;
RequestSignature({this.systemId,this.systemSecret,this.signature});
RequestSignature.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
systemId = json['systemId'];
systemSecret = json['systemSecret'];
signature = json['signature'];
return this;
}
Map<String, dynamic> toJson() => {
'systemId': systemId,
'systemSecret': systemSecret,
'signature': signature
};
getTypeName() => "RequestSignature";
TypeContext? context = _ctx;
}
class EventSeatingFindAndReserveRequest implements IConvertible
{
int? eventId;
int? quantity;
int? sectionId;
String? reservationTokenId;
String? phoneVerificationNumber;
int? skipIndex;
String? deviceId;
int? requestUnixUTCTimeStamp;
RequestSignature? signature;
EventSeatingFindAndReserveRequest({this.eventId,this.quantity,this.sectionId,this.reservationTokenId,this.phoneVerificationNumber,this.skipIndex,this.deviceId,this.requestUnixUTCTimeStamp,this.signature});
EventSeatingFindAndReserveRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
eventId = json['eventId'];
quantity = json['quantity'];
sectionId = json['sectionId'];
reservationTokenId = json['reservationTokenId'];
phoneVerificationNumber = json['phoneVerificationNumber'];
skipIndex = json['skipIndex'];
deviceId = json['deviceId'];
requestUnixUTCTimeStamp = json['requestUnixUTCTimeStamp'];
signature = JsonConverters.fromJson(json['signature'],'RequestSignature',context!);
return this;
}
Map<String, dynamic> toJson() => {
'eventId': eventId,
'quantity': quantity,
'sectionId': sectionId,
'reservationTokenId': reservationTokenId,
'phoneVerificationNumber': phoneVerificationNumber,
'skipIndex': skipIndex,
'deviceId': deviceId,
'requestUnixUTCTimeStamp': requestUnixUTCTimeStamp,
'signature': JsonConverters.toJson(signature,'RequestSignature',context!)
};
getTypeName() => "EventSeatingFindAndReserveRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'FoundSeat': TypeInfo(TypeOf.Class, create:() => FoundSeat()),
'EventSeatingFindAndReserveResult': TypeInfo(TypeOf.Class, create:() => EventSeatingFindAndReserveResult()),
'List<FoundSeat>': TypeInfo(TypeOf.Class, create:() => <FoundSeat>[]),
'RequestSignature': TypeInfo(TypeOf.Class, create:() => RequestSignature()),
'EventSeatingFindAndReserveRequest': TypeInfo(TypeOf.Class, create:() => EventSeatingFindAndReserveRequest()),
});
Dart EventSeatingFindAndReserveRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /EventSeatingFindAndReserve HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<EventSeatingFindAndReserveRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<DeviceId>String</DeviceId>
<EventId>0</EventId>
<PhoneVerificationNumber>String</PhoneVerificationNumber>
<Quantity>0</Quantity>
<RequestUnixUTCTimeStamp>0</RequestUnixUTCTimeStamp>
<ReservationTokenId>String</ReservationTokenId>
<SectionId>0</SectionId>
<Signature>
<Signature>String</Signature>
<SystemId>String</SystemId>
<SystemSecret>String</SystemSecret>
</Signature>
<SkipIndex>0</SkipIndex>
</EventSeatingFindAndReserveRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<EventSeatingFindAndReserveResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Message>String</Message>
<ReservationTokenId>String</ReservationTokenId>
<Seats>
<FoundSeat>
<Id>0</Id>
<Name>String</Name>
<RowName>String</RowName>
<SectionId>0</SectionId>
<SectionName>String</SectionName>
</FoundSeat>
</Seats>
<StatusCode>0</StatusCode>
<TotalCandidates>0</TotalCandidates>
</EventSeatingFindAndReserveResult>