def commit_batch(arg)
      path_to_batch = ""
      #they passed a batch
      if arg.kind_of?(LitleBatchRequest) then
        path_to_batch = arg.get_batch_name
        if((au = arg.get_au_batch) != nil) then
          # also commit the account updater batch
          commit_batch(au)
        end
      elsif arg.kind_of?(LitleAUBatch) then
        path_to_batch = arg.get_batch_name
      elsif arg.kind_of?(String) then
        path_to_batch = arg
      else
        raise RuntimeError, "You entered neither a path nor a batch."
      end
      #the batch isn't closed. let's help a brother out
      if (ind = path_to_batch.index(/\.closed/)) == nil then
        if arg.kind_of?(String) then
          new_batch = LitleBatchRequest.new
          new_batch.open_existing_batch(path_to_batch)
          new_batch.close_batch()
          path_to_batch = new_batch.get_batch_name
          # if we passed a path to an AU batch, then new_batch will be a new, empty batch and the batch we passed
          # will be in the AU batch variable. thus, we wanna grab that file name and remove the empty batch.
          if(new_batch.get_au_batch != nil) then
            File.remove(path_to_batch)
            path_to_batch = new_batch.get_au_batch.get_batch_name
          end
        elsif arg.kind_of?(LitleBatchRequest) then
          arg.close_batch()
          path_to_batch = arg.get_batch_name
        elsif arg.kind_of?(LitleAUBatch) then
          arg.close_batch()
          path_to_batch = arg.get_batch_name
        end
        ind = path_to_batch.index(/\.closed/)
      end
      transactions_in_batch = path_to_batch[ind+8..path_to_batch.length].to_i

      # if the litle request would be too big, let's make another!
      if (@num_total_transactions + transactions_in_batch) > @MAX_NUM_TRANSACTIONS then
        finish_request
        initialize(@options)
        create_new_litle_request    #(path_to_batch)
      else #otherwise, let's add it line by line to the request doc
        # @num_batch_requests += 1
        #how long we wnat to wait around for the FTP server to get us a response
        @RESPONSE_TIME_OUT += 90 + (transactions_in_batch * 0.25)
        #don't start looking until there could possibly be a response
        @POLL_DELAY += 30 +(transactions_in_batch  * 0.02)
        @num_total_transactions += transactions_in_batch
        # Don't add empty batches
        @num_batch_requests += 1 unless transactions_in_batch.eql?(0)
        File.open(@path_to_batches, 'a+') do |fo|
          File.foreach(path_to_batch) do |li|
            fo.puts li
          end
        end

        File.delete(path_to_batch)
      end
    end
def commit_batch(arg)
      path_to_batch = ""
      #they passed a batch
      if arg.kind_of?(LitleBatchRequest) then
        path_to_batch = arg.get_batch_name
        if((au = arg.get_au_batch) != nil) then
          # also commit the account updater batch
          commit_batch(au)
        end
      elsif arg.kind_of?(LitleAUBatch) then
        path_to_batch = arg.get_batch_name
      elsif arg.kind_of?(String) then
        path_to_batch = arg
      else
        raise RuntimeError, "You entered neither a path nor a batch."
      end
      #the batch isn't closed. let's help a brother out
      if (ind = path_to_batch.index(/\.closed/)) == nil then
        if arg.kind_of?(String) then
          new_batch = LitleBatchRequest.new
          new_batch.open_existing_batch(path_to_batch)
          new_batch.close_batch()
          path_to_batch = new_batch.get_batch_name
          # if we passed a path to an AU batch, then new_batch will be a new, empty batch and the batch we passed
          # will be in the AU batch variable. thus, we wanna grab that file name and remove the empty batch.
          if(new_batch.get_au_batch != nil) then
            File.remove(path_to_batch)
            path_to_batch = new_batch.get_au_batch.get_batch_name
          end
        elsif arg.kind_of?(LitleBatchRequest) then
          arg.close_batch()
          path_to_batch = arg.get_batch_name
        elsif arg.kind_of?(LitleAUBatch) then
          arg.close_batch()
          path_to_batch = arg.get_batch_name
        end
        ind = path_to_batch.index(/\.closed/)
      end
      transactions_in_batch = path_to_batch[ind+8..path_to_batch.length].to_i

      # if the litle request would be too big, let's make another!
      if (@num_total_transactions + transactions_in_batch) > @MAX_NUM_TRANSACTIONS then
        finish_request
        initialize(@options)
        create_new_litle_request    #(path_to_batch)
      else #otherwise, let's add it line by line to the request doc
        # @num_batch_requests += 1
        #how long we wnat to wait around for the FTP server to get us a response
        @RESPONSE_TIME_OUT += 90 + (transactions_in_batch * 0.25)
        #don't start looking until there could possibly be a response
        @POLL_DELAY += 30 +(transactions_in_batch  * 0.02)
        @num_total_transactions += transactions_in_batch
        # Don't add empty batches
        @num_batch_requests += 1 unless transactions_in_batch.eql?(0)
        File.open(@path_to_batches, 'a+') do |fo|
          File.foreach(path_to_batch) do |li|
            fo.puts li
          end
        end

        File.delete(path_to_batch)
      end
    end
Adds a batch to the LitleRequest. If the batch is open when passed, it will be closed prior to being added.
 Params:
 +arg+:: a +LitleBatchRequest+ containing the transactions you wish to send or a +String+ specifying the
 path to the batch file