class SurveyMonkey::Recipient
Attributes
custom_id[RW]
email[RW]
first_name[RW]
last_name[RW]
Public Class Methods
new(options = {})
click to toggle source
# File lib/survey_monkey/recipient.rb, line 5 def initialize(options = {}) @email = options[:email] @first_name = options[:first_name] @last_name = options[:last_name] @custom_id = options[:custom_id] raise "Email Required for Recipient" if email.nil? end
Public Instance Methods
to_hash()
click to toggle source
# File lib/survey_monkey/recipient.rb, line 13 def to_hash hash = Hash.new hash["email"] = email unless email.nil? hash["first_name"] = first_name unless first_name.nil? hash["last_name"] = last_name unless last_name.nil? hash["custom_id"] = custom_id unless custom_id.nil? hash end