Evo Voice

<back to all web services

TestSchedule

Test the customer's schedule

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
POST/customers/{customerId}/test-schedule
POST/endpoints/{endpointId}/test-schedule
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    /**
    * Test the customer's schedule
    */
    @Api(Description="Test the customer's schedule")
    public static class TestSchedule
    {
        /**
        * The ID of the customer whose schedule you want to test
        */
        @ApiMember(Description="The ID of the customer whose schedule you want to test")
        public String customerId = null;

        /**
        * The ID of the endpoint whose schedule you want to test.
        */
        @ApiMember(Description="The ID of the endpoint whose schedule you want to test.")
        public String endpointId = null;

        /**
        * The schedule to use (leave null to use the current saved schedule)
        */
        @ApiMember(Description="The schedule to use (leave null to use the current saved schedule)")
        public Schedule schedule = null;

        /**
        * The ISO string of the date and time you want to test
        */
        @ApiMember(Description="The ISO string of the date and time you want to test")
        public String dateTime = null;
        
        public String getCustomerId() { return customerId; }
        public TestSchedule setCustomerId(String value) { this.customerId = value; return this; }
        public String getEndpointId() { return endpointId; }
        public TestSchedule setEndpointId(String value) { this.endpointId = value; return this; }
        public Schedule getSchedule() { return schedule; }
        public TestSchedule setSchedule(Schedule value) { this.schedule = value; return this; }
        public String getDateTime() { return dateTime; }
        public TestSchedule setDateTime(String value) { this.dateTime = value; return this; }
    }

    public static class Schedule
    {
        public String timeZoneId = null;
        public Boolean inherit = null;
        public Boolean forceClosed = null;
        public ArrayList<SchedulingRule> rules = null;
        public String defaultState = null;
        
        public String getTimeZoneId() { return timeZoneId; }
        public Schedule setTimeZoneId(String value) { this.timeZoneId = value; return this; }
        public Boolean isInherit() { return inherit; }
        public Schedule setInherit(Boolean value) { this.inherit = value; return this; }
        public Boolean isForceClosed() { return forceClosed; }
        public Schedule setForceClosed(Boolean value) { this.forceClosed = value; return this; }
        public ArrayList<SchedulingRule> getRules() { return rules; }
        public Schedule setRules(ArrayList<SchedulingRule> value) { this.rules = value; return this; }
        public String getDefaultState() { return defaultState; }
        public Schedule setDefaultState(String value) { this.defaultState = value; return this; }
    }

    public static class SchedulingRule
    {
        public String id = null;
        public String name = null;
        public Integer priority = null;
        public String state = null;
        public String source = null;
        public String condition = null;
        public SimpleSchedulingRuleTypes simpleRuleType = null;
        public String customerState = null;
        public String flowId = null;
        public Struct flowParams = null;
        public Boolean isAllDay = null;
        public String startDate = null;
        public String startTime = null;
        public String endTime = null;
        public ArrayList<Integer> bySetPosition = null;
        public ArrayList<Integer> byMonth = null;
        public ArrayList<Integer> byWeekNo = null;
        public ArrayList<Integer> byYearDay = null;
        public ArrayList<Integer> byMonthDay = null;
        public ArrayList<ScheduleDay> byDay = null;
        public ArrayList<Integer> byHour = null;
        public ArrayList<Integer> byMinute = null;
        public Integer interval = null;
        public Integer count = null;
        public String untilDate = null;
        public SchedulingRuleFrequency frequency = null;
        
        public String getId() { return id; }
        public SchedulingRule setId(String value) { this.id = value; return this; }
        public String getName() { return name; }
        public SchedulingRule setName(String value) { this.name = value; return this; }
        public Integer getPriority() { return priority; }
        public SchedulingRule setPriority(Integer value) { this.priority = value; return this; }
        public String getState() { return state; }
        public SchedulingRule setState(String value) { this.state = value; return this; }
        public String getSource() { return source; }
        public SchedulingRule setSource(String value) { this.source = value; return this; }
        public String getCondition() { return condition; }
        public SchedulingRule setCondition(String value) { this.condition = value; return this; }
        public SimpleSchedulingRuleTypes getSimpleRuleType() { return simpleRuleType; }
        public SchedulingRule setSimpleRuleType(SimpleSchedulingRuleTypes value) { this.simpleRuleType = value; return this; }
        public String getCustomerState() { return customerState; }
        public SchedulingRule setCustomerState(String value) { this.customerState = value; return this; }
        public String getFlowId() { return flowId; }
        public SchedulingRule setFlowId(String value) { this.flowId = value; return this; }
        public Struct getFlowParams() { return flowParams; }
        public SchedulingRule setFlowParams(Struct value) { this.flowParams = value; return this; }
        public Boolean getIsAllDay() { return isAllDay; }
        public SchedulingRule setIsAllDay(Boolean value) { this.isAllDay = value; return this; }
        public String getStartDate() { return startDate; }
        public SchedulingRule setStartDate(String value) { this.startDate = value; return this; }
        public String getStartTime() { return startTime; }
        public SchedulingRule setStartTime(String value) { this.startTime = value; return this; }
        public String getEndTime() { return endTime; }
        public SchedulingRule setEndTime(String value) { this.endTime = value; return this; }
        public ArrayList<Integer> getBySetPosition() { return bySetPosition; }
        public SchedulingRule setBySetPosition(ArrayList<Integer> value) { this.bySetPosition = value; return this; }
        public ArrayList<Integer> getByMonth() { return byMonth; }
        public SchedulingRule setByMonth(ArrayList<Integer> value) { this.byMonth = value; return this; }
        public ArrayList<Integer> getByWeekNo() { return byWeekNo; }
        public SchedulingRule setByWeekNo(ArrayList<Integer> value) { this.byWeekNo = value; return this; }
        public ArrayList<Integer> getByYearDay() { return byYearDay; }
        public SchedulingRule setByYearDay(ArrayList<Integer> value) { this.byYearDay = value; return this; }
        public ArrayList<Integer> getByMonthDay() { return byMonthDay; }
        public SchedulingRule setByMonthDay(ArrayList<Integer> value) { this.byMonthDay = value; return this; }
        public ArrayList<ScheduleDay> getByDay() { return byDay; }
        public SchedulingRule setByDay(ArrayList<ScheduleDay> value) { this.byDay = value; return this; }
        public ArrayList<Integer> getByHour() { return byHour; }
        public SchedulingRule setByHour(ArrayList<Integer> value) { this.byHour = value; return this; }
        public ArrayList<Integer> getByMinute() { return byMinute; }
        public SchedulingRule setByMinute(ArrayList<Integer> value) { this.byMinute = value; return this; }
        public Integer getInterval() { return interval; }
        public SchedulingRule setInterval(Integer value) { this.interval = value; return this; }
        public Integer getCount() { return count; }
        public SchedulingRule setCount(Integer value) { this.count = value; return this; }
        public String getUntilDate() { return untilDate; }
        public SchedulingRule setUntilDate(String value) { this.untilDate = value; return this; }
        public SchedulingRuleFrequency getFrequency() { return frequency; }
        public SchedulingRule setFrequency(SchedulingRuleFrequency value) { this.frequency = value; return this; }
    }

    public static enum SimpleSchedulingRuleTypes
    {
        Always,
        CustomerState,
        Time;
    }

    public static class Struct extends HashMap<String,Value>
    {
        
    }

    public static class Value
    {
        public Boolean boolValue = null;
        public String stringValue = null;
        public Double numberValue = null;
        public ArrayList<Struct> listValue = null;
        public Struct structValue = null;
        
        public Boolean isBoolValue() { return boolValue; }
        public Value setBoolValue(Boolean value) { this.boolValue = value; return this; }
        public String getStringValue() { return stringValue; }
        public Value setStringValue(String value) { this.stringValue = value; return this; }
        public Double getNumberValue() { return numberValue; }
        public Value setNumberValue(Double value) { this.numberValue = value; return this; }
        public ArrayList<Struct> getListValue() { return listValue; }
        public Value setListValue(ArrayList<Struct> value) { this.listValue = value; return this; }
        public Struct getStructValue() { return structValue; }
        public Value setStructValue(Struct value) { this.structValue = value; return this; }
    }

    public static class ScheduleDay
    {
        public Integer offset = null;
        public DayOfWeek dayOfWeek = null;
        
        public Integer getOffset() { return offset; }
        public ScheduleDay setOffset(Integer value) { this.offset = value; return this; }
        public DayOfWeek getDayOfWeek() { return dayOfWeek; }
        public ScheduleDay setDayOfWeek(DayOfWeek value) { this.dayOfWeek = value; return this; }
    }

    public static enum SchedulingRuleFrequency
    {
        None,
        Secondly,
        Minutely,
        Hourly,
        Daily,
        Weekly,
        Monthly,
        Yearly;
    }

    public static class TestScheduleResponse
    {
        public String stateName = null;
        public String timeZoneId = null;
        
        public String getStateName() { return stateName; }
        public TestScheduleResponse setStateName(String value) { this.stateName = value; return this; }
        public String getTimeZoneId() { return timeZoneId; }
        public TestScheduleResponse setTimeZoneId(String value) { this.timeZoneId = value; return this; }
    }

}

Java TestSchedule 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.

POST /customers/{customerId}/test-schedule HTTP/1.1 
Host: evovoice.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	customerId: String,
	endpointId: String,
	schedule: 
	{
		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
	},
	dateTime: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	stateName: String,
	timeZoneId: String
}