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}
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class EntityInfo implements JsonSerializable
{
    public function __construct(
        /** @description The ID of the object */
        // @ApiMember(Description="The ID of the object")
        /** @var string|null */
        public ?string $id=null,

        /** @description The date the object was created */
        // @ApiMember(Description="The date the object was created")
        /** @var string|null */
        public ?string $dateCreated=null,

        /** @description The date the object was last modified */
        // @ApiMember(Description="The date the object was last modified")
        /** @var string|null */
        public ?string $dateLastModified=null,

        /** @description The user that created this object */
        // @ApiMember(Description="The user that created this object")
        /** @var string|null */
        public ?string $createdBy=null,

        /** @description The user that last modified this object */
        // @ApiMember(Description="The user that last modified this object")
        /** @var string|null */
        public ?string $lastModifiedBy=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['dateCreated'])) $this->dateCreated = $o['dateCreated'];
        if (isset($o['dateLastModified'])) $this->dateLastModified = $o['dateLastModified'];
        if (isset($o['createdBy'])) $this->createdBy = $o['createdBy'];
        if (isset($o['lastModifiedBy'])) $this->lastModifiedBy = $o['lastModifiedBy'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->dateCreated)) $o['dateCreated'] = $this->dateCreated;
        if (isset($this->dateLastModified)) $o['dateLastModified'] = $this->dateLastModified;
        if (isset($this->createdBy)) $o['createdBy'] = $this->createdBy;
        if (isset($this->lastModifiedBy)) $o['lastModifiedBy'] = $this->lastModifiedBy;
        return empty($o) ? new class(){} : $o;
    }
}

class CustomerBreadcrumb implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var string|null */
        public ?string $name=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['name'])) $this->name = $o['name'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->name)) $o['name'] = $this->name;
        return empty($o) ? new class(){} : $o;
    }
}

class Value implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $boolValue=null,
        /** @var string|null */
        public ?string $stringValue=null,
        /** @var float|null */
        public ?float $numberValue=null,
        /** @var array<Struct>|null */
        public ?array $listValue=null,
        /** @var Struct|null */
        public ?Struct $structValue=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['boolValue'])) $this->boolValue = $o['boolValue'];
        if (isset($o['stringValue'])) $this->stringValue = $o['stringValue'];
        if (isset($o['numberValue'])) $this->numberValue = $o['numberValue'];
        if (isset($o['listValue'])) $this->listValue = JsonConverters::fromArray('Struct', $o['listValue']);
        if (isset($o['structValue'])) $this->structValue = JsonConverters::from('Struct', $o['structValue']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->boolValue)) $o['boolValue'] = $this->boolValue;
        if (isset($this->stringValue)) $o['stringValue'] = $this->stringValue;
        if (isset($this->numberValue)) $o['numberValue'] = $this->numberValue;
        if (isset($this->listValue)) $o['listValue'] = JsonConverters::toArray('Struct', $this->listValue);
        if (isset($this->structValue)) $o['structValue'] = JsonConverters::to('Struct', $this->structValue);
        return empty($o) ? new class(){} : $o;
    }
}

/**
 * @template array of String
 * @template array1 of Value
 */
class Struct extends array implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        return empty($o) ? new class(){} : $o;
    }
}

enum TagColors : string
{
    case Magenta = 'Magenta';
    case Red = 'Red';
    case Volcano = 'Volcano';
    case Orange = 'Orange';
    case Gold = 'Gold';
    case Lime = 'Lime';
    case Green = 'Green';
    case Cyan = 'Cyan';
    case Blue = 'Blue';
    case GeekBlue = 'GeekBlue';
    case Purple = 'Purple';
}

class Tag implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var string|null */
        public ?string $name=null,
        /** @var TagColors|null */
        public ?TagColors $color=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['color'])) $this->color = JsonConverters::from('TagColors', $o['color']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->color)) $o['color'] = JsonConverters::to('TagColors', $this->color);
        return empty($o) ? new class(){} : $o;
    }
}

enum SimpleSchedulingRuleTypes : string
{
    case Always = 'Always';
    case CustomerState = 'CustomerState';
    case Time = 'Time';
}

class ScheduleDay implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $offset=0,
        /** @var DayOfWeek|null */
        public ?DayOfWeek $dayOfWeek=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['offset'])) $this->offset = $o['offset'];
        if (isset($o['dayOfWeek'])) $this->dayOfWeek = JsonConverters::from('DayOfWeek', $o['dayOfWeek']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->offset)) $o['offset'] = $this->offset;
        if (isset($this->dayOfWeek)) $o['dayOfWeek'] = JsonConverters::to('DayOfWeek', $this->dayOfWeek);
        return empty($o) ? new class(){} : $o;
    }
}

enum SchedulingRuleFrequency : string
{
    case None = 'None';
    case Secondly = 'Secondly';
    case Minutely = 'Minutely';
    case Hourly = 'Hourly';
    case Daily = 'Daily';
    case Weekly = 'Weekly';
    case Monthly = 'Monthly';
    case Yearly = 'Yearly';
}

class SchedulingRule implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var string|null */
        public ?string $name=null,
        /** @var int */
        public int $priority=0,
        /** @var string|null */
        public ?string $state=null,
        /** @var string|null */
        public ?string $source=null,
        /** @var string|null */
        public ?string $condition=null,
        /** @var SimpleSchedulingRuleTypes|null */
        public ?SimpleSchedulingRuleTypes $simpleRuleType=null,
        /** @var string|null */
        public ?string $customerState=null,
        /** @var string|null */
        public ?string $flowId=null,
        /** @var Struct|null */
        public ?Struct $flowParams=null,
        /** @var bool|null */
        public ?bool $isAllDay=null,
        /** @var string|null */
        public ?string $startDate=null,
        /** @var string|null */
        public ?string $startTime=null,
        /** @var string|null */
        public ?string $endTime=null,
        /** @var array<int>|null */
        public ?array $bySetPosition=null,
        /** @var array<int>|null */
        public ?array $byMonth=null,
        /** @var array<int>|null */
        public ?array $byWeekNo=null,
        /** @var array<int>|null */
        public ?array $byYearDay=null,
        /** @var array<int>|null */
        public ?array $byMonthDay=null,
        /** @var array<ScheduleDay>|null */
        public ?array $byDay=null,
        /** @var array<int>|null */
        public ?array $byHour=null,
        /** @var array<int>|null */
        public ?array $byMinute=null,
        /** @var int */
        public int $interval=0,
        /** @var int */
        public int $count=0,
        /** @var string|null */
        public ?string $untilDate=null,
        /** @var SchedulingRuleFrequency|null */
        public ?SchedulingRuleFrequency $frequency=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['priority'])) $this->priority = $o['priority'];
        if (isset($o['state'])) $this->state = $o['state'];
        if (isset($o['source'])) $this->source = $o['source'];
        if (isset($o['condition'])) $this->condition = $o['condition'];
        if (isset($o['simpleRuleType'])) $this->simpleRuleType = JsonConverters::from('SimpleSchedulingRuleTypes', $o['simpleRuleType']);
        if (isset($o['customerState'])) $this->customerState = $o['customerState'];
        if (isset($o['flowId'])) $this->flowId = $o['flowId'];
        if (isset($o['flowParams'])) $this->flowParams = JsonConverters::from('Struct', $o['flowParams']);
        if (isset($o['isAllDay'])) $this->isAllDay = $o['isAllDay'];
        if (isset($o['startDate'])) $this->startDate = $o['startDate'];
        if (isset($o['startTime'])) $this->startTime = $o['startTime'];
        if (isset($o['endTime'])) $this->endTime = $o['endTime'];
        if (isset($o['bySetPosition'])) $this->bySetPosition = JsonConverters::fromArray('int', $o['bySetPosition']);
        if (isset($o['byMonth'])) $this->byMonth = JsonConverters::fromArray('int', $o['byMonth']);
        if (isset($o['byWeekNo'])) $this->byWeekNo = JsonConverters::fromArray('int', $o['byWeekNo']);
        if (isset($o['byYearDay'])) $this->byYearDay = JsonConverters::fromArray('int', $o['byYearDay']);
        if (isset($o['byMonthDay'])) $this->byMonthDay = JsonConverters::fromArray('int', $o['byMonthDay']);
        if (isset($o['byDay'])) $this->byDay = JsonConverters::fromArray('ScheduleDay', $o['byDay']);
        if (isset($o['byHour'])) $this->byHour = JsonConverters::fromArray('int', $o['byHour']);
        if (isset($o['byMinute'])) $this->byMinute = JsonConverters::fromArray('int', $o['byMinute']);
        if (isset($o['interval'])) $this->interval = $o['interval'];
        if (isset($o['count'])) $this->count = $o['count'];
        if (isset($o['untilDate'])) $this->untilDate = $o['untilDate'];
        if (isset($o['frequency'])) $this->frequency = JsonConverters::from('SchedulingRuleFrequency', $o['frequency']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->priority)) $o['priority'] = $this->priority;
        if (isset($this->state)) $o['state'] = $this->state;
        if (isset($this->source)) $o['source'] = $this->source;
        if (isset($this->condition)) $o['condition'] = $this->condition;
        if (isset($this->simpleRuleType)) $o['simpleRuleType'] = JsonConverters::to('SimpleSchedulingRuleTypes', $this->simpleRuleType);
        if (isset($this->customerState)) $o['customerState'] = $this->customerState;
        if (isset($this->flowId)) $o['flowId'] = $this->flowId;
        if (isset($this->flowParams)) $o['flowParams'] = JsonConverters::to('Struct', $this->flowParams);
        if (isset($this->isAllDay)) $o['isAllDay'] = $this->isAllDay;
        if (isset($this->startDate)) $o['startDate'] = $this->startDate;
        if (isset($this->startTime)) $o['startTime'] = $this->startTime;
        if (isset($this->endTime)) $o['endTime'] = $this->endTime;
        if (isset($this->bySetPosition)) $o['bySetPosition'] = JsonConverters::toArray('int', $this->bySetPosition);
        if (isset($this->byMonth)) $o['byMonth'] = JsonConverters::toArray('int', $this->byMonth);
        if (isset($this->byWeekNo)) $o['byWeekNo'] = JsonConverters::toArray('int', $this->byWeekNo);
        if (isset($this->byYearDay)) $o['byYearDay'] = JsonConverters::toArray('int', $this->byYearDay);
        if (isset($this->byMonthDay)) $o['byMonthDay'] = JsonConverters::toArray('int', $this->byMonthDay);
        if (isset($this->byDay)) $o['byDay'] = JsonConverters::toArray('ScheduleDay', $this->byDay);
        if (isset($this->byHour)) $o['byHour'] = JsonConverters::toArray('int', $this->byHour);
        if (isset($this->byMinute)) $o['byMinute'] = JsonConverters::toArray('int', $this->byMinute);
        if (isset($this->interval)) $o['interval'] = $this->interval;
        if (isset($this->count)) $o['count'] = $this->count;
        if (isset($this->untilDate)) $o['untilDate'] = $this->untilDate;
        if (isset($this->frequency)) $o['frequency'] = JsonConverters::to('SchedulingRuleFrequency', $this->frequency);
        return empty($o) ? new class(){} : $o;
    }
}

class Schedule implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $timeZoneId=null,
        /** @var bool|null */
        public ?bool $inherit=null,
        /** @var bool|null */
        public ?bool $forceClosed=null,
        /** @var array<SchedulingRule>|null */
        public ?array $rules=null,
        /** @var string|null */
        public ?string $defaultState=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['timeZoneId'])) $this->timeZoneId = $o['timeZoneId'];
        if (isset($o['inherit'])) $this->inherit = $o['inherit'];
        if (isset($o['forceClosed'])) $this->forceClosed = $o['forceClosed'];
        if (isset($o['rules'])) $this->rules = JsonConverters::fromArray('SchedulingRule', $o['rules']);
        if (isset($o['defaultState'])) $this->defaultState = $o['defaultState'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->timeZoneId)) $o['timeZoneId'] = $this->timeZoneId;
        if (isset($this->inherit)) $o['inherit'] = $this->inherit;
        if (isset($this->forceClosed)) $o['forceClosed'] = $this->forceClosed;
        if (isset($this->rules)) $o['rules'] = JsonConverters::toArray('SchedulingRule', $this->rules);
        if (isset($this->defaultState)) $o['defaultState'] = $this->defaultState;
        return empty($o) ? new class(){} : $o;
    }
}

class IntegrationData implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $thirdPartyId=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['thirdPartyId'])) $this->thirdPartyId = $o['thirdPartyId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->thirdPartyId)) $o['thirdPartyId'] = $this->thirdPartyId;
        return empty($o) ? new class(){} : $o;
    }
}

/**
 * @template array of String
 * @template array1 of IntegrationData
 */
class EntityIntegrationData extends array implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        return empty($o) ? new class(){} : $o;
    }
}

class BillingItem implements JsonSerializable
{
    public function __construct(
        /** @var float */
        public float $baseCost=0.0,
        /** @var float */
        public float $rawUnitMultiplier=0.0,
        /** @var float */
        public float $unitCost=0.0,
        /** @var int */
        public int $allowance=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['baseCost'])) $this->baseCost = $o['baseCost'];
        if (isset($o['rawUnitMultiplier'])) $this->rawUnitMultiplier = $o['rawUnitMultiplier'];
        if (isset($o['unitCost'])) $this->unitCost = $o['unitCost'];
        if (isset($o['allowance'])) $this->allowance = $o['allowance'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->baseCost)) $o['baseCost'] = $this->baseCost;
        if (isset($this->rawUnitMultiplier)) $o['rawUnitMultiplier'] = $this->rawUnitMultiplier;
        if (isset($this->unitCost)) $o['unitCost'] = $this->unitCost;
        if (isset($this->allowance)) $o['allowance'] = $this->allowance;
        return empty($o) ? new class(){} : $o;
    }
}

class BillingSettings implements JsonSerializable
{
    public function __construct(
        /** @var BillingItem|null */
        public ?BillingItem $base=null,
        /** @var BillingItem|null */
        public ?BillingItem $localNumbers=null,
        /** @var BillingItem|null */
        public ?BillingItem $tollFreeNumbers=null,
        /** @var BillingItem|null */
        public ?BillingItem $inboundVoiceCalls=null,
        /** @var BillingItem|null */
        public ?BillingItem $outboundVoiceCalls=null,
        /** @var BillingItem|null */
        public ?BillingItem $inboundFaxes=null,
        /** @var BillingItem|null */
        public ?BillingItem $outboundFaxes=null,
        /** @var BillingItem|null */
        public ?BillingItem $inboundSmsMessages=null,
        /** @var BillingItem|null */
        public ?BillingItem $outboundSmsMessages=null,
        /** @var BillingItem|null */
        public ?BillingItem $aiInsights=null,
        /** @var BillingItem|null */
        public ?BillingItem $aiLiveMinutes=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['base'])) $this->base = JsonConverters::from('BillingItem', $o['base']);
        if (isset($o['localNumbers'])) $this->localNumbers = JsonConverters::from('BillingItem', $o['localNumbers']);
        if (isset($o['tollFreeNumbers'])) $this->tollFreeNumbers = JsonConverters::from('BillingItem', $o['tollFreeNumbers']);
        if (isset($o['inboundVoiceCalls'])) $this->inboundVoiceCalls = JsonConverters::from('BillingItem', $o['inboundVoiceCalls']);
        if (isset($o['outboundVoiceCalls'])) $this->outboundVoiceCalls = JsonConverters::from('BillingItem', $o['outboundVoiceCalls']);
        if (isset($o['inboundFaxes'])) $this->inboundFaxes = JsonConverters::from('BillingItem', $o['inboundFaxes']);
        if (isset($o['outboundFaxes'])) $this->outboundFaxes = JsonConverters::from('BillingItem', $o['outboundFaxes']);
        if (isset($o['inboundSmsMessages'])) $this->inboundSmsMessages = JsonConverters::from('BillingItem', $o['inboundSmsMessages']);
        if (isset($o['outboundSmsMessages'])) $this->outboundSmsMessages = JsonConverters::from('BillingItem', $o['outboundSmsMessages']);
        if (isset($o['aiInsights'])) $this->aiInsights = JsonConverters::from('BillingItem', $o['aiInsights']);
        if (isset($o['aiLiveMinutes'])) $this->aiLiveMinutes = JsonConverters::from('BillingItem', $o['aiLiveMinutes']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->base)) $o['base'] = JsonConverters::to('BillingItem', $this->base);
        if (isset($this->localNumbers)) $o['localNumbers'] = JsonConverters::to('BillingItem', $this->localNumbers);
        if (isset($this->tollFreeNumbers)) $o['tollFreeNumbers'] = JsonConverters::to('BillingItem', $this->tollFreeNumbers);
        if (isset($this->inboundVoiceCalls)) $o['inboundVoiceCalls'] = JsonConverters::to('BillingItem', $this->inboundVoiceCalls);
        if (isset($this->outboundVoiceCalls)) $o['outboundVoiceCalls'] = JsonConverters::to('BillingItem', $this->outboundVoiceCalls);
        if (isset($this->inboundFaxes)) $o['inboundFaxes'] = JsonConverters::to('BillingItem', $this->inboundFaxes);
        if (isset($this->outboundFaxes)) $o['outboundFaxes'] = JsonConverters::to('BillingItem', $this->outboundFaxes);
        if (isset($this->inboundSmsMessages)) $o['inboundSmsMessages'] = JsonConverters::to('BillingItem', $this->inboundSmsMessages);
        if (isset($this->outboundSmsMessages)) $o['outboundSmsMessages'] = JsonConverters::to('BillingItem', $this->outboundSmsMessages);
        if (isset($this->aiInsights)) $o['aiInsights'] = JsonConverters::to('BillingItem', $this->aiInsights);
        if (isset($this->aiLiveMinutes)) $o['aiLiveMinutes'] = JsonConverters::to('BillingItem', $this->aiLiveMinutes);
        return empty($o) ? new class(){} : $o;
    }
}

class AppSettings implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $enablePhoneNumberManagement=null,
        /** @var bool|null */
        public ?bool $enableDeviceManagement=null,
        /** @var bool|null */
        public ?bool $enableDialer=null,
        /** @var bool|null */
        public ?bool $enableCallHistory=null,
        /** @var bool|null */
        public ?bool $enableAssistants=null,
        /** @var bool|null */
        public ?bool $showFileNameInMessageCenter=null,
        /** @var string|null */
        public ?string $chakraTheme=null,
        /** @var string|null */
        public ?string $customCss=null,
        /** @var string|null */
        public ?string $pageTitle=null,
        /** @var string|null */
        public ?string $stringMappings=null,
        /** @var string|null */
        public ?string $logoutUrl=null,
        /** @var string|null */
        public ?string $portMyNumberUrl=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['enablePhoneNumberManagement'])) $this->enablePhoneNumberManagement = $o['enablePhoneNumberManagement'];
        if (isset($o['enableDeviceManagement'])) $this->enableDeviceManagement = $o['enableDeviceManagement'];
        if (isset($o['enableDialer'])) $this->enableDialer = $o['enableDialer'];
        if (isset($o['enableCallHistory'])) $this->enableCallHistory = $o['enableCallHistory'];
        if (isset($o['enableAssistants'])) $this->enableAssistants = $o['enableAssistants'];
        if (isset($o['showFileNameInMessageCenter'])) $this->showFileNameInMessageCenter = $o['showFileNameInMessageCenter'];
        if (isset($o['chakraTheme'])) $this->chakraTheme = $o['chakraTheme'];
        if (isset($o['customCss'])) $this->customCss = $o['customCss'];
        if (isset($o['pageTitle'])) $this->pageTitle = $o['pageTitle'];
        if (isset($o['stringMappings'])) $this->stringMappings = $o['stringMappings'];
        if (isset($o['logoutUrl'])) $this->logoutUrl = $o['logoutUrl'];
        if (isset($o['portMyNumberUrl'])) $this->portMyNumberUrl = $o['portMyNumberUrl'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->enablePhoneNumberManagement)) $o['enablePhoneNumberManagement'] = $this->enablePhoneNumberManagement;
        if (isset($this->enableDeviceManagement)) $o['enableDeviceManagement'] = $this->enableDeviceManagement;
        if (isset($this->enableDialer)) $o['enableDialer'] = $this->enableDialer;
        if (isset($this->enableCallHistory)) $o['enableCallHistory'] = $this->enableCallHistory;
        if (isset($this->enableAssistants)) $o['enableAssistants'] = $this->enableAssistants;
        if (isset($this->showFileNameInMessageCenter)) $o['showFileNameInMessageCenter'] = $this->showFileNameInMessageCenter;
        if (isset($this->chakraTheme)) $o['chakraTheme'] = $this->chakraTheme;
        if (isset($this->customCss)) $o['customCss'] = $this->customCss;
        if (isset($this->pageTitle)) $o['pageTitle'] = $this->pageTitle;
        if (isset($this->stringMappings)) $o['stringMappings'] = $this->stringMappings;
        if (isset($this->logoutUrl)) $o['logoutUrl'] = $this->logoutUrl;
        if (isset($this->portMyNumberUrl)) $o['portMyNumberUrl'] = $this->portMyNumberUrl;
        return empty($o) ? new class(){} : $o;
    }
}

class CustomerInfo extends EntityInfo implements JsonSerializable
{
    /**
     * @param string|null $id
     * @param string|null $dateCreated
     * @param string|null $dateLastModified
     * @param string|null $createdBy
     * @param string|null $lastModifiedBy
     */
    public function __construct(
        ?string $id=null,
        ?string $dateCreated=null,
        ?string $dateLastModified=null,
        ?string $createdBy=null,
        ?string $lastModifiedBy=null,
        /** @description The ID of the account associated with this customer */
        // @ApiMember(Description="The ID of the account associated with this customer")
        /** @var string|null */
        public ?string $accountId=null,

        /** @description The parent customer ID for this customer */
        // @ApiMember(Description="The parent customer ID for this customer")
        /** @var string|null */
        public ?string $parentCustomerId=null,

        /** @description The breadcrumb to this customer */
        // @ApiMember(Description="The breadcrumb to this customer")
        /** @var array<CustomerBreadcrumb>|null */
        public ?array $breadcrumb=null,

        /** @description The name of the account associated with this customer */
        // @ApiMember(Description="The name of the account associated with this customer")
        /** @var string|null */
        public ?string $accountName=null,

        /** @description Is this customer staging or production? */
        // @ApiMember(Description="Is this customer staging or production?")
        /** @var bool|null */
        public ?bool $isStaging=null,

        /** @description The name of the company */
        // @ApiMember(Description="The name of the company")
        /** @var string|null */
        public ?string $name=null,

        /** @description The reference ID for this company */
        // @ApiMember(Description="The reference ID for this company")
        /** @var string|null */
        public ?string $referenceId=null,

        /** @description This customer's data values */
        // @ApiMember(Description="This customer's data values")
        /** @var Struct|null */
        public ?Struct $data=null,

        /** @description The list of tags for this customer */
        // @ApiMember(Description="The list of tags for this customer")
        /** @var array<Tag>|null */
        public ?array $tags=null,

        /** @description This customer's schedule */
        // @ApiMember(Description="This customer's schedule")
        /** @var Schedule|null */
        public ?Schedule $schedule=null,

        /** @description Integration data for this customer */
        // @ApiMember(Description="Integration data for this customer")
        /** @var EntityIntegrationData|null */
        public ?EntityIntegrationData $integrationData=null,

        /** @description Override this customer's billing settings? Otherwise inherits from parent */
        // @ApiMember(Description="Override this customer's billing settings? Otherwise inherits from parent")
        /** @var bool|null */
        public ?bool $overrideBillingSettings=null,

        /** @description Billing settings for this customer */
        // @ApiMember(Description="Billing settings for this customer")
        /** @var BillingSettings|null */
        public ?BillingSettings $billingSettings=null,

        /** @description Should this customer override the parent customer's app settings */
        // @ApiMember(Description="Should this customer override the parent customer's app settings")
        /** @var bool|null */
        public ?bool $overrideAppSettings=null,

        /** @description App / Portal settings for this customer */
        // @ApiMember(Description="App / Portal settings for this customer")
        /** @var AppSettings|null */
        public ?AppSettings $appSettings=null
    ) {
        parent::__construct($id,$dateCreated,$dateLastModified,$createdBy,$lastModifiedBy);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['accountId'])) $this->accountId = $o['accountId'];
        if (isset($o['parentCustomerId'])) $this->parentCustomerId = $o['parentCustomerId'];
        if (isset($o['breadcrumb'])) $this->breadcrumb = JsonConverters::fromArray('CustomerBreadcrumb', $o['breadcrumb']);
        if (isset($o['accountName'])) $this->accountName = $o['accountName'];
        if (isset($o['isStaging'])) $this->isStaging = $o['isStaging'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['referenceId'])) $this->referenceId = $o['referenceId'];
        if (isset($o['data'])) $this->data = JsonConverters::from('Struct', $o['data']);
        if (isset($o['tags'])) $this->tags = JsonConverters::fromArray('Tag', $o['tags']);
        if (isset($o['schedule'])) $this->schedule = JsonConverters::from('Schedule', $o['schedule']);
        if (isset($o['integrationData'])) $this->integrationData = JsonConverters::from('EntityIntegrationData', $o['integrationData']);
        if (isset($o['overrideBillingSettings'])) $this->overrideBillingSettings = $o['overrideBillingSettings'];
        if (isset($o['billingSettings'])) $this->billingSettings = JsonConverters::from('BillingSettings', $o['billingSettings']);
        if (isset($o['overrideAppSettings'])) $this->overrideAppSettings = $o['overrideAppSettings'];
        if (isset($o['appSettings'])) $this->appSettings = JsonConverters::from('AppSettings', $o['appSettings']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->accountId)) $o['accountId'] = $this->accountId;
        if (isset($this->parentCustomerId)) $o['parentCustomerId'] = $this->parentCustomerId;
        if (isset($this->breadcrumb)) $o['breadcrumb'] = JsonConverters::toArray('CustomerBreadcrumb', $this->breadcrumb);
        if (isset($this->accountName)) $o['accountName'] = $this->accountName;
        if (isset($this->isStaging)) $o['isStaging'] = $this->isStaging;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->referenceId)) $o['referenceId'] = $this->referenceId;
        if (isset($this->data)) $o['data'] = JsonConverters::to('Struct', $this->data);
        if (isset($this->tags)) $o['tags'] = JsonConverters::toArray('Tag', $this->tags);
        if (isset($this->schedule)) $o['schedule'] = JsonConverters::to('Schedule', $this->schedule);
        if (isset($this->integrationData)) $o['integrationData'] = JsonConverters::to('EntityIntegrationData', $this->integrationData);
        if (isset($this->overrideBillingSettings)) $o['overrideBillingSettings'] = $this->overrideBillingSettings;
        if (isset($this->billingSettings)) $o['billingSettings'] = JsonConverters::to('BillingSettings', $this->billingSettings);
        if (isset($this->overrideAppSettings)) $o['overrideAppSettings'] = $this->overrideAppSettings;
        if (isset($this->appSettings)) $o['appSettings'] = JsonConverters::to('AppSettings', $this->appSettings);
        return empty($o) ? new class(){} : $o;
    }
}

/** @description Update a specific customer */
// @Api(Description="Update a specific customer")
class PatchCustomer implements IPatch, JsonSerializable
{
    public function __construct(
        /** @description The ID of the customer you want to update */
        // @ApiMember(Description="The ID of the customer you want to update")
        /** @var string|null */
        public ?string $customerId=null,

        /** @description The name for the customer */
        // @ApiMember(Description="The name for the customer")
        /** @var string|null */
        public ?string $name=null,

        /** @description The parent customer for this customer */
        // @ApiMember(Description="The parent customer for this customer")
        /** @var string|null */
        public ?string $parentCustomerId=null,

        /** @description 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 string|null */
        public ?string $referenceId=null,

        /** @description Data values for this customer */
        // @ApiMember(Description="Data values for this customer")
        /** @var Struct|null */
        public ?Struct $data=null,

        /** @description The list of tag IDs for this customer */
        // @ApiMember(Description="The list of tag IDs for this customer")
        /** @var array<string>|null */
        public ?array $tagIds=null,

        /** @description This customer's schedule */
        // @ApiMember(Description="This customer's schedule")
        /** @var Schedule|null */
        public ?Schedule $schedule=null,

        /** @description Override this customer's billing settings? Otherwise inherits from parent */
        // @ApiMember(Description="Override this customer's billing settings? Otherwise inherits from parent")
        /** @var bool|null */
        public ?bool $overrideBillingSettings=null,

        /** @description Updated billing settings for this customer */
        // @ApiMember(Description="Updated billing settings for this customer")
        /** @var BillingSettings|null */
        public ?BillingSettings $billingSettings=null,

        /** @description Should this customer override the parent customer's app settings */
        // @ApiMember(Description="Should this customer override the parent customer's app settings")
        /** @var bool|null */
        public ?bool $overrideAppSettings=null,

        /** @description App / Portal settings for this customer */
        // @ApiMember(Description="App / Portal settings for this customer")
        /** @var AppSettings|null */
        public ?AppSettings $appSettings=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['customerId'])) $this->customerId = $o['customerId'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['parentCustomerId'])) $this->parentCustomerId = $o['parentCustomerId'];
        if (isset($o['referenceId'])) $this->referenceId = $o['referenceId'];
        if (isset($o['data'])) $this->data = JsonConverters::from('Struct', $o['data']);
        if (isset($o['tagIds'])) $this->tagIds = JsonConverters::fromArray('string', $o['tagIds']);
        if (isset($o['schedule'])) $this->schedule = JsonConverters::from('Schedule', $o['schedule']);
        if (isset($o['overrideBillingSettings'])) $this->overrideBillingSettings = $o['overrideBillingSettings'];
        if (isset($o['billingSettings'])) $this->billingSettings = JsonConverters::from('BillingSettings', $o['billingSettings']);
        if (isset($o['overrideAppSettings'])) $this->overrideAppSettings = $o['overrideAppSettings'];
        if (isset($o['appSettings'])) $this->appSettings = JsonConverters::from('AppSettings', $o['appSettings']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->customerId)) $o['customerId'] = $this->customerId;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->parentCustomerId)) $o['parentCustomerId'] = $this->parentCustomerId;
        if (isset($this->referenceId)) $o['referenceId'] = $this->referenceId;
        if (isset($this->data)) $o['data'] = JsonConverters::to('Struct', $this->data);
        if (isset($this->tagIds)) $o['tagIds'] = JsonConverters::toArray('string', $this->tagIds);
        if (isset($this->schedule)) $o['schedule'] = JsonConverters::to('Schedule', $this->schedule);
        if (isset($this->overrideBillingSettings)) $o['overrideBillingSettings'] = $this->overrideBillingSettings;
        if (isset($this->billingSettings)) $o['billingSettings'] = JsonConverters::to('BillingSettings', $this->billingSettings);
        if (isset($this->overrideAppSettings)) $o['overrideAppSettings'] = $this->overrideAppSettings;
        if (isset($this->appSettings)) $o['appSettings'] = JsonConverters::to('AppSettings', $this->appSettings);
        return empty($o) ? new class(){} : $o;
    }
}

PHP PatchCustomer DTOs

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

HTTP + OTHER

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: team.evovoice.io 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"customerId":"String","name":"String","parentCustomerId":"String","referenceId":"String","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","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},"aiInsights":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"aiLiveMinutes":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0}},"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"}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"accountId":"String","parentCustomerId":"String","breadcrumb":[{"id":"String","name":"String"}],"accountName":"String","isStaging":false,"name":"String","referenceId":"String","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","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},"aiInsights":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"aiLiveMinutes":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0}},"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"},"id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}