Class: Cb::Models::User
- Inherits:
-
Object
- Object
- Cb::Models::User
- Defined in:
- lib/cb/models/implementations/user.rb
Instance Attribute Summary collapse
-
#address_1 ⇒ Object
Returns the value of attribute address_1.
-
#address_2 ⇒ Object
Returns the value of attribute address_2.
-
#allow_email_from_headhunter ⇒ Object
Returns the value of attribute allow_email_from_headhunter.
-
#allow_newsletter_emails ⇒ Object
Returns the value of attribute allow_newsletter_emails.
-
#allow_partner_emails ⇒ Object
Returns the value of attribute allow_partner_emails.
-
#birth_date ⇒ Object
Returns the value of attribute birth_date.
-
#city ⇒ Object
Returns the value of attribute city.
-
#cobrand_code ⇒ Object
Returns the value of attribute cobrand_code.
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#created ⇒ Object
Returns the value of attribute created.
-
#custom_values ⇒ Object
Returns the value of attribute custom_values.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#email ⇒ Object
Returns the value of attribute email.
-
#external_id ⇒ Object
Returns the value of attribute external_id.
-
#fax ⇒ Object
Returns the value of attribute fax.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#gender ⇒ Object
Returns the value of attribute gender.
-
#last_login ⇒ Object
Returns the value of attribute last_login.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#password ⇒ Object
Returns the value of attribute password.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#province ⇒ Object
Returns the value of attribute province.
-
#registration_path ⇒ Object
Returns the value of attribute registration_path.
-
#resume_stats ⇒ Object
Returns the value of attribute resume_stats.
-
#state ⇒ Object
Returns the value of attribute state.
-
#user_status ⇒ Object
Returns the value of attribute user_status.
-
#user_type ⇒ Object
Returns the value of attribute user_type.
-
#work_status ⇒ Object
Returns the value of attribute work_status.
Instance Method Summary collapse
- #custom_value(custom_value_key) ⇒ Object
-
#initialize(args = {}) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(args = {}) ⇒ User
Returns a new instance of User.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/cb/models/implementations/user.rb', line 20 def initialize(args = {}) return if args.nil? @external_id = args['ResponseExternalID'] || '' @user_status = args['UserStatus'] || '' @password = '' @email = args['Email'] || '' @address_1 = args['Address1'] || '' @address_2 = args['Address2'] || '' @city = args['City'] || '' @state = args['State'] || '' @province = args['Province'] || '' @postal_code = args['PostalCode'] || args['Zip'] || '' @country_code = args['CountryCode'] || '' @first_name = args['FirstName'] || '' @last_name = args['LastName'] || '' @phone = args['Phone'] || '' @fax = args['Fax'] || '' @last_login = args['LastLogin'] || '' @created = args['CreatedDT'] || '' @allow_partner_emails = args['AllowPartnerEmails'] || '' @allow_newsletter_emails = args['AllowNewsletterEmails'] || '' @allow_email_from_headhunter = args['AllowEmailFromHeadHunter'] || '' @domain = args['Domain'] || '' @registration_path = args['RegistrationPath'] || '' @user_type = args['UserType'] || '' @gender = args['Gender'] || '' @birth_date = args['BirthDate'] || '' @cobrand_code = args['CoBrandCode'] || '' @resume_stats = args['ResumeStats'] || '' @custom_values = args['CustomValues'] || '' @work_status = args['WorkStatus'] || '' end |
Instance Attribute Details
#address_1 ⇒ Object
Returns the value of attribute address_1.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def address_1 @address_1 end |
#address_2 ⇒ Object
Returns the value of attribute address_2.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def address_2 @address_2 end |
#allow_email_from_headhunter ⇒ Object
Returns the value of attribute allow_email_from_headhunter.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def allow_email_from_headhunter @allow_email_from_headhunter end |
#allow_newsletter_emails ⇒ Object
Returns the value of attribute allow_newsletter_emails.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def @allow_newsletter_emails end |
#allow_partner_emails ⇒ Object
Returns the value of attribute allow_partner_emails.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def allow_partner_emails @allow_partner_emails end |
#birth_date ⇒ Object
Returns the value of attribute birth_date.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def birth_date @birth_date end |
#city ⇒ Object
Returns the value of attribute city.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def city @city end |
#cobrand_code ⇒ Object
Returns the value of attribute cobrand_code.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def cobrand_code @cobrand_code end |
#country_code ⇒ Object
Returns the value of attribute country_code.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def country_code @country_code end |
#created ⇒ Object
Returns the value of attribute created.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def created @created end |
#custom_values ⇒ Object
Returns the value of attribute custom_values.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def custom_values @custom_values end |
#domain ⇒ Object
Returns the value of attribute domain.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def domain @domain end |
#email ⇒ Object
Returns the value of attribute email.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def email @email end |
#external_id ⇒ Object
Returns the value of attribute external_id.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def external_id @external_id end |
#fax ⇒ Object
Returns the value of attribute fax.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def fax @fax end |
#first_name ⇒ Object
Returns the value of attribute first_name.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def first_name @first_name end |
#gender ⇒ Object
Returns the value of attribute gender.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def gender @gender end |
#last_login ⇒ Object
Returns the value of attribute last_login.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def last_login @last_login end |
#last_name ⇒ Object
Returns the value of attribute last_name.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def last_name @last_name end |
#password ⇒ Object
Returns the value of attribute password.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def password @password end |
#phone ⇒ Object
Returns the value of attribute phone.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def phone @phone end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def postal_code @postal_code end |
#province ⇒ Object
Returns the value of attribute province.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def province @province end |
#registration_path ⇒ Object
Returns the value of attribute registration_path.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def registration_path @registration_path end |
#resume_stats ⇒ Object
Returns the value of attribute resume_stats.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def resume_stats @resume_stats end |
#state ⇒ Object
Returns the value of attribute state.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def state @state end |
#user_status ⇒ Object
Returns the value of attribute user_status.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def user_status @user_status end |
#user_type ⇒ Object
Returns the value of attribute user_type.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def user_type @user_type end |
#work_status ⇒ Object
Returns the value of attribute work_status.
14 15 16 |
# File 'lib/cb/models/implementations/user.rb', line 14 def work_status @work_status end |
Instance Method Details
#custom_value(custom_value_key) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/cb/models/implementations/user.rb', line 54 def custom_value(custom_value_key) custom_value = nil if @custom_values['CustomValue'].is_a? Array @custom_values['CustomValue'].each do |cv| custom_value = cv['Value'] if cv['Key'] == custom_value_key end elsif @custom_values['CustomValue'].is_a? Hash custom_value = @custom_values['CustomValue']['Value'] if @custom_values['CustomValue']['Key'] == custom_value_key end custom_value end |