Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
1 | module RingCentralSdk::REST |
||
16 | module RingCentralSdk::REST |
||
17 | class MessagesSMS |
||
18 | |||
19 | def initialize(client) |
||
20 | @client = client |
||
21 | end |
||
22 | |||
23 | def create(opts) |
||
24 | response = @client.http.post do |req| |
||
25 | req.url 'account/~/extension/~/sms' |
||
26 | req.headers['Content-Type'] = 'application/json' |
||
27 | req.body = { |
||
28 | :from => { :phoneNumber => opts[:from].to_s }, |
||
29 | :to => [ { :phoneNumber => opts[:to].to_s } ], |
||
30 | :text => opts[:text].to_s |
||
31 | } |
||
32 | end |
||
33 | return response |
||
34 | end |
||
35 | |||
36 | end |
||
52 | end |