Project

docusign

0.02
No commit activity in last 3 years
No release in over 3 years
A library for working with the Docusign API and associated objects. Provides SOAP4R-generated proxy classes, and extends many useful classes with familiar Ruby-like syntax.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

docusign¶ ↑

www.docusign.com www.github.com/texel/docusign

Description¶ ↑

A library for communicating with the Docusign API via SOAP.

Making An API Call¶ ↑

connection = Docusign::Base.login(
  :user_name    => 'your_user_name',
  :password     => 'your_password',
  :endpoint_url => 'http://demo.docusign.net/API/3.0'
)

connection.request_status :envelope_id => '12345'

Install¶ ↑

  1. $ gem update –system (this is only necessary if you don’t have rubygems 1.3.6 or newer)

  2. $ gem install docusign

AutoCamelize¶ ↑

The Docusign gem supports calling methods using both camelCase and snake_case. Methods in snake_case that don’t exist on a Docusign module class or instance are automatically aliased to their camelCase equivalent, if one exists. Hence, the following two examples are functionally identical:

connection.request_status :envelopeID => '12345'
connection.requestStatus :envelopeID => '12345'

Builder syntax¶ ↑

To ease common tasks, some builder methods are included. For example, you can generate tabs for a document for a particular recipient from the document itself:

recipient = Docusign::Recipient.new # You may want to set some attributes of the recipient as well.
document  = Docusign::Document.new

tabs = document.tabs recipient do |d|
  d.tab :name => 'email', :value => email, :page => 1, :x => 190, :y => 186
  d.tab :name => 'phone', :value => phone, :anchor => {:string => 'Phone:',  :x_offset => 200, :y_offset => -2}
  d.tab :type => Docusign::TabTypeCode::FullName, :page => 1, :x => 190, :y => 118
end

These tabs will be pre-populated with both the document’s and recipient’s id. Note that passing in a recipient to the builder is optional- you can still specify or override the recipient for an individual tab:

tabs = document.tabs do |d|
  d.tab :recipient => signer_1, :name => 'email', :value => email, :page => 1, :x => 190, :y => 186
  d.tab :recipient => signer_2, :name => 'email', :value => email, :page => 1, :x => 190, :y => 186
end

You can also use block syntax for the tabs themselves:

tabs = document.tabs recipient do |d|
  d.tab do |t|
    t.name = 'phone'
    t.anchor do |a|
      a.string = 'Phone'
      a.x_offset = 200
    end
  end
end

License¶ ↑

Copyright © DocuSign, Inc. All rights reserved.

This source code is intended only as a supplement to DocuSign SDK and/or on-line documentation.

This sample is designed to demonstrate DocuSign features and is not intended for production use. Code and policy for a production application must be developed to meet the specific data and security requirements of the application.

THIS CODE AND INFORMATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.