class Twilio::REST::Preview::TrustedComms::BrandedChannelContext

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

Public Class Methods

new(version, sid) click to toggle source

Initialize the BrandedChannelContext @param [Version] version Version that contains the resource @param [String] sid The unique SID identifier of the Branded Channel. @return [BrandedChannelContext] BrandedChannelContext

Calls superclass method Twilio::REST::InstanceContext::new
   # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
73 def initialize(version, sid)
74   super(version)
75 
76   # Path Solution
77   @solution = {sid: sid, }
78   @uri = "/BrandedChannels/#{@solution[:sid]}"
79 
80   # Dependents
81   @channels = nil
82 end

Public Instance Methods

channels() click to toggle source

Access the channels @return [ChannelList] @return [ChannelContext]

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
 97 def channels
 98   unless @channels
 99     @channels = ChannelList.new(@version, branded_channel_sid: @solution[:sid], )
100   end
101 
102   @channels
103 end
fetch() click to toggle source

Fetch the BrandedChannelInstance @return [BrandedChannelInstance] Fetched BrandedChannelInstance

   # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
87 def fetch
88   payload = @version.fetch('GET', @uri)
89 
90   BrandedChannelInstance.new(@version, payload, sid: @solution[:sid], )
91 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
114 def inspect
115   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
116   "#<Twilio.Preview.TrustedComms.BrandedChannelContext #{context}>"
117 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
107 def to_s
108   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
109   "#<Twilio.Preview.TrustedComms.BrandedChannelContext #{context}>"
110 end