Module: Ucpaas::Sms

Included in:
Client
Defined in:
lib/ucpaas/sms.rb

Overview

sms client api

Instance Method Summary collapse

Instance Method Details

#send_sms(app_id, tmp_id, mobile, *params) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/ucpaas/sms.rb', line 4

def send_sms(app_id, tmp_id, mobile, *params)
  data = {
    templateSMS: {
      appId: app_id,
      templateId: tmp_id,
      to: mobile,
      param: params.flatten.map(&:to_s).join(',')
    }
  }
  post '/Messages/templateSMS.json', data
end