Class: Yardi::Parameter::User
- Inherits:
-
Object
- Object
- Yardi::Parameter::User
- Defined in:
- lib/yardi/parameter/user.rb
Overview
Wraps the user-related data that we pass to Yardi.
Instance Attribute Summary collapse
-
#beds ⇒ Object
readonly
Returns the value of attribute beds.
-
#contact_info ⇒ Object
readonly
Returns the value of attribute contact_info.
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#move_in_date ⇒ Object
readonly
Returns the value of attribute move_in_date.
-
#preference_notes ⇒ Object
readonly
Returns the value of attribute preference_notes.
-
#preferred_floorplan_id ⇒ Object
readonly
Returns the value of attribute preferred_floorplan_id.
-
#preferred_unit_id ⇒ Object
readonly
Returns the value of attribute preferred_unit_id.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
Instance Method Summary collapse
-
#initialize(beds:, contact_info:, first_name:, id:, last_name:, message:, move_in_date:, preference_notes:, preferred_floorplan_id:, price:, preferred_unit_id: nil) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(beds:, contact_info:, first_name:, id:, last_name:, message:, move_in_date:, preference_notes:, preferred_floorplan_id:, price:, preferred_unit_id: nil) ⇒ User
Returns a new instance of User.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/yardi/parameter/user.rb', line 36 def initialize( beds:, contact_info:, first_name:, id:, last_name:, message:, move_in_date:, preference_notes:, preferred_floorplan_id:, price:, preferred_unit_id: nil ) @beds = beds.nil? || beds == '' ? nil : beds.to_i @contact_info = contact_info @first_name = first_name @id = id @last_name = last_name @message = @move_in_date = move_in_date @preference_notes = preference_notes @preferred_floorplan_id = preferred_floorplan_id @preferred_unit_id = preferred_unit_id @price = price.to_i > 0 ? price.to_i : nil end |
Instance Attribute Details
#beds ⇒ Object (readonly)
Returns the value of attribute beds.
5 6 7 |
# File 'lib/yardi/parameter/user.rb', line 5 def beds @beds end |
#contact_info ⇒ Object (readonly)
Returns the value of attribute contact_info.
5 6 7 |
# File 'lib/yardi/parameter/user.rb', line 5 def contact_info @contact_info end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
5 6 7 |
# File 'lib/yardi/parameter/user.rb', line 5 def first_name @first_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/yardi/parameter/user.rb', line 5 def id @id end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
5 6 7 |
# File 'lib/yardi/parameter/user.rb', line 5 def last_name @last_name end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/yardi/parameter/user.rb', line 5 def @message end |
#move_in_date ⇒ Object (readonly)
Returns the value of attribute move_in_date.
5 6 7 |
# File 'lib/yardi/parameter/user.rb', line 5 def move_in_date @move_in_date end |
#preference_notes ⇒ Object (readonly)
Returns the value of attribute preference_notes.
5 6 7 |
# File 'lib/yardi/parameter/user.rb', line 5 def preference_notes @preference_notes end |
#preferred_floorplan_id ⇒ Object (readonly)
Returns the value of attribute preferred_floorplan_id.
5 6 7 |
# File 'lib/yardi/parameter/user.rb', line 5 def preferred_floorplan_id @preferred_floorplan_id end |
#preferred_unit_id ⇒ Object (readonly)
Returns the value of attribute preferred_unit_id.
5 6 7 |
# File 'lib/yardi/parameter/user.rb', line 5 def preferred_unit_id @preferred_unit_id end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
5 6 7 |
# File 'lib/yardi/parameter/user.rb', line 5 def price @price end |