def pull_subscribe_folder(folder, evtypes, timeout = nil, watermark = nil)
      timeout ||= 240 # 4 hour default timeout
      psr = {
        :subscribe_to_all_folders => false,
        :folder_ids => [ {:id => folder[:id], :change_key => folder[:change_key]} ],
        :event_types=> evtypes,
        :timeout    => timeout
      }
      psr[:watermark] = watermark if watermark
      subscribe([{pull_subscription_request: psr}])
    end
def pull_subscribe_folder(folder, evtypes, timeout = nil, watermark = nil)
      timeout ||= 240 
      psr = {
        :subscribe_to_all_folders => false,
        :folder_ids => [ {:id => folder[:id], :change_key => folder[:change_key]} ],
        :event_types=> evtypes,
        :timeout    => timeout
      }
      psr[:watermark] = watermark if watermark
      subscribe([{pull_subscription_request: psr}])
    end
def pull_subscribe_folder ( folder , evtypes , timeout = nil , watermark = nil ) timeout ||= 240 # 4 hour default timeout psr = { :subscribe_to_all_folders => false , :folder_ids => [ { :id => folder [ :id ] , :change_key => folder [ :change_key ] } ] , :event_types => evtypes , :timeout => timeout } psr [ :watermark ] = watermark if watermark subscribe ( [ { pull_subscription_request : psr } ] ) end
------- convenience methods ------- 
 Create a pull subscription to a single folder
 @param folder [Hash] a hash with the folder :id and :change_key
 @param evtypes [Array] the events you would like to subscribe to.
 @param timeout [Fixnum] http://msdn.microsoft.com/en-us/library/aa565201.aspx
 @param watermark [String] http://msdn.microsoft.com/en-us/library/aa565886.aspx
------- convenience methods ------- Create a pull subscription to a single folder