Requires any of the roles: | Admin, TeamAdmin, MobileApp | Requires the permission: | ReadData |
GET POST | /ticketOrder |
---|
import 'package:servicestack/servicestack.dart';
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 TicketHolderInfo implements IConvertible
{
String? name;
String? fullPhoneNumber;
String? holderId;
int? seatId;
String? seatDisplayString;
TicketHolderInfo({this.name,this.fullPhoneNumber,this.holderId,this.seatId,this.seatDisplayString});
TicketHolderInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
name = json['name'];
fullPhoneNumber = json['fullPhoneNumber'];
holderId = json['holderId'];
seatId = json['seatId'];
seatDisplayString = json['seatDisplayString'];
return this;
}
Map<String, dynamic> toJson() => {
'name': name,
'fullPhoneNumber': fullPhoneNumber,
'holderId': holderId,
'seatId': seatId,
'seatDisplayString': seatDisplayString
};
getTypeName() => "TicketHolderInfo";
TypeContext? context = _ctx;
}
class ExternalGateAccessCodeInfo implements IConvertible
{
String? code;
String? codeType;
String? codeUrl;
DateTime? validFrom;
DateTime? validTo;
ExternalGateAccessCodeInfo({this.code,this.codeType,this.codeUrl,this.validFrom,this.validTo});
ExternalGateAccessCodeInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
code = json['code'];
codeType = json['codeType'];
codeUrl = json['codeUrl'];
validFrom = JsonConverters.fromJson(json['validFrom'],'DateTime',context!);
validTo = JsonConverters.fromJson(json['validTo'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'code': code,
'codeType': codeType,
'codeUrl': codeUrl,
'validFrom': JsonConverters.toJson(validFrom,'DateTime',context!),
'validTo': JsonConverters.toJson(validTo,'DateTime',context!)
};
getTypeName() => "ExternalGateAccessCodeInfo";
TypeContext? context = _ctx;
}
class TicketDetailsInfo extends TicketDetails implements IConvertible
{
bool? holderInfoRequired;
bool? blockTransfer;
String? ticketTypeImageUrl;
List<TicketHolderInfo>? ticketHolders;
List<ExternalGateAccessCodeInfo>? gateAccessCodes;
TicketDetailsInfo({this.holderInfoRequired,this.blockTransfer,this.ticketTypeImageUrl,this.ticketHolders,this.gateAccessCodes});
TicketDetailsInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
holderInfoRequired = json['holderInfoRequired'];
blockTransfer = json['blockTransfer'];
ticketTypeImageUrl = json['ticketTypeImageUrl'];
ticketHolders = JsonConverters.fromJson(json['ticketHolders'],'List<TicketHolderInfo>',context!);
gateAccessCodes = JsonConverters.fromJson(json['gateAccessCodes'],'List<ExternalGateAccessCodeInfo>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'holderInfoRequired': holderInfoRequired,
'blockTransfer': blockTransfer,
'ticketTypeImageUrl': ticketTypeImageUrl,
'ticketHolders': JsonConverters.toJson(ticketHolders,'List<TicketHolderInfo>',context!),
'gateAccessCodes': JsonConverters.toJson(gateAccessCodes,'List<ExternalGateAccessCodeInfo>',context!)
});
getTypeName() => "TicketDetailsInfo";
TypeContext? context = _ctx;
}
class EventDetails implements IConvertible
{
int? id;
String? name;
String? description;
String? externalReference;
DateTime? timeOfEvent;
int? eventLocationId;
int? eventSeriesId;
int? eventOwnerId;
bool? eventActive;
String? eventOwnerName;
String? externalOwnerId;
String? teamAwayId;
String? teamAwayName;
String? eventSeriesName;
String? eventLocationName;
double? latitude;
double? longitude;
String? defaultValues;
String? externalReferenceType;
bool? eventSeriesActive;
String? allowedKsiCard;
String? seriesId;
bool? seriesShowByDefault;
bool? postponedNoDate;
String? awayTeamExternalId;
String? sportGenderId;
String? externalIdType;
bool? seriesEventSaleSuspended;
DateTime? seriesSaleSuspensionEventStartDate;
DateTime? seriesSaleSuspensionEventEndDate;
bool? saleIsActive;
bool? hideEvent;
String? imageUrl2;
String? directAccessCode;
String? imageUrl;
String? detailedDescription;
String? ownerImageUrl;
String? ownerImageUrl2;
bool? ownerCardsNotAllowed;
String? seatingImageUrl;
DateTime? endOfEvent;
DateTime? endOfEventUTC;
String? timeZone;
DateTime? timeOfEventUTC;
EventDetails({this.id,this.name,this.description,this.externalReference,this.timeOfEvent,this.eventLocationId,this.eventSeriesId,this.eventOwnerId,this.eventActive,this.eventOwnerName,this.externalOwnerId,this.teamAwayId,this.teamAwayName,this.eventSeriesName,this.eventLocationName,this.latitude,this.longitude,this.defaultValues,this.externalReferenceType,this.eventSeriesActive,this.allowedKsiCard,this.seriesId,this.seriesShowByDefault,this.postponedNoDate,this.awayTeamExternalId,this.sportGenderId,this.externalIdType,this.seriesEventSaleSuspended,this.seriesSaleSuspensionEventStartDate,this.seriesSaleSuspensionEventEndDate,this.saleIsActive,this.hideEvent,this.imageUrl2,this.directAccessCode,this.imageUrl,this.detailedDescription,this.ownerImageUrl,this.ownerImageUrl2,this.ownerCardsNotAllowed,this.seatingImageUrl,this.endOfEvent,this.endOfEventUTC,this.timeZone,this.timeOfEventUTC});
EventDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
description = json['description'];
externalReference = json['externalReference'];
timeOfEvent = JsonConverters.fromJson(json['timeOfEvent'],'DateTime',context!);
eventLocationId = json['eventLocationId'];
eventSeriesId = json['eventSeriesId'];
eventOwnerId = json['eventOwnerId'];
eventActive = json['eventActive'];
eventOwnerName = json['eventOwnerName'];
externalOwnerId = json['externalOwnerId'];
teamAwayId = json['teamAwayId'];
teamAwayName = json['teamAwayName'];
eventSeriesName = json['eventSeriesName'];
eventLocationName = json['eventLocationName'];
latitude = JsonConverters.toDouble(json['latitude']);
longitude = JsonConverters.toDouble(json['longitude']);
defaultValues = json['defaultValues'];
externalReferenceType = json['externalReferenceType'];
eventSeriesActive = json['eventSeriesActive'];
allowedKsiCard = json['allowedKsiCard'];
seriesId = json['seriesId'];
seriesShowByDefault = json['seriesShowByDefault'];
postponedNoDate = json['postponedNoDate'];
awayTeamExternalId = json['awayTeamExternalId'];
sportGenderId = json['sportGenderId'];
externalIdType = json['externalIdType'];
seriesEventSaleSuspended = json['seriesEventSaleSuspended'];
seriesSaleSuspensionEventStartDate = JsonConverters.fromJson(json['seriesSaleSuspensionEventStartDate'],'DateTime',context!);
seriesSaleSuspensionEventEndDate = JsonConverters.fromJson(json['seriesSaleSuspensionEventEndDate'],'DateTime',context!);
saleIsActive = json['saleIsActive'];
hideEvent = json['hideEvent'];
imageUrl2 = json['imageUrl2'];
directAccessCode = json['directAccessCode'];
imageUrl = json['imageUrl'];
detailedDescription = json['detailedDescription'];
ownerImageUrl = json['ownerImageUrl'];
ownerImageUrl2 = json['ownerImageUrl2'];
ownerCardsNotAllowed = json['ownerCardsNotAllowed'];
seatingImageUrl = json['seatingImageUrl'];
endOfEvent = JsonConverters.fromJson(json['endOfEvent'],'DateTime',context!);
endOfEventUTC = JsonConverters.fromJson(json['endOfEventUTC'],'DateTime',context!);
timeZone = json['timeZone'];
timeOfEventUTC = JsonConverters.fromJson(json['timeOfEventUTC'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'description': description,
'externalReference': externalReference,
'timeOfEvent': JsonConverters.toJson(timeOfEvent,'DateTime',context!),
'eventLocationId': eventLocationId,
'eventSeriesId': eventSeriesId,
'eventOwnerId': eventOwnerId,
'eventActive': eventActive,
'eventOwnerName': eventOwnerName,
'externalOwnerId': externalOwnerId,
'teamAwayId': teamAwayId,
'teamAwayName': teamAwayName,
'eventSeriesName': eventSeriesName,
'eventLocationName': eventLocationName,
'latitude': latitude,
'longitude': longitude,
'defaultValues': defaultValues,
'externalReferenceType': externalReferenceType,
'eventSeriesActive': eventSeriesActive,
'allowedKsiCard': allowedKsiCard,
'seriesId': seriesId,
'seriesShowByDefault': seriesShowByDefault,
'postponedNoDate': postponedNoDate,
'awayTeamExternalId': awayTeamExternalId,
'sportGenderId': sportGenderId,
'externalIdType': externalIdType,
'seriesEventSaleSuspended': seriesEventSaleSuspended,
'seriesSaleSuspensionEventStartDate': JsonConverters.toJson(seriesSaleSuspensionEventStartDate,'DateTime',context!),
'seriesSaleSuspensionEventEndDate': JsonConverters.toJson(seriesSaleSuspensionEventEndDate,'DateTime',context!),
'saleIsActive': saleIsActive,
'hideEvent': hideEvent,
'imageUrl2': imageUrl2,
'directAccessCode': directAccessCode,
'imageUrl': imageUrl,
'detailedDescription': detailedDescription,
'ownerImageUrl': ownerImageUrl,
'ownerImageUrl2': ownerImageUrl2,
'ownerCardsNotAllowed': ownerCardsNotAllowed,
'seatingImageUrl': seatingImageUrl,
'endOfEvent': JsonConverters.toJson(endOfEvent,'DateTime',context!),
'endOfEventUTC': JsonConverters.toJson(endOfEventUTC,'DateTime',context!),
'timeZone': timeZone,
'timeOfEventUTC': JsonConverters.toJson(timeOfEventUTC,'DateTime',context!)
};
getTypeName() => "EventDetails";
TypeContext? context = _ctx;
}
class EventTicketWithDetails implements IConvertible
{
Ticket? eventTicket;
List<TicketDetailsInfo>? eventTicketDetails;
EventDetails? eventInfo;
bool? eventIsToday;
bool? eventisLive;
int? minutesToEvent;
EventTicketWithDetails({this.eventTicket,this.eventTicketDetails,this.eventInfo,this.eventIsToday,this.eventisLive,this.minutesToEvent});
EventTicketWithDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
eventTicket = JsonConverters.fromJson(json['eventTicket'],'Ticket',context!);
eventTicketDetails = JsonConverters.fromJson(json['eventTicketDetails'],'List<TicketDetailsInfo>',context!);
eventInfo = JsonConverters.fromJson(json['eventInfo'],'EventDetails',context!);
eventIsToday = json['eventIsToday'];
eventisLive = json['eventisLive'];
minutesToEvent = json['minutesToEvent'];
return this;
}
Map<String, dynamic> toJson() => {
'eventTicket': JsonConverters.toJson(eventTicket,'Ticket',context!),
'eventTicketDetails': JsonConverters.toJson(eventTicketDetails,'List<TicketDetailsInfo>',context!),
'eventInfo': JsonConverters.toJson(eventInfo,'EventDetails',context!),
'eventIsToday': eventIsToday,
'eventisLive': eventisLive,
'minutesToEvent': minutesToEvent
};
getTypeName() => "EventTicketWithDetails";
TypeContext? context = _ctx;
}
class TicketOrderResult implements IConvertible
{
EventTicketWithDetails? ticketAndDetails;
int? statusCode;
String? message;
TicketOrderResult({this.ticketAndDetails,this.statusCode,this.message});
TicketOrderResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ticketAndDetails = JsonConverters.fromJson(json['ticketAndDetails'],'EventTicketWithDetails',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'ticketAndDetails': JsonConverters.toJson(ticketAndDetails,'EventTicketWithDetails',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "TicketOrderResult";
TypeContext? context = _ctx;
}
class TeamPassType implements IConvertible
{
int? id;
String? name;
double? price;
int? seriesId;
int? ownerId;
int? seriesTicketType;
int? seriesOwnerTicketType;
bool? isActive;
bool? onlyForTeamUse;
DateTime? timestampCreated;
DateTime? timestampLastChanged;
TeamPassType({this.id,this.name,this.price,this.seriesId,this.ownerId,this.seriesTicketType,this.seriesOwnerTicketType,this.isActive,this.onlyForTeamUse,this.timestampCreated,this.timestampLastChanged});
TeamPassType.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
price = JsonConverters.toDouble(json['price']);
seriesId = json['seriesId'];
ownerId = json['ownerId'];
seriesTicketType = json['seriesTicketType'];
seriesOwnerTicketType = json['seriesOwnerTicketType'];
isActive = json['isActive'];
onlyForTeamUse = json['onlyForTeamUse'];
timestampCreated = JsonConverters.fromJson(json['timestampCreated'],'DateTime',context!);
timestampLastChanged = JsonConverters.fromJson(json['timestampLastChanged'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'price': price,
'seriesId': seriesId,
'ownerId': ownerId,
'seriesTicketType': seriesTicketType,
'seriesOwnerTicketType': seriesOwnerTicketType,
'isActive': isActive,
'onlyForTeamUse': onlyForTeamUse,
'timestampCreated': JsonConverters.toJson(timestampCreated,'DateTime',context!),
'timestampLastChanged': JsonConverters.toJson(timestampLastChanged,'DateTime',context!)
};
getTypeName() => "TeamPassType";
TypeContext? context = _ctx;
}
class TicketHoldersList implements IConvertible
{
List<TicketHolderInfo>? ticketHolders;
bool? holderInfoRequired;
TicketHoldersList({this.ticketHolders,this.holderInfoRequired});
TicketHoldersList.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ticketHolders = JsonConverters.fromJson(json['ticketHolders'],'List<TicketHolderInfo>',context!);
holderInfoRequired = json['holderInfoRequired'];
return this;
}
Map<String, dynamic> toJson() => {
'ticketHolders': JsonConverters.toJson(ticketHolders,'List<TicketHolderInfo>',context!),
'holderInfoRequired': holderInfoRequired
};
getTypeName() => "TicketHoldersList";
TypeContext? context = _ctx;
}
class PaymentMethodCreditCardInfo implements IConvertible
{
String? paymentType;
String? token;
String? pan;
String? expYear;
String? expMonth;
String? cvc;
PaymentMethodCreditCardInfo({this.paymentType,this.token,this.pan,this.expYear,this.expMonth,this.cvc});
PaymentMethodCreditCardInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
paymentType = json['paymentType'];
token = json['token'];
pan = json['pan'];
expYear = json['expYear'];
expMonth = json['expMonth'];
cvc = json['cvc'];
return this;
}
Map<String, dynamic> toJson() => {
'paymentType': paymentType,
'token': token,
'pan': pan,
'expYear': expYear,
'expMonth': expMonth,
'cvc': cvc
};
getTypeName() => "PaymentMethodCreditCardInfo";
TypeContext? context = _ctx;
}
class PaymentRequestCreditCard implements IConvertible
{
PaymentMethodCreditCardInfo? paymentMethod;
double? amount;
String? currency;
String? orderId;
DateTime? transActionDate;
bool? saveCardToToken;
PaymentRequestCreditCard({this.paymentMethod,this.amount,this.currency,this.orderId,this.transActionDate,this.saveCardToToken});
PaymentRequestCreditCard.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
paymentMethod = JsonConverters.fromJson(json['paymentMethod'],'PaymentMethodCreditCardInfo',context!);
amount = JsonConverters.toDouble(json['amount']);
currency = json['currency'];
orderId = json['orderId'];
transActionDate = JsonConverters.fromJson(json['transActionDate'],'DateTime',context!);
saveCardToToken = json['saveCardToToken'];
return this;
}
Map<String, dynamic> toJson() => {
'paymentMethod': JsonConverters.toJson(paymentMethod,'PaymentMethodCreditCardInfo',context!),
'amount': amount,
'currency': currency,
'orderId': orderId,
'transActionDate': JsonConverters.toJson(transActionDate,'DateTime',context!),
'saveCardToToken': saveCardToToken
};
getTypeName() => "PaymentRequestCreditCard";
TypeContext? context = _ctx;
}
class RequestSignature implements IConvertible
{
String? systemId;
String? systemSecret;
String? signature;
RequestSignature({this.systemId,this.systemSecret,this.signature});
RequestSignature.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
systemId = json['systemId'];
systemSecret = json['systemSecret'];
signature = json['signature'];
return this;
}
Map<String, dynamic> toJson() => {
'systemId': systemId,
'systemSecret': systemSecret,
'signature': signature
};
getTypeName() => "RequestSignature";
TypeContext? context = _ctx;
}
class BorgunApplePayThreeDSecureInfo implements IConvertible
{
String? dataType;
String? securityLevelInd;
String? cavv;
String? ucaf;
BorgunApplePayThreeDSecureInfo({this.dataType,this.securityLevelInd,this.cavv,this.ucaf});
BorgunApplePayThreeDSecureInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
dataType = json['dataType'];
securityLevelInd = json['securityLevelInd'];
cavv = json['cavv'];
ucaf = json['ucaf'];
return this;
}
Map<String, dynamic> toJson() => {
'dataType': dataType,
'securityLevelInd': securityLevelInd,
'cavv': cavv,
'ucaf': ucaf
};
getTypeName() => "BorgunApplePayThreeDSecureInfo";
TypeContext? context = _ctx;
}
class BorgunApplePayFinalInfo implements IConvertible
{
String? orderId;
BorgunApplePayThreeDSecureInfo? threeDSecure;
BorgunApplePayFinalInfo({this.orderId,this.threeDSecure});
BorgunApplePayFinalInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
orderId = json['orderId'];
threeDSecure = JsonConverters.fromJson(json['threeDSecure'],'BorgunApplePayThreeDSecureInfo',context!);
return this;
}
Map<String, dynamic> toJson() => {
'orderId': orderId,
'threeDSecure': JsonConverters.toJson(threeDSecure,'BorgunApplePayThreeDSecureInfo',context!)
};
getTypeName() => "BorgunApplePayFinalInfo";
TypeContext? context = _ctx;
}
class Borgun3DFinalPaymentMethodInfo implements IConvertible
{
String? paymentType;
String? token;
Borgun3DFinalPaymentMethodInfo({this.paymentType,this.token});
Borgun3DFinalPaymentMethodInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
paymentType = json['paymentType'];
token = json['token'];
return this;
}
Map<String, dynamic> toJson() => {
'paymentType': paymentType,
'token': token
};
getTypeName() => "Borgun3DFinalPaymentMethodInfo";
TypeContext? context = _ctx;
}
class Borgun3DFinal3DSecureInfo implements IConvertible
{
String? dataType;
String? mpiToken;
Borgun3DFinal3DSecureInfo({this.dataType,this.mpiToken});
Borgun3DFinal3DSecureInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
dataType = json['dataType'];
mpiToken = json['mpiToken'];
return this;
}
Map<String, dynamic> toJson() => {
'dataType': dataType,
'mpiToken': mpiToken
};
getTypeName() => "Borgun3DFinal3DSecureInfo";
TypeContext? context = _ctx;
}
class Borgun3DFinalRequest implements IConvertible
{
String? transactionType;
int? amount;
String? currency;
DateTime? transactionDate;
String? orderId;
Borgun3DFinalPaymentMethodInfo? paymentMethod;
Borgun3DFinal3DSecureInfo? threeDSecure;
Borgun3DFinalRequest({this.transactionType,this.amount,this.currency,this.transactionDate,this.orderId,this.paymentMethod,this.threeDSecure});
Borgun3DFinalRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
transactionType = json['transactionType'];
amount = json['amount'];
currency = json['currency'];
transactionDate = JsonConverters.fromJson(json['transactionDate'],'DateTime',context!);
orderId = json['orderId'];
paymentMethod = JsonConverters.fromJson(json['paymentMethod'],'Borgun3DFinalPaymentMethodInfo',context!);
threeDSecure = JsonConverters.fromJson(json['threeDSecure'],'Borgun3DFinal3DSecureInfo',context!);
return this;
}
Map<String, dynamic> toJson() => {
'transactionType': transactionType,
'amount': amount,
'currency': currency,
'transactionDate': JsonConverters.toJson(transactionDate,'DateTime',context!),
'orderId': orderId,
'paymentMethod': JsonConverters.toJson(paymentMethod,'Borgun3DFinalPaymentMethodInfo',context!),
'threeDSecure': JsonConverters.toJson(threeDSecure,'Borgun3DFinal3DSecureInfo',context!)
};
getTypeName() => "Borgun3DFinalRequest";
TypeContext? context = _ctx;
}
class TicketOrder implements IConvertible
{
TeamPassType? teamPass;
Ticket? order;
List<TicketDetails>? orderDetails;
TicketHoldersList? ticketHolders;
String? seatReservationTokenId;
PaymentRequestCreditCard? cardInfo;
String? paymentPhoneNumber;
int? paymentCardId;
int? requestUnixUTCTimeStamp;
RequestSignature? signature;
String? phoneVerificationNumber;
String? deviceId;
bool? dontReturnTickets;
String? appMetaData;
BorgunApplePayFinalInfo? applePayInfo;
Borgun3DFinalRequest? borgun3DFinalInfo;
TicketOrder({this.teamPass,this.order,this.orderDetails,this.ticketHolders,this.seatReservationTokenId,this.cardInfo,this.paymentPhoneNumber,this.paymentCardId,this.requestUnixUTCTimeStamp,this.signature,this.phoneVerificationNumber,this.deviceId,this.dontReturnTickets,this.appMetaData,this.applePayInfo,this.borgun3DFinalInfo});
TicketOrder.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
teamPass = JsonConverters.fromJson(json['teamPass'],'TeamPassType',context!);
order = JsonConverters.fromJson(json['order'],'Ticket',context!);
orderDetails = JsonConverters.fromJson(json['orderDetails'],'List<TicketDetails>',context!);
ticketHolders = JsonConverters.fromJson(json['ticketHolders'],'TicketHoldersList',context!);
seatReservationTokenId = json['seatReservationTokenId'];
cardInfo = JsonConverters.fromJson(json['cardInfo'],'PaymentRequestCreditCard',context!);
paymentPhoneNumber = json['paymentPhoneNumber'];
paymentCardId = json['paymentCardId'];
requestUnixUTCTimeStamp = json['requestUnixUTCTimeStamp'];
signature = JsonConverters.fromJson(json['signature'],'RequestSignature',context!);
phoneVerificationNumber = json['phoneVerificationNumber'];
deviceId = json['deviceId'];
dontReturnTickets = json['dontReturnTickets'];
appMetaData = json['appMetaData'];
applePayInfo = JsonConverters.fromJson(json['applePayInfo'],'BorgunApplePayFinalInfo',context!);
borgun3DFinalInfo = JsonConverters.fromJson(json['borgun3DFinalInfo'],'Borgun3DFinalRequest',context!);
return this;
}
Map<String, dynamic> toJson() => {
'teamPass': JsonConverters.toJson(teamPass,'TeamPassType',context!),
'order': JsonConverters.toJson(order,'Ticket',context!),
'orderDetails': JsonConverters.toJson(orderDetails,'List<TicketDetails>',context!),
'ticketHolders': JsonConverters.toJson(ticketHolders,'TicketHoldersList',context!),
'seatReservationTokenId': seatReservationTokenId,
'cardInfo': JsonConverters.toJson(cardInfo,'PaymentRequestCreditCard',context!),
'paymentPhoneNumber': paymentPhoneNumber,
'paymentCardId': paymentCardId,
'requestUnixUTCTimeStamp': requestUnixUTCTimeStamp,
'signature': JsonConverters.toJson(signature,'RequestSignature',context!),
'phoneVerificationNumber': phoneVerificationNumber,
'deviceId': deviceId,
'dontReturnTickets': dontReturnTickets,
'appMetaData': appMetaData,
'applePayInfo': JsonConverters.toJson(applePayInfo,'BorgunApplePayFinalInfo',context!),
'borgun3DFinalInfo': JsonConverters.toJson(borgun3DFinalInfo,'Borgun3DFinalRequest',context!)
};
getTypeName() => "TicketOrder";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
'Ticket': TypeInfo(TypeOf.Class, create:() => Ticket()),
'TicketDetails': TypeInfo(TypeOf.Class, create:() => TicketDetails()),
'TicketHolderInfo': TypeInfo(TypeOf.Class, create:() => TicketHolderInfo()),
'ExternalGateAccessCodeInfo': TypeInfo(TypeOf.Class, create:() => ExternalGateAccessCodeInfo()),
'TicketDetailsInfo': TypeInfo(TypeOf.Class, create:() => TicketDetailsInfo()),
'List<TicketHolderInfo>': TypeInfo(TypeOf.Class, create:() => <TicketHolderInfo>[]),
'List<ExternalGateAccessCodeInfo>': TypeInfo(TypeOf.Class, create:() => <ExternalGateAccessCodeInfo>[]),
'EventDetails': TypeInfo(TypeOf.Class, create:() => EventDetails()),
'EventTicketWithDetails': TypeInfo(TypeOf.Class, create:() => EventTicketWithDetails()),
'List<TicketDetailsInfo>': TypeInfo(TypeOf.Class, create:() => <TicketDetailsInfo>[]),
'TicketOrderResult': TypeInfo(TypeOf.Class, create:() => TicketOrderResult()),
'TeamPassType': TypeInfo(TypeOf.Class, create:() => TeamPassType()),
'TicketHoldersList': TypeInfo(TypeOf.Class, create:() => TicketHoldersList()),
'PaymentMethodCreditCardInfo': TypeInfo(TypeOf.Class, create:() => PaymentMethodCreditCardInfo()),
'PaymentRequestCreditCard': TypeInfo(TypeOf.Class, create:() => PaymentRequestCreditCard()),
'RequestSignature': TypeInfo(TypeOf.Class, create:() => RequestSignature()),
'BorgunApplePayThreeDSecureInfo': TypeInfo(TypeOf.Class, create:() => BorgunApplePayThreeDSecureInfo()),
'BorgunApplePayFinalInfo': TypeInfo(TypeOf.Class, create:() => BorgunApplePayFinalInfo()),
'Borgun3DFinalPaymentMethodInfo': TypeInfo(TypeOf.Class, create:() => Borgun3DFinalPaymentMethodInfo()),
'Borgun3DFinal3DSecureInfo': TypeInfo(TypeOf.Class, create:() => Borgun3DFinal3DSecureInfo()),
'Borgun3DFinalRequest': TypeInfo(TypeOf.Class, create:() => Borgun3DFinalRequest()),
'TicketOrder': TypeInfo(TypeOf.Class, create:() => TicketOrder()),
'List<TicketDetails>': TypeInfo(TypeOf.Class, create:() => <TicketDetails>[]),
});
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 /ticketOrder HTTP/1.1
Host: stubbur-autoupdates-live.smartnewapis.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
teamPass:
{
id: 0,
name: String,
price: 0,
seriesId: 0,
ownerId: 0,
seriesTicketType: 0,
seriesOwnerTicketType: 0,
isActive: False,
onlyForTeamUse: False,
timestampCreated: 0001-01-01,
timestampLastChanged: 0001-01-01
},
order:
{
id: 0,
userId: 0,
userAuthId: 0,
eventId: 0,
timestampBought: 0001-01-01,
timestampActivated: 0001-01-01,
timeStampOrdered: 0001-01-01,
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-01,
lastTicketStatus: String,
scanCode: String,
scanCodeType: String,
scanCodeNotActive: False,
multipleScanCodes: False,
currency: String,
ticketHasExpired: False
},
orderDetails:
[
{
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-01,
currency: String
}
],
ticketHolders:
{
ticketHolders:
[
{
name: String,
fullPhoneNumber: String,
holderId: String,
seatId: 0,
seatDisplayString: String
}
],
holderInfoRequired: False
},
seatReservationTokenId: String,
cardInfo:
{
paymentMethod:
{
paymentType: String,
token: String,
pan: String,
expYear: String,
expMonth: String,
cvc: String
},
amount: 0,
currency: String,
orderId: String,
transActionDate: 0001-01-01,
saveCardToToken: False
},
paymentPhoneNumber: String,
paymentCardId: 0,
requestUnixUTCTimeStamp: 0,
signature:
{
systemId: String,
systemSecret: String,
signature: String
},
phoneVerificationNumber: String,
deviceId: String,
dontReturnTickets: False,
appMetaData: String,
applePayInfo:
{
orderId: String,
threeDSecure:
{
dataType: String,
securityLevelInd: String,
cavv: String,
ucaf: String
}
},
borgun3DFinalInfo:
{
transactionType: String,
amount: 0,
currency: String,
transactionDate: 0001-01-01,
orderId: String,
paymentMethod:
{
paymentType: String,
token: String
},
threeDSecure:
{
dataType: String,
mpiToken: String
}
}
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { ticketAndDetails: { eventTicket: { id: 0, userId: 0, userAuthId: 0, eventId: 0, timestampBought: 0001-01-01, timestampActivated: 0001-01-01, timeStampOrdered: 0001-01-01, 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-01, lastTicketStatus: String, scanCode: String, scanCodeType: String, scanCodeNotActive: False, multipleScanCodes: False, currency: String, ticketHasExpired: False }, eventTicketDetails: [ { } ], eventInfo: { id: 0, name: String, description: String, externalReference: String, timeOfEvent: 0001-01-01, eventLocationId: 0, eventSeriesId: 0, eventOwnerId: 0, eventActive: False, eventOwnerName: String, externalOwnerId: String, teamAwayId: String, teamAwayName: String, eventSeriesName: String, eventLocationName: String, latitude: 0, longitude: 0, defaultValues: String, externalReferenceType: String, eventSeriesActive: False, allowedKsiCard: String, seriesId: String, seriesShowByDefault: False, postponedNoDate: False, awayTeamExternalId: String, sportGenderId: String, externalIdType: String, seriesEventSaleSuspended: False, seriesSaleSuspensionEventStartDate: 0001-01-01, seriesSaleSuspensionEventEndDate: 0001-01-01, saleIsActive: False, hideEvent: False, imageUrl2: String, directAccessCode: String, imageUrl: String, detailedDescription: String, ownerImageUrl: String, ownerImageUrl2: String, ownerCardsNotAllowed: False, seatingImageUrl: String, endOfEvent: 0001-01-01, endOfEventUTC: 0001-01-01, timeZone: String, timeOfEventUTC: 0001-01-01 }, eventIsToday: False, eventisLive: False, minutesToEvent: 0 }, statusCode: 0, message: String }