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
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 226 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.
282 283 284 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 282 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
249 250 251 252 253 254 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 249 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.
270 271 272 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 270 def description @properties['description'] end |
#extensions ⇒ extensions
Access the extensions
308 309 310 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 308 def extensions context.extensions end |
#fetch ⇒ AvailableAddOnInstance
Fetch a AvailableAddOnInstance
301 302 303 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 301 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A description of this Add-on.
264 265 266 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 264 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
321 322 323 324 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 321 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Marketplace.AvailableAddOnInstance #{values}>" end |
#links ⇒ String
Returns The links.
294 295 296 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 294 def links @properties['links'] end |
#pricing_type ⇒ String
Returns The way customers are charged for using this Add-on.
276 277 278 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 276 def pricing_type @properties['pricing_type'] end |
#sid ⇒ String
Returns A string that uniquely identifies this Add-on.
258 259 260 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 258 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
314 315 316 317 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 314 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Marketplace.AvailableAddOnInstance #{values}>" end |
#url ⇒ String
Returns The url.
288 289 290 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 288 def url @properties['url'] end |