class Echosign::Agreement
Attributes
Public Class Methods
Creates an agreement object for submission
@param [String] user_id
ID of the user whom this agreement is made for @param [String] user_email
Email of the user whom this agreement is made for @param [Hash] params SYMBOL-referenced Hash containing: @option params [Array] :fileInfos A list of one or more files (or references to files) that will be sent out
for signature. If more than one file is provided, they will be combined into one PDF before being sent out. Note: Only one of the four parameters in every FileInfo object must be specified. Populate the array with instances of {Echosign::Fileinfo Echosign::Fileinfo} (REQUIRED)
@option params [Array] :recipientSetInfos A list of one or more recipients. For regular (non-MegaSign)
documents, there is no limit on the number of electronic signatures in a single document. Written signatures are limited to four per document. This limit includes the sender if the sender's signature is also required. Populate the array with instances of {Echosign::Recipient Echosign::Recipient} (REQUIRED)
@option params [String] :signatureFlow ['SENDER_SIGNATURE_NOT_REQUIRED' or 'SENDER_SIGNS_LAST' or
'SENDER_SIGNS_FIRST' or 'SEQUENTIAL' or 'PARALLEL']: Selects the workflow you would like to use - whether the sender needs to sign before the recipient, after the recipient, or not at all. The possible values for this variable are SENDER_SIGNATURE_NOT_REQUIRED, SENDER_SIGNS_LAST, SENDER_SIGNS_FIRST, SEQUENTIAL or PARALLEL. (REQUIRED)
@option params [String] :signatureType ['ESIGN' or 'WRITTEN']: Specifies the type of signature you would like
to request - written or eSignature. The possible values are ESIGN or WRITTEN (REQUIRED)
@option params [String] :name The name of the agreement that will be used to identify it, in emails and on the
website. (REQUIRED)
@return [Echosign::Agreement]
# File lib/echosign/agreement.rb, line 36 def initialize(user_id = nil, user_email = nil, params) @user_id = user_id @user_email = user_email # TODO (cthomas) barf if user_id or user_email are blank if params.has_key?(:recipients) warn("NOTE: :recipients param in #{self.class}.new is deprecated; use :recipientSetInfos instead.\n" + "#{self.class}.new called from #{Gem.location_of_caller.join(":")}") params = params.dup params[:recipientSetInfos] ||= params.delete :recipients end require_keys([:signatureType, :recipientSetInfos, :signatureFlow, :fileInfos, :name], params) merge!({ documentCreationInfo: params }) end