Class: Yardi::Model::Prospect

Inherits:
Object
  • Object
show all
Defined in:
lib/yardi/model/prospect.rb

Overview

Basic data about a Prospect returned from the Yardi API

Search for Prospect records using Yardi::Request::GetYardiGuestActivity

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(first_name:, last_name:, email:, phones:, events:, prospect_id:, tenant_id:, remote_property_id:) ⇒ Prospect

Returns a new instance of Prospect.



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/yardi/model/prospect.rb', line 33

def initialize(
  first_name:,
  last_name:,
  email:,
  phones:,
  events:,
  prospect_id:,
  tenant_id:,
  remote_property_id:
)
  @first_name = first_name
  @last_name = last_name
  @email = email
  @phones = phones
  @events = events
  @prospect_id = prospect_id
  @tenant_id = tenant_id
  @remote_property_id = remote_property_id
end

Instance Attribute Details

#emailObject (readonly)

The Prospect’s email address according to Yardi’s database



16
17
18
# File 'lib/yardi/model/prospect.rb', line 16

def email
  @email
end

#eventsObject (readonly)

An Array of Yardi::Model::Event objects



22
23
24
# File 'lib/yardi/model/prospect.rb', line 22

def events
  @events
end

#first_nameObject (readonly)

The Prospect’s first name according to Yardi’s database



10
11
12
# File 'lib/yardi/model/prospect.rb', line 10

def first_name
  @first_name
end

#last_nameObject (readonly)

The Prospect’s last name according to Yardi’s database



13
14
15
# File 'lib/yardi/model/prospect.rb', line 13

def last_name
  @last_name
end

#phonesObject (readonly)

An Array of the Prospect’s phone numbers, or nil if there are none



19
20
21
# File 'lib/yardi/model/prospect.rb', line 19

def phones
  @phones
end

#prospect_idObject (readonly)

The Prospect id from Yardi’s database e.g. “p00003693”



25
26
27
# File 'lib/yardi/model/prospect.rb', line 25

def prospect_id
  @prospect_id
end

#remote_property_idObject (readonly)

The property id from Yardi’s database e.g. “052”



31
32
33
# File 'lib/yardi/model/prospect.rb', line 31

def remote_property_id
  @remote_property_id
end

#tenant_idObject (readonly)

The tenant id from Yardi’s database e.g. “t000456”



28
29
30
# File 'lib/yardi/model/prospect.rb', line 28

def tenant_id
  @tenant_id
end