public function update($endpointId, array $optionalArgs = [])
    {
        $response = $this->client->update(
            $this->uri . $endpointId . '/',
            $optionalArgs
        );

        $responseContents = $response->getContent();

        if(!array_key_exists("error",$responseContents)){
            return new ResponseUpdate(
                $responseContents['api_id'],
                $responseContents['message'],
                $response->getStatusCode()
            );
        } else {
            throw new PlivoResponseException(
                $responseContents['error'],
                0,
                null,
                $response->getContent(),
                $response->getStatusCode()

            );
        }

        
    }
public function update($endpointId, array $optionalArgs = [])
    {
        $response = $this->client->update(
            $this->uri . $endpointId . '/',
            $optionalArgs
        );

        $responseContents = $response->getContent();

        if(!array_key_exists("error",$responseContents)){
            return new ResponseUpdate(
                $responseContents['api_id'],
                $responseContents['message'],
                $response->getStatusCode()
            );
        } else {
            throw new PlivoResponseException(
                $responseContents['error'],
                0,
                null,
                $response->getContent(),
                $response->getStatusCode()

            );
        }

        
    }
public function update ( $ endpointId , array $ optionalArgs = [ ] ) { $ response = $ this -> client -> update ( $ this -> uri . $ endpointId . '/' , $ optionalArgs ) ; $ responseContents = $ response -> getContent ( ) ; if ( ! array_key_exists ( "error" , $ responseContents ) ) { return new ResponseUpdate ( $ responseContents [ 'api_id' ] , $ responseContents [ 'message' ] , $ response -> getStatusCode ( ) ) ; } else { throw new PlivoResponseException ( $ responseContents [ 'error' ] , 0 , null , $ response -> getContent ( ) , $ response -> getStatusCode ( ) ) ; } }
Modify an endpoint

@param $endpointId
@param array $optionalArgs
+ Valid arguments
+ [string] password - The password for your endpoint username.
+ [string] alias - Alias for this endpoint
+ [string] app_id - The app_id of the application that is to be attached to this endpoint. If app_id is not specified, then the endpoint does not point to any application.
@return ResponseUpdate
Modify an endpoint