public function updateObject($configClass, $objectType, $id, $fields)
    {
        $uri = "asterisk/config/dynamic/$configClass/$objectType/$id";

        try {
            $response = $this->client->getEndpoint()->put($uri, [
                'form_params' => [
                    'fields' => array_map('strval', $fields)
                ]
            ]);
        } catch (RequestException $e) {
            $this->processRequestException($e);
        }

        $configTuples = [];
        foreach (\GuzzleHttp\json_decode($response->getBody()) as $configTuple) {
            $configTuples[] = new ConfigTuple($configTuple);
        }

        return $configTuples;
    }
public function updateObject($configClass, $objectType, $id, $fields)
    {
        $uri = "asterisk/config/dynamic/$configClass/$objectType/$id";

        try {
            $response = $this->client->getEndpoint()->put($uri, [
                'form_params' => [
                    'fields' => array_map('strval', $fields)
                ]
            ]);
        } catch (RequestException $e) {
            $this->processRequestException($e);
        }

        $configTuples = [];
        foreach (\GuzzleHttp\json_decode($response->getBody()) as $configTuple) {
            $configTuples[] = new ConfigTuple($configTuple);
        }

        return $configTuples;
    }
public function updateObject ( $ configClass , $ objectType , $ id , $ fields ) { $ uri = "asterisk/config/dynamic/$configClass/$objectType/$id" ; try { $ response = $ this -> client -> getEndpoint ( ) -> put ( $ uri , [ 'form_params' => [ 'fields' => array_map ( 'strval' , $ fields ) ] ] ) ; } catch ( RequestException $ e ) { $ this -> processRequestException ( $ e ) ; } $ configTuples = [ ] ; foreach ( \ GuzzleHttp \ json_decode ( $ response -> getBody ( ) ) as $ configTuple ) { $ configTuples [ ] = new ConfigTuple ( $ configTuple ) ; } return $ configTuples ; }
Create or update a dynamic configuration object.

@param string $configClass The configuration class containing dynamic configuration objects.
@param string $objectType The type of configuration object to retrieve.
@param string $id The unique identifier of the object to retrieve.
@param ConfigTuple[] $fields The body object should have a value that is a list of ConfigTuples, which provide the fields to update. Ex. [ { "attribute": "directmedia", "value": "false" } ]
@return ConfigTuple[]
@throws BadResponseException
@throws ForbiddenException
@throws NotFoundException
Create or update a dynamic configuration object .