Requires any of the roles: | Admin, TeamAdmin, MobileApp | Requires the permission: | ReadData |
GET POST | /ticketSplit/{TicketTokenId} |
---|
import 'package:servicestack/servicestack.dart';
class SplitTicketRequest implements IConvertible
{
int? ticketId;
String? ticketTokenId;
SplitTicketRequest({this.ticketId,this.ticketTokenId});
SplitTicketRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ticketId = json['ticketId'];
ticketTokenId = json['ticketTokenId'];
return this;
}
Map<String, dynamic> toJson() => {
'ticketId': ticketId,
'ticketTokenId': ticketTokenId
};
getTypeName() => "SplitTicketRequest";
TypeContext? context = _ctx;
}
class Ticket implements IConvertible
{
int? id;
int? userId;
int? userAuthId;
int? eventId;
DateTime? timestampBought;
DateTime? timestampActivated;
DateTime? timeStampOrdered;
String? deviceId;
int? phoneVerificationId;
String? paymentMethodId;
String? paymentReference;
String? ticketStatus;
String? phoneVerificationNumber;
String? ticketTokenId;
String? paymentPhoneNumber;
int? ticketTransferredFrom;
String? originalPhoneVerificationNumber;
int? teamPassId;
String? paymentId;
bool? isFree;
String? freeTicketFromId;
String? freeTicketFromTypeId;
String? freeTicketCardTypeId;
int? freeTicketCardId;
double? totalPaidForTicket;
String? seatsReservationId;
DateTime? timeStampLastStatusChange;
String? lastTicketStatus;
String? scanCode;
String? scanCodeType;
bool? scanCodeNotActive;
bool? multipleScanCodes;
String? currency;
bool? ticketHasExpired;
Ticket({this.id,this.userId,this.userAuthId,this.eventId,this.timestampBought,this.timestampActivated,this.timeStampOrdered,this.deviceId,this.phoneVerificationId,this.paymentMethodId,this.paymentReference,this.ticketStatus,this.phoneVerificationNumber,this.ticketTokenId,this.paymentPhoneNumber,this.ticketTransferredFrom,this.originalPhoneVerificationNumber,this.teamPassId,this.paymentId,this.isFree,this.freeTicketFromId,this.freeTicketFromTypeId,this.freeTicketCardTypeId,this.freeTicketCardId,this.totalPaidForTicket,this.seatsReservationId,this.timeStampLastStatusChange,this.lastTicketStatus,this.scanCode,this.scanCodeType,this.scanCodeNotActive,this.multipleScanCodes,this.currency,this.ticketHasExpired});
Ticket.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
userId = json['userId'];
userAuthId = json['userAuthId'];
eventId = json['eventId'];
timestampBought = JsonConverters.fromJson(json['timestampBought'],'DateTime',context!);
timestampActivated = JsonConverters.fromJson(json['timestampActivated'],'DateTime',context!);
timeStampOrdered = JsonConverters.fromJson(json['timeStampOrdered'],'DateTime',context!);
deviceId = json['deviceId'];
phoneVerificationId = json['phoneVerificationId'];
paymentMethodId = json['paymentMethodId'];
paymentReference = json['paymentReference'];
ticketStatus = json['ticketStatus'];
phoneVerificationNumber = json['phoneVerificationNumber'];
ticketTokenId = json['ticketTokenId'];
paymentPhoneNumber = json['paymentPhoneNumber'];
ticketTransferredFrom = json['ticketTransferredFrom'];
originalPhoneVerificationNumber = json['originalPhoneVerificationNumber'];
teamPassId = json['teamPassId'];
paymentId = json['paymentId'];
isFree = json['isFree'];
freeTicketFromId = json['freeTicketFromId'];
freeTicketFromTypeId = json['freeTicketFromTypeId'];
freeTicketCardTypeId = json['freeTicketCardTypeId'];
freeTicketCardId = json['freeTicketCardId'];
totalPaidForTicket = JsonConverters.toDouble(json['totalPaidForTicket']);
seatsReservationId = json['seatsReservationId'];
timeStampLastStatusChange = JsonConverters.fromJson(json['timeStampLastStatusChange'],'DateTime',context!);
lastTicketStatus = json['lastTicketStatus'];
scanCode = json['scanCode'];
scanCodeType = json['scanCodeType'];
scanCodeNotActive = json['scanCodeNotActive'];
multipleScanCodes = json['multipleScanCodes'];
currency = json['currency'];
ticketHasExpired = json['ticketHasExpired'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'userId': userId,
'userAuthId': userAuthId,
'eventId': eventId,
'timestampBought': JsonConverters.toJson(timestampBought,'DateTime',context!),
'timestampActivated': JsonConverters.toJson(timestampActivated,'DateTime',context!),
'timeStampOrdered': JsonConverters.toJson(timeStampOrdered,'DateTime',context!),
'deviceId': deviceId,
'phoneVerificationId': phoneVerificationId,
'paymentMethodId': paymentMethodId,
'paymentReference': paymentReference,
'ticketStatus': ticketStatus,
'phoneVerificationNumber': phoneVerificationNumber,
'ticketTokenId': ticketTokenId,
'paymentPhoneNumber': paymentPhoneNumber,
'ticketTransferredFrom': ticketTransferredFrom,
'originalPhoneVerificationNumber': originalPhoneVerificationNumber,
'teamPassId': teamPassId,
'paymentId': paymentId,
'isFree': isFree,
'freeTicketFromId': freeTicketFromId,
'freeTicketFromTypeId': freeTicketFromTypeId,
'freeTicketCardTypeId': freeTicketCardTypeId,
'freeTicketCardId': freeTicketCardId,
'totalPaidForTicket': totalPaidForTicket,
'seatsReservationId': seatsReservationId,
'timeStampLastStatusChange': JsonConverters.toJson(timeStampLastStatusChange,'DateTime',context!),
'lastTicketStatus': lastTicketStatus,
'scanCode': scanCode,
'scanCodeType': scanCodeType,
'scanCodeNotActive': scanCodeNotActive,
'multipleScanCodes': multipleScanCodes,
'currency': currency,
'ticketHasExpired': ticketHasExpired
};
getTypeName() => "Ticket";
TypeContext? context = _ctx;
}
class SplitTicketResponse implements IConvertible
{
int? statusCode;
bool? success;
String? message;
List<Ticket>? result;
SplitTicketResponse({this.statusCode,this.success,this.message,this.result});
SplitTicketResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
statusCode = json['statusCode'];
success = json['success'];
message = json['message'];
result = JsonConverters.fromJson(json['result'],'List<Ticket>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'statusCode': statusCode,
'success': success,
'message': message,
'result': JsonConverters.toJson(result,'List<Ticket>',context!)
};
getTypeName() => "SplitTicketResponse";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
'SplitTicketRequest': TypeInfo(TypeOf.Class, create:() => SplitTicketRequest()),
'Ticket': TypeInfo(TypeOf.Class, create:() => Ticket()),
'SplitTicketResponse': TypeInfo(TypeOf.Class, create:() => SplitTicketResponse()),
'List<Ticket>': TypeInfo(TypeOf.Class, create:() => <Ticket>[]),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /ticketSplit/{TicketTokenId} HTTP/1.1
Host: stubbur-autoupdates-live.smartnewapis.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ticketId":0,"ticketTokenId":"String"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"statusCode":0,"success":false,"message":"String","result":[{"id":0,"userId":0,"userAuthId":0,"eventId":0,"timestampBought":"0001-01-01T00:00:00.0000000","timestampActivated":"0001-01-01T00:00:00.0000000","timeStampOrdered":"0001-01-01T00:00:00.0000000","deviceId":"String","phoneVerificationId":0,"paymentMethodId":"String","paymentReference":"String","ticketStatus":"String","phoneVerificationNumber":"String","ticketTokenId":"String","paymentPhoneNumber":"String","ticketTransferredFrom":0,"originalPhoneVerificationNumber":"String","teamPassId":0,"paymentId":"String","isFree":false,"freeTicketFromId":"String","freeTicketFromTypeId":"String","freeTicketCardTypeId":"String","freeTicketCardId":0,"totalPaidForTicket":0,"seatsReservationId":"String","timeStampLastStatusChange":"0001-01-01T00:00:00.0000000","lastTicketStatus":"String","scanCode":"String","scanCodeType":"String","scanCodeNotActive":false,"multipleScanCodes":false,"currency":"String","ticketHasExpired":false}]}