src/Model/ApiResourceBase.php
public function update(array $values)
    {
        if ($errors = $this->checkUpdate($values)) {
            $message = "Cannot update resource due to validation error(s): " . implode('; ', $errors);
            throw new \InvalidArgumentException($message);
        }
        $data = $this->runOperation('edit', 'patch', $values)->getData();
        if (isset($data['_embedded']['entity'])) {
            $this->setData($data['_embedded']['entity']);
            $this->isFull = true;
        }

        return new Result($data, $this->baseUrl, $this->client, get_called_class());
    }
public function update(array $values)
    {
        if ($errors = $this->checkUpdate($values)) {
            $message = "Cannot update resource due to validation error(s): " . implode('; ', $errors);
            throw new \InvalidArgumentException($message);
        }
        $data = $this->runOperation('edit', 'patch', $values)->getData();
        if (isset($data['_embedded']['entity'])) {
            $this->setData($data['_embedded']['entity']);
            $this->isFull = true;
        }

        return new Result($data, $this->baseUrl, $this->client, get_called_class());
    }
public function update ( array $ values ) { if ( $ errors = $ this -> checkUpdate ( $ values ) ) { $ message = "Cannot update resource due to validation error(s): " . implode ( '; ' , $ errors ) ; throw new \ InvalidArgumentException ( $ message ) ; } $ data = $ this -> runOperation ( 'edit' , 'patch' , $ values ) -> getData ( ) ; if ( isset ( $ data [ '_embedded' ] [ 'entity' ] ) ) { $ this -> setData ( $ data [ '_embedded' ] [ 'entity' ] ) ; $ this -> isFull = true ; } return new Result ( $ data , $ this -> baseUrl , $ this -> client , get_called_class ( ) ) ; }
Update the resource.

This updates the resource's internal data with the API response.

@param array $values

@return Result
Update the resource .