| Requires any of the roles: | Admin, TeamAdmin | Required permission: | Tickets.Add |
| POST | /SharedTicketLink/Create |
|---|
import 'package:servicestack/servicestack.dart';
class SharedTicketLinkSeatInfo implements IConvertible
{
int? seatId;
String? sectionName;
String? rowName;
String? seatName;
SharedTicketLinkSeatInfo({this.seatId,this.sectionName,this.rowName,this.seatName});
SharedTicketLinkSeatInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
seatId = json['seatId'];
sectionName = json['sectionName'];
rowName = json['rowName'];
seatName = json['seatName'];
return this;
}
Map<String, dynamic> toJson() => {
'seatId': seatId,
'sectionName': sectionName,
'rowName': rowName,
'seatName': seatName
};
getTypeName() => "SharedTicketLinkSeatInfo";
TypeContext? context = _ctx;
}
class SharedTicketLinkCreateResult implements IConvertible
{
bool? success;
int? id;
String? token;
String? url;
DateTime? validTo;
String? status;
List<SharedTicketLinkSeatInfo>? seats;
int? statusCode;
String? message;
SharedTicketLinkCreateResult({this.success,this.id,this.token,this.url,this.validTo,this.status,this.seats,this.statusCode,this.message});
SharedTicketLinkCreateResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
success = json['success'];
id = json['id'];
token = json['token'];
url = json['url'];
validTo = JsonConverters.fromJson(json['validTo'],'DateTime',context!);
status = json['status'];
seats = JsonConverters.fromJson(json['seats'],'List<SharedTicketLinkSeatInfo>',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'success': success,
'id': id,
'token': token,
'url': url,
'validTo': JsonConverters.toJson(validTo,'DateTime',context!),
'status': status,
'seats': JsonConverters.toJson(seats,'List<SharedTicketLinkSeatInfo>',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "SharedTicketLinkCreateResult";
TypeContext? context = _ctx;
}
class SharedTicketLinkCreateRequest implements IConvertible
{
int? eventId;
int? ticketOwnerTypeId;
int? count;
int? sectionId;
List<int>? seatIds;
String? recipientEmail;
String? recipientPhone;
int? validToDays;
SharedTicketLinkCreateRequest({this.eventId,this.ticketOwnerTypeId,this.count,this.sectionId,this.seatIds,this.recipientEmail,this.recipientPhone,this.validToDays});
SharedTicketLinkCreateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
eventId = json['eventId'];
ticketOwnerTypeId = json['ticketOwnerTypeId'];
count = json['count'];
sectionId = json['sectionId'];
seatIds = JsonConverters.fromJson(json['seatIds'],'List<int>',context!);
recipientEmail = json['recipientEmail'];
recipientPhone = json['recipientPhone'];
validToDays = json['validToDays'];
return this;
}
Map<String, dynamic> toJson() => {
'eventId': eventId,
'ticketOwnerTypeId': ticketOwnerTypeId,
'count': count,
'sectionId': sectionId,
'seatIds': JsonConverters.toJson(seatIds,'List<int>',context!),
'recipientEmail': recipientEmail,
'recipientPhone': recipientPhone,
'validToDays': validToDays
};
getTypeName() => "SharedTicketLinkCreateRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'SharedTicketLinkSeatInfo': TypeInfo(TypeOf.Class, create:() => SharedTicketLinkSeatInfo()),
'SharedTicketLinkCreateResult': TypeInfo(TypeOf.Class, create:() => SharedTicketLinkCreateResult()),
'List<SharedTicketLinkSeatInfo>': TypeInfo(TypeOf.Class, create:() => <SharedTicketLinkSeatInfo>[]),
'SharedTicketLinkCreateRequest': TypeInfo(TypeOf.Class, create:() => SharedTicketLinkCreateRequest()),
});
Dart SharedTicketLinkCreateRequest DTOs
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 /SharedTicketLink/Create HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
eventId: 0,
ticketOwnerTypeId: 0,
count: 0,
sectionId: 0,
seatIds:
[
0
],
recipientEmail: String,
recipientPhone: String,
validToDays: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
success: False,
id: 0,
token: String,
url: String,
validTo: 0001-01-01,
status: String,
seats:
[
{
seatId: 0,
sectionName: String,
rowName: String,
seatName: String
}
],
statusCode: 0,
message: String
}