Class: Echosign::Agreement
- Inherits:
-
Hash
- Object
- Hash
- Echosign::Agreement
- Includes:
- Validatable
- Defined in:
- lib/echosign/agreement.rb
Instance Attribute Summary collapse
-
#user_email ⇒ Object
Returns the value of attribute user_email.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(user_id = nil, user_email = nil, params) ⇒ Echosign::Agreement
constructor
Creates an agreement object for submission.
Methods included from Validatable
#require_exactly_one, #require_keys, #validate_field
Constructor Details
#initialize(user_id = nil, user_email = nil, params) ⇒ Echosign::Agreement
Creates an agreement object for submission
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# 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 |
Instance Attribute Details
#user_email ⇒ Object
Returns the value of attribute user_email.
11 12 13 |
# File 'lib/echosign/agreement.rb', line 11 def user_email @user_email end |
#user_id ⇒ Object
Returns the value of attribute user_id.
11 12 13 |
# File 'lib/echosign/agreement.rb', line 11 def user_id @user_id end |