Sha256: 876e4d5914b922d65173441527c26f04122675b34c750b32e8855f2d73ad2969

Contents?: true

Size: 648 Bytes

Versions: 1

Compression:

Stored size: 648 Bytes

Contents

module RingCentralSdk
  module REST
    module Request
      class SMS < RingCentralSdk::REST::Request::Multipart
        def add_metadata(data, opts = {})
          if data.is_a? Hash
            inf = RingCentralSdk::REST::Request::Inflator::ContactInfo.new
            if data.key? :to
              data[:to] = inf.inflate_to_array data[:to]
            end
            if data.key? :from
              data[:from] = inf.inflate_to_object data[:from]
            end
          end

          super data, opts
        end

        def url
          "account/#{@account_id}/extension/#{@extension_id}/sms"
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ringcentral_sdk-2.2.1 lib/ringcentral_sdk/rest/request/sms.rb