| Requires any of the roles: | SystemAdministrator, Manager, Customer |
| GET | /customers/{customerId}/inherited-schedule | ||
|---|---|---|---|
| GET | /endpoints/{endpointId}/inherited-schedule |
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
class SimpleSchedulingRuleTypes(str, Enum):
ALWAYS = 'Always'
CUSTOMER_STATE = 'CustomerState'
TIME = 'Time'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Value:
bool_value: Optional[bool] = None
string_value: Optional[str] = None
number_value: Optional[float] = None
list_value: Optional[List[Struct]] = None
struct_value: Optional[Struct] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Struct(Dict[str,Value]):
pass
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ScheduleDay:
offset: int = 0
day_of_week: Optional[DayOfWeek] = None
class SchedulingRuleFrequency(str, Enum):
NONE = 'None'
SECONDLY = 'Secondly'
MINUTELY = 'Minutely'
HOURLY = 'Hourly'
DAILY = 'Daily'
WEEKLY = 'Weekly'
MONTHLY = 'Monthly'
YEARLY = 'Yearly'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SchedulingRule:
id: Optional[str] = None
name: Optional[str] = None
priority: int = 0
state: Optional[str] = None
source: Optional[str] = None
condition: Optional[str] = None
simple_rule_type: Optional[SimpleSchedulingRuleTypes] = None
customer_state: Optional[str] = None
flow_id: Optional[str] = None
flow_params: Optional[Struct] = None
is_all_day: bool = False
start_date: Optional[str] = None
start_time: Optional[str] = None
end_time: Optional[str] = None
by_set_position: Optional[List[int]] = None
by_month: Optional[List[int]] = None
by_week_no: Optional[List[int]] = None
by_year_day: Optional[List[int]] = None
by_month_day: Optional[List[int]] = None
by_day: Optional[List[ScheduleDay]] = None
by_hour: Optional[List[int]] = None
by_minute: Optional[List[int]] = None
interval: int = 0
count: int = 0
until_date: Optional[str] = None
frequency: Optional[SchedulingRuleFrequency] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Schedule:
time_zone_id: Optional[str] = None
inherit: bool = False
force_closed: bool = False
rules: Optional[List[SchedulingRule]] = None
default_state: Optional[str] = None
# @Api(Description="Get the inherited schedule for this customer")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetInheritedSchedule:
"""
Get the inherited schedule for this customer
"""
# @ApiMember(Description="The customer ID whose inherited schedule you want to retrieve")
customer_id: Optional[str] = None
"""
The customer ID whose inherited schedule you want to retrieve
"""
# @ApiMember(Description="The endpoint ID whose inherited schedule you want to retrieve (use this OR customer id")
endpoint_id: Optional[str] = None
"""
The endpoint ID whose inherited schedule you want to retrieve (use this OR customer id
"""
Python GetInheritedSchedule 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.
GET /customers/{customerId}/inherited-schedule HTTP/1.1
Host: team.evovoice.io
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<Schedule xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Scheduling">
<DefaultState>String</DefaultState>
<ForceClosed>false</ForceClosed>
<Inherit>false</Inherit>
<Rules>
<SchedulingRule>
<ByDay>
<ScheduleDay>
<DayOfWeek>Sunday</DayOfWeek>
<Offset>0</Offset>
</ScheduleDay>
</ByDay>
<ByHour xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</ByHour>
<ByMinute xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</ByMinute>
<ByMonth xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</ByMonth>
<ByMonthDay xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</ByMonthDay>
<BySetPosition xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</BySetPosition>
<ByWeekNo xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</ByWeekNo>
<ByYearDay xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</ByYearDay>
<Condition>String</Condition>
<Count>0</Count>
<CustomerState>String</CustomerState>
<EndTime>String</EndTime>
<FlowId>String</FlowId>
<FlowParams xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<Frequency>None</Frequency>
<Id>String</Id>
<Interval>0</Interval>
<IsAllDay>false</IsAllDay>
<Name>String</Name>
<Priority>0</Priority>
<SimpleRuleType>Always</SimpleRuleType>
<Source>String</Source>
<StartDate>String</StartDate>
<StartTime>String</StartTime>
<State>String</State>
<UntilDate>String</UntilDate>
</SchedulingRule>
</Rules>
<TimeZoneId>String</TimeZoneId>
</Schedule>