Class: SMS
- Inherits:
-
Object
- Object
- SMS
- Defined in:
- lib/sms.rb
Constant Summary collapse
- @@account_sid =
'AC0b322d7367604e7a852a1d59193738a2'
- @@auth_token =
'c32bcf082cb7cee728a99832858db23b'
- @@client =
Twilio::REST::Client.new(@@account_sid, @@auth_token)
- @@account =
@@client.account
Class Method Summary collapse
Class Method Details
.send_referral(referral, url, referrer_name, optional) ⇒ Object
12 13 14 |
# File 'lib/sms.rb', line 12 def self.send_referral(referral, url, referrer_name, optional) @@account.sms..create(:from => '+18599030353', :to => Referee.find(referral.referee_id).endpoint, :body => optional[:body] + Base64::encode64(referral.id.to_s).chop + '.') end |
.sieve(number) ⇒ Object
9 10 11 |
# File 'lib/sms.rb', line 9 def self.sieve(number) return number.to_s.gsub(/\D/, '') end |