Class: Viewpoint::EWS::SOAP::SendNotificationResponseMessage

Inherits:
ResponseMessage
  • Object
show all
Includes:
StringUtils
Defined in:
lib/ews/soap/responses/send_notification_response_message.rb

Constant Summary

Constants included from StringUtils

StringUtils::DURATION_RE

Instance Attribute Summary

Attributes inherited from ResponseMessage

#message, #type

Instance Method Summary collapse

Methods included from StringUtils

included

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



49
50
51
52
53
54
55
56
# File 'lib/ews/soap/responses/send_notification_response_message.rb', line 49

def events
  @events ||=
    notification[3..-1].collect do |ev|
      type = ev.keys.first
      klass = Viewpoint::EWS::Types.const_get(camel_case(type))
      klass.new(nil, ev[type])
    end
end

#more_events?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/ews/soap/responses/send_notification_response_message.rb', line 45

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

#new_watermarkObject



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

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

#notificationObject



23
24
25
# File 'lib/ews/soap/responses/send_notification_response_message.rb', line 23

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

#previous_watermarkObject



31
32
33
# File 'lib/ews/soap/responses/send_notification_response_message.rb', line 31

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

#subscription_idObject



27
28
29
# File 'lib/ews/soap/responses/send_notification_response_message.rb', line 27

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