Class: Twilio::REST::Preview::TrustedComms::BusinessContext::BrandContext::BrandedChannelContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::TrustedComms::BusinessContext::BrandContext::BrandedChannelContext
- Defined in:
- lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb,
lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/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].
Defined Under Namespace
Classes: ChannelInstance, ChannelList, ChannelPage
Instance Method Summary collapse
-
#channels ⇒ ChannelList, ChannelContext
Access the channels.
-
#fetch ⇒ BrandedChannelInstance
Fetch the BrandedChannelInstance.
-
#initialize(version, business_sid, brand_sid, sid) ⇒ BrandedChannelContext
constructor
Initialize the BrandedChannelContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, business_sid, brand_sid, sid) ⇒ BrandedChannelContext
Initialize the BrandedChannelContext
84 85 86 87 88 89 90 91 92 93 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 84 def initialize(version, business_sid, brand_sid, sid) super(version) # Path Solution @solution = {business_sid: business_sid, brand_sid: brand_sid, sid: sid, } @uri = "/Businesses/#{@solution[:business_sid]}/Brands/#{@solution[:brand_sid]}/BrandedChannels/#{@solution[:sid]}" # Dependents @channels = nil end |
Instance Method Details
#channels ⇒ ChannelList, ChannelContext
Access the channels
114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 114 def channels unless @channels @channels = ChannelList.new( @version, business_sid: @solution[:business_sid], brand_sid: @solution[:brand_sid], branded_channel_sid: @solution[:sid], ) end @channels end |
#fetch ⇒ BrandedChannelInstance
Fetch the BrandedChannelInstance
98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 98 def fetch payload = @version.fetch('GET', @uri) BrandedChannelInstance.new( @version, payload, business_sid: @solution[:business_sid], brand_sid: @solution[:brand_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
136 137 138 139 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 136 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.TrustedComms.BrandedChannelContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
129 130 131 132 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb', line 129 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.TrustedComms.BrandedChannelContext #{context}>" end |