Class: Viewpoint::EWS::SOAP::EwsSoapFreeBusyResponse
- Inherits:
-
EwsSoapResponse
- Object
- EwsSoapResponse
- Viewpoint::EWS::SOAP::EwsSoapFreeBusyResponse
- Defined in:
- lib/ews/soap/ews_soap_free_busy_response.rb
Instance Attribute Summary
Attributes inherited from EwsSoapResponse
Instance Method Summary collapse
- #body ⇒ Object
- #calendar_event_array ⇒ Object
- #envelope ⇒ Object
- #get_user_availability_response ⇒ Object
- #header ⇒ Object
-
#initialize(sax_hash) ⇒ EwsSoapFreeBusyResponse
constructor
A new instance of EwsSoapFreeBusyResponse.
- #response ⇒ Object
- #response_class ⇒ Object (also: #status)
- #response_code ⇒ Object (also: #code)
- #response_key ⇒ Object
- #response_message ⇒ Object
- #response_message_text ⇒ Object (also: #message)
- #success? ⇒ Boolean
- #working_hours ⇒ Object
Methods inherited from EwsSoapResponse
Constructor Details
#initialize(sax_hash) ⇒ EwsSoapFreeBusyResponse
Returns a new instance of EwsSoapFreeBusyResponse.
23 24 25 26 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 23 def initialize(sax_hash) @resp = sax_hash simplify! end |
Instance Method Details
#body ⇒ Object
36 37 38 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 36 def body envelope[1][:body][:elems] end |
#calendar_event_array ⇒ Object
48 49 50 51 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 48 def calendar_event_array result = find_in_hash_list(get_user_availability_response[1][:free_busy_view][:elems], :calendar_event_array) result ? result[:elems] : [] end |
#envelope ⇒ Object
28 29 30 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 28 def envelope @resp[:envelope][:elems] end |
#get_user_availability_response ⇒ Object
40 41 42 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 40 def get_user_availability_response body.first[:get_user_availability_response][:elems].first[:free_busy_response_array][:elems].first[:free_busy_response][:elems] end |
#header ⇒ Object
32 33 34 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 32 def header envelope[0][:header][:elems] end |
#response ⇒ Object
44 45 46 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 44 def response body end |
#response_class ⇒ Object Also known as: status
61 62 63 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 61 def response_class [:attribs][:response_class] end |
#response_code ⇒ Object Also known as: code
66 67 68 69 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 66 def response_code result = find_in_hash_list([:elems], :response_code) result ? result[:text] : nil end |
#response_key ⇒ Object
77 78 79 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 77 def response_key [:elems] end |
#response_message ⇒ Object
57 58 59 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 57 def find_in_hash_list(get_user_availability_response, :response_message) end |
#response_message_text ⇒ Object Also known as: message
72 73 74 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 72 def guard_hash [:elems], [:message_text, :text] end |
#success? ⇒ Boolean
81 82 83 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 81 def success? response_class == "Success" end |
#working_hours ⇒ Object
53 54 55 |
# File 'lib/ews/soap/ews_soap_free_busy_response.rb', line 53 def working_hours get_user_availability_response[1][:free_busy_view][:elems][2][:working_hours][:elems] end |