class FriendlyScore::User

Public Class Methods

new(attributes) click to toggle source
# File lib/friendly_score/user.rb, line 3
def initialize attributes
  @attributes = attributes
end

Public Instance Methods

address() click to toggle source

Address

@return [String] address

# File lib/friendly_score/user.rb, line 28
def address
  @attributes["address"]
end
age() click to toggle source

Age of the user

@return [Integer] age of the user

# File lib/friendly_score/user.rb, line 35
def age
  @attributes["age"].to_i
end
attributes() click to toggle source
# File lib/friendly_score/user.rb, line 7
def attributes
  @attributes
end
city_name() click to toggle source

City name

@return [String] city name

# File lib/friendly_score/user.rb, line 42
def city_name
  @attributes["city_name"]
end
city_population_50k() click to toggle source

City population

@return [String] city population

# File lib/friendly_score/user.rb, line 49
def city_population_50k
  @attributes["city_population_50k"]
end
contact_bank_in_90_days() click to toggle source

Contact bank in 90 days

@return [String] contact bank in 90 days

# File lib/friendly_score/user.rb, line 56
def contact_bank_in_90_days
  @attributes["contact_bank_in_90_days"]
end
education_average() click to toggle source

Education average

@return [String] education average

# File lib/friendly_score/user.rb, line 70
def education_average
  @attributes["education_average"]
end
education_best_find() click to toggle source

Education best find

@return [String] education best find

# File lib/friendly_score/user.rb, line 63
def education_best_find
  @attributes["education_best_find"]
end
educations() click to toggle source

Educations

@return [String] educations

# File lib/friendly_score/user.rb, line 77
def educations
  @attributes["educations"]
end
email() click to toggle source

Email

@return [String] email

# File lib/friendly_score/user.rb, line 84
def email
  @attributes["email"]
end
facebook_id() click to toggle source

Facebook id

@return [String] facebook id

# File lib/friendly_score/user.rb, line 112
def facebook_id
  @attributes["facebook_id"]
end
family() click to toggle source

Family

@return [String] family

# File lib/friendly_score/user.rb, line 91
def family
  @attributes["family"]
end
family_members_in_home() click to toggle source

Number of family members at home

@return [Integer] number of family members at home

# File lib/friendly_score/user.rb, line 98
def family_members_in_home
  @attributes["family_members_in_home"].to_i
end
friendlyscore() click to toggle source

Friendly score

@return [Integer] friendly score

# File lib/friendly_score/user.rb, line 105
def friendlyscore
  @attributes["friendlyscore"]
end
gender() click to toggle source

Gender of the user

@return [Symbol] :male or :female

# File lib/friendly_score/user.rb, line 119
def gender
  @attributes["gender"] == "male" ? :male : :female
end
has_kids() click to toggle source

Number of kids

@return [Integer] number of kids

# File lib/friendly_score/user.rb, line 126
def has_kids
  @attributes["kids"].to_i
end
id() click to toggle source

Id

@return [Integer] users id

# File lib/friendly_score/user.rb, line 14
def id
  @attributes["id"]
end
in_relationship?() click to toggle source

Relationship

@return [Boolean] true if user is in relationship, false if not

# File lib/friendly_score/user.rb, line 133
def in_relationship?
  @attributes["in_relationship"] == "In a relationship"
end
lead?() click to toggle source

Is lead

@return [Boolean] true if is lead, false in other case, nil if not set

# File lib/friendly_score/user.rb, line 140
def lead?
  return nil unless @attributes["is_lead"]
  @attributes["is_lead"].to_i == 1
end
loan_amount() click to toggle source

Loan amount

@return [Integer] loan amount

# File lib/friendly_score/user.rb, line 164
def loan_amount
  @attributes["loan_amount"]
end
loan_currency() click to toggle source

Loan currency

@return [String] loan currency

# File lib/friendly_score/user.rb, line 171
def loan_currency
  @attributes["loan_currency"]
end
loan_description() click to toggle source

Loan description

@return [String] loan description

# File lib/friendly_score/user.rb, line 178
def loan_description
  @attributes["loan_description"]
end
loan_duration_in_days() click to toggle source

Loan duration

@return [Integer] loan duration

# File lib/friendly_score/user.rb, line 185
def loan_duration_in_days
  @attributes["loan_duration_in_days"]
end
mobile() click to toggle source

Mobile

@return [String] mobile

# File lib/friendly_score/user.rb, line 192
def mobile
  @attributes["mobile"]
end
name() click to toggle source

Name

@return [String] users name

# File lib/friendly_score/user.rb, line 21
def name
  @attributes["name"]
end
positive?() click to toggle source

Is user set as positive

@return [Boolean] true if user is positive, false if not, nil if not set

# File lib/friendly_score/user.rb, line 148
def positive?
  return nil unless @attributes["is_positive"]
  @attributes["is_positive"].to_i == 1
end
scoreyourself_mobile() click to toggle source

ScoreyourselfMobile

@return [String] score yourself mobile

# File lib/friendly_score/user.rb, line 199
def scoreyourself_mobile
  @attributes["scoreyourself_mobile"]
end
skills() click to toggle source

Skills

@return [String] skills

# File lib/friendly_score/user.rb, line 206
def skills
  @attributes["skills"]
end
status() click to toggle source

Status of the user

@return [Integer] status of the user

# File lib/friendly_score/user.rb, line 213
def status
  @attributes["status"].to_i
end
status_description() click to toggle source

Status description

@return [String] status description

# File lib/friendly_score/user.rb, line 220
def status_description
  @attributes["status_description"]
end
working?() click to toggle source

Is working

@return [Boolean] true if user is working, false if not, nil if not set

# File lib/friendly_score/user.rb, line 156
def working?
  return nil unless @attributes["is_working"]
  @attributes["is_working"].to_i == 1
end