## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / # # frozen_string_literal: true module Twilio module REST class Preview < Domain class TrustedComms < Version class BusinessContext < InstanceContext class BrandContext < InstanceContext class BrandedChannelContext < InstanceContext ## # 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. class ChannelList < ListResource ## # Initialize the ChannelList # @param [Version] version Version that contains the resource # @param [String] business_sid The unique SID identifier of the Business. # @param [String] brand_sid The unique SID identifier of the Brand. # @param [String] branded_channel_sid The unique SID identifier of the Branded # Channel. # @return [ChannelList] ChannelList def initialize(version, business_sid: nil, brand_sid: nil, branded_channel_sid: nil) super(version) # Path Solution @solution = { business_sid: business_sid, brand_sid: brand_sid, branded_channel_sid: branded_channel_sid } @uri = "/Businesses/#{@solution[:business_sid]}/Brands/#{@solution[:brand_sid]}/BrandedChannels/#{@solution[:branded_channel_sid]}/Channels" end ## # Create the ChannelInstance # @param [String] phone_number_sid The unique SID identifier of the Phone Number # of the Phone number to be assigned to the Branded Channel. # @return [ChannelInstance] Created ChannelInstance 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, business_sid: @solution[:business_sid], brand_sid: @solution[:brand_sid], branded_channel_sid: @solution[:branded_channel_sid], ) end ## # Provide a user friendly representation def to_s '#' end end ## # 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. class ChannelPage < Page ## # Initialize the ChannelPage # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @return [ChannelPage] ChannelPage def initialize(version, response, solution) super(version, response) # Path Solution @solution = solution end ## # Build an instance of ChannelInstance # @param [Hash] payload Payload response from the API # @return [ChannelInstance] ChannelInstance def get_instance(payload) ChannelInstance.new( @version, payload, business_sid: @solution[:business_sid], brand_sid: @solution[:brand_sid], branded_channel_sid: @solution[:branded_channel_sid], ) end ## # Provide a user friendly representation def to_s '' end end ## # 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. class ChannelInstance < InstanceResource ## # Initialize the ChannelInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @param [String] business_sid The unique SID identifier of the Business. # @param [String] brand_sid The unique SID identifier of the Brand. # @param [String] branded_channel_sid The unique SID identifier of the Branded # Channel. # @return [ChannelInstance] ChannelInstance def initialize(version, payload, business_sid: nil, brand_sid: nil, branded_channel_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'business_sid' => payload['business_sid'], 'brand_sid' => payload['brand_sid'], 'branded_channel_sid' => payload['branded_channel_sid'], 'phone_number_sid' => payload['phone_number_sid'], 'phone_number' => payload['phone_number'], 'url' => payload['url'], } end ## # @return [String] Account Sid. def account_sid @properties['account_sid'] end ## # @return [String] Business Sid. def business_sid @properties['business_sid'] end ## # @return [String] Brand Sid. def brand_sid @properties['brand_sid'] end ## # @return [String] Branded Channel Sid. def branded_channel_sid @properties['branded_channel_sid'] end ## # @return [String] Phone Number Sid to be branded. def phone_number_sid @properties['phone_number_sid'] end ## # @return [String] Twilio number to assign to the Branded Channel def phone_number @properties['phone_number'] end ## # @return [String] The URL of this resource. def url @properties['url'] end ## # Provide a user friendly representation def to_s "" end ## # Provide a detailed, user friendly representation def inspect "" end end end end end end end end end