Class: Twilio::REST::Preview::Marketplace::AvailableAddOnInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Marketplace::AvailableAddOnInstance
- Defined in:
- lib/twilio-ruby/rest/preview/marketplace/available_add_on.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
-
#configuration_schema ⇒ Hash
The JSON Schema describing the Add-on’s configuration.
-
#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 functionality.
-
#extensions ⇒ extensions
Access the extensions.
-
#fetch ⇒ AvailableAddOnInstance
Fetch a AvailableAddOnInstance.
-
#friendly_name ⇒ String
A description of this Add-on.
-
#initialize(version, payload, sid: nil) ⇒ AvailableAddOnInstance
constructor
Initialize the AvailableAddOnInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
The links.
-
#pricing_type ⇒ String
The way customers are charged for using this Add-on.
-
#sid ⇒ String
A string that uniquely identifies this Add-on.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ AvailableAddOnInstance
Initialize the AvailableAddOnInstance
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 240 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 Schema describing the Add-on’s configuration.
301 302 303 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 301 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
265 266 267 268 269 270 271 272 273 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 265 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 functionality.
289 290 291 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 289 def description @properties['description'] end |
#extensions ⇒ extensions
Access the extensions
327 328 329 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 327 def extensions context.extensions end |
#fetch ⇒ AvailableAddOnInstance
Fetch a AvailableAddOnInstance
320 321 322 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 320 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A description of this Add-on.
283 284 285 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 283 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
340 341 342 343 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 340 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Marketplace.AvailableAddOnInstance #{values}>" end |
#links ⇒ String
Returns The links.
313 314 315 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 313 def links @properties['links'] end |
#pricing_type ⇒ String
Returns The way customers are charged for using this Add-on.
295 296 297 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 295 def pricing_type @properties['pricing_type'] end |
#sid ⇒ String
Returns A string that uniquely identifies this Add-on.
277 278 279 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 277 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
333 334 335 336 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 333 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Marketplace.AvailableAddOnInstance #{values}>" end |
#url ⇒ String
Returns The url.
307 308 309 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 307 def url @properties['url'] end |