TicketUserServices

<back to all web services

SeasonRolloverRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequired permission:Tickets.Add
The following routes are available for this service:
POST/season/{Id}/rollover
import 'package:servicestack/servicestack.dart';

class SeasonRolloverRequest implements IConvertible
{
    int? id;
    int? ownerId;
    String? newSeasonName;
    DateTime? newStartUTC;
    DateTime? newEndUTC;
    bool? preview;

    SeasonRolloverRequest({this.id,this.ownerId,this.newSeasonName,this.newStartUTC,this.newEndUTC,this.preview});
    SeasonRolloverRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        ownerId = json['ownerId'];
        newSeasonName = json['newSeasonName'];
        newStartUTC = JsonConverters.fromJson(json['newStartUTC'],'DateTime',context!);
        newEndUTC = JsonConverters.fromJson(json['newEndUTC'],'DateTime',context!);
        preview = json['preview'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'ownerId': ownerId,
        'newSeasonName': newSeasonName,
        'newStartUTC': JsonConverters.toJson(newStartUTC,'DateTime',context!),
        'newEndUTC': JsonConverters.toJson(newEndUTC,'DateTime',context!),
        'preview': preview
    };

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

class Season implements IConvertible
{
    int? id;
    int? ownerId;
    String? name;
    DateTime? startUTC;
    DateTime? endUTC;
    bool? isActive;
    DateTime? timeStampCreatedUTC;
    DateTime? timeStampLastChangedUTC;

    Season({this.id,this.ownerId,this.name,this.startUTC,this.endUTC,this.isActive,this.timeStampCreatedUTC,this.timeStampLastChangedUTC});
    Season.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        ownerId = json['ownerId'];
        name = json['name'];
        startUTC = JsonConverters.fromJson(json['startUTC'],'DateTime',context!);
        endUTC = JsonConverters.fromJson(json['endUTC'],'DateTime',context!);
        isActive = json['isActive'];
        timeStampCreatedUTC = JsonConverters.fromJson(json['timeStampCreatedUTC'],'DateTime',context!);
        timeStampLastChangedUTC = JsonConverters.fromJson(json['timeStampLastChangedUTC'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'ownerId': ownerId,
        'name': name,
        'startUTC': JsonConverters.toJson(startUTC,'DateTime',context!),
        'endUTC': JsonConverters.toJson(endUTC,'DateTime',context!),
        'isActive': isActive,
        'timeStampCreatedUTC': JsonConverters.toJson(timeStampCreatedUTC,'DateTime',context!),
        'timeStampLastChangedUTC': JsonConverters.toJson(timeStampLastChangedUTC,'DateTime',context!)
    };

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

class SeasonRolloverClonedItem implements IConvertible
{
    int? sourceCardTypeId;
    int? newCardTypeId;
    String? name;
    int? ticketTypeConnections;

    SeasonRolloverClonedItem({this.sourceCardTypeId,this.newCardTypeId,this.name,this.ticketTypeConnections});
    SeasonRolloverClonedItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        sourceCardTypeId = json['sourceCardTypeId'];
        newCardTypeId = json['newCardTypeId'];
        name = json['name'];
        ticketTypeConnections = json['ticketTypeConnections'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'sourceCardTypeId': sourceCardTypeId,
        'newCardTypeId': newCardTypeId,
        'name': name,
        'ticketTypeConnections': ticketTypeConnections
    };

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

class SeasonRolloverResult implements IConvertible
{
    int? newSeasonId;
    Season? newSeason;
    List<SeasonRolloverClonedItem>? cloned;
    int? count;
    bool? preview;
    int? statusCode;
    String? message;

    SeasonRolloverResult({this.newSeasonId,this.newSeason,this.cloned,this.count,this.preview,this.statusCode,this.message});
    SeasonRolloverResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        newSeasonId = json['newSeasonId'];
        newSeason = JsonConverters.fromJson(json['newSeason'],'Season',context!);
        cloned = JsonConverters.fromJson(json['cloned'],'List<SeasonRolloverClonedItem>',context!);
        count = json['count'];
        preview = json['preview'];
        statusCode = json['statusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'newSeasonId': newSeasonId,
        'newSeason': JsonConverters.toJson(newSeason,'Season',context!),
        'cloned': JsonConverters.toJson(cloned,'List<SeasonRolloverClonedItem>',context!),
        'count': count,
        'preview': preview,
        'statusCode': statusCode,
        'message': message
    };

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

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'SeasonRolloverRequest': TypeInfo(TypeOf.Class, create:() => SeasonRolloverRequest()),
    'Season': TypeInfo(TypeOf.Class, create:() => Season()),
    'SeasonRolloverClonedItem': TypeInfo(TypeOf.Class, create:() => SeasonRolloverClonedItem()),
    'SeasonRolloverResult': TypeInfo(TypeOf.Class, create:() => SeasonRolloverResult()),
    'List<SeasonRolloverClonedItem>': TypeInfo(TypeOf.Class, create:() => <SeasonRolloverClonedItem>[]),
});

Dart SeasonRolloverRequest 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.

POST /season/{Id}/rollover HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: 0,
	ownerId: 0,
	newSeasonName: String,
	newStartUTC: 0001-01-01,
	newEndUTC: 0001-01-01,
	preview: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	newSeasonId: 0,
	newSeason: 
	{
		id: 0,
		ownerId: 0,
		name: String,
		startUTC: 0001-01-01,
		endUTC: 0001-01-01,
		isActive: False,
		timeStampCreatedUTC: 0001-01-01,
		timeStampLastChangedUTC: 0001-01-01
	},
	cloned: 
	[
		{
			sourceCardTypeId: 0,
			newCardTypeId: 0,
			name: String,
			ticketTypeConnections: 0
		}
	],
	count: 0,
	preview: False,
	statusCode: 0,
	message: String
}