Class: Viewpoint::EWS::SOAP::GetEventsResponseMessage

Inherits:
ResponseMessage show all
Defined in:
lib/ews/soap/responses/get_events_response_message.rb

Instance Attribute Summary

Attributes inherited from ResponseMessage

#message, #type

Instance Method Summary collapse

Methods inherited from ResponseMessage

#initialize, #items, #message_text, #message_xml, #response_class, #response_code, #success?

Constructor Details

This class inherits a constructor from Viewpoint::EWS::SOAP::ResponseMessage

Instance Method Details

#eventsObject



48
49
50
# File 'lib/ews/soap/responses/get_events_response_message.rb', line 48

def events
  notification[3..-1]
end

#more_events?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/ews/soap/responses/get_events_response_message.rb', line 44

def more_events?
  safe_hash_access(notification[2], [:more_events, :text]) == 'true'
end

#new_watermarkObject



34
35
36
37
38
39
40
41
42
# File 'lib/ews/soap/responses/get_events_response_message.rb', line 34

def new_watermark
  ev = notification.last
  if ev
    type = ev.keys.first
    ev[type][:elems][0][:watermark][:text]
  else
    nil
  end
end

#notificationObject



22
23
24
# File 'lib/ews/soap/responses/get_events_response_message.rb', line 22

def notification
  safe_hash_access message, [:elems, :notification, :elems]
end

#previous_watermarkObject



30
31
32
# File 'lib/ews/soap/responses/get_events_response_message.rb', line 30

def previous_watermark
  safe_hash_access notification[1], [:previous_watermark, :text]
end

#subscription_idObject



26
27
28
# File 'lib/ews/soap/responses/get_events_response_message.rb', line 26

def subscription_id
  safe_hash_access notification[0], [:subscription_id, :text]
end