public function updateRecords($id, $data, $params = [], $options = [])
    {
        if (is_array($data) && count($data['records']) > 1) {
            // Version 4 is mandatory for updating multiple records.
            $params['version'] = 4;
        } else {
            if (empty($id)) {
                throw new \InvalidArgumentException('Record Id is required and cannot be empty.');
            }
            $params['id'] = $id;
        }

        return $this->call('updateRecords', $params, $data, $options);
    }
public function updateRecords($id, $data, $params = [], $options = [])
    {
        if (is_array($data) && count($data['records']) > 1) {
            // Version 4 is mandatory for updating multiple records.
            $params['version'] = 4;
        } else {
            if (empty($id)) {
                throw new \InvalidArgumentException('Record Id is required and cannot be empty.');
            }
            $params['id'] = $id;
        }

        return $this->call('updateRecords', $params, $data, $options);
    }
public function updateRecords ( $ id , $ data , $ params = [ ] , $ options = [ ] ) { if ( is_array ( $ data ) && count ( $ data [ 'records' ] ) > 1 ) { // Version 4 is mandatory for updating multiple records. $ params [ 'version' ] = 4 ; } else { if ( empty ( $ id ) ) { throw new \ InvalidArgumentException ( 'Record Id is required and cannot be empty.' ) ; } $ params [ 'id' ] = $ id ; } return $ this -> call ( 'updateRecords' , $ params , $ data , $ options ) ; }
Implements updateRecords API method.

@param string $id       unique ID of the record to be updated
@param array  $data     xmlData represented as an array
array will be converted into XML before sending the request
@param array  $params   request parameters
wfTrigger    Boolean   Set value as true to trigger the workflow rule
while inserting record into CRM account. By default, this parameter is false.
newFormat    Integer   1 (default) - exclude fields with "null" values while updating data
2 - include fields with "null" values while updating data
version      Integer   1 (default) - use earlier API implementation
2 - use latest API implementation
4 - update multiple records in a single API method call
@param array $options Options to add for configurations [optional]

@return Response The Response object
Implements updateRecords API method .