| 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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<SelfServiceAvailableSeatsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<BuyerPhone>String</BuyerPhone>
<TicketTokenId>String</TicketTokenId>
<ToEventId>0</ToEventId>
<ToOwnerTicketTypeId>0</ToOwnerTicketTypeId>
<ToSeriesTicketTypeId>0</ToSeriesTicketTypeId>
</SelfServiceAvailableSeatsRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<SelfServiceAvailableSeatsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Code>String</Code>
<Message>String</Message>
<Ok>false</Ok>
<StatusCode>0</StatusCode>
<AssignedSeatId>0</AssignedSeatId>
<AssignedSeatLabel>String</AssignedSeatLabel>
<Sections>
<SelfServiceSeatSection>
<PositionX>0</PositionX>
<PositionY>0</PositionY>
<Rotation>0</Rotation>
<Seats>
<SelfServiceSeatOption>
<IsSeat>false</IsSeat>
<Label>String</Label>
<PositionX>0</PositionX>
<PositionY>0</PositionY>
<Rotation>0</Rotation>
<RowId>0</RowId>
<RowName>String</RowName>
<SeatId>0</SeatId>
<SeatName>String</SeatName>
<Selectable>false</Selectable>
<SortOrder>0</SortOrder>
<Status>String</Status>
</SelfServiceSeatOption>
</Seats>
<SectionId>0</SectionId>
<SectionName>String</SectionName>
<ViewType>String</ViewType>
</SelfServiceSeatSection>
</Sections>
<SelectableSeats>0</SelectableSeats>
<ToEventId>0</ToEventId>
<ToTicketTypeName>String</ToTicketTypeName>
<TotalSeats>0</TotalSeats>
<Truncated>false</Truncated>
</SelfServiceAvailableSeatsResult>