Class: OpenMarket::SMS::Requests::SendMessage
- Inherits:
-
Object
- Object
- OpenMarket::SMS::Requests::SendMessage
- Defined in:
- lib/open_market/sms/requests/send_message.rb
Constant Summary collapse
- ALPHANUMERIC_TYPE_OF_NUMBER =
5
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#text ⇒ Object
Returns the value of attribute text.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(from, to, text) ⇒ SendMessage
constructor
A new instance of SendMessage.
- #method ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(from, to, text) ⇒ SendMessage
Returns a new instance of SendMessage.
10 11 12 13 14 |
# File 'lib/open_market/sms/requests/send_message.rb', line 10 def initialize(from, to, text) @from = from @to = to @text = text end |
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
6 7 8 |
# File 'lib/open_market/sms/requests/send_message.rb', line 6 def from @from end |
#text ⇒ Object
Returns the value of attribute text.
6 7 8 |
# File 'lib/open_market/sms/requests/send_message.rb', line 6 def text @text end |
#to ⇒ Object
Returns the value of attribute to.
6 7 8 |
# File 'lib/open_market/sms/requests/send_message.rb', line 6 def to @to end |
Instance Method Details
#body ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/open_market/sms/requests/send_message.rb', line 16 def body { mobileTerminate: {} .merge() .merge(source) .merge(destination) } end |
#method ⇒ Object
29 30 31 |
# File 'lib/open_market/sms/requests/send_message.rb', line 29 def method :post end |