def auth=(authorization)
      clensed_auth_hash = {}
      authorization.each {|k, v| 
        clensed_auth_hash[k.to_sym] = v
        }

      # nice and pretty now
      authorization = clensed_auth_hash
      
    if authorization.has_key? :access_token
      # clear the basic_auth, if it's set
      self.class.default_options.reject!{ |k| k == :basic_auth }
                
      # set the Authorization headers
      self.class.headers.merge!("Authorization" => "Bearer #{authorization[:access_token]}")

    elsif authorization.has_key?(:username) && authorization.has_key?(:password)

      # ... then we pass it off to basic auth
      self.class.basic_auth authorization[:username], authorization[:password]
      
      # check if the user tried passing in some other stupid stuff.
      # this should never be the case if the user follows instructions. 
      self.class.headers.reject!{ |k, v| k == "Authorization" }

    else
      # something inportant is missing if we get here. 
      raise "Incomplete Authorization hash. Please check the Authentication Hash."

      #end else 
    end


    # end method
    end
def auth=(authorization)
      clensed_auth_hash = {}
      authorization.each {|k, v| 
        clensed_auth_hash[k.to_sym] = v
        }

      # nice and pretty now
      authorization = clensed_auth_hash
      
    if authorization.has_key? :access_token
      # clear the basic_auth, if it's set
      self.class.default_options.reject!{ |k| k == :basic_auth }
                
      # set the Authorization headers
      self.class.headers.merge!("Authorization" => "Bearer #{authorization[:access_token]}")

    elsif authorization.has_key?(:username) && authorization.has_key?(:password)

      # ... then we pass it off to basic auth
      self.class.basic_auth authorization[:username], authorization[:password]
      
      # check if the user tried passing in some other stupid stuff.
      # this should never be the case if the user follows instructions. 
      self.class.headers.reject!{ |k, v| k == "Authorization" }

    else
      # something inportant is missing if we get here. 
      raise "Incomplete Authorization hash. Please check the Authentication Hash."

      #end else 
    end


    # end method
    end
Initializes the connection to Basecamp using httparty.

 @param basecamp_id [String] the Basecamp company ID
 @param authorization [Hash] authorization hash consisting of a username and password combination (:username, :password) or an access_token (:access_token)
 @param user_agent [String] the user-agent string to include in header of requests
 Sets the authorization information.
 Need to

 @param authorization [Hash] authorization hash consisting of a username and password combination (:username, :password) or an access_token (:access_token)