lib/mls/models/listing.rb in mls-0.5.5 vs lib/mls/models/listing.rb in mls-0.5.6
- old
+ new
@@ -33,10 +33,12 @@
property :minimum_divisible_size, Fixnum
property :lease_terms, String
property :rate, Decimal
property :rate_units, String, :default => '/sqft/mo'
+ property :low_rate, Decimal, :serialize => :false
+ property :high_rate, Decimal, :serialize => :false
property :rate_per_sqft_per_month, Decimal, :serialize => :false # need to make write methods for these that set rate to the according rate units. not accepted on api
property :rate_per_sqft_per_year, Decimal, :serialize => :false
property :rate_per_month, Decimal, :serialize => :false
property :rate_per_year, Decimal, :serialize => :false
property :sublease_expiration, DateTime
@@ -63,13 +65,18 @@
property :natural_light, Boolean
property :high_ceilings, Boolean
property :created_at, DateTime, :serialize => :false
property :updated_at, DateTime, :serialize => :false
- property :touched_at, DateTime, :serialize => :false
+ property :touched_at, DateTime, :serialize => :false
property :leased_on, DateTime
-
+ property :photography_requested_on, DateTime, :serialize => :false
+
+ property :awesome_score, Fixnum
+ property :awesome_needs, Array, :serialize => :if_present
+ property :awesome_label, String
+
property :flyer_id, Fixnum, :serialize => :if_present
property :floorplan_id, Fixnum, :serialize => :if_present
property :avatar_digest, String, :serialize => false
@@ -152,10 +159,10 @@
# 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|
raise MLS::Exception::UnexpectedResponse if ![201, 400].include?(code)
MLS::Listing::Parser.update(self, response.body)
end