| 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;
String? discountCode;
double? totalDiscount;
double? totalAmountBeforeDiscount;
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,this.discountCode,this.totalDiscount,this.totalAmountBeforeDiscount});
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'];
discountCode = json['discountCode'];
totalDiscount = JsonConverters.toDouble(json['totalDiscount']);
totalAmountBeforeDiscount = JsonConverters.toDouble(json['totalAmountBeforeDiscount']);
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,
'discountCode': discountCode,
'totalDiscount': totalDiscount,
'totalAmountBeforeDiscount': totalAmountBeforeDiscount
};
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_app.azurewebsites.net', 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 .xml suffix or ?format=xml
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-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SplitTicketRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<TicketId>0</TicketId>
<TicketTokenId>String</TicketTokenId>
</SplitTicketRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<SplitTicketResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Message>String</Message>
<Result xmlns:d2p1="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel.Types">
<d2p1:Ticket>
<d2p1:Currency>String</d2p1:Currency>
<d2p1:DeviceId>String</d2p1:DeviceId>
<d2p1:DiscountCode>String</d2p1:DiscountCode>
<d2p1:EventId>0</d2p1:EventId>
<d2p1:FreeTicketCardId>0</d2p1:FreeTicketCardId>
<d2p1:FreeTicketCardTypeId>String</d2p1:FreeTicketCardTypeId>
<d2p1:FreeTicketFromId>String</d2p1:FreeTicketFromId>
<d2p1:FreeTicketFromTypeId>String</d2p1:FreeTicketFromTypeId>
<d2p1:ID>0</d2p1:ID>
<d2p1:IsFree>false</d2p1:IsFree>
<d2p1:LastTicketStatus>String</d2p1:LastTicketStatus>
<d2p1:MultipleScanCodes>false</d2p1:MultipleScanCodes>
<d2p1:OriginalPhoneVerificationNumber>String</d2p1:OriginalPhoneVerificationNumber>
<d2p1:PaymentId>String</d2p1:PaymentId>
<d2p1:PaymentMethodId>String</d2p1:PaymentMethodId>
<d2p1:PaymentPhoneNumber>String</d2p1:PaymentPhoneNumber>
<d2p1:PaymentReference>String</d2p1:PaymentReference>
<d2p1:PhoneVerificationId>0</d2p1:PhoneVerificationId>
<d2p1:PhoneVerificationNumber>String</d2p1:PhoneVerificationNumber>
<d2p1:ScanCode>String</d2p1:ScanCode>
<d2p1:ScanCodeNotActive>false</d2p1:ScanCodeNotActive>
<d2p1:ScanCodeType>String</d2p1:ScanCodeType>
<d2p1:SeatsReservationId>String</d2p1:SeatsReservationId>
<d2p1:TeamPassId>0</d2p1:TeamPassId>
<d2p1:TicketHasExpired>false</d2p1:TicketHasExpired>
<d2p1:TicketStatus>String</d2p1:TicketStatus>
<d2p1:TicketTokenId>String</d2p1:TicketTokenId>
<d2p1:TicketTransferredFrom>0</d2p1:TicketTransferredFrom>
<d2p1:TimeStampLastStatusChange>0001-01-01T00:00:00</d2p1:TimeStampLastStatusChange>
<d2p1:TimeStampOrdered>0001-01-01T00:00:00</d2p1:TimeStampOrdered>
<d2p1:TimestampActivated>0001-01-01T00:00:00</d2p1:TimestampActivated>
<d2p1:TimestampBought>0001-01-01T00:00:00</d2p1:TimestampBought>
<d2p1:TotalAmountBeforeDiscount>0</d2p1:TotalAmountBeforeDiscount>
<d2p1:TotalDiscount>0</d2p1:TotalDiscount>
<d2p1:TotalPaidForTicket>0</d2p1:TotalPaidForTicket>
<d2p1:UserAuthId>0</d2p1:UserAuthId>
<d2p1:UserId>0</d2p1:UserId>
</d2p1:Ticket>
</Result>
<StatusCode>0</StatusCode>
<Success>false</Success>
</SplitTicketResponse>