Class: Twilio::REST::Marketplace::V1::AvailableAddOnInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Marketplace::V1::AvailableAddOnInstance
- Defined in:
- lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb
Instance Method Summary collapse
-
#configuration_schema ⇒ Hash
The JSON object with the configuration that must be provided when installing a given Add-on.
-
#context ⇒ AvailableAddOnContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#description ⇒ String
A short description of the Add-on’s functionality.
-
#extensions ⇒ extensions
Access the extensions.
-
#fetch ⇒ AvailableAddOnInstance
Fetch the AvailableAddOnInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, sid: nil) ⇒ AvailableAddOnInstance
constructor
Initialize the AvailableAddOnInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ Hash
The URLs of related resources.
-
#pricing_type ⇒ String
How customers are charged for using this Add-on.
-
#sid ⇒ String
The unique string that we created to identify the AvailableAddOn resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ AvailableAddOnInstance
Initialize the AvailableAddOnInstance
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 395 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'friendly_name' => payload['friendly_name'], 'description' => payload['description'], 'pricing_type' => payload['pricing_type'], 'configuration_schema' => payload['configuration_schema'], 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#configuration_schema ⇒ Hash
Returns The JSON object with the configuration that must be provided when installing a given Add-on.
452 453 454 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 452 def configuration_schema @properties['configuration_schema'] end |
#context ⇒ AvailableAddOnContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
419 420 421 422 423 424 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 419 def context unless @instance_context @instance_context = AvailableAddOnContext.new(@version , @params['sid']) end @instance_context end |
#description ⇒ String
Returns A short description of the Add-on’s functionality.
440 441 442 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 440 def description @properties['description'] end |
#extensions ⇒ extensions
Access the extensions
479 480 481 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 479 def extensions context.extensions end |
#fetch ⇒ AvailableAddOnInstance
Fetch the AvailableAddOnInstance
471 472 473 474 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 471 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
434 435 436 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 434 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
492 493 494 495 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 492 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Marketplace.V1.AvailableAddOnInstance #{values}>" end |
#links ⇒ Hash
Returns The URLs of related resources.
464 465 466 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 464 def links @properties['links'] end |
#pricing_type ⇒ String
Returns How customers are charged for using this Add-on.
446 447 448 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 446 def pricing_type @properties['pricing_type'] end |
#sid ⇒ String
Returns The unique string that we created to identify the AvailableAddOn resource.
428 429 430 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 428 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
485 486 487 488 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 485 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Marketplace.V1.AvailableAddOnInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the resource.
458 459 460 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb', line 458 def url @properties['url'] end |