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
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
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
@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
@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
@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
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
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 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
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
@return [String] Nested resource URLs.
# File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb 184 def links 185 @properties['links'] 186 end
@return [String] Branded Channel Sid.
# File lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb 178 def sid 179 @properties['sid'] 180 end
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
@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