Requires any of the roles: | Admin, TeamAdmin, MobileApp | Requires the permission: | ReadData |
POST | /TransferTicket |
---|
import 'package:servicestack/servicestack.dart';
class TransferTicketResult implements IConvertible
{
int? statusCode;
String? message;
TransferTicketResult({this.statusCode,this.message});
TransferTicketResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'statusCode': statusCode,
'message': message
};
getTypeName() => "TransferTicketResult";
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 TicketDetails implements IConvertible
{
int? id;
int? ticketId;
int? eventSeriesTicketType;
int? eventSeriesOwnerTicketType;
double? ticketPrice;
double? totalPrice;
int? count;
String? ticketColor;
bool? showUsedTickets;
String? ticketName;
String? ticketDisplayString;
int? ticketDetailsTransferredFrom;
int? teamPassId;
bool? isSpecialTicket;
String? specialTicketId;
bool? justChangedBySQL;
DateTime? sqlJustChangedTimeStamp;
String? currency;
TicketDetails({this.id,this.ticketId,this.eventSeriesTicketType,this.eventSeriesOwnerTicketType,this.ticketPrice,this.totalPrice,this.count,this.ticketColor,this.showUsedTickets,this.ticketName,this.ticketDisplayString,this.ticketDetailsTransferredFrom,this.teamPassId,this.isSpecialTicket,this.specialTicketId,this.justChangedBySQL,this.sqlJustChangedTimeStamp,this.currency});
TicketDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
ticketId = json['ticketId'];
eventSeriesTicketType = json['eventSeriesTicketType'];
eventSeriesOwnerTicketType = json['eventSeriesOwnerTicketType'];
ticketPrice = JsonConverters.toDouble(json['ticketPrice']);
totalPrice = JsonConverters.toDouble(json['totalPrice']);
count = json['count'];
ticketColor = json['ticketColor'];
showUsedTickets = json['showUsedTickets'];
ticketName = json['ticketName'];
ticketDisplayString = json['ticketDisplayString'];
ticketDetailsTransferredFrom = json['ticketDetailsTransferredFrom'];
teamPassId = json['teamPassId'];
isSpecialTicket = json['isSpecialTicket'];
specialTicketId = json['specialTicketId'];
justChangedBySQL = json['justChangedBySQL'];
sqlJustChangedTimeStamp = JsonConverters.fromJson(json['sqlJustChangedTimeStamp'],'DateTime',context!);
currency = json['currency'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'ticketId': ticketId,
'eventSeriesTicketType': eventSeriesTicketType,
'eventSeriesOwnerTicketType': eventSeriesOwnerTicketType,
'ticketPrice': ticketPrice,
'totalPrice': totalPrice,
'count': count,
'ticketColor': ticketColor,
'showUsedTickets': showUsedTickets,
'ticketName': ticketName,
'ticketDisplayString': ticketDisplayString,
'ticketDetailsTransferredFrom': ticketDetailsTransferredFrom,
'teamPassId': teamPassId,
'isSpecialTicket': isSpecialTicket,
'specialTicketId': specialTicketId,
'justChangedBySQL': justChangedBySQL,
'sqlJustChangedTimeStamp': JsonConverters.toJson(sqlJustChangedTimeStamp,'DateTime',context!),
'currency': currency
};
getTypeName() => "TicketDetails";
TypeContext? context = _ctx;
}
class TransferTicketRequest implements IConvertible
{
String? transferFromPhoneVerificationNumber;
String? transferFromDeviceId;
String? transferToPhoneVerificationNumber;
Ticket? eventTicket;
List<TicketDetails>? eventTicketDetails;
TransferTicketRequest({this.transferFromPhoneVerificationNumber,this.transferFromDeviceId,this.transferToPhoneVerificationNumber,this.eventTicket,this.eventTicketDetails});
TransferTicketRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
transferFromPhoneVerificationNumber = json['transferFromPhoneVerificationNumber'];
transferFromDeviceId = json['transferFromDeviceId'];
transferToPhoneVerificationNumber = json['transferToPhoneVerificationNumber'];
eventTicket = JsonConverters.fromJson(json['eventTicket'],'Ticket',context!);
eventTicketDetails = JsonConverters.fromJson(json['eventTicketDetails'],'List<TicketDetails>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'transferFromPhoneVerificationNumber': transferFromPhoneVerificationNumber,
'transferFromDeviceId': transferFromDeviceId,
'transferToPhoneVerificationNumber': transferToPhoneVerificationNumber,
'eventTicket': JsonConverters.toJson(eventTicket,'Ticket',context!),
'eventTicketDetails': JsonConverters.toJson(eventTicketDetails,'List<TicketDetails>',context!)
};
getTypeName() => "TransferTicketRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
'TransferTicketResult': TypeInfo(TypeOf.Class, create:() => TransferTicketResult()),
'Ticket': TypeInfo(TypeOf.Class, create:() => Ticket()),
'TicketDetails': TypeInfo(TypeOf.Class, create:() => TicketDetails()),
'TransferTicketRequest': TypeInfo(TypeOf.Class, create:() => TransferTicketRequest()),
'List<TicketDetails>': TypeInfo(TypeOf.Class, create:() => <TicketDetails>[]),
});
Dart TransferTicketRequest DTOs
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 /TransferTicket HTTP/1.1
Host: stubbur-autoupdates-live.smartnewapis.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"transferFromPhoneVerificationNumber":"String","transferFromDeviceId":"String","transferToPhoneVerificationNumber":"String","eventTicket":{"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},"eventTicketDetails":[{"id":0,"ticketId":0,"eventSeriesTicketType":0,"eventSeriesOwnerTicketType":0,"ticketPrice":0,"totalPrice":0,"count":0,"ticketColor":"String","showUsedTickets":false,"ticketName":"String","ticketDisplayString":"String","ticketDetailsTransferredFrom":0,"teamPassId":0,"isSpecialTicket":false,"specialTicketId":"String","justChangedBySQL":false,"sqlJustChangedTimeStamp":"0001-01-01T00:00:00.0000000","currency":"String"}]}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"statusCode":0,"message":"String"}