class Echosign::MegaSign

Attributes

user_email[RW]
user_id[RW]

Public Class Methods

new(user_id = nil, user_email = nil, params) click to toggle source

Creates an MegaSign object for submission

@param [String] user_id ID of the user whom this megasign is made for @param [String] user_email Email of the user whom this megasign 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 megasign that will be used to identify it, in emails and on the

website. (REQUIRED)

@return [Echosign::MegaSign]

# File lib/echosign/mega_sign.rb, line 34
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
  require_keys([:signatureType, :recipientSetInfos, :signatureFlow, :fileInfos, :name], params)
  merge!({ megaSignCreationInfo: params })
end