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 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")
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")
var endpointId:String? = null
}
open class Schedule
{
var timeZoneId:String? = null
var inherit:Boolean? = null
var forceClosed:Boolean? = null
var rules:ArrayList<SchedulingRule> = ArrayList<SchedulingRule>()
var defaultState:String? = null
}
open class SchedulingRule
{
var id:String? = null
var name:String? = null
var priority:Int? = null
var state:String? = null
var source:String? = null
var condition:String? = null
var simpleRuleType:SimpleSchedulingRuleTypes? = null
var customerState:String? = null
var flowId:String? = null
var flowParams:Struct? = null
var isAllDay:Boolean? = null
var startDate:String? = null
var startTime:String? = null
var endTime:String? = null
var bySetPosition:ArrayList<Int> = ArrayList<Int>()
var byMonth:ArrayList<Int> = ArrayList<Int>()
var byWeekNo:ArrayList<Int> = ArrayList<Int>()
var byYearDay:ArrayList<Int> = ArrayList<Int>()
var byMonthDay:ArrayList<Int> = ArrayList<Int>()
var byDay:ArrayList<ScheduleDay> = ArrayList<ScheduleDay>()
var byHour:ArrayList<Int> = ArrayList<Int>()
var byMinute:ArrayList<Int> = ArrayList<Int>()
var interval:Int? = null
var count:Int? = null
var untilDate:String? = null
var frequency:SchedulingRuleFrequency? = null
}
enum class SimpleSchedulingRuleTypes
{
Always,
CustomerState,
Time,
}
open class Struct : HashMap<String,Value>()
{
}
open class Value
{
var boolValue:Boolean? = null
var stringValue:String? = null
var numberValue:Double? = null
var listValue:ArrayList<Struct> = ArrayList<Struct>()
var structValue:Struct? = null
}
open class ScheduleDay
{
var offset:Int? = null
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 .jsv suffix or ?format=jsv
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: evovoice.io Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { timeZoneId: String, inherit: False, forceClosed: False, rules: [ { id: String, name: String, priority: 0, state: String, source: String, condition: String, simpleRuleType: Always, customerState: String, flowId: String, flowParams: { String: { boolValue: False, stringValue: String, numberValue: 0, listValue: [ { String: { boolValue: False, stringValue: String, numberValue: 0, listValue: [ { String: { boolValue: False, stringValue: String, numberValue: 0, listValue: [ null ] } } ], structValue: { String: { boolValue: False, stringValue: String, numberValue: 0, listValue: [ null ] } } } } ], structValue: { String: { boolValue: False, stringValue: String, numberValue: 0, listValue: [ { String: { boolValue: False, stringValue: String, numberValue: 0, listValue: [ null ] } } ], structValue: { String: { boolValue: False, stringValue: String, numberValue: 0, listValue: [ null ] } } } } } }, isAllDay: False, startDate: String, startTime: String, endTime: String, bySetPosition: [ 0 ], byMonth: [ 0 ], byWeekNo: [ 0 ], byYearDay: [ 0 ], byMonthDay: [ 0 ], byDay: [ { offset: 0, dayOfWeek: Sunday } ], byHour: [ 0 ], byMinute: [ 0 ], interval: 0, count: 0, untilDate: String, frequency: None } ], defaultState: String }