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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<SeasonRolloverRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Id>0</Id>
  <NewEndUTC>0001-01-01T00:00:00</NewEndUTC>
  <NewSeasonName>String</NewSeasonName>
  <NewStartUTC>0001-01-01T00:00:00</NewStartUTC>
  <OwnerId>0</OwnerId>
  <Preview>false</Preview>
</SeasonRolloverRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SeasonRolloverResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Cloned>
    <SeasonRolloverClonedItem>
      <Name>String</Name>
      <NewCardTypeId>0</NewCardTypeId>
      <SourceCardTypeId>0</SourceCardTypeId>
      <TicketTypeConnections>0</TicketTypeConnections>
    </SeasonRolloverClonedItem>
  </Cloned>
  <Count>0</Count>
  <Message>String</Message>
  <NewSeason xmlns:d2p1="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel.Types">
    <d2p1:EndUTC>0001-01-01T00:00:00</d2p1:EndUTC>
    <d2p1:ID>0</d2p1:ID>
    <d2p1:IsActive>false</d2p1:IsActive>
    <d2p1:Name>String</d2p1:Name>
    <d2p1:OwnerId>0</d2p1:OwnerId>
    <d2p1:StartUTC>0001-01-01T00:00:00</d2p1:StartUTC>
    <d2p1:TimeStampCreatedUTC>0001-01-01T00:00:00</d2p1:TimeStampCreatedUTC>
    <d2p1:TimeStampLastChangedUTC>0001-01-01T00:00:00</d2p1:TimeStampLastChangedUTC>
  </NewSeason>
  <NewSeasonId>0</NewSeasonId>
  <Preview>false</Preview>
  <StatusCode>0</StatusCode>
</SeasonRolloverResult>