Class: Twilio::REST::Preview::TrustedComms::BusinessContext::BrandContext::BrandedChannelInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::TrustedComms::BusinessContext::BrandContext::BrandedChannelInstance
- Defined in:
- lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb
Overview
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 [email protected].
Instance Method Summary collapse
-
#account_sid ⇒ String
Account Sid.
-
#brand_sid ⇒ String
Brand Sid.
-
#business_sid ⇒ String
Business Sid.
-
#channels ⇒ channels
Access the channels.
-
#context ⇒ BrandedChannelContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ BrandedChannelInstance
Fetch the BrandedChannelInstance.
-
#initialize(version, payload, business_sid: nil, brand_sid: nil, sid: nil) ⇒ BrandedChannelInstance
constructor
Initialize the BrandedChannelInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
Nested resource URLs.
-
#sid ⇒ String
Branded Channel Sid.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, business_sid: nil, brand_sid: nil, sid: nil) ⇒ BrandedChannelInstance
Initialize the BrandedChannelInstance
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 153 def initialize(version, payload, business_sid: nil, brand_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'business_sid' => payload['business_sid'], 'brand_sid' => payload['brand_sid'], 'sid' => payload['sid'], 'links' => payload['links'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'business_sid' => business_sid, 'brand_sid' => brand_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Account Sid.
193 194 195 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 193 def account_sid @properties['account_sid'] end |
#brand_sid ⇒ String
Returns Brand Sid.
205 206 207 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 205 def brand_sid @properties['brand_sid'] end |
#business_sid ⇒ String
Returns Business Sid.
199 200 201 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 199 def business_sid @properties['business_sid'] end |
#channels ⇒ channels
Access the channels
237 238 239 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 237 def channels context.channels end |
#context ⇒ BrandedChannelContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 179 def context unless @instance_context @instance_context = BrandedChannelContext.new( @version, @params['business_sid'], @params['brand_sid'], @params['sid'], ) end @instance_context end |
#fetch ⇒ BrandedChannelInstance
Fetch the BrandedChannelInstance
230 231 232 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 230 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
250 251 252 253 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 250 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.TrustedComms.BrandedChannelInstance #{values}>" end |
#links ⇒ String
Returns Nested resource URLs.
217 218 219 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 217 def links @properties['links'] end |
#sid ⇒ String
Returns Branded Channel Sid.
211 212 213 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 211 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
243 244 245 246 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 243 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.TrustedComms.BrandedChannelInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
223 224 225 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 223 def url @properties['url'] end |