Class: Twilio::SMS
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ SMS
constructor
:nodoc:.
-
#save ⇒ Object
Sends the SMS message.
Methods included from Resource
Constructor Details
#initialize(attrs = {}) ⇒ SMS
:nodoc:
5 6 7 |
# File 'lib/twilio/sms.rb', line 5 def initialize(attrs ={}) #:nodoc: @attributes = Hash[attrs.map { |k,v| [k.to_s.camelize, v.to_s] }] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Twilio::Resource
Instance Method Details
#save ⇒ Object
Sends the SMS message
10 11 12 |
# File 'lib/twilio/sms.rb', line 10 def save handle_response self.class.post "/Accounts/#{Twilio::ACCOUNT_SID}/SMS/Messages.json", :body => attributes end |