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 account_sid.
-
#advanced_features ⇒ Boolean
The advanced_features.
-
#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.
-
#voice_trace ⇒ Boolean
The voice_trace.
Constructor Details
#initialize(version, payload) ⇒ SettingInstance
Initialize the SettingInstance
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 125 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 account_sid.
154 155 156 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 154 def account_sid @properties['account_sid'] end |
#advanced_features ⇒ Boolean
Returns The advanced_features.
160 161 162 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 160 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
145 146 147 148 149 150 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 145 def context unless @instance_context @instance_context = SettingContext.new(@version, ) end @instance_context end |
#fetch(subaccount_sid: :unset) ⇒ SettingInstance
Fetch the SettingInstance
180 181 182 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 180 def fetch(subaccount_sid: :unset) context.fetch(subaccount_sid: subaccount_sid, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
207 208 209 210 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 207 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Insights.V1.SettingInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
200 201 202 203 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 200 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
190 191 192 193 194 195 196 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 190 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.
172 173 174 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 172 def url @properties['url'] end |
#voice_trace ⇒ Boolean
Returns The voice_trace.
166 167 168 |
# File 'lib/twilio-ruby/rest/insights/v1/setting.rb', line 166 def voice_trace @properties['voice_trace'] end |