Class: Zoopla::Listings::Rentals

Inherits:
API
  • Object
show all
Includes:
Listing
Defined in:
lib/zoopla/listings/rentals.rb

Overview

Searches for rental listings

Instance Method Summary collapse

Methods included from Listing

#beds, #each, #flats, #houses, #in, #keywords, #listing_id, #maximum_beds, #maximum_price, #minimum_beds, #minimum_price, #order_by, #ordering, #price, #property_type, #reset!, #within

Constructor Details

#initialize(*args) ⇒ Rentals

Returns a new instance of Rentals.



10
11
12
13
# File 'lib/zoopla/listings/rentals.rb', line 10

def initialize(*args)
  super(*args)
  reset!
end

Instance Method Details

#furnished(value) ⇒ Rentals

Specify whether or not the apartment is “furnished”, “unfurnished” or “part-furnished”.

Returns:



24
25
26
27
28
# File 'lib/zoopla/listings/rentals.rb', line 24

def furnished(value)
  ensure_valid_parameter('furnished', value, %w(furnished unfurnished part-furnished))
  @request[:furnished] = value.to_s
  self
end

#include_rentedRentals

Include property listings that are already rented in the results

Returns:



17
18
19
20
# File 'lib/zoopla/listings/rentals.rb', line 17

def include_rented
  @request[:include_rented] = '1'
  self
end