lib/DealsService.php
public function update($id, array $deal, array $options = array())
  {
    $attributes = array_intersect_key($deal, array_flip(self::$keysToPersist));
    if (isset($attributes['custom_fields']) && empty($attributes['custom_fields'])) unset($attributes['custom_fields']);
    if (isset($attributes["value"])) $attributes["value"] = Coercion::toStringValue($attributes['value']);

    list($code, $updatedDeal) = $this->httpClient->put("/deals/{$id}", $attributes, $options);
    if (isset($options['raw']) && $options['raw']) {
      return $updatedDeal;
    }
    $updatedDeal = $this->coerceDealData($updatedDeal);
    return $updatedDeal;
  }
public function update($id, array $deal, array $options = array())
  {
    $attributes = array_intersect_key($deal, array_flip(self::$keysToPersist));
    if (isset($attributes['custom_fields']) && empty($attributes['custom_fields'])) unset($attributes['custom_fields']);
    if (isset($attributes["value"])) $attributes["value"] = Coercion::toStringValue($attributes['value']);

    list($code, $updatedDeal) = $this->httpClient->put("/deals/{$id}", $attributes, $options);
    if (isset($options['raw']) && $options['raw']) {
      return $updatedDeal;
    }
    $updatedDeal = $this->coerceDealData($updatedDeal);
    return $updatedDeal;
  }
public function update ( $ id , array $ deal , array $ options = array ( ) ) { $ attributes = array_intersect_key ( $ deal , array_flip ( self :: $ keysToPersist ) ) ; if ( isset ( $ attributes [ 'custom_fields' ] ) && empty ( $ attributes [ 'custom_fields' ] ) ) unset ( $ attributes [ 'custom_fields' ] ) ; if ( isset ( $ attributes [ "value" ] ) ) $ attributes [ "value" ] = Coercion :: toStringValue ( $ attributes [ 'value' ] ) ; list ( $ code , $ updatedDeal ) = $ this -> httpClient -> put ( "/deals/{$id}" , $ attributes , $ options ) ; if ( isset ( $ options [ 'raw' ] ) && $ options [ 'raw' ] ) { return $ updatedDeal ; } $ updatedDeal = $ this -> coerceDealData ( $ updatedDeal ) ; return $ updatedDeal ; }
Update a deal

put '/deals/{id}'

Updates deal information
If the specified deal does not exist, the request will return an error
<figure class="notice">
In order to modify tags used on a record, you need to supply the entire set
`tags` are replaced every time they are used in a request
</figure>

@param integer $id Unique identifier of a Deal
@param array $deal This array's attributes describe the object to be updated.
@param array $options Additional request's options.

@return array The resulting object representing updated resource.
Update a deal