Class: Viewpoint::EWS::SOAP::ResponseMessage
- Inherits:
-
Object
- Object
- Viewpoint::EWS::SOAP::ResponseMessage
show all
- Defined in:
- lib/ews/soap/response_message.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ResponseMessage.
24
25
26
27
|
# File 'lib/ews/soap/response_message.rb', line 24
def initialize(message)
@type = message.keys.first
@message = message[@type]
end
|
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
22
23
24
|
# File 'lib/ews/soap/response_message.rb', line 22
def message
@message
end
|
#type ⇒ Object
Returns the value of attribute type.
22
23
24
|
# File 'lib/ews/soap/response_message.rb', line 22
def type
@type
end
|
Instance Method Details
#items ⇒ Object
51
52
53
|
# File 'lib/ews/soap/response_message.rb', line 51
def items
safe_hash_access(message, [:elems, :items, :elems]) || []
end
|
#message_text ⇒ Object
38
39
40
|
# File 'lib/ews/soap/response_message.rb', line 38
def message_text
safe_hash_access message, [:elems, :message_text, :text]
end
|
#message_xml ⇒ Object
47
48
49
|
# File 'lib/ews/soap/response_message.rb', line 47
def message_xml
safe_hash_access message, [:elems, :message_xml, :text]
end
|
#response_class ⇒ Object
Also known as:
status
29
30
31
|
# File 'lib/ews/soap/response_message.rb', line 29
def response_class
message[:attribs][:response_class]
end
|
#response_code ⇒ Object
Also known as:
code
42
43
44
|
# File 'lib/ews/soap/response_message.rb', line 42
def response_code
safe_hash_access message, [:elems, :response_code, :text]
end
|
#success? ⇒ Boolean
34
35
36
|
# File 'lib/ews/soap/response_message.rb', line 34
def success?
response_class == 'Success'
end
|