Permalink
Browse files

Changing tour_request to tour.

  • Loading branch information...
1 parent 9c6ca00 commit 9af1e4c97ac5f3d40a0bf3b7d70818b865dd1de2 @waratuman waratuman committed Jun 13, 2013
View
@@ -439,7 +439,7 @@ def self.parse(json) # TODO: testme
require 'mls/models/photo'
require 'mls/models/video'
require 'mls/models/pdf'
-require 'mls/models/tour_request'
+require 'mls/models/tour'
require 'mls/models/flyer'
require 'mls/models/floorplan'
require 'mls/models/region'
@@ -13,15 +13,15 @@ class MLS::TourRequest < MLS::Resource
attr_accessor :client, :listing
def claim(agent)
- MLS.post("/tour_requests/#{token}/claim", {:agent_id => agent.id})
+ MLS.post("/tours/#{token}/claim", {:agent_id => agent.id})
end
def decline(comments=nil)
- MLS.post("/tour_requests/#{token}/decline", {:agent_comments => reasons})
+ MLS.post("/tours/#{token}/decline", {:agent_comments => reasons})
end
def view
- MLS.post("/tour_requests/#{token}/view")
+ MLS.post("/tours/#{token}/view")
end
def viewed?
@@ -38,18 +38,18 @@ def declined?
class << self
def get_all_for_account
- response = MLS.get('/account/tour_requests')
+ response = MLS.get('/account/tours')
MLS::TourRequest::Parser.parse_collection(response.body)
end
def find_by_token(token)
- response = MLS.get("/tour_requests/#{token}")
+ response = MLS.get("/tours/#{token}")
MLS::TourRequest::Parser.parse(response.body)
end
def create(listing_id, account, tour={})
params = {:account => account, :tour => tour}
- response = MLS.post("/listings/#{listing_id}/tour_requests", params)
+ response = MLS.post("/listings/#{listing_id}/tours", params)
return MLS::TourRequest::Parser.parse(response.body)
end
end
View
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
Gem::Specification.new do |s|
s.name = "mls"
- s.version = '0.4.0'
+ s.version = '0.5.0'
s.authors = ["James R. Bracy", "Jon Bracy"]
s.email = ["james@42floors.com"]
s.homepage = "http://mls.42floors.com"
@@ -1,5 +1,5 @@
FactoryGirl.define do
- factory :tour_request, :class => MLS::TourRequest do
+ factory :tour, :class => MLS::TourRequest do
message { Faker::Lorem.paragraph }
company { Faker::Company.email }
population { Kernel.rand(2..200) }

0 comments on commit 9af1e4c

Please sign in to comment.