Requires any of the roles: | Admin, TeamAdmin, MobileApp, Admin, TeamAdmin, MobileApp | Required permissions: | Tickets.Add, Tickets.Add |
GET PUT POST | /ownerTicketType | Add or change Tickets for Series | TicketId only when changing (PUT) |
---|
import 'package:servicestack/servicestack.dart';
class EventSeriesOwnerTicketType implements IConvertible
{
int? id;
String? name;
double? defaultPrice;
int? seriesId;
int? ownerId;
int? ticketTypeListOrder;
bool? isActive;
int? maxTickets;
String? ticketColor;
bool? showUsedTickets;
bool? canOnlyBeBoughtWithTeamPass;
bool? isSpecialTicket;
String? specialTicketId;
bool? onlyForKsi;
DateTime? timestampCreated;
DateTime? timestampLastChanged;
bool? ticketsForSalePerEvent;
String? imageUrl;
bool? holderInfoRequired;
int? eventSeriesOwnerSeatingSectionId;
bool? canOnlyBeBought;
bool? canNotBeBought;
bool? blockTransfer;
int? maxTicketsPerTransaction;
bool? forceSingleTickets;
int? onlyForEvent;
String? currency;
EventSeriesOwnerTicketType({this.id,this.name,this.defaultPrice,this.seriesId,this.ownerId,this.ticketTypeListOrder,this.isActive,this.maxTickets,this.ticketColor,this.showUsedTickets,this.canOnlyBeBoughtWithTeamPass,this.isSpecialTicket,this.specialTicketId,this.onlyForKsi,this.timestampCreated,this.timestampLastChanged,this.ticketsForSalePerEvent,this.imageUrl,this.holderInfoRequired,this.eventSeriesOwnerSeatingSectionId,this.canOnlyBeBought,this.canNotBeBought,this.blockTransfer,this.maxTicketsPerTransaction,this.forceSingleTickets,this.onlyForEvent,this.currency});
EventSeriesOwnerTicketType.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
defaultPrice = JsonConverters.toDouble(json['defaultPrice']);
seriesId = json['seriesId'];
ownerId = json['ownerId'];
ticketTypeListOrder = json['ticketTypeListOrder'];
isActive = json['isActive'];
maxTickets = json['maxTickets'];
ticketColor = json['ticketColor'];
showUsedTickets = json['showUsedTickets'];
canOnlyBeBoughtWithTeamPass = json['canOnlyBeBoughtWithTeamPass'];
isSpecialTicket = json['isSpecialTicket'];
specialTicketId = json['specialTicketId'];
onlyForKsi = json['onlyForKsi'];
timestampCreated = JsonConverters.fromJson(json['timestampCreated'],'DateTime',context!);
timestampLastChanged = JsonConverters.fromJson(json['timestampLastChanged'],'DateTime',context!);
ticketsForSalePerEvent = json['ticketsForSalePerEvent'];
imageUrl = json['imageUrl'];
holderInfoRequired = json['holderInfoRequired'];
eventSeriesOwnerSeatingSectionId = json['eventSeriesOwnerSeatingSectionId'];
canOnlyBeBought = json['canOnlyBeBought'];
canNotBeBought = json['canNotBeBought'];
blockTransfer = json['blockTransfer'];
maxTicketsPerTransaction = json['maxTicketsPerTransaction'];
forceSingleTickets = json['forceSingleTickets'];
onlyForEvent = json['onlyForEvent'];
currency = json['currency'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'defaultPrice': defaultPrice,
'seriesId': seriesId,
'ownerId': ownerId,
'ticketTypeListOrder': ticketTypeListOrder,
'isActive': isActive,
'maxTickets': maxTickets,
'ticketColor': ticketColor,
'showUsedTickets': showUsedTickets,
'canOnlyBeBoughtWithTeamPass': canOnlyBeBoughtWithTeamPass,
'isSpecialTicket': isSpecialTicket,
'specialTicketId': specialTicketId,
'onlyForKsi': onlyForKsi,
'timestampCreated': JsonConverters.toJson(timestampCreated,'DateTime',context!),
'timestampLastChanged': JsonConverters.toJson(timestampLastChanged,'DateTime',context!),
'ticketsForSalePerEvent': ticketsForSalePerEvent,
'imageUrl': imageUrl,
'holderInfoRequired': holderInfoRequired,
'eventSeriesOwnerSeatingSectionId': eventSeriesOwnerSeatingSectionId,
'canOnlyBeBought': canOnlyBeBought,
'canNotBeBought': canNotBeBought,
'blockTransfer': blockTransfer,
'maxTicketsPerTransaction': maxTicketsPerTransaction,
'forceSingleTickets': forceSingleTickets,
'onlyForEvent': onlyForEvent,
'currency': currency
};
getTypeName() => "EventSeriesOwnerTicketType";
TypeContext? context = _ctx;
}
class OwnerTicketTypeResult implements IConvertible
{
EventSeriesOwnerTicketType? ticketType;
int? statusCode;
String? message;
OwnerTicketTypeResult({this.ticketType,this.statusCode,this.message});
OwnerTicketTypeResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ticketType = JsonConverters.fromJson(json['ticketType'],'EventSeriesOwnerTicketType',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'ticketType': JsonConverters.toJson(ticketType,'EventSeriesOwnerTicketType',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "OwnerTicketTypeResult";
TypeContext? context = _ctx;
}
class OwnerTicketTypeRequest implements IConvertible
{
int? ticketId;
int? eventOwnerId;
int? seriesId;
String? name;
double? defaultPrice;
int? listOrder;
bool? active;
int? maxTickets;
String? ticketColor;
bool? showUsedTickets;
bool? canOnlyBeBoughtWithTeamPass;
bool? ticketsForSalePerEvent;
String? specialTicketId;
String? imageUrl;
bool? holderInfoRequired;
int? eventSeriesOwnerSeatingSectionId;
bool? canOnlyBeBought;
bool? canNotBeBought;
bool? blockTransfer;
int? maxTicketsPerTransaction;
bool? forceSingleTickets;
int? onlyForEvent;
OwnerTicketTypeRequest({this.ticketId,this.eventOwnerId,this.seriesId,this.name,this.defaultPrice,this.listOrder,this.active,this.maxTickets,this.ticketColor,this.showUsedTickets,this.canOnlyBeBoughtWithTeamPass,this.ticketsForSalePerEvent,this.specialTicketId,this.imageUrl,this.holderInfoRequired,this.eventSeriesOwnerSeatingSectionId,this.canOnlyBeBought,this.canNotBeBought,this.blockTransfer,this.maxTicketsPerTransaction,this.forceSingleTickets,this.onlyForEvent});
OwnerTicketTypeRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ticketId = json['ticketId'];
eventOwnerId = json['eventOwnerId'];
seriesId = json['seriesId'];
name = json['name'];
defaultPrice = JsonConverters.toDouble(json['defaultPrice']);
listOrder = json['listOrder'];
active = json['active'];
maxTickets = json['maxTickets'];
ticketColor = json['ticketColor'];
showUsedTickets = json['showUsedTickets'];
canOnlyBeBoughtWithTeamPass = json['canOnlyBeBoughtWithTeamPass'];
ticketsForSalePerEvent = json['ticketsForSalePerEvent'];
specialTicketId = json['specialTicketId'];
imageUrl = json['imageUrl'];
holderInfoRequired = json['holderInfoRequired'];
eventSeriesOwnerSeatingSectionId = json['eventSeriesOwnerSeatingSectionId'];
canOnlyBeBought = json['canOnlyBeBought'];
canNotBeBought = json['canNotBeBought'];
blockTransfer = json['blockTransfer'];
maxTicketsPerTransaction = json['maxTicketsPerTransaction'];
forceSingleTickets = json['forceSingleTickets'];
onlyForEvent = json['onlyForEvent'];
return this;
}
Map<String, dynamic> toJson() => {
'ticketId': ticketId,
'eventOwnerId': eventOwnerId,
'seriesId': seriesId,
'name': name,
'defaultPrice': defaultPrice,
'listOrder': listOrder,
'active': active,
'maxTickets': maxTickets,
'ticketColor': ticketColor,
'showUsedTickets': showUsedTickets,
'canOnlyBeBoughtWithTeamPass': canOnlyBeBoughtWithTeamPass,
'ticketsForSalePerEvent': ticketsForSalePerEvent,
'specialTicketId': specialTicketId,
'imageUrl': imageUrl,
'holderInfoRequired': holderInfoRequired,
'eventSeriesOwnerSeatingSectionId': eventSeriesOwnerSeatingSectionId,
'canOnlyBeBought': canOnlyBeBought,
'canNotBeBought': canNotBeBought,
'blockTransfer': blockTransfer,
'maxTicketsPerTransaction': maxTicketsPerTransaction,
'forceSingleTickets': forceSingleTickets,
'onlyForEvent': onlyForEvent
};
getTypeName() => "OwnerTicketTypeRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
'EventSeriesOwnerTicketType': TypeInfo(TypeOf.Class, create:() => EventSeriesOwnerTicketType()),
'OwnerTicketTypeResult': TypeInfo(TypeOf.Class, create:() => OwnerTicketTypeResult()),
'OwnerTicketTypeRequest': TypeInfo(TypeOf.Class, create:() => OwnerTicketTypeRequest()),
});
Dart OwnerTicketTypeRequest 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 /ownerTicketType HTTP/1.1
Host: stubbur-autoupdates-live.smartnewapis.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ticketId":0,"eventOwnerId":0,"seriesId":0,"name":"String","defaultPrice":0,"listOrder":0,"active":false,"maxTickets":0,"ticketColor":"String","showUsedTickets":false,"canOnlyBeBoughtWithTeamPass":false,"ticketsForSalePerEvent":false,"specialTicketId":"String","imageUrl":"String","holderInfoRequired":false,"eventSeriesOwnerSeatingSectionId":0,"canOnlyBeBought":false,"canNotBeBought":false,"blockTransfer":false,"maxTicketsPerTransaction":0,"forceSingleTickets":false,"onlyForEvent":0}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"ticketType":{"id":0,"name":"String","defaultPrice":0,"seriesId":0,"ownerId":0,"ticketTypeListOrder":0,"isActive":false,"maxTickets":0,"ticketColor":"String","showUsedTickets":false,"canOnlyBeBoughtWithTeamPass":false,"isSpecialTicket":false,"specialTicketId":"String","onlyForKsi":false,"timestampCreated":"0001-01-01T00:00:00.0000000","timestampLastChanged":"0001-01-01T00:00:00.0000000","ticketsForSalePerEvent":false,"imageUrl":"String","holderInfoRequired":false,"eventSeriesOwnerSeatingSectionId":0,"canOnlyBeBought":false,"canNotBeBought":false,"blockTransfer":false,"maxTicketsPerTransaction":0,"forceSingleTickets":false,"onlyForEvent":0,"currency":"String"},"statusCode":0,"message":"String"}