Module: Prosper

Defined in:
lib/prosper.rb,
lib/prosper/version.rb

Constant Summary collapse

VERSION =
"0.0.11"

Class Method Summary collapse

Class Method Details

.login(username, password) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/prosper.rb', line 7

def self.(username, password)
  request = soap.request("Login")
  request.body { |b| b.email username; b.password password }
  response = HTTParty.post(request.url, :headers => request.headers, :body => request.content)
  result = soap.response(request, response.body).body_hash
  if result["LoginResult"]["Success"] == "true"
    @@login_token = result["LoginResult"]["Message"]
  end
  result["LoginResult"]["Message"]
end