Class: Twilio::REST::Preview::TrustedComms::BusinessInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::TrustedComms::BusinessInstance
- Defined in:
- lib/twilio-ruby/rest/preview/trusted_comms/business.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.
-
#brands ⇒ brands
Access the brands.
-
#context ⇒ BusinessContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ BusinessInstance
Fetch the BusinessInstance.
-
#initialize(version, payload, sid: nil) ⇒ BusinessInstance
constructor
Initialize the BusinessInstance.
-
#insights ⇒ insights
Access the insights.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
Nested resource URLs.
-
#sid ⇒ String
A string that uniquely identifies this Business.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ BusinessInstance
Initialize the BusinessInstance
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business.rb', line 150 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'sid' => payload['sid'], 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = {'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns Account Sid.
179 180 181 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business.rb', line 179 def account_sid @properties['account_sid'] end |
#brands ⇒ brands
Access the brands
211 212 213 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business.rb', line 211 def brands context.brands end |
#context ⇒ BusinessContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
170 171 172 173 174 175 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business.rb', line 170 def context unless @instance_context @instance_context = BusinessContext.new(@version, @params['sid'], ) end @instance_context end |
#fetch ⇒ BusinessInstance
Fetch the BusinessInstance
204 205 206 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business.rb', line 204 def fetch context.fetch end |
#insights ⇒ insights
Access the insights
218 219 220 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business.rb', line 218 def insights context.insights end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
231 232 233 234 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business.rb', line 231 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.TrustedComms.BusinessInstance #{values}>" end |
#links ⇒ String
Returns Nested resource URLs.
197 198 199 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business.rb', line 197 def links @properties['links'] end |
#sid ⇒ String
Returns A string that uniquely identifies this Business.
185 186 187 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business.rb', line 185 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
224 225 226 227 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business.rb', line 224 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.TrustedComms.BusinessInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
191 192 193 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business.rb', line 191 def url @properties['url'] end |