Class: SMSBox::WebsendRequest
- Inherits:
-
XMLRequest
- Object
- XMLRequest
- SMSBox::WebsendRequest
- Defined in:
- lib/sms_box/websend_request.rb
Instance Attribute Summary collapse
-
#maximum_sms_amount ⇒ Object
Returns the value of attribute maximum_sms_amount.
-
#password ⇒ Object
Returns the value of attribute password.
-
#receivers ⇒ Object
Returns the value of attribute receivers.
-
#service ⇒ Object
Returns the value of attribute service.
-
#text ⇒ Object
Returns the value of attribute text.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #command ⇒ Object
- #decorate_xml(xml) ⇒ Object
-
#initialize ⇒ WebsendRequest
constructor
A new instance of WebsendRequest.
Methods inherited from XMLRequest
Constructor Details
#initialize ⇒ WebsendRequest
Returns a new instance of WebsendRequest.
12 13 14 |
# File 'lib/sms_box/websend_request.rb', line 12 def initialize self.receivers = [] end |
Instance Attribute Details
#maximum_sms_amount ⇒ Object
Returns the value of attribute maximum_sms_amount.
10 11 12 |
# File 'lib/sms_box/websend_request.rb', line 10 def maximum_sms_amount @maximum_sms_amount end |
#password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'lib/sms_box/websend_request.rb', line 6 def password @password end |
#receivers ⇒ Object
Returns the value of attribute receivers.
9 10 11 |
# File 'lib/sms_box/websend_request.rb', line 9 def receivers @receivers end |
#service ⇒ Object
Returns the value of attribute service.
7 8 9 |
# File 'lib/sms_box/websend_request.rb', line 7 def service @service end |
#text ⇒ Object
Returns the value of attribute text.
8 9 10 |
# File 'lib/sms_box/websend_request.rb', line 8 def text @text end |
#username ⇒ Object
Returns the value of attribute username.
5 6 7 |
# File 'lib/sms_box/websend_request.rb', line 5 def username @username end |
Instance Method Details
#command ⇒ Object
16 17 18 |
# File 'lib/sms_box/websend_request.rb', line 16 def command 'WEBSEND' end |
#decorate_xml(xml) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/sms_box/websend_request.rb', line 20 def decorate_xml(xml) xml.SMSBoxXMLRequest do |root| super(root) root.parameters do |parameters| receivers.each do |r| parameters.multiReceiver r end parameters.service service parameters.text_ text if maximum_sms_amount.present? parameters.maximumSMSAmount maximum_sms_amount end end xml end end |