# File 'lib/clockwork/xml/sms.rb', line 85defself.parse_multiplecollection,http_responseresponses=[]ifhttp_response.code.to_i==200doc=Nokogiri.parse(http_response.body)elseraiseClockwork::Error::HTTP,"Could not connect to the Clockwork API to send SMS."enddoc.css('SMS_Resp').each_with_indexdo|sms_response,i|response=Clockwork::SMS::Response.newresponse.message=collection.messages[i]ifsms_response.css('ErrDesc').empty?response.success=trueresponse.message_id=sms_response.css('MessageID').inner_htmlelseresponse.success=falseresponse.error_code=sms_response.css('ErrNo').inner_html.to_iresponse.error_description=sms_response.css('ErrDesc').inner_htmlendresponses[sms_response.css('WrapperID').inner_html.to_i]=responseendresponsesend

Clockwork:HTTPError - if a connection to the Clockwork API cannot be made

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

# File 'lib/clockwork/xml/sms.rb', line 59defself.parse_singlesms,http_responseresponse=Clockwork::SMS::Response.newresponse.message=smsifhttp_response.code.to_i==200doc=Nokogiri.parse(http_response.body)ifdoc.css('ErrDesc').empty?response.success=trueresponse.message_id=doc.css('MessageID').inner_htmlelseresponse.success=falseresponse.error_code=doc.css('ErrNo').inner_html.to_iresponse.error_description=doc.css('ErrDesc').inner_htmlendelseraiseClockwork::Error::HTTP,"Could not connect to the Clockwork API to send SMS."endresponseend