Class: Twilio::REST::Preview::TrustedComms::BrandedChannelContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::TrustedComms::BrandedChannelContext
- Defined in:
- lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb,
lib/twilio-ruby/rest/preview/trusted_comms/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, 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, sid) ⇒ BrandedChannelContext
Initialize the BrandedChannelContext
73 74 75 76 77 78 79 80 81 82 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 73 def initialize(version, sid) super(version) # Path Solution @solution = {sid: sid, } @uri = "/BrandedChannels/#{@solution[:sid]}" # Dependents @channels = nil end |
Instance Method Details
#channels ⇒ ChannelList, ChannelContext
Access the channels
97 98 99 100 101 102 103 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 97 def channels unless @channels @channels = ChannelList.new(@version, branded_channel_sid: @solution[:sid], ) end @channels end |
#fetch ⇒ BrandedChannelInstance
Fetch the BrandedChannelInstance
87 88 89 90 91 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 87 def fetch payload = @version.fetch('GET', @uri) BrandedChannelInstance.new(@version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
114 115 116 117 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 114 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.TrustedComms.BrandedChannelContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
107 108 109 110 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 107 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.TrustedComms.BrandedChannelContext #{context}>" end |