Class: ConferenceCallService::GetConferenceTemplateResponse
- Inherits:
-
BasicResponse
- Object
- BasicResponse
- ConferenceCallService::GetConferenceTemplateResponse
- Defined in:
- lib/conference_call_service/get_conference_template_response.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
Returns the value of attribute details.
-
#participants ⇒ Object
Returns the value of attribute participants.
Attributes inherited from BasicResponse
Instance Method Summary collapse
-
#initialize(response_xml, raise_exception_on_error = true) ⇒ GetConferenceTemplateResponse
constructor
Constructor.
Methods inherited from BasicResponse
#inizialize, #raise_on_error, #to_s
Constructor Details
#initialize(response_xml, raise_exception_on_error = true) ⇒ GetConferenceTemplateResponse
Constructor.
Parameters
response_xml
-
Xml as returned by the corresponding method call.
raise_exception_on_error
-
Raise an exception if an error occurs or not?
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/conference_call_service/get_conference_template_response.rb', line 11 def initialize(response_xml, raise_exception_on_error = true) @participants = [] doc = response_xml.document @error_code = ConferenceCallService.xpath_query(doc, "statusCode").to_s @error_message = ConferenceCallService.xpath_query(doc, "statusMessage").to_s participants_xml = ConferenceCallService.xpath_query(doc, "participants") if participants_xml then participants_xml.each do |participant_xml| @participants << ParticipantDetails.build_from_xml(participant_xml) end end @details = ConferenceDetails.build_from_xml(ConferenceCallService.xpath_query(doc, "detail")) raise_on_error(response_xml) if raise_exception_on_error end |
Instance Attribute Details
#details ⇒ Object
Returns the value of attribute details.
5 6 7 |
# File 'lib/conference_call_service/get_conference_template_response.rb', line 5 def details @details end |
#participants ⇒ Object
Returns the value of attribute participants.
5 6 7 |
# File 'lib/conference_call_service/get_conference_template_response.rb', line 5 def participants @participants end |