lib/ews/soap/exchange_data_services.rb
def delete_folder(opts)
      req = build_soap! do |type, builder|
        if(type == :header)
        else
          builder.nbuild.DeleteFolder('DeleteType' => opts[:delete_type]) {
            builder.nbuild.parent.default_namespace = @default_ns
            builder.folder_ids!(opts[:folder_ids], opts[:act_as])
          }
        end
      end
      do_soap_request(req)
    end
def delete_folder(opts)
      req = build_soap! do |type, builder|
        if(type == :header)
        else
          builder.nbuild.DeleteFolder('DeleteType' => opts[:delete_type]) {
            builder.nbuild.parent.default_namespace = @default_ns
            builder.folder_ids!(opts[:folder_ids], opts[:act_as])
          }
        end
      end
      do_soap_request(req)
    end
Deletes folders from a mailbox.
 @see http://msdn.microsoft.com/en-us/library/aa564767.aspx DeleteFolder

 @param [Hash] opts
 @option opts [Array<Hash>] :folder_ids An array of folder_ids in the form:
   [ {:id => 'myfolderID##asdfs', :change_key => 'asdfasdf'},
     {:id => :msgfolderroot} ]  # Don't do this for real
 @option opts [String,nil] :delete_type Type of delete to do:
   HardDelete/SoftDelete/MoveToDeletedItems
 @option opts [String,nil] :act_as User to act on behalf as. This user
   must have been given delegate access to this folder or else this
   operation will fail.