| Requires any of the roles: | Admin, TeamAdmin | Required permission: | Tickets.Add |
| 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 .jsv suffix or ?format=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
}