mls 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 258e404cb751442f18cc7fef1e5f4a5f994b3d66
4
- data.tar.gz: bd7c59b9a5f06516c707600539d34873c80deb55
3
+ metadata.gz: e070d9a4cae4be4554e66251a009b02df572f7a6
4
+ data.tar.gz: 13f784337f9dc51435121f0e94044a05489fbea5
5
5
  SHA512:
6
- metadata.gz: 3f4a136e37e8658b03b39b8af88e209af492685907cf78f48fe5f8670565292135271f6f61b8128c2170f3596ad66cbd922ca92a3d49e29784231fb99f120067
7
- data.tar.gz: e0d2f38b9935a0ec57c508f6d85a04ee26342c6075fde069fad11c0061e3c4860acd03165dd2909cb3177795ecc7b6a0eaff0faea9997b8e02839c58b58e5a53
6
+ metadata.gz: 54bfaa9d98bbbd187e5504d33f6e9ed0089942d6da60f74c23f202a596f0a0ef3da9673cbca6ac7e8c9ca98c5bc9aa88102185b8363b6dbf98a5cadea541c324
7
+ data.tar.gz: a2f7a3c6a4531501760e86a58e0006ca4e471920315b76e6cbb78142624542433e670052339cb2b3fa37e0379ee156ef98f44acf34fc651530d88a0667b6ceb1
@@ -13,15 +13,15 @@ class MLS::TourRequest < MLS::Resource
13
13
  attr_accessor :client, :listing
14
14
 
15
15
  def claim(agent)
16
- MLS.post("/tour_requests/#{token}/claim", {:agent_id => agent.id})
16
+ MLS.post("/tours/#{token}/claim", {:agent_id => agent.id})
17
17
  end
18
18
 
19
19
  def decline(comments=nil)
20
- MLS.post("/tour_requests/#{token}/decline", {:agent_comments => reasons})
20
+ MLS.post("/tours/#{token}/decline", {:agent_comments => reasons})
21
21
  end
22
22
 
23
23
  def view
24
- MLS.post("/tour_requests/#{token}/view")
24
+ MLS.post("/tours/#{token}/view")
25
25
  end
26
26
 
27
27
  def viewed?
@@ -38,18 +38,18 @@ class MLS::TourRequest < MLS::Resource
38
38
 
39
39
  class << self
40
40
  def get_all_for_account
41
- response = MLS.get('/account/tour_requests')
41
+ response = MLS.get('/account/tours')
42
42
  MLS::TourRequest::Parser.parse_collection(response.body)
43
43
  end
44
44
 
45
45
  def find_by_token(token)
46
- response = MLS.get("/tour_requests/#{token}")
46
+ response = MLS.get("/tours/#{token}")
47
47
  MLS::TourRequest::Parser.parse(response.body)
48
48
  end
49
49
 
50
50
  def create(listing_id, account, tour={})
51
51
  params = {:account => account, :tour => tour}
52
- response = MLS.post("/listings/#{listing_id}/tour_requests", params)
52
+ response = MLS.post("/listings/#{listing_id}/tours", params)
53
53
  return MLS::TourRequest::Parser.parse(response.body)
54
54
  end
55
55
  end
data/lib/mls.rb CHANGED
@@ -439,7 +439,7 @@ require 'mls/models/address'
439
439
  require 'mls/models/photo'
440
440
  require 'mls/models/video'
441
441
  require 'mls/models/pdf'
442
- require 'mls/models/tour_request'
442
+ require 'mls/models/tour'
443
443
  require 'mls/models/flyer'
444
444
  require 'mls/models/floorplan'
445
445
  require 'mls/models/region'
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.4.0'
6
+ s.version = '0.5.0'
7
7
  s.authors = ["James R. Bracy", "Jon Bracy"]
8
8
  s.email = ["james@42floors.com"]
9
9
  s.homepage = "http://mls.42floors.com"
@@ -1,5 +1,5 @@
1
1
  FactoryGirl.define do
2
- factory :tour_request, :class => MLS::TourRequest do
2
+ factory :tour, :class => MLS::TourRequest do
3
3
  message { Faker::Lorem.paragraph }
4
4
  company { Faker::Company.email }
5
5
  population { Kernel.rand(2..200) }
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.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James R. Bracy
@@ -201,7 +201,7 @@ files:
201
201
  - lib/mls/models/pdf.rb
202
202
  - lib/mls/models/photo.rb
203
203
  - lib/mls/models/region.rb
204
- - lib/mls/models/tour_request.rb
204
+ - lib/mls/models/tour.rb
205
205
  - lib/mls/models/video.rb
206
206
  - lib/mls/parser.rb
207
207
  - lib/mls/properties/array.rb
@@ -238,7 +238,7 @@ files:
238
238
  - test/factories/account.rb
239
239
  - test/factories/address.rb
240
240
  - test/factories/listing.rb
241
- - test/factories/tour_request.rb
241
+ - test/factories/tour.rb
242
242
  - test/fixtures/flyer.pdf
243
243
  - test/test_helper.rb
244
244
  - test/units/models/test_account.rb
@@ -246,7 +246,7 @@ files:
246
246
  - test/units/models/test_flyer.rb
247
247
  - test/units/models/test_listing.rb
248
248
  - test/units/models/test_photo.rb
249
- - test/units/models/test_tour_request.rb
249
+ - test/units/models/test_tour.rb
250
250
  - test/units/properties/test_boolean.rb
251
251
  - test/units/test_errors.rb
252
252
  - test/units/test_mls.rb
@@ -281,7 +281,7 @@ test_files:
281
281
  - test/factories/account.rb
282
282
  - test/factories/address.rb
283
283
  - test/factories/listing.rb
284
- - test/factories/tour_request.rb
284
+ - test/factories/tour.rb
285
285
  - test/fixtures/flyer.pdf
286
286
  - test/test_helper.rb
287
287
  - test/units/models/test_account.rb
@@ -289,7 +289,7 @@ test_files:
289
289
  - test/units/models/test_flyer.rb
290
290
  - test/units/models/test_listing.rb
291
291
  - test/units/models/test_photo.rb
292
- - test/units/models/test_tour_request.rb
292
+ - test/units/models/test_tour.rb
293
293
  - test/units/properties/test_boolean.rb
294
294
  - test/units/test_errors.rb
295
295
  - test/units/test_mls.rb