| Requires any of the roles: | Admin, TeamAdmin | Requires the permission: | ReadData |
| POST | /transferTicket/targetTicketTypes | List all ticket types available on the target event with price diff vs source |
|---|
import 'package:servicestack/servicestack.dart';
class TransferTargetTicketTypeOption implements IConvertible
{
int? ownerTicketTypeId;
int? seriesTicketTypeId;
String? name;
double? price;
String? direction;
double? priceDifference;
bool? nameMatchesSource;
bool? blockTransfer;
bool? hidden;
int? maxTickets;
int? ticketsSold;
int? ticketsLeft;
TransferTargetTicketTypeOption({this.ownerTicketTypeId,this.seriesTicketTypeId,this.name,this.price,this.direction,this.priceDifference,this.nameMatchesSource,this.blockTransfer,this.hidden,this.maxTickets,this.ticketsSold,this.ticketsLeft});
TransferTargetTicketTypeOption.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ownerTicketTypeId = json['ownerTicketTypeId'];
seriesTicketTypeId = json['seriesTicketTypeId'];
name = json['name'];
price = JsonConverters.toDouble(json['price']);
direction = json['direction'];
priceDifference = JsonConverters.toDouble(json['priceDifference']);
nameMatchesSource = json['nameMatchesSource'];
blockTransfer = json['blockTransfer'];
hidden = json['hidden'];
maxTickets = json['maxTickets'];
ticketsSold = json['ticketsSold'];
ticketsLeft = json['ticketsLeft'];
return this;
}
Map<String, dynamic> toJson() => {
'ownerTicketTypeId': ownerTicketTypeId,
'seriesTicketTypeId': seriesTicketTypeId,
'name': name,
'price': price,
'direction': direction,
'priceDifference': priceDifference,
'nameMatchesSource': nameMatchesSource,
'blockTransfer': blockTransfer,
'hidden': hidden,
'maxTickets': maxTickets,
'ticketsSold': ticketsSold,
'ticketsLeft': ticketsLeft
};
getTypeName() => "TransferTargetTicketTypeOption";
TypeContext? context = _ctx;
}
class TransferTargetTicketTypesResult implements IConvertible
{
bool? ok;
int? statusCode;
String? code;
String? message;
double? sourceTicketPrice;
String? sourceTicketTypeName;
List<TransferTargetTicketTypeOption>? options;
TransferTargetTicketTypesResult({this.ok,this.statusCode,this.code,this.message,this.sourceTicketPrice,this.sourceTicketTypeName,this.options});
TransferTargetTicketTypesResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ok = json['ok'];
statusCode = json['statusCode'];
code = json['code'];
message = json['message'];
sourceTicketPrice = JsonConverters.toDouble(json['sourceTicketPrice']);
sourceTicketTypeName = json['sourceTicketTypeName'];
options = JsonConverters.fromJson(json['options'],'List<TransferTargetTicketTypeOption>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ok': ok,
'statusCode': statusCode,
'code': code,
'message': message,
'sourceTicketPrice': sourceTicketPrice,
'sourceTicketTypeName': sourceTicketTypeName,
'options': JsonConverters.toJson(options,'List<TransferTargetTicketTypeOption>',context!)
};
getTypeName() => "TransferTargetTicketTypesResult";
TypeContext? context = _ctx;
}
class TransferTargetTicketTypesRequest implements IConvertible
{
String? ticketTokenId;
int? toEventId;
int? sectionId;
TransferTargetTicketTypesRequest({this.ticketTokenId,this.toEventId,this.sectionId});
TransferTargetTicketTypesRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ticketTokenId = json['ticketTokenId'];
toEventId = json['toEventId'];
sectionId = json['sectionId'];
return this;
}
Map<String, dynamic> toJson() => {
'ticketTokenId': ticketTokenId,
'toEventId': toEventId,
'sectionId': sectionId
};
getTypeName() => "TransferTargetTicketTypesRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'TransferTargetTicketTypeOption': TypeInfo(TypeOf.Class, create:() => TransferTargetTicketTypeOption()),
'TransferTargetTicketTypesResult': TypeInfo(TypeOf.Class, create:() => TransferTargetTicketTypesResult()),
'List<TransferTargetTicketTypeOption>': TypeInfo(TypeOf.Class, create:() => <TransferTargetTicketTypeOption>[]),
'TransferTargetTicketTypesRequest': TypeInfo(TypeOf.Class, create:() => TransferTargetTicketTypesRequest()),
});
Dart TransferTargetTicketTypesRequest 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 /transferTicket/targetTicketTypes HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<TransferTargetTicketTypesRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<SectionId>0</SectionId>
<TicketTokenId>String</TicketTokenId>
<ToEventId>0</ToEventId>
</TransferTargetTicketTypesRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<TransferTargetTicketTypesResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Code>String</Code>
<Message>String</Message>
<Ok>false</Ok>
<Options>
<TransferTargetTicketTypeOption>
<BlockTransfer>false</BlockTransfer>
<Direction>String</Direction>
<Hidden>false</Hidden>
<MaxTickets>0</MaxTickets>
<Name>String</Name>
<NameMatchesSource>false</NameMatchesSource>
<OwnerTicketTypeId>0</OwnerTicketTypeId>
<Price>0</Price>
<PriceDifference>0</PriceDifference>
<SeriesTicketTypeId>0</SeriesTicketTypeId>
<TicketsLeft>0</TicketsLeft>
<TicketsSold>0</TicketsSold>
</TransferTargetTicketTypeOption>
</Options>
<SourceTicketPrice>0</SourceTicketPrice>
<SourceTicketTypeName>String</SourceTicketTypeName>
<StatusCode>0</StatusCode>
</TransferTargetTicketTypesResult>