lib/rentlinx/modules/link_client_methods.rb
# Posts an array of links to Rentlinx
#
# This uses the batch endpoint, so all links must be associated with
# the same property. They can be on different units, so long as all units
# are on the same property.
#
# @param links [Array] an array of links which all have the same propertyID
Posts an array of links to Rentlinx
This uses the batch endpoint, so all links must be associated with
the same property. They can be on different units, so long as all units
are on the same property.
Posts an array of links to Rentlinx This uses the batch endpoint so all links must be associated with the same property . They can be on different units so long as all units are on the same property .
def post_unit_links(links)
      hash = {}
      links.each do |p|
        if hash.keys.include?(p.unitID)
          hash[p.unitID] << p
        else
          hash[p.unitID] = [p]
        end
      end
      hash.each do |unit_id, unit_links|
        post_links_for_unit_id(unit_id, unit_links)
      end
    end
def post_unit_links ( links ) hash = { } links . each do | p | if hash . keys . include? ( p . unitID ) hash [ p . unitID ] << p else hash [ p . unitID ] = [ p ] end end hash . each do | unit_id , unit_links | post_links_for_unit_id ( unit_id , unit_links ) end end
Posts an array of links to Rentlinx
This uses the batch endpoint, so all links must be associated with
the same property.
Posts an array of links to Rentlinx This uses the batch endpoint so all links must be associated with the same property .
links
an array of links which all have the same propertyID
an array of links which all have the same propertyID