Requires any of the roles: | SystemAdministrator, Manager, Customer |
GET | /customers/{customerId}/inherited-schedule | ||
---|---|---|---|
GET | /endpoints/{endpointId}/inherited-schedule |
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
/**
* Get the inherited schedule for this customer
*/
@Api(Description="Get the inherited schedule for this customer")
open class GetInheritedSchedule
{
/**
* The customer ID whose inherited schedule you want to retrieve
*/
@ApiMember(Description="The customer ID whose inherited schedule you want to retrieve")
open var customerId:String? = null
/**
* The endpoint ID whose inherited schedule you want to retrieve (use this OR customer id
*/
@ApiMember(Description="The endpoint ID whose inherited schedule you want to retrieve (use this OR customer id")
open var endpointId:String? = null
}
open class Schedule
{
open var timeZoneId:String? = null
open var inherit:Boolean? = null
open var forceClosed:Boolean? = null
open var rules:ArrayList<SchedulingRule>? = null
open var defaultState:String? = null
}
open class SchedulingRule
{
open var id:String? = null
open var name:String? = null
open var priority:Int? = null
open var state:String? = null
open var source:String? = null
open var condition:String? = null
open var simpleRuleType:SimpleSchedulingRuleTypes? = null
open var customerState:String? = null
open var flowId:String? = null
open var flowParams:Struct? = null
open var isAllDay:Boolean? = null
open var startDate:String? = null
open var startTime:String? = null
open var endTime:String? = null
open var bySetPosition:ArrayList<Int>? = null
open var byMonth:ArrayList<Int>? = null
open var byWeekNo:ArrayList<Int>? = null
open var byYearDay:ArrayList<Int>? = null
open var byMonthDay:ArrayList<Int>? = null
open var byDay:ArrayList<ScheduleDay>? = null
open var byHour:ArrayList<Int>? = null
open var byMinute:ArrayList<Int>? = null
open var interval:Int? = null
open var count:Int? = null
open var untilDate:String? = null
open var frequency:SchedulingRuleFrequency? = null
}
enum class SimpleSchedulingRuleTypes
{
Always,
CustomerState,
Time,
}
open class Struct : HashMap<String,Value>()
{
}
open class Value
{
open var boolValue:Boolean? = null
open var stringValue:String? = null
open var numberValue:Double? = null
open var listValue:ArrayList<Struct>? = null
open var structValue:Struct? = null
}
open class ScheduleDay
{
open var offset:Int? = null
open var dayOfWeek:DayOfWeek? = null
}
enum class SchedulingRuleFrequency
{
None,
Secondly,
Minutely,
Hourly,
Daily,
Weekly,
Monthly,
Yearly,
}
Kotlin 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>