class Fountain::Applicant

Fountain Applicant

Attributes

raw_data[R]

Raw applicant data

Public Class Methods

new(data) click to toggle source

@param [Hash] data Raw applicant data

# File lib/fountain/applicant.rb, line 14
def initialize(data)
  @raw_data = Util.stringify_hash_keys data
end

Public Instance Methods

background_checks() click to toggle source

Background checks

# File lib/fountain/applicant.rb, line 59
def background_checks
  return [] unless raw_data['background_checks'].is_a? Array

  raw_data['background_checks'].map { |check| BackgroundCheck.new check }
end
created_at() click to toggle source

Created at

# File lib/fountain/applicant.rb, line 24
def created_at
  Time.parse raw_data['created_at']
end
data() click to toggle source

data

# File lib/fountain/applicant.rb, line 44
def data
  raw_data['data']
end
document_signatures() click to toggle source

Document signatures

# File lib/fountain/applicant.rb, line 66
def document_signatures
  return [] unless raw_data['document_signatures'].is_a? Array

  raw_data['document_signatures'].map { |signature| DocumentSignature.new signature }
end
email() click to toggle source

Email

# File lib/fountain/applicant.rb, line 29
def email
  raw_data['email']
end
funnel() click to toggle source

Funnel

# File lib/fountain/applicant.rb, line 49
def funnel
  Funnel.new raw_data['funnel']
end
id() click to toggle source

Applicant ID

# File lib/fountain/applicant.rb, line 19
def id
  raw_data['id']
end
inspect() click to toggle source
# File lib/fountain/applicant.rb, line 72
def inspect
  format(
    '#<%<class_name>s:0x%<object_id>p @id="%<id>s" @name="%<name>s" @email="%<email>s">',
    class_name: self.class.name,
    object_id: object_id,
    id: id,
    name: name,
    email: email
  )
end
name() click to toggle source

Name

# File lib/fountain/applicant.rb, line 34
def name
  raw_data['name']
end
phone_number() click to toggle source

Phone number

# File lib/fountain/applicant.rb, line 39
def phone_number
  raw_data['phone_number']
end
stage() click to toggle source

Stage

# File lib/fountain/applicant.rb, line 54
def stage
  Stage.new raw_data['stage']
end