Class: Echochamber::Recipient

Inherits:
Hash
  • Object
show all
Includes:
Validatable
Defined in:
lib/echochamber/agreement/recipient.rb

Instance Method Summary collapse

Methods included from Validatable

#require_exactly_one, #require_keys, #validate_field

Constructor Details

#initialize(params) ⇒ Echochamber::Recipient

Creates an Echochamber::Recipient object

Options Hash (params):

  • :role (String)

    ['SIGNER' or 'APPROVER']: Specify the role of recipient (REQUIRED)

  • :email (String)

    Email of the recipient. This is required if fax is not provided. Both fax and email can not be provided (email or fax REQUIRED)

  • :fax (String)

    Fax of the recipient. This is required if email is not provided. Both fax and email can not be provided (email or fax REQUIRED)

  • :securityOptions (Array)

    Security options that apply to the recipient. Populate the array with instances of Echochamber::RecipientSecurityOption


15
16
17
18
19
# File 'lib/echochamber/agreement/recipient.rb', line 15

def initialize(params)
  require_keys([:role], params)
  require_exactly_one([:email, :fax], params)
  merge!(params)
end