Class: DocusignApi

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

Defined Under Namespace

Classes: LoginFailed, UnexpectedResponseBody

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ DocusignApi

Returns a new instance of DocusignApi.



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/docusign_api.rb', line 2

def initialize( opts = {} )
  @username = opts[:username] || docusign_const(:username)
  @password = opts[:password] || docusign_const(:password)
  @integrator_key = opts[:integrator_key] || docusign_const(:integrator_key)
  @login_url = opts[:login_url] || docusign_const(:login_url)

  fail "please initialize with Docusign credentials: username, password, integrator_key" unless @username && @password && @integrator_key && @login_url

  @proxy_host = opts[:proxy_host]
  
end

Instance Method Details

#delete(path, body = nil) ⇒ Object



26
27
28
# File 'lib/docusign_api.rb', line 26

def delete( path, body = nil )
  perform( path, :delete, body: body )
end

#get(path) ⇒ Object



14
15
16
# File 'lib/docusign_api.rb', line 14

def get( path )
  perform( path, :get)
end

#post(path, body) ⇒ Object



18
19
20
# File 'lib/docusign_api.rb', line 18

def post( path, body )
  perform( path, :post, body: body )
end

#put(path, body, opts = {}) ⇒ Object



22
23
24
# File 'lib/docusign_api.rb', line 22

def put( path, body, opts = {} )
  perform( path, :put, opts.merge(body: body) )
end