mls 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mls/models/address.rb +11 -0
- data/lib/mls/models/listing.rb +1 -1
- data/mls.gemspec +1 -1
- metadata +2 -2
data/lib/mls/models/address.rb
CHANGED
@@ -67,6 +67,17 @@ class MLS::Address < MLS::Resource
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
+
def save
|
71
|
+
MLS.put("/addresses/#{id}", {:address => to_hash}, 400) do |response, code|
|
72
|
+
if code == 200 || code == 400
|
73
|
+
MLS::Address::Parser.update(self, response.body)
|
74
|
+
code == 200
|
75
|
+
else
|
76
|
+
raise MLS::Exception::UnexpectedResponse, code
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
70
81
|
def to_hash
|
71
82
|
hash = super
|
72
83
|
hash[:photo_ids] = photos.map(&:id) if photos
|
data/lib/mls/models/listing.rb
CHANGED
@@ -13,7 +13,7 @@ class MLS::Listing < MLS::Resource
|
|
13
13
|
property :use_id, Fixnum
|
14
14
|
property :use, String, :serialize => :if_present
|
15
15
|
property :account_id, Fixnum
|
16
|
-
property :hidden, Boolean, :default => false
|
16
|
+
property :hidden, Boolean, :default => false, :serialize => false
|
17
17
|
property :source, String
|
18
18
|
property :source_url, String
|
19
19
|
property :source_type, String, :serialize => :if_present
|
data/mls.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|