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 datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SeasonRolloverRequest:
    id: Optional[int] = None
    owner_id: Optional[int] = None
    new_season_name: Optional[str] = None
    new_start_u_t_c: Optional[datetime.datetime] = None
    new_end_u_t_c: Optional[datetime.datetime] = None
    preview: Optional[bool] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Season:
    id: Optional[int] = None
    owner_id: Optional[int] = None
    name: Optional[str] = None
    start_u_t_c: Optional[datetime.datetime] = None
    end_u_t_c: Optional[datetime.datetime] = None
    is_active: Optional[bool] = None
    time_stamp_created_u_t_c: Optional[datetime.datetime] = None
    time_stamp_last_changed_u_t_c: Optional[datetime.datetime] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SeasonRolloverClonedItem:
    source_card_type_id: Optional[int] = None
    new_card_type_id: Optional[int] = None
    name: Optional[str] = None
    ticket_type_connections: Optional[int] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SeasonRolloverResult:
    new_season_id: Optional[int] = None
    new_season: Optional[Season] = None
    cloned: Optional[List[SeasonRolloverClonedItem]] = None
    count: Optional[int] = None
    preview: Optional[bool] = None
    status_code: Optional[int] = None
    message: Optional[str] = None

Python SeasonRolloverRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

{"id":0,"ownerId":0,"newSeasonName":"String","newStartUTC":"0001-01-01T00:00:00.0000000","newEndUTC":"0001-01-01T00:00:00.0000000","preview":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

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