Class: Twilio::SMS

Inherits:
Object
  • Object
show all
Includes:
Resource
Defined in:
lib/twilio/sms.rb

Instance Method Summary collapse

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

#saveObject

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