def update(lead)
      validate_type!(lead)
      params = extract_params!(lead, :id)
      id = params[:id]

      attributes = sanitize(lead)
      _, _, root = @client.put("/leads/#{id}", attributes)

      Lead.new(root[:data])
    end
def update(lead)
      validate_type!(lead)
      params = extract_params!(lead, :id)
      id = params[:id]

      attributes = sanitize(lead)
      _, _, root = @client.put("/leads/#{id}", attributes)

      Lead.new(root[:data])
    end
Update a lead

 put '/leads/{id}'

 Updates lead information
 If the specified lead does not exist, this query returns an error
 <figure class="notice">
 In order to modify tags, you need to supply the entire set of tags
 `tags` are replaced every time they are used in a request
 </figure>

 @param lead [Lead, Hash] Either object of the Lead type or Hash. This object's attributes describe the object to be updated.
 @return [Lead] The resulting object represting updated resource.