TicketUserServices

<back to all web services

EventSendGuardRequest

The following routes are available for this service:
GET/EventSendGuard/{EventId}
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 EventSendGuardChange:
    changed_at: Optional[datetime.datetime] = None
    time_has_changed: Optional[bool] = None
    location_has_changed: Optional[bool] = None
    old_time_of_event: Optional[datetime.datetime] = None
    new_time_of_event: Optional[datetime.datetime] = None
    alert_handled: Optional[bool] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EventSendGuardResult:
    event_id: Optional[int] = None
    event_name: Optional[str] = None
    sendable: Optional[bool] = None
    reasons: Optional[List[str]] = None
    current_time_of_event_utc: Optional[datetime.datetime] = None
    assumed_time_utc: Optional[datetime.datetime] = None
    time_changed_since_planned: Optional[bool] = None
    postponed_no_date: Optional[bool] = None
    event_active: Optional[bool] = None
    hide_event: Optional[bool] = None
    already_started: Optional[bool] = None
    last_change_at: Optional[datetime.datetime] = None
    recent_changes: Optional[List[EventSendGuardChange]] = None
    status_code: Optional[int] = None
    message: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EventSendGuardRequest:
    event_id: Optional[int] = None
    assumed_time_utc: Optional[datetime.datetime] = None
    change_lookback_hours: Optional[int] = None

Python EventSendGuardRequest 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 /EventSendGuard/{EventId} HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	eventId: 0,
	eventName: String,
	sendable: False,
	reasons: 
	[
		String
	],
	currentTimeOfEventUtc: 0001-01-01,
	assumedTimeUtc: 0001-01-01,
	timeChangedSincePlanned: False,
	postponedNoDate: False,
	eventActive: False,
	hideEvent: False,
	alreadyStarted: False,
	lastChangeAt: 0001-01-01,
	recentChanges: 
	[
		{
			changedAt: 0001-01-01,
			timeHasChanged: False,
			locationHasChanged: False,
			oldTimeOfEvent: 0001-01-01,
			newTimeOfEvent: 0001-01-01,
			alertHandled: False
		}
	],
	statusCode: 0,
	message: String
}