| POST | /selfService/transferTicket/availableSeats | Seats a buyer may pick for a seated exchange, grouped by section and row |
|---|
import 'package:servicestack/servicestack.dart';
class SelfServiceTransferResultBase implements IConvertible
{
bool? ok;
int? statusCode;
String? code;
String? message;
SelfServiceTransferResultBase({this.ok,this.statusCode,this.code,this.message});
SelfServiceTransferResultBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ok = json['ok'];
statusCode = json['statusCode'];
code = json['code'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'ok': ok,
'statusCode': statusCode,
'code': code,
'message': message
};
getTypeName() => "SelfServiceTransferResultBase";
TypeContext? context = _ctx;
}
class SelfServiceSeatOption implements IConvertible
{
int? seatId;
String? seatName;
String? label;
String? status;
bool? isSeat;
bool? selectable;
double? positionX;
double? positionY;
double? rotation;
double? sortOrder;
int? rowId;
String? rowName;
SelfServiceSeatOption({this.seatId,this.seatName,this.label,this.status,this.isSeat,this.selectable,this.positionX,this.positionY,this.rotation,this.sortOrder,this.rowId,this.rowName});
SelfServiceSeatOption.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
seatId = json['seatId'];
seatName = json['seatName'];
label = json['label'];
status = json['status'];
isSeat = json['isSeat'];
selectable = json['selectable'];
positionX = JsonConverters.toDouble(json['positionX']);
positionY = JsonConverters.toDouble(json['positionY']);
rotation = JsonConverters.toDouble(json['rotation']);
sortOrder = JsonConverters.toDouble(json['sortOrder']);
rowId = json['rowId'];
rowName = json['rowName'];
return this;
}
Map<String, dynamic> toJson() => {
'seatId': seatId,
'seatName': seatName,
'label': label,
'status': status,
'isSeat': isSeat,
'selectable': selectable,
'positionX': positionX,
'positionY': positionY,
'rotation': rotation,
'sortOrder': sortOrder,
'rowId': rowId,
'rowName': rowName
};
getTypeName() => "SelfServiceSeatOption";
TypeContext? context = _ctx;
}
class SelfServiceSeatSection implements IConvertible
{
int? sectionId;
String? sectionName;
double? positionX;
double? positionY;
double? rotation;
String? viewType;
List<SelfServiceSeatOption>? seats;
SelfServiceSeatSection({this.sectionId,this.sectionName,this.positionX,this.positionY,this.rotation,this.viewType,this.seats});
SelfServiceSeatSection.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
sectionId = json['sectionId'];
sectionName = json['sectionName'];
positionX = JsonConverters.toDouble(json['positionX']);
positionY = JsonConverters.toDouble(json['positionY']);
rotation = JsonConverters.toDouble(json['rotation']);
viewType = json['viewType'];
seats = JsonConverters.fromJson(json['seats'],'List<SelfServiceSeatOption>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'sectionId': sectionId,
'sectionName': sectionName,
'positionX': positionX,
'positionY': positionY,
'rotation': rotation,
'viewType': viewType,
'seats': JsonConverters.toJson(seats,'List<SelfServiceSeatOption>',context!)
};
getTypeName() => "SelfServiceSeatSection";
TypeContext? context = _ctx;
}
class SelfServiceAvailableSeatsResult extends SelfServiceTransferResultBase implements IConvertible
{
int? toEventId;
String? toTicketTypeName;
int? assignedSeatId;
String? assignedSeatLabel;
List<SelfServiceSeatSection>? sections;
int? totalSeats;
int? selectableSeats;
bool? truncated;
SelfServiceAvailableSeatsResult({this.toEventId,this.toTicketTypeName,this.assignedSeatId,this.assignedSeatLabel,this.sections,this.totalSeats,this.selectableSeats,this.truncated});
SelfServiceAvailableSeatsResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
toEventId = json['toEventId'];
toTicketTypeName = json['toTicketTypeName'];
assignedSeatId = json['assignedSeatId'];
assignedSeatLabel = json['assignedSeatLabel'];
sections = JsonConverters.fromJson(json['sections'],'List<SelfServiceSeatSection>',context!);
totalSeats = json['totalSeats'];
selectableSeats = json['selectableSeats'];
truncated = json['truncated'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'toEventId': toEventId,
'toTicketTypeName': toTicketTypeName,
'assignedSeatId': assignedSeatId,
'assignedSeatLabel': assignedSeatLabel,
'sections': JsonConverters.toJson(sections,'List<SelfServiceSeatSection>',context!),
'totalSeats': totalSeats,
'selectableSeats': selectableSeats,
'truncated': truncated
});
getTypeName() => "SelfServiceAvailableSeatsResult";
TypeContext? context = _ctx;
}
class SelfServiceAvailableSeatsRequest implements IConvertible
{
String? ticketTokenId;
String? buyerPhone;
int? toEventId;
int? toOwnerTicketTypeId;
int? toSeriesTicketTypeId;
SelfServiceAvailableSeatsRequest({this.ticketTokenId,this.buyerPhone,this.toEventId,this.toOwnerTicketTypeId,this.toSeriesTicketTypeId});
SelfServiceAvailableSeatsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ticketTokenId = json['ticketTokenId'];
buyerPhone = json['buyerPhone'];
toEventId = json['toEventId'];
toOwnerTicketTypeId = json['toOwnerTicketTypeId'];
toSeriesTicketTypeId = json['toSeriesTicketTypeId'];
return this;
}
Map<String, dynamic> toJson() => {
'ticketTokenId': ticketTokenId,
'buyerPhone': buyerPhone,
'toEventId': toEventId,
'toOwnerTicketTypeId': toOwnerTicketTypeId,
'toSeriesTicketTypeId': toSeriesTicketTypeId
};
getTypeName() => "SelfServiceAvailableSeatsRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'SelfServiceTransferResultBase': TypeInfo(TypeOf.Class, create:() => SelfServiceTransferResultBase()),
'SelfServiceSeatOption': TypeInfo(TypeOf.Class, create:() => SelfServiceSeatOption()),
'SelfServiceSeatSection': TypeInfo(TypeOf.Class, create:() => SelfServiceSeatSection()),
'List<SelfServiceSeatOption>': TypeInfo(TypeOf.Class, create:() => <SelfServiceSeatOption>[]),
'SelfServiceAvailableSeatsResult': TypeInfo(TypeOf.Class, create:() => SelfServiceAvailableSeatsResult()),
'List<SelfServiceSeatSection>': TypeInfo(TypeOf.Class, create:() => <SelfServiceSeatSection>[]),
'SelfServiceAvailableSeatsRequest': TypeInfo(TypeOf.Class, create:() => SelfServiceAvailableSeatsRequest()),
});
Dart SelfServiceAvailableSeatsRequest 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 /selfService/transferTicket/availableSeats HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ticketTokenId: String,
buyerPhone: String,
toEventId: 0,
toOwnerTicketTypeId: 0,
toSeriesTicketTypeId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
toEventId: 0,
toTicketTypeName: String,
assignedSeatId: 0,
assignedSeatLabel: String,
sections:
[
{
sectionId: 0,
sectionName: String,
positionX: 0,
positionY: 0,
rotation: 0,
viewType: String,
seats:
[
{
seatId: 0,
seatName: String,
label: String,
status: String,
isSeat: False,
selectable: False,
positionX: 0,
positionY: 0,
rotation: 0,
sortOrder: 0,
rowId: 0,
rowName: String
}
]
}
],
totalSeats: 0,
selectableSeats: 0,
truncated: False,
ok: False,
statusCode: 0,
code: String,
message: String
}