lib/amee/connection.rb
def put(path, data = {})
      # Allow format override
      format = data.delete(:format) || @format
      # Clear cache
      expire_matching "#{parent_path(path)}.*"
      # Extract return unit params
      query_params = {}
      query_params[:returnUnit] = data.delete(:returnUnit) if data[:returnUnit]
      query_params[:returnPerUnit] = data.delete(:returnPerUnit) if data[:returnPerUnit]
      # Create PUT request
      put_params = {
        :verbose => DEBUG,
        :method => "put",
        :body => form_encode(data)
      }
      put_params[:params] = query_params unless query_params.empty?
      put = Typhoeus::Request.new("#{protocol}#{@server}#{path}", put_params)
       # Send request
      do_request(put, format)
    end
def put(path, data = {})
      # Allow format override
      format = data.delete(:format) || @format
      # Clear cache
      expire_matching "#{parent_path(path)}.*"
      # Extract return unit params
      query_params = {}
      query_params[:returnUnit] = data.delete(:returnUnit) if data[:returnUnit]
      query_params[:returnPerUnit] = data.delete(:returnPerUnit) if data[:returnPerUnit]
      # Create PUT request
      put_params = {
        :verbose => DEBUG,
        :method => "put",
        :body => form_encode(data)
      }
      put_params[:params] = query_params unless query_params.empty?
      put = Typhoeus::Request.new("#{protocol}#{@server}#{path}", put_params)
       # Send request
      do_request(put, format)
    end
PUT to the AMEE API, passing in a hash of data