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

- (ListItem) initialize(ws, list_id, xml)



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

- (Object) created_date (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

- (Object) due_date (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

- (Object) editor (readonly)

Returns the value of attribute editor



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

def editor
  @editor
end

- (Object) file_name (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

- (Object) file_ref (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

- (Object) guid (readonly)

Returns the value of attribute guid



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

def guid
  @guid
end

- (Object) id (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

- (Object) modified_date (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) object_type (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

- (Object) priority (readonly)

Returns the value of attribute priority



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

def priority
  @priority
end

- (Object) status (readonly)

Returns the value of attribute status



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

def status
  @status
end

- (Object) title (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

- (Object) delete!

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