lib/mls/models/listing.rb in mls-0.2.20 vs lib/mls/models/listing.rb in mls-0.2.21
- old
+ new
@@ -137,12 +137,10 @@
# info => {:company => 'name', :population => 10, :funding => 'string', :move_id => '2012-09-12'}
# listing.request_tour('name', 'email@address.com', info) # => #<MLS::TourRequest>
#
# listing.request_tour('', 'emai', info) # => #<MLS::TourRequest> will have errors on account
def request_tour(account, tour={})
- params = {:account => account, :tour => tour}
- response = MLS.post("/listings/#{id}/tour_requests", params)
- return MLS::TourRequest::Parser.parse(response.body)
+ MLS::TourRequest.create(id, account, tour)
end
def create
MLS.post('/listings', {:listing => to_hash}, 201, 400) do |response, code|