TicketUserServices

<back to all web services

SharedTicketLinkGetRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequires the permission:ReadData
The following routes are available for this service:
GET/SharedTicketLink/{Token}
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 LocalizedMessage implements IConvertible
{
    String? Is;
    String? en;

    LocalizedMessage({this.Is,this.en});
    LocalizedMessage.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Is = json['is'];
        en = json['en'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'is': Is,
        'en': en
    };

    getTypeName() => "LocalizedMessage";
    TypeContext? context = _ctx;
}

class SharedTicketLinkPublicResult implements IConvertible
{
    bool? ok;
    String? token;
    int? eventId;
    int? ticketOwnerTypeId;
    int? count;
    int? sectionId;
    List<SharedTicketLinkSeatInfo>? seats;
    String? status;
    DateTime? validTo;
    LocalizedMessage? statusMessage;
    int? statusCode;
    String? message;

    SharedTicketLinkPublicResult({this.ok,this.token,this.eventId,this.ticketOwnerTypeId,this.count,this.sectionId,this.seats,this.status,this.validTo,this.statusMessage,this.statusCode,this.message});
    SharedTicketLinkPublicResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ok = json['ok'];
        token = json['token'];
        eventId = json['eventId'];
        ticketOwnerTypeId = json['ticketOwnerTypeId'];
        count = json['count'];
        sectionId = json['sectionId'];
        seats = JsonConverters.fromJson(json['seats'],'List<SharedTicketLinkSeatInfo>',context!);
        status = json['status'];
        validTo = JsonConverters.fromJson(json['validTo'],'DateTime',context!);
        statusMessage = JsonConverters.fromJson(json['statusMessage'],'LocalizedMessage',context!);
        statusCode = json['statusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ok': ok,
        'token': token,
        'eventId': eventId,
        'ticketOwnerTypeId': ticketOwnerTypeId,
        'count': count,
        'sectionId': sectionId,
        'seats': JsonConverters.toJson(seats,'List<SharedTicketLinkSeatInfo>',context!),
        'status': status,
        'validTo': JsonConverters.toJson(validTo,'DateTime',context!),
        'statusMessage': JsonConverters.toJson(statusMessage,'LocalizedMessage',context!),
        'statusCode': statusCode,
        'message': message
    };

    getTypeName() => "SharedTicketLinkPublicResult";
    TypeContext? context = _ctx;
}

class SharedTicketLinkGetRequest implements IConvertible
{
    String? token;

    SharedTicketLinkGetRequest({this.token});
    SharedTicketLinkGetRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        token = json['token'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'token': token
    };

    getTypeName() => "SharedTicketLinkGetRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'SharedTicketLinkSeatInfo': TypeInfo(TypeOf.Class, create:() => SharedTicketLinkSeatInfo()),
    'LocalizedMessage': TypeInfo(TypeOf.Class, create:() => LocalizedMessage()),
    'SharedTicketLinkPublicResult': TypeInfo(TypeOf.Class, create:() => SharedTicketLinkPublicResult()),
    'List<SharedTicketLinkSeatInfo>': TypeInfo(TypeOf.Class, create:() => <SharedTicketLinkSeatInfo>[]),
    'SharedTicketLinkGetRequest': TypeInfo(TypeOf.Class, create:() => SharedTicketLinkGetRequest()),
});

Dart SharedTicketLinkGetRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /SharedTicketLink/{Token} HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ok: False,
	token: String,
	eventId: 0,
	ticketOwnerTypeId: 0,
	count: 0,
	sectionId: 0,
	seats: 
	[
		{
			seatId: 0,
			sectionName: String,
			rowName: String,
			seatName: String
		}
	],
	status: String,
	validTo: 0001-01-01,
	statusMessage: 
	{
		is: String,
		en: String
	},
	statusCode: 0,
	message: String
}