lib/mls/models/account.rb in mls-0.5.5 vs lib/mls/models/account.rb in mls-0.5.6
- old
+ new
@@ -24,10 +24,11 @@
property :country, String, :serialize => :if_present
property :created_at, DateTime, :serialize => :false
property :updated_at, DateTime, :serialize => :false
+ property :email_token, String, :serialize => false
property :auth_key, String, :serialize => false
exclude_from_comparison :password, :password_confirmation
attr_accessor :password_required
@@ -64,10 +65,14 @@
def favorites
return @favorites if @favorites
response = MLS.get('/account/favorites')
@favorites = MLS::Listing::Parser.parse_collection(response.body, {:collection_root_element => :favorites})
end
-
+
+ def agent_profile
+ @agent_profile ||= MLS.agent_profile id
+ end
+
def favorited?(listing)
favorites.include?(listing)
end
def favorite(listing) # TODO: test me, i don't work on failures