mls 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -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
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "mls"
6
- s.version = '0.2.7'
6
+ s.version = '0.2.8'
7
7
  s.authors = ["James R. Bracy"]
8
8
  s.email = ["james@42floors.com"]
9
9
  s.homepage = "http://mls.42floors.com"
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.7
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-13 00:00:00.000000000 Z
12
+ date: 2012-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake