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
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 217 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.
273 274 275 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 273 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
240 241 242 243 244 245 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 240 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.
261 262 263 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 261 def description @properties['description'] end |
#extensions ⇒ extensions
Access the extensions
299 300 301 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 299 def extensions context.extensions end |
#fetch ⇒ AvailableAddOnInstance
Fetch a AvailableAddOnInstance
292 293 294 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 292 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A description of this Add-on.
255 256 257 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 255 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
312 313 314 315 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 312 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Marketplace.AvailableAddOnInstance #{values}>" end |
#links ⇒ String
Returns The links.
285 286 287 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 285 def links @properties['links'] end |
#pricing_type ⇒ String
Returns The way customers are charged for using this Add-on.
267 268 269 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 267 def pricing_type @properties['pricing_type'] end |
#sid ⇒ String
Returns A string that uniquely identifies this Add-on.
249 250 251 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 249 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
305 306 307 308 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 305 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Marketplace.AvailableAddOnInstance #{values}>" end |
#url ⇒ String
Returns The url.
279 280 281 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 279 def url @properties['url'] end |