Class: Entrata::Parameter::CustomerPreferences

Inherits:
Object
  • Object
show all
Defined in:
lib/entrata/parameter/customer_preferences.rb

Overview

Wraps the customer preference data that we pass to Entrata. All of the preference attributes are optional when inserting a lead.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(beds: nil, baths: nil, comments: nil, lease_terms: nil, move_in_date: nil, number_of_pets: nil, preferred_floorplan_id: nil, preferred_unit_id: nil, min_price: nil, max_price: nil) ⇒ CustomerPreferences

Returns a new instance of CustomerPreferences.

Parameters:

  • beds (Integer) (defaults to: nil)

    Number of beds the renter is interested in

  • baths (Float) (defaults to: nil)

    Number of baths the renter is interested in

  • comments (String) (defaults to: nil)

    Notes about the renter’s preferences plus any information about a tour if there is one, plus the renter’s message for the property. Entrata only gives us one key for comments, so we need to put everything there.

  • lease_terms (String) (defaults to: nil)

    Length of preferred lease term, e.g. ‘12 months’

  • move_in_date (Date) (defaults to: nil)

    Renter move in date

  • number_of_pets (String) (defaults to: nil)

    The number of pets the renter has

  • preferred_floorplan_id (Integer) (defaults to: nil)

    Entrata’s ID for the floorplan the renter is interested in. They do not verify that this ID matches any real floorplan on the property in their system.

  • preferred_unit_id (Integer) (defaults to: nil)

    Entrata’s ID for the unit the renter is interested in. They do not verify that this ID matches any real unit on the property in their system.

  • min_price (Float) (defaults to: nil)

    Renter’s minimum budget

  • max_price (Float) (defaults to: nil)

    Renter’s maximum budget



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/entrata/parameter/customer_preferences.rb', line 35

def initialize(
  beds: nil,
  baths: nil,
  comments: nil,
  lease_terms: nil,
  move_in_date: nil,
  number_of_pets: nil,
  preferred_floorplan_id: nil,
  preferred_unit_id: nil,
  min_price: nil,
  max_price: nil
)

  @beds = beds
  @baths = baths
  @comments = comments
  @lease_terms = lease_terms
  @move_in_date = move_in_date
  @number_of_pets = number_of_pets
  @preferred_floorplan_id = preferred_floorplan_id
  @preferred_unit_id = preferred_unit_id
  @min_price = min_price
  @max_price = max_price
end

Instance Attribute Details

#bathsObject (readonly)

Returns the value of attribute baths.



6
7
8
# File 'lib/entrata/parameter/customer_preferences.rb', line 6

def baths
  @baths
end

#bedsObject (readonly)

Returns the value of attribute beds.



6
7
8
# File 'lib/entrata/parameter/customer_preferences.rb', line 6

def beds
  @beds
end

#commentsObject (readonly)

Returns the value of attribute comments.



6
7
8
# File 'lib/entrata/parameter/customer_preferences.rb', line 6

def comments
  @comments
end

#lease_termsObject (readonly)

Returns the value of attribute lease_terms.



6
7
8
# File 'lib/entrata/parameter/customer_preferences.rb', line 6

def lease_terms
  @lease_terms
end

#max_priceObject (readonly)

Returns the value of attribute max_price.



6
7
8
# File 'lib/entrata/parameter/customer_preferences.rb', line 6

def max_price
  @max_price
end

#min_priceObject (readonly)

Returns the value of attribute min_price.



6
7
8
# File 'lib/entrata/parameter/customer_preferences.rb', line 6

def min_price
  @min_price
end

#move_in_dateObject (readonly)

Returns the value of attribute move_in_date.



6
7
8
# File 'lib/entrata/parameter/customer_preferences.rb', line 6

def move_in_date
  @move_in_date
end

#number_of_petsObject (readonly)

Returns the value of attribute number_of_pets.



6
7
8
# File 'lib/entrata/parameter/customer_preferences.rb', line 6

def number_of_pets
  @number_of_pets
end

#preferred_floorplan_idObject (readonly)

Returns the value of attribute preferred_floorplan_id.



6
7
8
# File 'lib/entrata/parameter/customer_preferences.rb', line 6

def preferred_floorplan_id
  @preferred_floorplan_id
end

#preferred_unit_idObject (readonly)

Returns the value of attribute preferred_unit_id.



6
7
8
# File 'lib/entrata/parameter/customer_preferences.rb', line 6

def preferred_unit_id
  @preferred_unit_id
end