| POST | /EventSendGuard |
|---|
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 EventSendGuardBatchResult:
items: Optional[List[EventSendGuardResult]] = None
sendable_count: Optional[int] = None
blocked_count: Optional[int] = None
status_code: Optional[int] = None
message: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EventSendGuardBatchRequest:
event_ids: Optional[List[int]] = None
change_lookback_hours: Optional[int] = None
Python EventSendGuardBatchRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /EventSendGuard HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<EventSendGuardBatchRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<ChangeLookbackHours>0</ChangeLookbackHours>
<EventIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</EventIds>
</EventSendGuardBatchRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<EventSendGuardBatchResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<BlockedCount>0</BlockedCount>
<Items>
<EventSendGuardResult>
<AlreadyStarted>false</AlreadyStarted>
<AssumedTimeUtc>0001-01-01T00:00:00</AssumedTimeUtc>
<CurrentTimeOfEventUtc>0001-01-01T00:00:00</CurrentTimeOfEventUtc>
<EventActive>false</EventActive>
<EventId>0</EventId>
<EventName>String</EventName>
<HideEvent>false</HideEvent>
<LastChangeAt>0001-01-01T00:00:00</LastChangeAt>
<Message>String</Message>
<PostponedNoDate>false</PostponedNoDate>
<Reasons xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Reasons>
<RecentChanges>
<EventSendGuardChange>
<AlertHandled>false</AlertHandled>
<ChangedAt>0001-01-01T00:00:00</ChangedAt>
<LocationHasChanged>false</LocationHasChanged>
<NewTimeOfEvent>0001-01-01T00:00:00</NewTimeOfEvent>
<OldTimeOfEvent>0001-01-01T00:00:00</OldTimeOfEvent>
<TimeHasChanged>false</TimeHasChanged>
</EventSendGuardChange>
</RecentChanges>
<Sendable>false</Sendable>
<StatusCode>0</StatusCode>
<TimeChangedSincePlanned>false</TimeChangedSincePlanned>
</EventSendGuardResult>
</Items>
<Message>String</Message>
<SendableCount>0</SendableCount>
<StatusCode>0</StatusCode>
</EventSendGuardBatchResult>