Class: Viewpoint::SPWS::Types::ListItem

Inherits:
Object
  • Object
show all
Defined in:
lib/spws/types/list_item.rb

Overview

This class represents a Sharepoint ListItem returned from the Lists Web Service

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ws, list_id, xml) ⇒ ListItem



30
31
32
33
34
# File 'lib/spws/types/list_item.rb', line 30

def initialize(ws, list_id, xml)
  @ws = ws
  @list_id = list_id
  parse_xml_fields(xml)
end

Instance Attribute Details

#created_dateObject (readonly)

Returns the value of attribute created_date



24
25
26
# File 'lib/spws/types/list_item.rb', line 24

def created_date
  @created_date
end

#due_dateObject (readonly)

Returns the value of attribute due_date



24
25
26
# File 'lib/spws/types/list_item.rb', line 24

def due_date
  @due_date
end

#editorObject (readonly)

Returns the value of attribute editor



23
24
25
# File 'lib/spws/types/list_item.rb', line 23

def editor
  @editor
end

#file_nameObject (readonly)

Returns the value of attribute file_name



23
24
25
# File 'lib/spws/types/list_item.rb', line 23

def file_name
  @file_name
end

#file_refObject (readonly)

Returns the value of attribute file_ref



23
24
25
# File 'lib/spws/types/list_item.rb', line 23

def file_ref
  @file_ref
end

#guidObject (readonly)

Returns the value of attribute guid



23
24
25
# File 'lib/spws/types/list_item.rb', line 23

def guid
  @guid
end

#idObject (readonly)

Returns the value of attribute id



23
24
25
# File 'lib/spws/types/list_item.rb', line 23

def id
  @id
end

Returns the value of attribute link_title



25
26
27
# File 'lib/spws/types/list_item.rb', line 25

def link_title
  @link_title
end

#modified_dateObject (readonly)

Returns the value of attribute modified_date



24
25
26
# File 'lib/spws/types/list_item.rb', line 24

def modified_date
  @modified_date
end

#object_typeObject (readonly)

Returns the value of attribute object_type



23
24
25
# File 'lib/spws/types/list_item.rb', line 23

def object_type
  @object_type
end

#priorityObject (readonly)

Returns the value of attribute priority



25
26
27
# File 'lib/spws/types/list_item.rb', line 25

def priority
  @priority
end

#statusObject (readonly)

Returns the value of attribute status



25
26
27
# File 'lib/spws/types/list_item.rb', line 25

def status
  @status
end

#titleObject (readonly)

Returns the value of attribute title



25
26
27
# File 'lib/spws/types/list_item.rb', line 25

def title
  @title
end

Instance Method Details

#delete!Object

Delete this ListItem



37
38
39
40
41
# File 'lib/spws/types/list_item.rb', line 37

def delete!
  del = [{ :id => @id, :command => 'Delete',
    :file_ref => full_file_ref }]
  @ws.update_list_items(@list_id, :item_updates => del)
end