PATCH | /portal/phone-number |
---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
open class AppUpdatePhoneNumber
{
open var phoneNumberId:String? = null
open var flowId:String? = null
@SerializedName("data") open var Data:Struct? = null
open var flowParams:Struct? = null
open var flowSchedule:EndpointFlowSchedules? = null
open var schedule:Schedule? = null
open var name:String? = null
open var callerIdName:String? = null
}
open class Struct : HashMap<String,Value>()
{
}
open class Value
{
open var boolValue:Boolean? = null
open var stringValue:String? = null
open var numberValue:Double? = null
open var listValue:ArrayList<Struct>? = null
open var structValue:Struct? = null
}
enum class EndpointFlowSchedules
{
Always,
Scheduled,
Simple,
}
open class Schedule
{
open var timeZoneId:String? = null
open var inherit:Boolean? = null
open var forceClosed:Boolean? = null
open var rules:ArrayList<SchedulingRule>? = null
open var defaultState:String? = null
}
open class SchedulingRule
{
open var id:String? = null
open var name:String? = null
open var priority:Int? = null
open var state:String? = null
open var source:String? = null
open var condition:String? = null
open var simpleRuleType:SimpleSchedulingRuleTypes? = null
open var customerState:String? = null
open var flowId:String? = null
open var flowParams:Struct? = null
open var isAllDay:Boolean? = null
open var startDate:String? = null
open var startTime:String? = null
open var endTime:String? = null
open var bySetPosition:ArrayList<Int>? = null
open var byMonth:ArrayList<Int>? = null
open var byWeekNo:ArrayList<Int>? = null
open var byYearDay:ArrayList<Int>? = null
open var byMonthDay:ArrayList<Int>? = null
open var byDay:ArrayList<ScheduleDay>? = null
open var byHour:ArrayList<Int>? = null
open var byMinute:ArrayList<Int>? = null
open var interval:Int? = null
open var count:Int? = null
open var untilDate:String? = null
open var frequency:SchedulingRuleFrequency? = null
}
enum class SimpleSchedulingRuleTypes
{
Always,
CustomerState,
Time,
}
open class ScheduleDay
{
open var offset:Int? = null
open var dayOfWeek:DayOfWeek? = null
}
enum class SchedulingRuleFrequency
{
None,
Secondly,
Minutely,
Hourly,
Daily,
Weekly,
Monthly,
Yearly,
}
open class EndpointInfo : EntityInfo()
{
/**
* The account ID this endpoint is associated with
*/
@ApiMember(Description="The account ID this endpoint is associated with")
open var accountId:String? = null
/**
* The name of the account this endpoint is associated with
*/
@ApiMember(Description="The name of the account this endpoint is associated with")
open var accountName:String? = null
/**
* The ID of the customer this endpoint is associated with
*/
@ApiMember(Description="The ID of the customer this endpoint is associated with")
open var customerId:String? = null
/**
* The name of the customer this endpoint is associated with
*/
@ApiMember(Description="The name of the customer this endpoint is associated with")
open var customerName:String? = null
/**
* The third party reference ID for the endpoint
*/
@ApiMember(Description="The third party reference ID for the endpoint")
open var referenceId:String? = null
/**
* The breadcrumb to the customer for this endpoint
*/
@ApiMember(Description="The breadcrumb to the customer for this endpoint")
open var customerBreadcrumb:ArrayList<CustomerBreadcrumb>? = null
/**
* The display name of the endpoint
*/
@ApiMember(Description="The display name of the endpoint")
open var displayName:String? = null
/**
* The type of endpoint
*/
@ApiMember(Description="The type of endpoint")
@SerializedName("type") open var Type:EndpointTypes? = null
/**
* Extra info for this endpoint (typically to show in grid)
*/
@ApiMember(Description="Extra info for this endpoint (typically to show in grid)")
open var extraInformation:String? = null
/**
* The ID of the flow to use for voice
*/
@ApiMember(Description="The ID of the flow to use for voice")
open var flowId:String? = null
/**
* The name of the flow to use for voice
*/
@ApiMember(Description="The name of the flow to use for voice")
open var flowName:String? = null
/**
* The params for the voice flow
*/
@ApiMember(Description="The params for the voice flow")
open var flowParams:Struct? = null
/**
* Whether to use a single flow always or use scheduled flow system
*/
@ApiMember(Description="Whether to use a single flow always or use scheduled flow system")
open var flowSchedule:EndpointFlowSchedules? = null
/**
* This endpoint's schedule
*/
@ApiMember(Description="This endpoint's schedule")
open var schedule:Schedule? = null
/**
* The list of scheduled flows when using scheduling
*/
@ApiMember(Description="The list of scheduled flows when using scheduling")
open var scheduledFlows:ArrayList<ScheduledFlow>? = null
/**
* Disable SMS
*/
@ApiMember(Description="Disable SMS")
open var disableSms:Boolean? = null
/**
* Set this to true to prevent Evo Voice from overriding the 10DLC / SMS settings for this number
*/
@ApiMember(Description="Set this to true to prevent Evo Voice from overriding the 10DLC / SMS settings for this number")
open var useExternal10DlcCampaign:Boolean? = null
/**
* Is this a virtual phone number?
*/
@ApiMember(Description="Is this a virtual phone number?")
open var isVirtualPhoneNumber:Boolean? = null
/**
* Is caller ID verified for this virtual number?
*/
@ApiMember(Description="Is caller ID verified for this virtual number?")
open var isCallerIdVerified:Boolean? = null
/**
* The verification code for this number
*/
@ApiMember(Description="The verification code for this number")
open var callerIdVerificationCode:String? = null
/**
* The phone number
*/
@ApiMember(Description="The phone number")
open var phoneNumber:String? = null
/**
* The Sid of the phone number
*/
@ApiMember(Description="The Sid of the phone number")
open var phoneNumberSid:String? = null
/**
* The caller ID Name (CNAM) for the phone number
*/
@ApiMember(Description="The caller ID Name (CNAM) for the phone number")
open var callerIdName:String? = null
/**
* The address SID associated with the phone number
*/
@ApiMember(Description="The address SID associated with the phone number")
open var addressSid:String? = null
/**
* Do not touch this phone number - for BYOA accounts
*/
@ApiMember(Description="Do not touch this phone number - for BYOA accounts")
open var doNotTouchPhoneNumber:Boolean? = null
/**
* Is this number enrolled in a 10DLC messaging service campaign
*/
@ApiMember(Description="Is this number enrolled in a 10DLC messaging service campaign")
open var isEnrolledIn10DlcService:Boolean? = null
/**
* Whether we look up caller ID or not
*/
@ApiMember(Description="Whether we look up caller ID or not")
open var enableCallerIdLookup:Boolean? = null
/**
* The email address of the user
*/
@ApiMember(Description="The email address of the user")
open var userEmailAddress:String? = null
/**
* The Twilio Region for the SIP endpoint
*/
@ApiMember(Description="The Twilio Region for the SIP endpoint")
open var sipRegion:TwilioSipRegions? = null
/**
* The Twilio Sid of the credentials for Sip
*/
@ApiMember(Description="The Twilio Sid of the credentials for Sip")
open var sipCredentialSid:String? = null
/**
* The Twilio SIP user name
*/
@ApiMember(Description="The Twilio SIP user name")
open var sipUserName:String? = null
/**
* The Twilio SIP password
*/
@ApiMember(Description="The Twilio SIP password")
open var sipPassword:String? = null
/**
* The SIP domain
*/
@ApiMember(Description="The SIP domain")
open var sipDomain:String? = null
/**
* Is emergency calling enabled on this number?
*/
@ApiMember(Description="Is emergency calling enabled on this number?")
open var enableEmergencyCalling:Boolean? = null
/**
* The SID of the emergency address for this number
*/
@ApiMember(Description="The SID of the emergency address for this number")
open var emergencyAddressSid:String? = null
/**
* The ID of the phone number to use for emergency dialing
*/
@ApiMember(Description="The ID of the phone number to use for emergency dialing")
open var emergencyPhoneNumberId:String? = null
/**
* The current agent state of this user endpoint
*/
@ApiMember(Description="The current agent state of this user endpoint")
open var agentState:AgentStates? = null
/**
* The current agent state reason of this user endpoint
*/
@ApiMember(Description="The current agent state reason of this user endpoint")
open var agentStateReason:AgentStateReasons? = null
/**
* The mode for this user
*/
@ApiMember(Description="The mode for this user")
open var userMode:UserModes? = null
/**
* The ID of the file to use for voicemail greeting
*/
@ApiMember(Description="The ID of the file to use for voicemail greeting")
open var voicemailGreetingId:String? = null
/**
* The endpoint's data
*/
@ApiMember(Description="The endpoint's data")
@SerializedName("data") open var Data:Struct? = null
/**
* The email address for email endpoints
*/
@ApiMember(Description="The email address for email endpoints")
open var emailAddress:String? = null
/**
* The first name of the user (for user endpoints)
*/
@ApiMember(Description="The first name of the user (for user endpoints)")
open var userFirstName:String? = null
/**
* The last name of the user (for user endpoints)
*/
@ApiMember(Description="The last name of the user (for user endpoints)")
open var userLastName:String? = null
/**
* The URL of an image for this user's avatar
*/
@ApiMember(Description="The URL of an image for this user's avatar")
open var avatarUrl:String? = null
/**
* Does this user have manager role?
*/
@ApiMember(Description="Does this user have manager role?")
open var managerRole:UserManagerRoles? = null
/**
* The list of dashboard permissions for when the manager role is custom
*/
@ApiMember(Description="The list of dashboard permissions for when the manager role is custom")
open var dashboardPermissions:ArrayList<DashboardPermissions>? = null
/**
* The type of visibility this user has to their own fields
*/
@ApiMember(Description="The type of visibility this user has to their own fields")
open var myFieldPermissions:UserDataFieldModes? = null
/**
* The type of visibility this user has to customer fields
*/
@ApiMember(Description="The type of visibility this user has to customer fields")
open var customerFieldPermissions:UserDataFieldModes? = null
/**
* The type of visibility this user has to other user fields
*/
@ApiMember(Description="The type of visibility this user has to other user fields")
open var otherUserFieldPermissions:UserDataFieldModes? = null
/**
* The type of visibility this user has to other endpoint fields
*/
@ApiMember(Description="The type of visibility this user has to other endpoint fields")
open var otherEndpointFieldPermissions:UserDataFieldModes? = null
/**
* The name of this endpoint (for bots etc.)
*/
@ApiMember(Description="The name of this endpoint (for bots etc.)")
open var name:String? = null
/**
* The list of tags for this endpoint
*/
@ApiMember(Description="The list of tags for this endpoint")
open var tags:ArrayList<Tag>? = null
/**
* The list of action URLs
*/
@ApiMember(Description="The list of action URLs")
open var actionUrls:ArrayList<EndpointActionUrl>? = null
/**
* The list of members in this team
*/
@ApiMember(Description="The list of members in this team")
open var teamMemberIds:ArrayList<String>? = null
/**
* Visibility of this user/team in contact lists
*/
@ApiMember(Description="Visibility of this user/team in contact lists")
open var contactListVisibility:CustomerVisibility? = null
/**
* The list of contacts personal to this user
*/
@ApiMember(Description="The list of contacts personal to this user")
open var contacts:ArrayList<EndpointContact>? = null
/**
* The documo ID for this number
*/
@ApiMember(Description="The documo ID for this number")
open var documoId:String? = null
/**
* Integration data for this endpoint
*/
@ApiMember(Description="Integration data for this endpoint")
open var integrationData:EntityIntegrationData? = null
/**
* Settings for third party phone system
*/
@ApiMember(Description="Settings for third party phone system")
open var thirdPartyPhoneSystemSettings:ThirdPartyPhoneSystemSettings? = null
/**
* Should this user override the parent customer's app settings
*/
@ApiMember(Description="Should this user override the parent customer's app settings")
open var overrideAppSettings:Boolean? = null
/**
* App / Portal settings for this user
*/
@ApiMember(Description="App / Portal settings for this user")
open var appSettings:AppSettings? = null
/**
* Configuration for the AI assistant
*/
@ApiMember(Description="Configuration for the AI assistant")
open var assistantSettings:AssistantSettings? = null
/**
* Configuration for the embed
*/
@ApiMember(Description="Configuration for the embed")
open var embedSettings:EmbedSettings? = null
}
open class EntityInfo
{
/**
* The ID of the object
*/
@ApiMember(Description="The ID of the object")
open var id:String? = null
/**
* The date the object was created
*/
@ApiMember(Description="The date the object was created")
open var dateCreated:String? = null
/**
* The date the object was last modified
*/
@ApiMember(Description="The date the object was last modified")
open var dateLastModified:String? = null
/**
* The user that created this object
*/
@ApiMember(Description="The user that created this object")
open var createdBy:String? = null
/**
* The user that last modified this object
*/
@ApiMember(Description="The user that last modified this object")
open var lastModifiedBy:String? = null
}
open class CustomerBreadcrumb
{
open var id:String? = null
open var name:String? = null
}
enum class EndpointTypes
{
PhoneNumber,
User,
FaxNumber,
EmailAddress,
Unused1,
Unused2,
Unused3,
Unused4,
Unused5,
Team,
Assistant,
}
open class ScheduledFlow
{
open var stateName:String? = null
open var flowId:String? = null
open var flowParams:Struct? = null
}
enum class TwilioSipRegions
{
NorthAmericaVirginia,
NorthAmericaOregon,
EuropeIreland,
EuropeFrankfurt,
AsiaPacificSingapore,
AsiaPacificTokyo,
AsiaPacificSydney,
SouthAmericaSanPaolo,
}
enum class AgentStates
{
Unknown,
Ready,
NotReady,
LoggedOut,
WrapUp,
Outgoing,
Other,
}
enum class AgentStateReasons
{
Unknown,
SetByUser,
MissedCall,
SetBySystem,
}
enum class UserModes
{
SoftPhone,
Sip,
Flow,
DataOnly,
ThirdParty,
}
enum class UserManagerRoles
{
None,
Manager,
VoicemailAndCallHistory,
Custom,
}
enum class DashboardPermissions
{
ViewFiles,
ViewNotifications,
ViewSessions,
ViewEndpoints,
ViewReports,
ViewCustomers,
ViewFlows,
}
enum class UserDataFieldModes
{
Hidden,
ReadOnly,
ReadWrite,
}
open class Tag
{
open var id:String? = null
open var name:String? = null
open var color:TagColors? = null
}
enum class TagColors
{
Magenta,
Red,
Volcano,
Orange,
Gold,
Lime,
Green,
Cyan,
Blue,
GeekBlue,
Purple,
}
open class EndpointActionUrl
{
open var id:String? = null
open var url:String? = null
open var method:ActionUrlHttpMethods? = null
}
enum class ActionUrlHttpMethods
{
Get,
Post,
}
enum class CustomerVisibility
{
None,
CurrentCustomer,
CurrentAndChildCustomers,
}
open class EndpointContact
{
open var id:String? = null
open var displayName:String? = null
open var address:String? = null
}
open class EntityIntegrationData : HashMap<String,IntegrationData>()
{
}
open class IntegrationData
{
open var thirdPartyId:String? = null
}
open class ThirdPartyPhoneSystemSettings
{
@SerializedName("type") open var Type:ThirdPartyPhoneSystemTypes? = null
open var sipSettings:ThirdPartySipSettings? = null
open var demoSettings:ThirdPartyDemoSettings? = null
}
enum class ThirdPartyPhoneSystemTypes
{
Demo,
Sip,
}
open class ThirdPartySipSettings
{
open var accounts:ArrayList<ThirdPartySipAccountSettings>? = null
}
open class ThirdPartySipAccountSettings
{
open var number:String? = null
open var agent:String? = null
open var authName:String? = null
open var userName:String? = null
open var displayName:String? = null
open var password:String? = null
open var userDomain:String? = null
open var registrationExpires:Int? = null
open var transportType:TransportTypes? = null
open var localIP:String? = null
open var localPort:Int? = null
open var sipServer:String? = null
open var sipServerPort:Int? = null
open var outboundServer:String? = null
open var outboundServerPort:Int? = null
open var stunServer:String? = null
open var stunPort:Int? = null
open var audioPlaybackDeviceName:String? = null
open var audioRecordingDeviceName:String? = null
open var audioCodecs:ArrayList<AudioCodecTypes>? = null
open var dtmfMethod:DtmfMethods? = null
}
enum class TransportTypes
{
Udp,
Tls,
Tcp,
Pers,
}
enum class AudioCodecTypes(val value:Int)
{
Pcmu(0),
Gsm(3),
Pcma(8),
G722(9),
G729(18),
Ilbc(97),
Amr(98),
Amrwb(99),
Speex(100),
Dtmf(101),
Speexwb(102),
Isacwb(103),
Isacswb(104),
Opus(105),
G7221(121),
None(-1),
}
enum class DtmfMethods
{
RfC2833,
Info,
}
open class ThirdPartyDemoSettings
{
open var extension:String? = null
}
open class AppSettings
{
open var enablePhoneNumberManagement:Boolean? = null
open var enableDeviceManagement:Boolean? = null
open var enableDialer:Boolean? = null
open var enableCallHistory:Boolean? = null
open var enableAssistants:Boolean? = null
open var showFileNameInMessageCenter:Boolean? = null
open var chakraTheme:String? = null
open var customCss:String? = null
open var pageTitle:String? = null
open var stringMappings:String? = null
open var logoutUrl:String? = null
open var portMyNumberUrl:String? = null
}
open class AssistantSettings
{
open var companyName:String? = null
open var greeting:String? = null
open var companyInformation:String? = null
open var customPrompt:String? = null
open var voice:String? = null
open var voiceStyle:String? = null
open var tuning:AssistantTunings? = null
open var words:ArrayList<AssistantWord>? = null
open var links:ArrayList<AssistantLink>? = null
open var contacts:ArrayList<AssistantContact>? = null
open var integrations:ArrayList<AssistantIntegration>? = null
}
enum class AssistantTunings
{
Accuracy,
Speed,
}
open class AssistantWord
{
open var word:String? = null
open var pronounced:String? = null
}
open class AssistantLink
{
open var url:String? = null
open var description:String? = null
}
open class AssistantContact
{
open var name:String? = null
open var phoneNumber:String? = null
open var transferType:AssistantTransferTypes? = null
open var about:String? = null
open var emailAddress:String? = null
open var takeMessageFields:ArrayList<AssistantTakeMessageField>? = null
}
enum class AssistantTransferTypes
{
Blind,
Supervised,
MessagesOnly,
}
open class AssistantTakeMessageField
{
open var name:String? = null
open var description:String? = null
open var required:Boolean? = null
}
open class AssistantIntegration
{
open var uri:String? = null
open var httpMethod:String? = null
open var authToken:String? = null
}
open class EmbedSettings
{
open var enabled:Boolean? = null
open var allowedHosts:String? = null
}
Kotlin AppUpdatePhoneNumber DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PATCH /portal/phone-number HTTP/1.1
Host: team.evovoice.io
Accept: application/json
Content-Type: application/json
Content-Length: length
{"phoneNumberId":"String","flowId":"String","flowSchedule":"Always","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","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"},"name":"String","callerIdName":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"accountId":"String","accountName":"String","customerId":"String","customerName":"String","referenceId":"String","customerBreadcrumb":[{"id":"String","name":"String"}],"displayName":"String","type":"PhoneNumber","extraInformation":"String","flowId":"String","flowName":"String","flowSchedule":"Always","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","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"},"scheduledFlows":[{"stateName":"String","flowId":"String"}],"disableSms":false,"useExternal10DlcCampaign":false,"isVirtualPhoneNumber":false,"isCallerIdVerified":false,"callerIdVerificationCode":"String","phoneNumber":"String","phoneNumberSid":"String","callerIdName":"String","addressSid":"String","doNotTouchPhoneNumber":false,"isEnrolledIn10DlcService":false,"enableCallerIdLookup":false,"userEmailAddress":"String","sipRegion":"NorthAmericaVirginia","sipCredentialSid":"String","sipUserName":"String","sipPassword":"String","sipDomain":"String","enableEmergencyCalling":false,"emergencyAddressSid":"String","emergencyPhoneNumberId":"String","agentState":"Unknown","agentStateReason":"Unknown","userMode":"SoftPhone","voicemailGreetingId":"String","emailAddress":"String","userFirstName":"String","userLastName":"String","avatarUrl":"String","managerRole":"None","dashboardPermissions":["ViewFiles"],"myFieldPermissions":"Hidden","customerFieldPermissions":"Hidden","otherUserFieldPermissions":"Hidden","otherEndpointFieldPermissions":"Hidden","name":"String","tags":[{"id":"String","name":"String","color":"Magenta"}],"actionUrls":[{"id":"String","url":"String","method":"GET"}],"teamMemberIds":["String"],"contactListVisibility":"None","contacts":[{"id":"String","displayName":"String","address":"String"}],"documoId":"String","integrationData":{"String":{"thirdPartyId":"String"}},"thirdPartyPhoneSystemSettings":{"type":"Demo","sipSettings":{"accounts":[{"number":"String","agent":"String","authName":"String","userName":"String","displayName":"String","password":"String","userDomain":"String","registrationExpires":0,"transportType":"UDP","localIP":"String","localPort":0,"sipServer":"String","sipServerPort":0,"outboundServer":"String","outboundServerPort":0,"stunServer":"String","stunPort":0,"audioPlaybackDeviceName":"String","audioRecordingDeviceName":"String","audioCodecs":["PCMU"],"dtmfMethod":"RFC2833"}]},"demoSettings":{"extension":"String"}},"overrideAppSettings":false,"appSettings":{"enablePhoneNumberManagement":false,"enableDeviceManagement":false,"enableDialer":false,"enableCallHistory":false,"enableAssistants":false,"showFileNameInMessageCenter":false,"chakraTheme":"String","customCss":"String","pageTitle":"String","stringMappings":"String","logoutUrl":"String","portMyNumberUrl":"String"},"assistantSettings":{"companyName":"String","greeting":"String","companyInformation":"String","customPrompt":"String","voice":"String","voiceStyle":"String","tuning":"Accuracy","words":[{"word":"String","pronounced":"String"}],"links":[{"url":"String","description":"String"}],"contacts":[{"name":"String","phoneNumber":"String","transferType":"Blind","about":"String","emailAddress":"String","takeMessageFields":[{"name":"String","description":"String","required":false}]}],"integrations":[{"uri":"String","httpMethod":"String","authToken":"String"}]},"embedSettings":{"enabled":false,"allowedHosts":"String"},"id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}