20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/docusign/base.rb', line 20
def login(options={})
connection = Docusign::APIServiceSoap.new
if options[:integrators_key]
= IntegratorsKeyAuthHeaderHandler.new(
:email => options.delete(:email),
:integrators_key => options.delete(:integrators_key),
:password => options.delete(:password)
)
else
= AuthHeaderHandler.new(
:user_name => options.delete(:user_name),
:password => options.delete(:password)
)
end
connection.headerhandler <<
options.each do |key, value|
connection.send("#{key}=", value)
end
connection
end
|