Evo Voice

<back to all web services

PatchSettingsObject

Update the specified settings object

Requires Authentication
Required role:User
The following routes are available for this service:
PATCH/app/settings-objects/{id}
namespace Voice.Api.App

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

    type SettingsObjectTypes =
        | Endpoint = 0
        | Customer = 1

    type EndpointTypes =
        | PhoneNumber = 0
        | User = 1
        | FaxNumber = 2
        | EmailAddress = 3
        | Unused_1 = 4
        | Unused_2 = 5
        | Unused_3 = 6
        | Unused_4 = 7
        | Unused_5 = 8
        | Team = 9
        | Assistant = 10

    type ValueTypes =
        | NotSpecified = 0
        | String = 1
        | Boolean = 2
        | Number = 3
        | List = 4
        | Struct = 5
        | Transition = 6
        | Custom = 7
        | Date = 8
        | AudioFile = 9
        | TimeZoneId = 10
        | PhoneNumber = 11
        | User = 12
        | Endpoint = 13
        | Time = 14
        | File = 15
        | FaxNumber = 16
        | EmailAccount = 17
        | Customer = 18
        | Flow = 19
        | Team = 20
        | FlowReference = 21
        | Integration = 22
        | Assistant = 23

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

    [<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> = null with get,set
        member val StructValue:Struct = null with get,set

    [<AllowNullLiteral>]
    type SettingsPossibleValue() = 
        member val DisplayName:String = null with get,set
        member val Value:Value = null with get,set

    type UIHints =
        | None = 0
        | LargeText = 1
        | InlineForm = 2
        | Password = 3
        | InlineStruct = 4

    [<AllowNullLiteral>]
    type DataType() = 
        member val TypeName:String = null with get,set
        member val Fields:ResizeArray<DataField> = null with get,set

    type DataFieldUniqueness =
        | NotUnique = 0
        | Unique = 1
        | UniqueToCustomer = 2

    type UserDataFieldModes =
        | Hidden = 0
        | ReadOnly = 1
        | ReadWrite = 2

    [<AllowNullLiteral>]
    type DataField() = 
        member val Id:String = null with get,set
        member val Name:String = null with get,set
        member val Type:ValueTypes = new ValueTypes() with get,set
        member val UIHint:UIHints = new UIHints() with get,set
        member val UITab:String = null with get,set
        member val IsAsync:Boolean = new Boolean() with get,set
        member val DisableBinding:Boolean = new Boolean() with get,set
        member val StructType:DataType = null with get,set
        member val ListType:DataType = null with get,set
        member val Description:String = null with get,set
        member val PossibleValues:ResizeArray<String> = null with get,set
        member val IsOutput:Boolean = new Boolean() with get,set
        member val CustomFieldValuesUrl:String = null with get,set
        member val DefaultValue:Value = null with get,set
        member val TransitionNameFormat:String = null with get,set
        member val Uniqueness:DataFieldUniqueness = new DataFieldUniqueness() with get,set
        member val VoiceOnly:Boolean = new Boolean() with get,set
        member val ConditionalVisibilityField:String = null with get,set
        member val ConditionalVisibilityValue:String = null with get,set
        member val NoEvalTemplate:Boolean = new Boolean() with get,set
        member val UserMode:UserDataFieldModes = new UserDataFieldModes() with get,set
        member val AnyValueType:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type SettingsField() = 
        member val Name:String = null with get,set
        member val DisplayName:String = null with get,set
        member val Type:ValueTypes = new ValueTypes() with get,set
        member val Value:Value = null with get,set
        member val ReadOnly:Boolean = new Boolean() with get,set
        member val PossibleValues:ResizeArray<SettingsPossibleValue> = null with get,set
        member val DataField:DataField = null with get,set

    [<AllowNullLiteral>]
    type SettingsObject() = 
        member val Id:String = null with get,set
        member val Name:String = null with get,set
        member val Description:String = null with get,set
        member val ReadOnly:Boolean = new Boolean() with get,set
        member val Type:SettingsObjectTypes = new SettingsObjectTypes() with get,set
        member val EndpointType:Nullable<EndpointTypes> = new Nullable<EndpointTypes>() with get,set
        member val Fields:ResizeArray<SettingsField> = null with get,set

    ///<summary>
    ///Update the specified settings object
    ///</summary>
    [<Api(Description="Update the specified settings object")>]
    [<AllowNullLiteral>]
    type PatchSettingsObject() = 
        interface IPatch
        ///<summary>
        ///The ID of the settings object
        ///</summary>
        [<ApiMember(Description="The ID of the settings object")>]
        member val Id:String = null with get,set

        ///<summary>
        ///The data values to set
        ///</summary>
        [<ApiMember(Description="The data values to set")>]
        member val Data:Struct = null with get,set

F# PatchSettingsObject 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.

PATCH /app/settings-objects/{id} HTTP/1.1 
Host: evovoice.io 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<PatchSettingsObject xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.App">
  <Data xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <Id>String</Id>
</PatchSettingsObject>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SettingsObject xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.App">
  <Description>String</Description>
  <EndpointType>PhoneNumber</EndpointType>
  <Fields>
    <SettingsField>
      <DataField xmlns:d4p1="http://schemas.datacontract.org/2004/07/Voice.Api.Flows.Data" i:nil="true" />
      <DisplayName>String</DisplayName>
      <Name>String</Name>
      <PossibleValues>
        <SettingsPossibleValue>
          <DisplayName>String</DisplayName>
          <Value xmlns:d6p1="http://schemas.datacontract.org/2004/07/Voice.Api.Flows.Data">
            <d6p1:BoolValue>false</d6p1:BoolValue>
            <d6p1:ListValue xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:ArrayOfKeyValueOfstringValue8Ahp2kgT i:nil="true" />
            </d6p1:ListValue>
            <d6p1:NumberValue>0</d6p1:NumberValue>
            <d6p1:StringValue>String</d6p1:StringValue>
            <d6p1:StructValue xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
          </Value>
        </SettingsPossibleValue>
      </PossibleValues>
      <ReadOnly>false</ReadOnly>
      <Type>NotSpecified</Type>
      <Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/Voice.Api.Flows.Data">
        <d4p1:BoolValue>false</d4p1:BoolValue>
        <d4p1:ListValue xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:ArrayOfKeyValueOfstringValue8Ahp2kgT i:nil="true" />
        </d4p1:ListValue>
        <d4p1:NumberValue>0</d4p1:NumberValue>
        <d4p1:StringValue>String</d4p1:StringValue>
        <d4p1:StructValue xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
      </Value>
    </SettingsField>
  </Fields>
  <Id>String</Id>
  <Name>String</Name>
  <ReadOnly>false</ReadOnly>
  <Type>Endpoint</Type>
</SettingsObject>