Class: Twilio::REST::Preview::TrustedComms::BusinessContext::BrandInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::TrustedComms::BusinessContext::BrandInstance
- Defined in:
- lib/twilio-ruby/rest/preview/trusted_comms/business/brand.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.
-
#branded_channels ⇒ branded_channels
Access the branded_channels.
-
#business_sid ⇒ String
Business Sid.
-
#context ⇒ BrandContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ BrandInstance
Fetch the BrandInstance.
-
#initialize(version, payload, business_sid: nil, sid: nil) ⇒ BrandInstance
constructor
Initialize the BrandInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
Nested resource URLs.
-
#sid ⇒ String
Brand Sid.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, business_sid: nil, sid: nil) ⇒ BrandInstance
Initialize the BrandInstance
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 143 def initialize(version, payload, business_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'business_sid' => payload['business_sid'], 'sid' => payload['sid'], 'links' => payload['links'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'business_sid' => business_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Account Sid.
173 174 175 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 173 def account_sid @properties['account_sid'] end |
#branded_channels ⇒ branded_channels
Access the branded_channels
211 212 213 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 211 def branded_channels context.branded_channels end |
#business_sid ⇒ String
Returns Business Sid.
179 180 181 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 179 def business_sid @properties['business_sid'] end |
#context ⇒ BrandContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
164 165 166 167 168 169 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 164 def context unless @instance_context @instance_context = BrandContext.new(@version, @params['business_sid'], @params['sid'], ) end @instance_context end |
#fetch ⇒ BrandInstance
Fetch the BrandInstance
204 205 206 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 204 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
224 225 226 227 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 224 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.TrustedComms.BrandInstance #{values}>" end |
#links ⇒ String
Returns Nested resource URLs.
191 192 193 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 191 def links @properties['links'] end |
#sid ⇒ String
Returns Brand Sid.
185 186 187 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 185 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
217 218 219 220 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 217 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.TrustedComms.BrandInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
197 198 199 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb', line 197 def url @properties['url'] end |