lib/rentlinx/modules/amenity_client_methods.rb
# Submits amenities to the batch endpoint on Rentlinx
#
# @param amenities [Array] an array of amenity objects
Submits amenities to the batch endpoint on Rentlinx
Submits amenities to the batch endpoint on Rentlinx
def post_unit_amenities(amenities)
      hash = {}
      amenities.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_amenities|
        post_amenities_for_unit_id(unit_id, unit_amenities)
      end
    end
def post_unit_amenities ( amenities ) hash = { } amenities . 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_amenities | post_amenities_for_unit_id ( unit_id , unit_amenities ) end end
Submits amenities to the batch endpoint on Rentlinx
Submits amenities to the batch endpoint on Rentlinx
amenities
an array of amenity objects
an array of amenity objects