Coder Social home page Coder Social logo

docusign's Introduction

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.

docusign's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.