class Twilio::REST::Preview::TrustedComms::BrandedChannelInstance

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, payload, sid: nil) click to toggle source

Initialize the BrandedChannelInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The unique SID identifier of the Branded Channel. @return [BrandedChannelInstance] BrandedChannelInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
129 def initialize(version, payload, sid: nil)
130   super(version)
131 
132   # Marshaled Properties
133   @properties = {
134       'account_sid' => payload['account_sid'],
135       'business_sid' => payload['business_sid'],
136       'brand_sid' => payload['brand_sid'],
137       'sid' => payload['sid'],
138       'links' => payload['links'],
139       'url' => payload['url'],
140   }
141 
142   # Context
143   @instance_context = nil
144   @params = {'sid' => sid || @properties['sid'], }
145 end

Public Instance Methods

account_sid() click to toggle source

@return [String] Account Sid.

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
160 def account_sid
161   @properties['account_sid']
162 end
brand_sid() click to toggle source

@return [String] Brand Sid.

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
172 def brand_sid
173   @properties['brand_sid']
174 end
business_sid() click to toggle source

@return [String] Business Sid.

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
166 def business_sid
167   @properties['business_sid']
168 end
channels() click to toggle source

Access the channels @return [channels] channels

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
204 def channels
205   context.channels
206 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [BrandedChannelContext] BrandedChannelContext for this BrandedChannelInstance

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
151 def context
152   unless @instance_context
153     @instance_context = BrandedChannelContext.new(@version, @params['sid'], )
154   end
155   @instance_context
156 end
fetch() click to toggle source

Fetch the BrandedChannelInstance @return [BrandedChannelInstance] Fetched BrandedChannelInstance

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
197 def fetch
198   context.fetch
199 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
217 def inspect
218   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
219   "<Twilio.Preview.TrustedComms.BrandedChannelInstance #{values}>"
220 end
sid() click to toggle source

@return [String] Branded Channel Sid.

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
178 def sid
179   @properties['sid']
180 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
210 def to_s
211   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
212   "<Twilio.Preview.TrustedComms.BrandedChannelInstance #{values}>"
213 end
url() click to toggle source

@return [String] The URL of this resource.

    # File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
190 def url
191   @properties['url']
192 end