Evo Voice

<back to all web services

PatchCustomer

Update a specific customer

Requires Authentication
Requires any of the roles:SystemAdministrator, Manager, Customer
The following routes are available for this service:
PATCH/customers/{customerId}
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


/**
* Update a specific customer
*/
@Api(Description="Update a specific customer")
open class PatchCustomer : IPatch
{
    /**
    * The ID of the customer you want to update
    */
    @ApiMember(Description="The ID of the customer you want to update")
    var customerId:String? = null

    /**
    * The name for the customer
    */
    @ApiMember(Description="The name for the customer")
    var name:String? = null

    /**
    * The parent customer for this customer
    */
    @ApiMember(Description="The parent customer for this customer")
    var parentCustomerId:String? = null

    /**
    * The reference ID for this customer (e.g. in a third party system)
    */
    @ApiMember(Description="The reference ID for this customer (e.g. in a third party system)")
    var referenceId:String? = null

    /**
    * Data values for this customer
    */
    @ApiMember(Description="Data values for this customer")
    @SerializedName("data") var Data:Struct? = null

    /**
    * The list of tag IDs for this customer
    */
    @ApiMember(Description="The list of tag IDs for this customer")
    var tagIds:ArrayList<String> = ArrayList<String>()

    /**
    * This customer's schedule
    */
    @ApiMember(Description="This customer's schedule")
    var schedule:Schedule? = null

    /**
    * Override this customer's billing settings? Otherwise inherits from parent
    */
    @ApiMember(Description="Override this customer's billing settings? Otherwise inherits from parent")
    var overrideBillingSettings:Boolean? = null

    /**
    * Updated billing settings for this customer
    */
    @ApiMember(Description="Updated billing settings for this customer")
    var billingSettings:BillingSettings? = null

    /**
    * Should this customer override the parent customer's app settings
    */
    @ApiMember(Description="Should this customer override the parent customer's app settings")
    var overrideAppSettings:Boolean? = null

    /**
    * App / Portal settings for this customer
    */
    @ApiMember(Description="App / Portal settings for this customer")
    var appSettings:AppSettings? = null
}

open class Struct : HashMap<String,Value>()
{
}

open class Value
{
    var boolValue:Boolean? = null
    var stringValue:String? = null
    var numberValue:Double? = null
    var listValue:ArrayList<Struct> = ArrayList<Struct>()
    var structValue:Struct? = null
}

open class Schedule
{
    var timeZoneId:String? = null
    var inherit:Boolean? = null
    var forceClosed:Boolean? = null
    var rules:ArrayList<SchedulingRule> = ArrayList<SchedulingRule>()
    var defaultState:String? = null
}

open class SchedulingRule
{
    var id:String? = null
    var name:String? = null
    var priority:Int? = null
    var state:String? = null
    var source:String? = null
    var condition:String? = null
    var simpleRuleType:SimpleSchedulingRuleTypes? = null
    var customerState:String? = null
    var flowId:String? = null
    var flowParams:Struct? = null
    var isAllDay:Boolean? = null
    var startDate:String? = null
    var startTime:String? = null
    var endTime:String? = null
    var bySetPosition:ArrayList<Int> = ArrayList<Int>()
    var byMonth:ArrayList<Int> = ArrayList<Int>()
    var byWeekNo:ArrayList<Int> = ArrayList<Int>()
    var byYearDay:ArrayList<Int> = ArrayList<Int>()
    var byMonthDay:ArrayList<Int> = ArrayList<Int>()
    var byDay:ArrayList<ScheduleDay> = ArrayList<ScheduleDay>()
    var byHour:ArrayList<Int> = ArrayList<Int>()
    var byMinute:ArrayList<Int> = ArrayList<Int>()
    var interval:Int? = null
    var count:Int? = null
    var untilDate:String? = null
    var frequency:SchedulingRuleFrequency? = null
}

enum class SimpleSchedulingRuleTypes
{
    Always,
    CustomerState,
    Time,
}

open class ScheduleDay
{
    var offset:Int? = null
    var dayOfWeek:DayOfWeek? = null
}

enum class SchedulingRuleFrequency
{
    None,
    Secondly,
    Minutely,
    Hourly,
    Daily,
    Weekly,
    Monthly,
    Yearly,
}

open class BillingSettings
{
    var base:BillingItem? = null
    var localNumbers:BillingItem? = null
    var tollFreeNumbers:BillingItem? = null
    var inboundVoiceCalls:BillingItem? = null
    var outboundVoiceCalls:BillingItem? = null
    var inboundFaxes:BillingItem? = null
    var outboundFaxes:BillingItem? = null
    var inboundSmsMessages:BillingItem? = null
    var outboundSmsMessages:BillingItem? = null
}

open class BillingItem
{
    var baseCost:Double? = null
    var rawUnitMultiplier:Double? = null
    var unitCost:Double? = null
    var allowance:Int? = null
}

open class AppSettings
{
    var enablePhoneNumberManagement:Boolean? = null
    var enableDeviceManagement:Boolean? = null
    var enableDialer:Boolean? = null
    var enableCallHistory:Boolean? = null
    var showFileNameInMessageCenter:Boolean? = null
    var chakraTheme:String? = null
    var customCss:String? = null
    var pageTitle:String? = null
    var stringMappings:String? = null
    var logoutUrl:String? = null
    var portMyNumberUrl:String? = null
}

open class CustomerInfo : EntityInfo()
{
    /**
    * The ID of the account associated with this customer
    */
    @ApiMember(Description="The ID of the account associated with this customer")
    var accountId:String? = null

    /**
    * The parent customer ID for this customer
    */
    @ApiMember(Description="The parent customer ID for this customer")
    var parentCustomerId:String? = null

    /**
    * The breadcrumb to this customer
    */
    @ApiMember(Description="The breadcrumb to this customer")
    var breadcrumb:ArrayList<CustomerBreadcrumb> = ArrayList<CustomerBreadcrumb>()

    /**
    * The name of the account associated with this customer
    */
    @ApiMember(Description="The name of the account associated with this customer")
    var accountName:String? = null

    /**
    * Is this customer staging or production?
    */
    @ApiMember(Description="Is this customer staging or production?")
    var isStaging:Boolean? = null

    /**
    * The name of the company
    */
    @ApiMember(Description="The name of the company")
    var name:String? = null

    /**
    * The reference ID for this company
    */
    @ApiMember(Description="The reference ID for this company")
    var referenceId:String? = null

    /**
    * This customer's data values
    */
    @ApiMember(Description="This customer's data values")
    @SerializedName("data") var Data:Struct? = null

    /**
    * The list of tags for this customer
    */
    @ApiMember(Description="The list of tags for this customer")
    var tags:ArrayList<Tag> = ArrayList<Tag>()

    /**
    * This customer's schedule
    */
    @ApiMember(Description="This customer's schedule")
    var schedule:Schedule? = null

    /**
    * Integration data for this customer
    */
    @ApiMember(Description="Integration data for this customer")
    var integrationData:EntityIntegrationData? = null

    /**
    * Override this customer's billing settings? Otherwise inherits from parent
    */
    @ApiMember(Description="Override this customer's billing settings? Otherwise inherits from parent")
    var overrideBillingSettings:Boolean? = null

    /**
    * Billing settings for this customer
    */
    @ApiMember(Description="Billing settings for this customer")
    var billingSettings:BillingSettings? = null

    /**
    * Should this customer override the parent customer's app settings
    */
    @ApiMember(Description="Should this customer override the parent customer's app settings")
    var overrideAppSettings:Boolean? = null

    /**
    * App / Portal settings for this customer
    */
    @ApiMember(Description="App / Portal settings for this customer")
    var appSettings:AppSettings? = null
}

open class EntityInfo
{
    /**
    * The ID of the object
    */
    @ApiMember(Description="The ID of the object")
    var id:String? = null

    /**
    * The date the object was created
    */
    @ApiMember(Description="The date the object was created")
    var dateCreated:String? = null

    /**
    * The date the object was last modified
    */
    @ApiMember(Description="The date the object was last modified")
    var dateLastModified:String? = null

    /**
    * The user that created this object
    */
    @ApiMember(Description="The user that created this object")
    var createdBy:String? = null

    /**
    * The user that last modified this object
    */
    @ApiMember(Description="The user that last modified this object")
    var lastModifiedBy:String? = null
}

open class CustomerBreadcrumb
{
    var id:String? = null
    var name:String? = null
}

open class Tag
{
    var id:String? = null
    var name:String? = null
    var color:TagColors? = null
}

enum class TagColors
{
    Magenta,
    Red,
    Volcano,
    Orange,
    Gold,
    Lime,
    Green,
    Cyan,
    Blue,
    GeekBlue,
    Purple,
}

open class EntityIntegrationData : HashMap<String,IntegrationData>()
{
}

open class IntegrationData
{
    var thirdPartyId:String? = null
}

Kotlin PatchCustomer 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.

PATCH /customers/{customerId} HTTP/1.1 
Host: evovoice.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	customerId: String,
	name: String,
	parentCustomerId: String,
	referenceId: String,
	data: 
	{
		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
							]
						}
					}
				}
			}
		}
	},
	tagIds: 
	[
		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
	},
	overrideBillingSettings: False,
	billingSettings: 
	{
		base: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		localNumbers: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		tollFreeNumbers: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		inboundVoiceCalls: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		outboundVoiceCalls: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		inboundFaxes: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		outboundFaxes: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		inboundSmsMessages: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		outboundSmsMessages: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		}
	},
	overrideAppSettings: False,
	appSettings: 
	{
		enablePhoneNumberManagement: False,
		enableDeviceManagement: False,
		enableDialer: False,
		enableCallHistory: False,
		showFileNameInMessageCenter: False,
		chakraTheme: String,
		customCss: String,
		pageTitle: String,
		stringMappings: String,
		logoutUrl: String,
		portMyNumberUrl: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	accountId: String,
	parentCustomerId: String,
	breadcrumb: 
	[
		{
			id: String,
			name: String
		}
	],
	accountName: String,
	isStaging: False,
	name: String,
	referenceId: String,
	data: 
	{
		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
							]
						}
					}
				}
			}
		}
	},
	tags: 
	[
		{
			id: String,
			name: String,
			color: Magenta
		}
	],
	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
	},
	integrationData: 
	{
		String: 
		{
			thirdPartyId: String
		}
	},
	overrideBillingSettings: False,
	billingSettings: 
	{
		base: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		localNumbers: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		tollFreeNumbers: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		inboundVoiceCalls: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		outboundVoiceCalls: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		inboundFaxes: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		outboundFaxes: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		inboundSmsMessages: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		},
		outboundSmsMessages: 
		{
			baseCost: 0,
			rawUnitMultiplier: 0,
			unitCost: 0,
			allowance: 0
		}
	},
	overrideAppSettings: False,
	appSettings: 
	{
		enablePhoneNumberManagement: False,
		enableDeviceManagement: False,
		enableDialer: False,
		enableCallHistory: False,
		showFileNameInMessageCenter: False,
		chakraTheme: String,
		customCss: String,
		pageTitle: String,
		stringMappings: String,
		logoutUrl: String,
		portMyNumberUrl: String
	},
	id: String,
	dateCreated: String,
	dateLastModified: String,
	createdBy: String,
	lastModifiedBy: String
}