Method: TAM::API.send_sms
- Defined in:
- lib/tam/api/sms.rb
.send_sms(from_app, to_user, body, transaction_id = nil) ⇒ Object
Sends an SMS
38 39 40 41 42 43 44 45 |
# File 'lib/tam/api/sms.rb', line 38 def self.send_sms(from_app, to_user, body, transaction_id = nil) payload = {'body' => body, 'from' => from_app} if transaction_id payload["transaction_id"] = transaction_id end response = dispatch_to_tam(:post, '/api/1/sms/send', to_user, JSON.generate(payload)) JSON.parse response end |