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

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

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

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

      Tag.new(root[:data])
    end
Update a tag

 put '/tags/{id}'

 Updates a tag's information
 If the specified tag does not exist, this query will return an error
 **Notice** if you want to update a tag, you **must** make sure the tag's name is unique within the scope of the specified resource

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