Evo Voice

<back to all web services

AppUpdateSystemSettings

Requires Authentication
The following routes are available for this service:
PATCH/portal/system-settings
import Foundation
import ServiceStack

public class AppUpdateSystemSettings : Codable
{
    public var accountId:String
    public var customerId:String
    public var customerTimeZoneId:String

    required public init(){}
}

public class AppSystemSettingsInfo : Codable
{
    public var endpointFields:[EndpointDataField]
    /**
    * Is this customer a HostedSuite customer?
    */
    // @ApiMember(Description="Is this customer a HostedSuite customer?")
    public var isHostedSuiteCustomer:Bool

    /**
    * The customer's time zone
    */
    // @ApiMember(Description="The customer's time zone")
    public var customerTimeZoneId:String

    required public init(){}
}

public class EndpointDataField : DataField
{
    public var showInSearch:Bool
    public var showInLists:Bool
    public var endpointType:EndpointTypes?
    public var isCallerId:Bool
    public var isKnob:Bool

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case showInSearch
        case showInLists
        case endpointType
        case isCallerId
        case isKnob
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        showInSearch = try container.decodeIfPresent(Bool.self, forKey: .showInSearch)
        showInLists = try container.decodeIfPresent(Bool.self, forKey: .showInLists)
        endpointType = try container.decodeIfPresent(EndpointTypes.self, forKey: .endpointType)
        isCallerId = try container.decodeIfPresent(Bool.self, forKey: .isCallerId)
        isKnob = try container.decodeIfPresent(Bool.self, forKey: .isKnob)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if showInSearch != nil { try container.encode(showInSearch, forKey: .showInSearch) }
        if showInLists != nil { try container.encode(showInLists, forKey: .showInLists) }
        if endpointType != nil { try container.encode(endpointType, forKey: .endpointType) }
        if isCallerId != nil { try container.encode(isCallerId, forKey: .isCallerId) }
        if isKnob != nil { try container.encode(isKnob, forKey: .isKnob) }
    }
}

public class DataField : Codable
{
    public var id:String
    public var name:String
    public var type:ValueTypes
    public var uiHint:UIHints
    public var uiTab:String
    public var isAsync:Bool
    public var disableBinding:Bool
    public var structType:DataType
    public var listType:DataType
    public var Description:String
    public var possibleValues:[String]
    public var isOutput:Bool
    public var customFieldValuesUrl:String
    public var defaultValue:Value
    public var transitionNameFormat:String
    public var uniqueness:DataFieldUniqueness
    public var voiceOnly:Bool
    public var conditionalVisibilityField:String
    public var conditionalVisibilityValue:String
    public var noEvalTemplate:Bool
    public var userMode:UserDataFieldModes
    public var anyValueType:Bool

    required public init(){}
}

public enum ValueTypes : String, Codable
{
    case NotSpecified
    case String
    case Boolean
    case Number
    case List
    case Struct
    case Transition
    case Custom
    case Date
    case AudioFile
    case TimeZoneId
    case PhoneNumber
    case User
    case Endpoint
    case Time
    case File
    case FaxNumber
    case EmailAccount
    case Customer
    case Flow
    case Team
    case FlowReference
    case Integration
    case Assistant
}

public enum UIHints : String, Codable
{
    case None
    case LargeText
    case InlineForm
    case Password
    case InlineStruct
}

public class DataType : Codable
{
    public var typeName:String
    public var fields:[DataField]

    required public init(){}
}

public class Value : Codable
{
    public var boolValue:Bool?
    public var stringValue:String
    public var numberValue:Double?
    public var listValue:[Struct]
    public var structValue:Struct

    required public init(){}
}

public class Struct : List<String:Value>
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

public enum DataFieldUniqueness : String, Codable
{
    case NotUnique
    case Unique
    case UniqueToCustomer
}

public enum UserDataFieldModes : String, Codable
{
    case Hidden
    case ReadOnly
    case ReadWrite
}

public enum EndpointTypes : String, Codable
{
    case PhoneNumber
    case User
    case FaxNumber
    case EmailAddress
    case Unused_1
    case Unused_2
    case Unused_3
    case Unused_4
    case Unused_5
    case Team
    case Assistant
}


Swift AppUpdateSystemSettings DTOs

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

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PATCH /portal/system-settings HTTP/1.1 
Host: team.evovoice.io 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"accountId":"String","customerId":"String","customerTimeZoneId":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"endpointFields":[{"showInSearch":false,"showInLists":false,"endpointType":"PhoneNumber","isCallerId":false,"isKnob":false,"id":"String","name":"String","type":"NotSpecified","uiHint":"None","uiTab":"String","isAsync":false,"disableBinding":false,"description":"String","possibleValues":["String"],"isOutput":false,"customFieldValuesUrl":"String","defaultValue":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]},"transitionNameFormat":"String","uniqueness":"NotUnique","voiceOnly":false,"conditionalVisibilityField":"String","conditionalVisibilityValue":"String","noEvalTemplate":false,"userMode":"Hidden","anyValueType":false}],"isHostedSuiteCustomer":false,"customerTimeZoneId":"String"}