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

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

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

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

      Product.new(root[:data])
    end
Update a product

 put '/products/{id}'

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

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