Class: Twilio::REST::Preview::TrustedComms::BrandedChannelInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::TrustedComms::BrandedChannelInstance
- Defined in:
- lib/twilio-ruby/rest/preview/trusted_comms/branded_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
-
#account_sid ⇒ String
Account Sid.
-
#brand_sid ⇒ String
Brand Sid.
-
#business_sid ⇒ String
Business Sid.
-
#channels ⇒ channels
Access the channels.
-
#context ⇒ BrandedChannelContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ BrandedChannelInstance
Fetch the BrandedChannelInstance.
-
#initialize(version, payload, sid: nil) ⇒ BrandedChannelInstance
constructor
Initialize the BrandedChannelInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
Nested resource URLs.
-
#sid ⇒ String
Branded Channel Sid.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ BrandedChannelInstance
Initialize the BrandedChannelInstance
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 129 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'business_sid' => payload['business_sid'], 'brand_sid' => payload['brand_sid'], 'sid' => payload['sid'], 'links' => payload['links'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Account Sid.
160 161 162 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 160 def account_sid @properties['account_sid'] end |
#brand_sid ⇒ String
Returns Brand Sid.
172 173 174 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 172 def brand_sid @properties['brand_sid'] end |
#business_sid ⇒ String
Returns Business Sid.
166 167 168 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 166 def business_sid @properties['business_sid'] end |
#channels ⇒ channels
Access the channels
204 205 206 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 204 def channels context.channels end |
#context ⇒ BrandedChannelContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
151 152 153 154 155 156 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 151 def context unless @instance_context @instance_context = BrandedChannelContext.new(@version, @params['sid'], ) end @instance_context end |
#fetch ⇒ BrandedChannelInstance
Fetch the BrandedChannelInstance
197 198 199 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 197 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
217 218 219 220 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 217 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.TrustedComms.BrandedChannelInstance #{values}>" end |
#links ⇒ String
Returns Nested resource URLs.
184 185 186 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 184 def links @properties['links'] end |
#sid ⇒ String
Returns Branded Channel Sid.
178 179 180 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 178 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
210 211 212 213 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 210 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.TrustedComms.BrandedChannelInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
190 191 192 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb', line 190 def url @properties['url'] end |