Class: Twilio::REST::Preview::TrustedComms::BrandedChannelContext::ChannelList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Preview::TrustedComms::BrandedChannelContext::ChannelList
- Defined in:
- 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]
Instance Method Summary collapse
-
#create(phone_number_sid: nil) ⇒ ChannelInstance
Create the ChannelInstance.
-
#initialize(version, branded_channel_sid: nil) ⇒ ChannelList
constructor
Initialize the ChannelList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, branded_channel_sid: nil) ⇒ ChannelList
Initialize the ChannelList
23 24 25 26 27 28 29 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb', line 23 def initialize(version, branded_channel_sid: nil) super(version) # Path Solution @solution = {branded_channel_sid: branded_channel_sid} @uri = "/BrandedChannels/#{@solution[:branded_channel_sid]}/Channels" end |
Instance Method Details
#create(phone_number_sid: nil) ⇒ ChannelInstance
Create the ChannelInstance
36 37 38 39 40 41 42 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb', line 36 def create(phone_number_sid: nil) data = Twilio::Values.of({'PhoneNumberSid' => phone_number_sid, }) payload = @version.create('POST', @uri, data: data) ChannelInstance.new(@version, payload, branded_channel_sid: @solution[:branded_channel_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
46 47 48 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb', line 46 def to_s '#<Twilio.Preview.TrustedComms.ChannelList>' end |