Class: Twilio::REST::Preview::TrustedComms::BusinessContext::BrandContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::TrustedComms::BusinessContext::BrandContext
- Defined in:
- lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb,
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: BrandedChannelContext, BrandedChannelInstance, BrandedChannelList, BrandedChannelPage
Instance Method Summary collapse
-
#branded_channels(sid = :unset) ⇒ BrandedChannelList, BrandedChannelContext
Access the branded_channels.
-
#fetch ⇒ BrandInstance
Fetch the BrandInstance.
-
#initialize(version, business_sid, sid) ⇒ BrandContext
constructor
Initialize the BrandContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, business_sid, sid) ⇒ BrandContext
Initialize the BrandContext
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 76 def initialize(version, business_sid, sid) super(version) # Path Solution @solution = {business_sid: business_sid, sid: sid, } @uri = "/Businesses/#{@solution[:business_sid]}/Brands/#{@solution[:sid]}" # Dependents @branded_channels = nil end |
Instance Method Details
#branded_channels(sid = :unset) ⇒ BrandedChannelList, BrandedChannelContext
Access the branded_channels
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 100 def branded_channels(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return BrandedChannelContext.new(@version, @solution[:business_sid], @solution[:sid], sid, ) end unless @branded_channels @branded_channels = BrandedChannelList.new( @version, business_sid: @solution[:business_sid], brand_sid: @solution[:sid], ) end @branded_channels end |
#fetch ⇒ BrandInstance
Fetch the BrandInstance
90 91 92 93 94 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 90 def fetch payload = @version.fetch('GET', @uri) BrandInstance.new(@version, payload, business_sid: @solution[:business_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
127 128 129 130 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 127 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.TrustedComms.BrandContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
120 121 122 123 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 120 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.TrustedComms.BrandContext #{context}>" end |