def move!(new_folder)
      new_folder = new_folder.id if new_folder.kind_of?(GenericFolder)
      move_opts = {
        :to_folder_id => {:id => new_folder},
        :item_ids => [{:item_id => {:id => self.id}}]
      }
      resp = @ews.move_item(move_opts)
      rmsg = resp.response_messages[0]

      if rmsg.success?
        obj = rmsg.items.first
        itype = obj.keys.first
        obj[itype][:elems][0][:item_id][:attribs][:id]
      else
        raise EwsError, "Could not move item. #{resp.code}: #{resp.message}"
      end
    end
def move!(new_folder)
      new_folder = new_folder.id if new_folder.kind_of?(GenericFolder)
      move_opts = {
        :to_folder_id => {:id => new_folder},
        :item_ids => [{:item_id => {:id => self.id}}]
      }
      resp = @ews.move_item(move_opts)
      rmsg = resp.response_messages[0]

      if rmsg.success?
        obj = rmsg.items.first
        itype = obj.keys.first
        obj[itype][:elems][0][:item_id][:attribs][:id]
      else
        raise EwsError, "Could not move item. 
      end
    end
def move! ( new_folder ) new_folder = new_folder . id if new_folder . kind_of? ( GenericFolder ) move_opts = { :to_folder_id => { :id => new_folder } , :item_ids => [ { :item_id => { :id => self . id } } ] } resp = @ews . move_item ( move_opts ) rmsg = resp . response_messages [ 0 ] if rmsg . success? obj = rmsg . items . first itype = obj . keys . first obj [ itype ] [ :elems ] [ 0 ] [ :item_id ] [ :attribs ] [ :id ] else raise EwsError , "Could not move item. #{resp.code}: #{resp.message}" end end
Move this item to a new folder
 @param [String,Symbol,GenericFolder] new_folder The new folder to move it to. This should
   be a subclass of GenericFolder, a DistinguishedFolderId (must me a Symbol) or a FolderId (String)
 @return [String] the new Id of the moved item
Move this item to a new folder