lib/mls/models/listing.rb in mls-0.7.2 vs lib/mls/models/listing.rb in mls-0.8.0

- old
+ new

@@ -52,10 +52,11 @@ property :forecast_rate_per_sqft_per_year, Decimal, :serialize => :false property :available_on, DateTime property :maximum_term_length, Fixnum property :minimum_term_length, Fixnum + property :term_length_units, String, :default => 'years' property :offices, Fixnum property :conference_rooms, Fixnum property :bathrooms, Fixnum @@ -135,18 +136,18 @@ end end - # Creates a contact request for the listing. + # Creates a tour request for the listing. # # Paramaters:: # # * +account+ - A +Hash+ of the user account. Valid keys are: - # * +:name+ - Name of the User requesting the contact (Required) - # * +:email+ - Email of the User requesting the contact (Required) - # * +:phone+ - Phone of the User requesting the contact + # * +:name+ - Name of the User requesting the tour (Required) + # * +:email+ - Email of the User requesting the tour (Required) + # * +:phone+ - Phone of the User requesting the tour # * +info+ - A optional +Hash+ of *company* info. Valid keys are: # * +:message+ - Overrides the default message on the email sent to the broker # * +:company+ - The name of the company that is interested in the space # * +:population+ - The current number of employees at the company # * +:growing+ - A boolean of weather or not the company is expecting to grow @@ -154,14 +155,14 @@ # Examples: # # #!ruby # listing = MLS::Listing.find(@id) # info => {:company => 'name', :population => 10, :funding => 'string', :move_id => '2012-09-12'} - # listing.request_contact('name', 'email@address.com', info) # => #<MLS::Contact> + # listing.request_tour('name', 'email@address.com', info) # => #<MLS::Tour> # - # listing.request_contact('', 'emai', info) # => #<MLS::Contact> will have errors on account - def request_contact(account, contact={}) - MLS::Contact.create(id, account, contact) + # listing.request_tour('', 'emai', info) # => #<MLS::Tour> will have errors on account + def request_tour(account, tour={}) + MLS::Tour.create(id, account, tour) end def create MLS.post('/listings', {:listing => to_hash}, 201, 400) do |response, code|