Class: Yardi::Model::Resident
- Inherits:
-
Object
- Object
- Yardi::Model::Resident
- Defined in:
- lib/yardi/model/resident.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#import_resident_id ⇒ Object
readonly
Returns the value of attribute import_resident_id.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#lease_from_date ⇒ Object
readonly
Returns the value of attribute lease_from_date.
-
#lease_id ⇒ Object
readonly
Returns the value of attribute lease_id.
-
#lease_lead_id ⇒ Object
readonly
Returns the value of attribute lease_lead_id.
-
#lease_to_date ⇒ Object
readonly
Returns the value of attribute lease_to_date.
-
#move_in_date ⇒ Object
readonly
Returns the value of attribute move_in_date.
-
#phones ⇒ Object
readonly
Returns the value of attribute phones.
-
#roommates ⇒ Object
readonly
Returns the value of attribute roommates.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#unit_name ⇒ Object
readonly
Returns the value of attribute unit_name.
Instance Method Summary collapse
-
#initialize(resident, type:, roommates: nil) ⇒ Resident
constructor
A new instance of Resident.
Constructor Details
#initialize(resident, type:, roommates: nil) ⇒ Resident
Returns a new instance of Resident.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/yardi/model/resident.rb', line 12 def initialize(resident, type:, roommates: nil) @status = resident['Status'] @lease_id = resident['tCode'] @lease_lead_id = resident['pCode'] @first_name = resident['FirstName'] @last_name = resident['LastName'] @email = resident['Email'] @unit_name = resident['UnitCode'] @phones = Utils::PhoneParser.parse(resident['Phone']) @move_in_date = parse_date(resident['MoveInDate']) @lease_from_date = parse_date(resident['LeaseFromDate']) @lease_to_date = parse_date(resident['LeaseToDate']) @type = type @roommates = roommates || [] @import_resident_id = resident['import_resident_id'] end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def email @email end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def first_name @first_name end |
#import_resident_id ⇒ Object (readonly)
Returns the value of attribute import_resident_id.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def import_resident_id @import_resident_id end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def last_name @last_name end |
#lease_from_date ⇒ Object (readonly)
Returns the value of attribute lease_from_date.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def lease_from_date @lease_from_date end |
#lease_id ⇒ Object (readonly)
Returns the value of attribute lease_id.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def lease_id @lease_id end |
#lease_lead_id ⇒ Object (readonly)
Returns the value of attribute lease_lead_id.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def lease_lead_id @lease_lead_id end |
#lease_to_date ⇒ Object (readonly)
Returns the value of attribute lease_to_date.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def lease_to_date @lease_to_date end |
#move_in_date ⇒ Object (readonly)
Returns the value of attribute move_in_date.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def move_in_date @move_in_date end |
#phones ⇒ Object (readonly)
Returns the value of attribute phones.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def phones @phones end |
#roommates ⇒ Object (readonly)
Returns the value of attribute roommates.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def roommates @roommates end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def status @status end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def type @type end |
#unit_name ⇒ Object (readonly)
Returns the value of attribute unit_name.
8 9 10 |
# File 'lib/yardi/model/resident.rb', line 8 def unit_name @unit_name end |