Class: Twilio::REST::Insights::V1::SettingInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Insights::V1::SettingInstance
- Defined in:
- lib/twilio-ruby/rest/insights/v1/setting.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
-
#advanced_features ⇒ Boolean
A boolean flag indicating whether Advanced Features for Voice Insights are enabled.
-
#context ⇒ SettingContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch(subaccount_sid: :unset) ⇒ SettingInstance
Fetch the SettingInstance.
-
#initialize(version, payload) ⇒ SettingInstance
constructor
Initialize the SettingInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(advanced_features: :unset, voice_trace: :unset, subaccount_sid: :unset) ⇒ SettingInstance
Update the SettingInstance.
-
#url ⇒ String
The URL of this resource.
-
#voice_trace ⇒ Boolean
A boolean flag indicating whether Voice Trace is enabled.
Constructor Details
#initialize(version, payload) ⇒ SettingInstance
Initialize the SettingInstance
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 343 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'advanced_features' => payload['advanced_features'], 'voice_trace' => payload['voice_trace'], 'url' => payload['url'], } # Context @instance_context = nil @params = { } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID identifier of the Account.
373 374 375 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 373 def account_sid @properties['account_sid'] end |
#advanced_features ⇒ Boolean
Returns A boolean flag indicating whether Advanced Features for Voice Insights are enabled.
379 380 381 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 379 def advanced_features @properties['advanced_features'] end |
#context ⇒ SettingContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
364 365 366 367 368 369 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 364 def context unless @instance_context @instance_context = SettingContext.new(@version ) end @instance_context end |
#fetch(subaccount_sid: :unset) ⇒ SettingInstance
Fetch the SettingInstance
399 400 401 402 403 404 405 406 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 399 def fetch( subaccount_sid: :unset ) context.fetch( subaccount_sid: subaccount_sid, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
436 437 438 439 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 436 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V1.SettingInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
429 430 431 432 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 429 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V1.SettingInstance #{values}>" end |
#update(advanced_features: :unset, voice_trace: :unset, subaccount_sid: :unset) ⇒ SettingInstance
Update the SettingInstance
414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 414 def update( advanced_features: :unset, voice_trace: :unset, subaccount_sid: :unset ) context.update( advanced_features: advanced_features, voice_trace: voice_trace, subaccount_sid: subaccount_sid, ) end |
#url ⇒ String
Returns The URL of this resource.
391 392 393 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 391 def url @properties['url'] end |
#voice_trace ⇒ Boolean
Returns A boolean flag indicating whether Voice Trace is enabled.
385 386 387 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 385 def voice_trace @properties['voice_trace'] end |