Class: TuraTEL::XmlBody
- Inherits:
-
Object
- Object
- TuraTEL::XmlBody
- Defined in:
- lib/turatel_sms/xml_body.rb
Class Method Summary collapse
- .check_sms_body(msg_id) ⇒ Object
- .get_credit ⇒ Object
- .send_sms_body(recipient, message_text, valid_options) ⇒ Object
Class Method Details
.check_sms_body(msg_id) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/turatel_sms/xml_body.rb', line 21 def self.check_sms_body(msg_id) "<?xml version=\"1.0\" encoding=\"utf-8\" ?> <MainReportRoot> <Command>3</Command> <PlatformID>1</PlatformID> <ChannelCode>#{TuraTEL.configuration.channel_code}</ChannelCode> <UserName>#{TuraTEL.configuration.usercode}</UserName> <PassWord>#{TuraTEL.configuration.password}</PassWord> <MsgID>#{msg_id}</MsgID> </MainReportRoot>" end |
.get_credit ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/turatel_sms/xml_body.rb', line 33 def self.get_credit "<?xml version=\"1.0\" encoding=\"utf-8\" ?> <MainReportRoot> <Command>6</Command> <ChannelCode>#{TuraTEL.configuration.channel_code}</ChannelCode> <UserName>#{TuraTEL.configuration.usercode}</UserName> <PassWord>#{TuraTEL.configuration.password}</PassWord> </MainReportRoot>" end |
.send_sms_body(recipient, message_text, valid_options) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/turatel_sms/xml_body.rb', line 3 def self.send_sms_body(recipient, , ) "<?xml version=\"1.0\" encoding=\"utf-8\" ?> <MainmsgBody> <Command>0</Command> <PlatformID>1</PlatformID> <ChannelCode>#{TuraTEL.configuration.channel_code}</ChannelCode> <UserName>#{TuraTEL.configuration.usercode}</UserName> <PassWord>#{TuraTEL.configuration.password}</PassWord> <Mesgbody><![CDATA[#{}]]></Mesgbody> <Numbers>#{recipient}</Numbers> <Type>#{[:type]}</Type> <Concat>#{[:concat]}</Concat> <Originator>#{[:from]}</Originator> <SDate>#{[:start_date]}</SDate> <EDate>#{[:stop_date]}</EDate> </MainmsgBody>" end |