Class: Docusign::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign/base.rb

Class Method Summary collapse

Class Method Details

.credentials(email, password, endpoint_url = nil) ⇒ Object



37
38
39
40
41
42
43
# File 'lib/docusign/base.rb', line 37

def credentials(email, password, endpoint_url=nil)
  
  connection = Docusign::Credential::CredentialSoap.new
  connection.endpoint_url = endpoint_url if endpoint_url
  
  connection.(:email => email, :password => password).loginResult        
end

.login(options = {}) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/docusign/base.rb', line 20

def (options={})
  
  connection  = Docusign::APIServiceSoap.new
  header = AuthHeaderHandler.new(
    :user_name => options.delete(:user_name), 
    :password  => options.delete(:password)
  )
  
  connection.headerhandler << header
  
  options.each do |key, value|
    connection.send("#{key}=", value)
  end
  
  connection
end