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
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Voice.Api.Customers
Imports Voice.Api.Scheduling
Imports Voice.Api.Flows.Data

Namespace Global

    Namespace Voice.Api.Customers

        '''<Summary>
        '''Test the customer's schedule
        '''</Summary>
        <Api(Description:="Test the customer's schedule")>
        Public Partial Class TestSchedule
            '''<Summary>
            '''The ID of the customer whose schedule you want to test
            '''</Summary>
            <ApiMember(Description:="The ID of the customer whose schedule you want to test")>
            Public Overridable Property CustomerId As String

            '''<Summary>
            '''The ID of the endpoint whose schedule you want to test.
            '''</Summary>
            <ApiMember(Description:="The ID of the endpoint whose schedule you want to test.")>
            Public Overridable Property EndpointId As String

            '''<Summary>
            '''The schedule to use (leave null to use the current saved schedule)
            '''</Summary>
            <ApiMember(Description:="The schedule to use (leave null to use the current saved schedule)")>
            Public Overridable Property Schedule As Schedule

            '''<Summary>
            '''The ISO string of the date and time you want to test
            '''</Summary>
            <ApiMember(Description:="The ISO string of the date and time you want to test")>
            Public Overridable Property DateTime As String
        End Class

        Public Partial Class TestScheduleResponse
            Public Overridable Property StateName As String
            Public Overridable Property TimeZoneId As String
        End Class
    End Namespace

    Namespace Voice.Api.Flows.Data

        Public Partial Class Struct
            Inherits Dictionary(Of String, Value)
        End Class

        Public Partial Class Value
            Public Sub New()
                ListValue = New List(Of Struct)
            End Sub

            Public Overridable Property BoolValue As Nullable(Of Boolean)
            Public Overridable Property StringValue As String
            Public Overridable Property NumberValue As Nullable(Of Double)
            Public Overridable Property ListValue As List(Of Struct)
            Public Overridable Property StructValue As Struct
        End Class
    End Namespace

    Namespace Voice.Api.Scheduling

        Public Partial Class Schedule
            Public Sub New()
                Rules = New List(Of SchedulingRule)
            End Sub

            Public Overridable Property TimeZoneId As String
            Public Overridable Property Inherit As Boolean
            Public Overridable Property ForceClosed As Boolean
            Public Overridable Property Rules As List(Of SchedulingRule)
            Public Overridable Property DefaultState As String
        End Class

        Public Partial Class ScheduleDay
            Public Overridable Property Offset As Integer
            Public Overridable Property DayOfWeek As DayOfWeek
        End Class

        Public Partial Class SchedulingRule
            Public Sub New()
                BySetPosition = New List(Of Integer)
                ByMonth = New List(Of Integer)
                ByWeekNo = New List(Of Integer)
                ByYearDay = New List(Of Integer)
                ByMonthDay = New List(Of Integer)
                ByDay = New List(Of ScheduleDay)
                ByHour = New List(Of Integer)
                ByMinute = New List(Of Integer)
            End Sub

            Public Overridable Property Id As String
            Public Overridable Property Name As String
            Public Overridable Property Priority As Integer
            Public Overridable Property State As String
            Public Overridable Property Source As String
            Public Overridable Property Condition As String
            Public Overridable Property SimpleRuleType As SimpleSchedulingRuleTypes
            Public Overridable Property CustomerState As String
            Public Overridable Property FlowId As String
            Public Overridable Property FlowParams As Struct
            Public Overridable Property IsAllDay As Boolean
            Public Overridable Property StartDate As String
            Public Overridable Property StartTime As String
            Public Overridable Property EndTime As String
            Public Overridable Property BySetPosition As List(Of Integer)
            Public Overridable Property ByMonth As List(Of Integer)
            Public Overridable Property ByWeekNo As List(Of Integer)
            Public Overridable Property ByYearDay As List(Of Integer)
            Public Overridable Property ByMonthDay As List(Of Integer)
            Public Overridable Property ByDay As List(Of ScheduleDay)
            Public Overridable Property ByHour As List(Of Integer)
            Public Overridable Property ByMinute As List(Of Integer)
            Public Overridable Property Interval As Integer
            Public Overridable Property Count As Integer
            Public Overridable Property UntilDate As String
            Public Overridable Property Frequency As SchedulingRuleFrequency
        End Class

        Public Enum SchedulingRuleFrequency
            None
            Secondly
            Minutely
            Hourly
            Daily
            Weekly
            Monthly
            Yearly
        End Enum

        Public Enum SimpleSchedulingRuleTypes
            Always
            CustomerState
            Time
        End Enum
    End Namespace
End Namespace

VB.NET 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
}