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
namespace Voice.Api.Customers

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type SimpleSchedulingRuleTypes =
        | Always = 0
        | CustomerState = 1
        | Time = 2

    [<AllowNullLiteral>]
    type Value() = 
        member val BoolValue:Nullable<Boolean> = new Nullable<Boolean>() with get,set
        member val StringValue:String = null with get,set
        member val NumberValue:Nullable<Double> = new Nullable<Double>() with get,set
        member val ListValue:ResizeArray<Struct> = new ResizeArray<Struct>() with get,set
        member val StructValue:Struct = null with get,set

    [<AllowNullLiteral>]
    type Struct() = 
        inherit Dictionary<String, Value>()

    [<AllowNullLiteral>]
    type ScheduleDay() = 
        member val Offset:Int32 = new Int32() with get,set
        member val DayOfWeek:DayOfWeek = new DayOfWeek() with get,set

    type SchedulingRuleFrequency =
        | None = 0
        | Secondly = 1
        | Minutely = 2
        | Hourly = 3
        | Daily = 4
        | Weekly = 5
        | Monthly = 6
        | Yearly = 7

    [<AllowNullLiteral>]
    type SchedulingRule() = 
        member val Id:String = null with get,set
        member val Name:String = null with get,set
        member val Priority:Int32 = new Int32() with get,set
        member val State:String = null with get,set
        member val Source:String = null with get,set
        member val Condition:String = null with get,set
        member val SimpleRuleType:SimpleSchedulingRuleTypes = new SimpleSchedulingRuleTypes() with get,set
        member val CustomerState:String = null with get,set
        member val FlowId:String = null with get,set
        member val FlowParams:Struct = null with get,set
        member val IsAllDay:Boolean = new Boolean() with get,set
        member val StartDate:String = null with get,set
        member val StartTime:String = null with get,set
        member val EndTime:String = null with get,set
        member val BySetPosition:ResizeArray<Int32> = new ResizeArray<Int32>() with get,set
        member val ByMonth:ResizeArray<Int32> = new ResizeArray<Int32>() with get,set
        member val ByWeekNo:ResizeArray<Int32> = new ResizeArray<Int32>() with get,set
        member val ByYearDay:ResizeArray<Int32> = new ResizeArray<Int32>() with get,set
        member val ByMonthDay:ResizeArray<Int32> = new ResizeArray<Int32>() with get,set
        member val ByDay:ResizeArray<ScheduleDay> = new ResizeArray<ScheduleDay>() with get,set
        member val ByHour:ResizeArray<Int32> = new ResizeArray<Int32>() with get,set
        member val ByMinute:ResizeArray<Int32> = new ResizeArray<Int32>() with get,set
        member val Interval:Int32 = new Int32() with get,set
        member val Count:Int32 = new Int32() with get,set
        member val UntilDate:String = null with get,set
        member val Frequency:SchedulingRuleFrequency = new SchedulingRuleFrequency() with get,set

    [<AllowNullLiteral>]
    type Schedule() = 
        member val TimeZoneId:String = null with get,set
        member val Inherit:Boolean = new Boolean() with get,set
        member val ForceClosed:Boolean = new Boolean() with get,set
        member val Rules:ResizeArray<SchedulingRule> = new ResizeArray<SchedulingRule>() with get,set
        member val DefaultState:String = null with get,set

    ///<summary>
    ///Test the customer's schedule
    ///</summary>
    [<Api(Description="Test the customer's schedule")>]
    [<AllowNullLiteral>]
    type 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")>]
        member val CustomerId:String = null with get,set

        ///<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.")>]
        member val EndpointId:String = null with get,set

        ///<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)")>]
        member val Schedule:Schedule = null with get,set

        ///<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")>]
        member val DateTime:String = null with get,set

    [<AllowNullLiteral>]
    type TestScheduleResponse() = 
        member val StateName:String = null with get,set
        member val TimeZoneId:String = null with get,set

F# TestSchedule DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<TestSchedule xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Customers">
  <CustomerId>String</CustomerId>
  <DateTime>String</DateTime>
  <EndpointId>String</EndpointId>
  <Schedule xmlns:d2p1="http://schemas.datacontract.org/2004/07/Voice.Api.Scheduling">
    <d2p1:DefaultState>String</d2p1:DefaultState>
    <d2p1:ForceClosed>false</d2p1:ForceClosed>
    <d2p1:Inherit>false</d2p1:Inherit>
    <d2p1:Rules>
      <d2p1:SchedulingRule>
        <d2p1:ByDay>
          <d2p1:ScheduleDay>
            <d2p1:DayOfWeek>Sunday</d2p1:DayOfWeek>
            <d2p1:Offset>0</d2p1:Offset>
          </d2p1:ScheduleDay>
        </d2p1:ByDay>
        <d2p1:ByHour xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:int>0</d5p1:int>
        </d2p1:ByHour>
        <d2p1:ByMinute xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:int>0</d5p1:int>
        </d2p1:ByMinute>
        <d2p1:ByMonth xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:int>0</d5p1:int>
        </d2p1:ByMonth>
        <d2p1:ByMonthDay xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:int>0</d5p1:int>
        </d2p1:ByMonthDay>
        <d2p1:BySetPosition xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:int>0</d5p1:int>
        </d2p1:BySetPosition>
        <d2p1:ByWeekNo xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:int>0</d5p1:int>
        </d2p1:ByWeekNo>
        <d2p1:ByYearDay xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:int>0</d5p1:int>
        </d2p1:ByYearDay>
        <d2p1:Condition>String</d2p1:Condition>
        <d2p1:Count>0</d2p1:Count>
        <d2p1:CustomerState>String</d2p1:CustomerState>
        <d2p1:EndTime>String</d2p1:EndTime>
        <d2p1:FlowId>String</d2p1:FlowId>
        <d2p1:FlowParams xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringValue8Ahp2kgT>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value xmlns:d7p1="http://schemas.datacontract.org/2004/07/Voice.Api.Flows.Data">
              <d7p1:BoolValue>false</d7p1:BoolValue>
              <d7p1:ListValue>
                <d5p1:ArrayOfKeyValueOfstringValue8Ahp2kgT>
                  <d5p1:KeyValueOfstringValue8Ahp2kgT>
                    <d5p1:Key>String</d5p1:Key>
                    <d5p1:Value>
                      <d7p1:BoolValue>false</d7p1:BoolValue>
                      <d7p1:ListValue>
                        <d5p1:ArrayOfKeyValueOfstringValue8Ahp2kgT>
                          <d5p1:KeyValueOfstringValue8Ahp2kgT>
                            <d5p1:Key>String</d5p1:Key>
                            <d5p1:Value>
                              <d7p1:BoolValue>false</d7p1:BoolValue>
                              <d7p1:ListValue>
                                <d5p1:ArrayOfKeyValueOfstringValue8Ahp2kgT i:nil="true" />
                              </d7p1:ListValue>
                              <d7p1:NumberValue>0</d7p1:NumberValue>
                              <d7p1:StringValue>String</d7p1:StringValue>
                              <d7p1:StructValue i:nil="true" />
                            </d5p1:Value>
                          </d5p1:KeyValueOfstringValue8Ahp2kgT>
                        </d5p1:ArrayOfKeyValueOfstringValue8Ahp2kgT>
                      </d7p1:ListValue>
                      <d7p1:NumberValue>0</d7p1:NumberValue>
                      <d7p1:StringValue>String</d7p1:StringValue>
                      <d7p1:StructValue>
                        <d5p1:KeyValueOfstringValue8Ahp2kgT>
                          <d5p1:Key>String</d5p1:Key>
                          <d5p1:Value>
                            <d7p1:BoolValue>false</d7p1:BoolValue>
                            <d7p1:ListValue>
                              <d5p1:ArrayOfKeyValueOfstringValue8Ahp2kgT i:nil="true" />
                            </d7p1:ListValue>
                            <d7p1:NumberValue>0</d7p1:NumberValue>
                            <d7p1:StringValue>String</d7p1:StringValue>
                            <d7p1:StructValue i:nil="true" />
                          </d5p1:Value>
                        </d5p1:KeyValueOfstringValue8Ahp2kgT>
                      </d7p1:StructValue>
                    </d5p1:Value>
                  </d5p1:KeyValueOfstringValue8Ahp2kgT>
                </d5p1:ArrayOfKeyValueOfstringValue8Ahp2kgT>
              </d7p1:ListValue>
              <d7p1:NumberValue>0</d7p1:NumberValue>
              <d7p1:StringValue>String</d7p1:StringValue>
              <d7p1:StructValue>
                <d5p1:KeyValueOfstringValue8Ahp2kgT>
                  <d5p1:Key>String</d5p1:Key>
                  <d5p1:Value>
                    <d7p1:BoolValue>false</d7p1:BoolValue>
                    <d7p1:ListValue>
                      <d5p1:ArrayOfKeyValueOfstringValue8Ahp2kgT>
                        <d5p1:KeyValueOfstringValue8Ahp2kgT>
                          <d5p1:Key>String</d5p1:Key>
                          <d5p1:Value>
                            <d7p1:BoolValue>false</d7p1:BoolValue>
                            <d7p1:ListValue>
                              <d5p1:ArrayOfKeyValueOfstringValue8Ahp2kgT i:nil="true" />
                            </d7p1:ListValue>
                            <d7p1:NumberValue>0</d7p1:NumberValue>
                            <d7p1:StringValue>String</d7p1:StringValue>
                            <d7p1:StructValue i:nil="true" />
                          </d5p1:Value>
                        </d5p1:KeyValueOfstringValue8Ahp2kgT>
                      </d5p1:ArrayOfKeyValueOfstringValue8Ahp2kgT>
                    </d7p1:ListValue>
                    <d7p1:NumberValue>0</d7p1:NumberValue>
                    <d7p1:StringValue>String</d7p1:StringValue>
                    <d7p1:StructValue>
                      <d5p1:KeyValueOfstringValue8Ahp2kgT>
                        <d5p1:Key>String</d5p1:Key>
                        <d5p1:Value>
                          <d7p1:BoolValue>false</d7p1:BoolValue>
                          <d7p1:ListValue>
                            <d5p1:ArrayOfKeyValueOfstringValue8Ahp2kgT i:nil="true" />
                          </d7p1:ListValue>
                          <d7p1:NumberValue>0</d7p1:NumberValue>
                          <d7p1:StringValue>String</d7p1:StringValue>
                          <d7p1:StructValue i:nil="true" />
                        </d5p1:Value>
                      </d5p1:KeyValueOfstringValue8Ahp2kgT>
                    </d7p1:StructValue>
                  </d5p1:Value>
                </d5p1:KeyValueOfstringValue8Ahp2kgT>
              </d7p1:StructValue>
            </d5p1:Value>
          </d5p1:KeyValueOfstringValue8Ahp2kgT>
        </d2p1:FlowParams>
        <d2p1:Frequency>None</d2p1:Frequency>
        <d2p1:Id>String</d2p1:Id>
        <d2p1:Interval>0</d2p1:Interval>
        <d2p1:IsAllDay>false</d2p1:IsAllDay>
        <d2p1:Name>String</d2p1:Name>
        <d2p1:Priority>0</d2p1:Priority>
        <d2p1:SimpleRuleType>Always</d2p1:SimpleRuleType>
        <d2p1:Source>String</d2p1:Source>
        <d2p1:StartDate>String</d2p1:StartDate>
        <d2p1:StartTime>String</d2p1:StartTime>
        <d2p1:State>String</d2p1:State>
        <d2p1:UntilDate>String</d2p1:UntilDate>
      </d2p1:SchedulingRule>
    </d2p1:Rules>
    <d2p1:TimeZoneId>String</d2p1:TimeZoneId>
  </Schedule>
</TestSchedule>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<TestScheduleResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Customers">
  <StateName>String</StateName>
  <TimeZoneId>String</TimeZoneId>
</TestScheduleResponse>