Ruby Gem to consume Adobe's EchoSign e-signature service - REST service v2
gem install echochamber
The bulk of the API is on the Echochamber::Client class
You can read Echochamber's full API Documentation
It also wouldn't hurt to read Adobe's Echosign API documentation
require 'echochamber'
credentials = Echochamber::Credentials.new(app_id, app_secret, api_key, email, password)
client = Echochamber::Client.new(credentials)
url_file_params = {
url: 'http://somedomain.com/contract.pdf',
mimeType: 'application/pdf',
name: 'contract.pdf'
}
file_info_params = {
documentURL: Echochamber::UrlFileInfo.new(url_file_params)
}
recipient_params = {
role: 'SIGNER', email: 'superguy@whatsit.com'
}
agreement_info_params = {
fileInfos: [ Echochamber::Fileinfo.new(file_info_params) ],
recipients: [ Echochamber::Recipient.new(recipient_params)],
signatureFlow: "SENDER_SIGNS_LAST",
signatureType: "ESIGN",
name: "Rumplestiltskin Contract"
}
agreement = Echochamber::Agreement.new(sender_id, sender_email, agreement_info)
agreement_id = client.create_agreement(agreement)
result = client.cancel_agreement(agreement_id, true, 'Because...blah blah.')
user_params = {
firstName: 'JohnQ',
lastName: 'Public',
email: 'publius@comcast.net',
password: 'kN12oK9p!3',
title: 'Hedge Wizard'
}
user = Echochamber::User.new(user_params)
user_id = client.create_user(user)
tran_doc_id = client.create_transient_document(file_name, mime_type, File.new('myfile.pdf'))