Class: RailsOtp::Exotel

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/rails_otp/exotel.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.send(params = {}) ⇒ Object



8
9
10
# File 'lib/rails_otp/exotel.rb', line 8

def self.send(params={})
  self.new.send(params)
end

Instance Method Details

#send(params = {}) ⇒ Object



12
13
14
15
16
# File 'lib/rails_otp/exotel.rb', line 12

def send(params={})
  params = transform_params(params)
  response = self.class.post("/#{RailsOtp::configuration.sid}/Sms/send",  {:body => params, :basic_auth => auth })
  response.response.code
end