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
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/turatel_sms/xml_body.rb', line 18 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
30 31 32 33 34 35 36 37 38 |
# File 'lib/turatel_sms/xml_body.rb', line 30 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 |
# 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>#{}</Mesgbody> <Numbers>#{recipient}</Numbers> <Type>1</Type> <Originator>#{[:from]}</Originator> </MainmsgBody>" end |