Module: FlexmlsApi::Models::Subresource

Included in:
Document, Note, OpenHouse, Photo, TourOfHome, Video, VirtualTour
Defined in:
lib/flexmls_api/models/subresource.rb

Instance Method Summary collapse

Instance Method Details

#build_subclassObject



5
6
7
# File 'lib/flexmls_api/models/subresource.rb', line 5

def build_subclass
  Class.new(self)
end

#find_by_id(id, parent_id, arguments = {}) ⇒ Object



13
14
15
# File 'lib/flexmls_api/models/subresource.rb', line 13

def find_by_id(id, parent_id, arguments={})
  collect(connection.get("/listings/#{parent_id}#{self.path}/#{id}", arguments)).first
end

#find_by_listing_key(key, arguments = {}) ⇒ Object



9
10
11
# File 'lib/flexmls_api/models/subresource.rb', line 9

def find_by_listing_key(key, arguments={})
  collect(connection.get("/listings/#{key}#{self.path}", arguments))
end