Requires any of the roles: | Admin, TeamAdmin, MobileApp, Admin, TeamAdmin, MobileApp | Required permissions: | Tickets.Add, Tickets.Add |
GET PUT POST | /ownerEventTicketPrice | Change Tickets prices for Event | Id only when changing (PUT). isOwnerTicket is false if the Ticket is default ticket for series |
---|
import 'package:servicestack/servicestack.dart';
class EventTicketPrice implements IConvertible
{
int? id;
String? name;
double? price;
int? ticketTypeId;
int? ticketOwnerTypeId;
int? eventId;
bool? hidden;
bool? isActive;
int? maxTickets;
String? currency;
EventTicketPrice({this.id,this.name,this.price,this.ticketTypeId,this.ticketOwnerTypeId,this.eventId,this.hidden,this.isActive,this.maxTickets,this.currency});
EventTicketPrice.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
price = JsonConverters.toDouble(json['price']);
ticketTypeId = json['ticketTypeId'];
ticketOwnerTypeId = json['ticketOwnerTypeId'];
eventId = json['eventId'];
hidden = json['hidden'];
isActive = json['isActive'];
maxTickets = json['maxTickets'];
currency = json['currency'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'price': price,
'ticketTypeId': ticketTypeId,
'ticketOwnerTypeId': ticketOwnerTypeId,
'eventId': eventId,
'hidden': hidden,
'isActive': isActive,
'maxTickets': maxTickets,
'currency': currency
};
getTypeName() => "EventTicketPrice";
TypeContext? context = _ctx;
}
class OwnerEventTicketPriceResult implements IConvertible
{
EventTicketPrice? ticketPrice;
int? statusCode;
String? message;
OwnerEventTicketPriceResult({this.ticketPrice,this.statusCode,this.message});
OwnerEventTicketPriceResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ticketPrice = JsonConverters.fromJson(json['ticketPrice'],'EventTicketPrice',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'ticketPrice': JsonConverters.toJson(ticketPrice,'EventTicketPrice',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "OwnerEventTicketPriceResult";
TypeContext? context = _ctx;
}
class OwnerEventTicketPriceRequest implements IConvertible
{
int? id;
bool? isOwnerTicket;
int? eventId;
int? ticketId;
int? eventOwnerId;
int? seriesId;
double? price;
bool? hide;
bool? active;
int? maxTickets;
OwnerEventTicketPriceRequest({this.id,this.isOwnerTicket,this.eventId,this.ticketId,this.eventOwnerId,this.seriesId,this.price,this.hide,this.active,this.maxTickets});
OwnerEventTicketPriceRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
isOwnerTicket = json['isOwnerTicket'];
eventId = json['eventId'];
ticketId = json['ticketId'];
eventOwnerId = json['eventOwnerId'];
seriesId = json['seriesId'];
price = JsonConverters.toDouble(json['price']);
hide = json['hide'];
active = json['active'];
maxTickets = json['maxTickets'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'isOwnerTicket': isOwnerTicket,
'eventId': eventId,
'ticketId': ticketId,
'eventOwnerId': eventOwnerId,
'seriesId': seriesId,
'price': price,
'hide': hide,
'active': active,
'maxTickets': maxTickets
};
getTypeName() => "OwnerEventTicketPriceRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
'EventTicketPrice': TypeInfo(TypeOf.Class, create:() => EventTicketPrice()),
'OwnerEventTicketPriceResult': TypeInfo(TypeOf.Class, create:() => OwnerEventTicketPriceResult()),
'OwnerEventTicketPriceRequest': TypeInfo(TypeOf.Class, create:() => OwnerEventTicketPriceRequest()),
});
Dart OwnerEventTicketPriceRequest DTOs
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 /ownerEventTicketPrice HTTP/1.1
Host: stubbur-autoupdates-live.smartnewapis.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<OwnerEventTicketPriceRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Active>false</Active>
<EventId>0</EventId>
<EventOwnerId>0</EventOwnerId>
<Hide>false</Hide>
<Id>0</Id>
<IsOwnerTicket>false</IsOwnerTicket>
<MaxTickets>0</MaxTickets>
<Price>0</Price>
<SeriesId>0</SeriesId>
<TicketId>0</TicketId>
</OwnerEventTicketPriceRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <OwnerEventTicketPriceResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel"> <Message>String</Message> <StatusCode>0</StatusCode> <TicketPrice xmlns:d2p1="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel.Types"> <d2p1:Currency>String</d2p1:Currency> <d2p1:EventId>0</d2p1:EventId> <d2p1:Hidden>false</d2p1:Hidden> <d2p1:ID>0</d2p1:ID> <d2p1:MaxTickets>0</d2p1:MaxTickets> <d2p1:Name>String</d2p1:Name> <d2p1:Price>0</d2p1:Price> <d2p1:TicketOwnerTypeId>0</d2p1:TicketOwnerTypeId> <d2p1:TicketTypeId>0</d2p1:TicketTypeId> <d2p1:isActive>false</d2p1:isActive> </TicketPrice> </OwnerEventTicketPriceResult>