lib/ews/types/generic_folder.rb
def unsubscribe
      return true if @subscription_id.nil?

      resp = ews.unsubscribe(@subscription_id)
      rmsg = resp.response_messages.first
      if rmsg.success?
        @subscription_id, @watermark = nil, nil
        true
      else
        raise EwsSubscriptionError, "Could not unsubscribe: #{rmsg.code}: #{rmsg.message_text}"
      end
    end
def unsubscribe
      return true if @subscription_id.nil?

      resp = ews.unsubscribe(@subscription_id)
      rmsg = resp.response_messages.first
      if rmsg.success?
        @subscription_id, @watermark = nil, nil
        true
      else
        raise EwsSubscriptionError, "Could not unsubscribe: #{rmsg.code}: #{rmsg.message_text}"
      end
    end
Unsubscribe this folder from further Exchange events.
 @return [Boolean] Did we unsubscribe successfully?