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


export class NodeParameterMap
{
    [key:string] : NodeParameter;

    public constructor(init?: Partial<NodeParameterMap>) { (Object as any).assign(this, init); }
}


export enum SimpleSchedulingRuleTypes
{
    Always = 'Always',
    CustomerState = 'CustomerState',
    Time = 'Time',
}

export class Value
{
    public boolValue?: boolean;
    public stringValue?: string;
    public numberValue?: number;
    public listValue?: Struct[];
    public structValue?: Struct;

    public constructor(init?: Partial<Value>) { (Object as any).assign(this, init); }
}

export class Struct
{

    public constructor(init?: Partial<Struct>) { (Object as any).assign(this, init); }
}

export class ScheduleDay
{
    public offset?: number;
    public dayOfWeek?: DayOfWeek;

    public constructor(init?: Partial<ScheduleDay>) { (Object as any).assign(this, init); }
}

export enum SchedulingRuleFrequency
{
    None = 'None',
    Secondly = 'Secondly',
    Minutely = 'Minutely',
    Hourly = 'Hourly',
    Daily = 'Daily',
    Weekly = 'Weekly',
    Monthly = 'Monthly',
    Yearly = 'Yearly',
}

export class SchedulingRule
{
    public id?: string;
    public name?: string;
    public priority?: number;
    public state?: string;
    public source?: string;
    public condition?: string;
    public simpleRuleType?: SimpleSchedulingRuleTypes;
    public customerState?: string;
    public flowId?: string;
    public flowParams?: Struct;
    public isAllDay?: boolean;
    public startDate?: string;
    public startTime?: string;
    public endTime?: string;
    public bySetPosition?: number[];
    public byMonth?: number[];
    public byWeekNo?: number[];
    public byYearDay?: number[];
    public byMonthDay?: number[];
    public byDay?: ScheduleDay[];
    public byHour?: number[];
    public byMinute?: number[];
    public interval?: number;
    public count?: number;
    public untilDate?: string;
    public frequency?: SchedulingRuleFrequency;

    public constructor(init?: Partial<SchedulingRule>) { (Object as any).assign(this, init); }
}

export class Schedule
{
    public timeZoneId?: string;
    public inherit?: boolean;
    public forceClosed?: boolean;
    public rules?: SchedulingRule[];
    public defaultState?: string;

    public constructor(init?: Partial<Schedule>) { (Object as any).assign(this, init); }
}

/**
* Test the customer's schedule
*/
// @Api(Description="Test the customer's schedule")
export 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 customerId?: string;

    /**
    * 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 endpointId?: string;

    /**
    * 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;

    /**
    * 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 dateTime?: string;

    public constructor(init?: Partial<TestSchedule>) { (Object as any).assign(this, init); }
}

export class TestScheduleResponse
{
    public stateName?: string;
    public timeZoneId?: string;

    public constructor(init?: Partial<TestScheduleResponse>) { (Object as any).assign(this, init); }
}

TypeScript 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
}