code: def wrap_resource(res, with_association = with_association?)
        case res
        when Array
          wrap_resource(Hash[*res], with_association)
        when Hash
          res = res.merge(:association => @association) if with_association
          @resource_class.new(@client, res)
        else
          res = { :id => res }
          res.merge!(:association => @association) if with_association
          @resource_class.new(@client, res)
        end
      end
docs: Simplified Associations#wrap_resource