Class: Twilio::REST::Marketplace::V1::InstalledAddOnContext::InstalledAddOnExtensionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Marketplace::V1::InstalledAddOnContext::InstalledAddOnExtensionInstance
- Defined in:
- lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb
Instance Method Summary collapse
-
#context ⇒ InstalledAddOnExtensionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#enabled ⇒ Boolean
Whether the Extension will be invoked.
-
#fetch ⇒ InstalledAddOnExtensionInstance
Fetch the InstalledAddOnExtensionInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, installed_add_on_sid: nil, sid: nil) ⇒ InstalledAddOnExtensionInstance
constructor
Initialize the InstalledAddOnExtensionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#installed_add_on_sid ⇒ String
The SID of the InstalledAddOn resource to which this extension applies.
-
#product_name ⇒ String
The name of the Product this Extension is used within.
-
#sid ⇒ String
The unique string that we created to identify the InstalledAddOn Extension resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
An application-defined string that uniquely identifies the resource.
-
#update(enabled: nil) ⇒ InstalledAddOnExtensionInstance
Update the InstalledAddOnExtensionInstance.
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, installed_add_on_sid: nil, sid: nil) ⇒ InstalledAddOnExtensionInstance
Initialize the InstalledAddOnExtensionInstance
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 249 def initialize(version, payload , installed_add_on_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'installed_add_on_sid' => payload['installed_add_on_sid'], 'friendly_name' => payload['friendly_name'], 'product_name' => payload['product_name'], 'unique_name' => payload['unique_name'], 'enabled' => payload['enabled'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'installed_add_on_sid' => installed_add_on_sid || @properties['installed_add_on_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#context ⇒ InstalledAddOnExtensionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
272 273 274 275 276 277 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 272 def context unless @instance_context @instance_context = InstalledAddOnExtensionContext.new(@version , @params['installed_add_on_sid'], @params['sid']) end @instance_context end |
#enabled ⇒ Boolean
Returns Whether the Extension will be invoked.
311 312 313 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 311 def enabled @properties['enabled'] end |
#fetch ⇒ InstalledAddOnExtensionInstance
Fetch the InstalledAddOnExtensionInstance
324 325 326 327 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 324 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
293 294 295 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 293 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
351 352 353 354 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 351 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Marketplace.V1.InstalledAddOnExtensionInstance #{values}>" end |
#installed_add_on_sid ⇒ String
Returns The SID of the InstalledAddOn resource to which this extension applies.
287 288 289 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 287 def installed_add_on_sid @properties['installed_add_on_sid'] end |
#product_name ⇒ String
Returns The name of the Product this Extension is used within.
299 300 301 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 299 def product_name @properties['product_name'] end |
#sid ⇒ String
Returns The unique string that we created to identify the InstalledAddOn Extension resource.
281 282 283 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 281 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
344 345 346 347 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 344 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Marketplace.V1.InstalledAddOnExtensionInstance #{values}>" end |
#unique_name ⇒ String
Returns An application-defined string that uniquely identifies the resource.
305 306 307 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 305 def unique_name @properties['unique_name'] end |
#update(enabled: nil) ⇒ InstalledAddOnExtensionInstance
Update the InstalledAddOnExtensionInstance
333 334 335 336 337 338 339 340 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 333 def update( enabled: nil ) context.update( enabled: enabled, ) end |
#url ⇒ String
Returns The absolute URL of the resource.
317 318 319 |
# File 'lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb', line 317 def url @properties['url'] end |