Class: ConferenceCallService::GetConferenceStatusResponse
- Inherits:
-
BasicResponse
- Object
- BasicResponse
- ConferenceCallService::GetConferenceStatusResponse
- Defined in:
- lib/conference_call_service/get_conference_status_response.rb
Instance Attribute Summary collapse
-
#acc ⇒ Object
Returns the value of attribute acc.
-
#details ⇒ Object
Returns the value of attribute details.
-
#participants ⇒ Object
Returns the value of attribute participants.
-
#schedule ⇒ Object
Returns the value of attribute schedule.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
Attributes inherited from BasicResponse
Instance Method Summary collapse
-
#initialize(response_xml, raise_exception_on_error = true) ⇒ GetConferenceStatusResponse
constructor
Constructor.
- #to_s ⇒ Object
Methods inherited from BasicResponse
Constructor Details
#initialize(response_xml, raise_exception_on_error = true) ⇒ GetConferenceStatusResponse
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?
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/conference_call_service/get_conference_status_response.rb', line 12 def initialize(response_xml, raise_exception_on_error = true) @conference_ids = [] @participants = [] doc = response_xml.document @error_code = ConferenceCallService.xpath_query(doc, "statusCode").to_s @error_message = ConferenceCallService.xpath_query(doc, "statusMessage").to_s @details = ConferenceDetails.build_from_xml(ConferenceCallService.xpath_query(doc, "detail")) @schedule = ConferenceSchedule.build_from_xml(ConferenceCallService.xpath_query(doc, "schedule")) participants_xml = ConferenceCallService.xpath_query(doc, "participants") participants_xml.each do |participant_xml| @participants << Participant.build_from_xml(participant_xml) end raise_on_error(response_xml) if raise_exception_on_error end |
Instance Attribute Details
#acc ⇒ Object
Returns the value of attribute acc.
6 7 8 |
# File 'lib/conference_call_service/get_conference_status_response.rb', line 6 def acc @acc end |
#details ⇒ Object
Returns the value of attribute details.
6 7 8 |
# File 'lib/conference_call_service/get_conference_status_response.rb', line 6 def details @details end |
#participants ⇒ Object
Returns the value of attribute participants.
6 7 8 |
# File 'lib/conference_call_service/get_conference_status_response.rb', line 6 def participants @participants end |
#schedule ⇒ Object
Returns the value of attribute schedule.
6 7 8 |
# File 'lib/conference_call_service/get_conference_status_response.rb', line 6 def schedule @schedule end |
#start_time ⇒ Object
Returns the value of attribute start_time.
6 7 8 |
# File 'lib/conference_call_service/get_conference_status_response.rb', line 6 def start_time @start_time end |
Instance Method Details
#to_s ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/conference_call_service/get_conference_status_response.rb', line 33 def to_s ret = "#{@error_code}: #{@error_message}\n" ret += "\t" + details.to_s + "\n" if details ret += "\t" + schedule.to_s + "\n" if schedule @participants.each do |participant| ret += "\t" + participant.to_s + "\n" end ret end |