class RingCentralSdk::REST::MessagesSMS
MessagesSMS
provides a helper for SMS and MMS messages
Public Class Methods
new(client)
click to toggle source
# File lib/ringcentral_sdk/rest/messages.rb, line 21 def initialize(client) @client = client end
Public Instance Methods
create(opts)
click to toggle source
# File lib/ringcentral_sdk/rest/messages.rb, line 25 def create(opts) req = RingCentralSdk::REST::Request::SMS.new req.add_metadata({ to: opts[:to], from: opts[:from], text: opts[:text] }) if opts.key? :media if opts[:media].is_a? String req.add_file opts[:media] elsif opts[:media].is_a? Array req.add_files opts[:media] end end @client.send_request req end