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 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 ⇒ String
The URLs of related resources.
-
#pricing_type ⇒ String
How customers are charged for using this Add-on.
-
#sid ⇒ String
The unique string that identifies the 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
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 216 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.
272 273 274 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 272 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
239 240 241 242 243 244 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 239 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.
260 261 262 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 260 def description @properties['description'] end |
#extensions ⇒ extensions
Access the extensions
298 299 300 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 298 def extensions context.extensions end |
#fetch ⇒ AvailableAddOnInstance
Fetch the AvailableAddOnInstance
291 292 293 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 291 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
254 255 256 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 254 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
311 312 313 314 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 311 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Marketplace.AvailableAddOnInstance #{values}>" end |
#links ⇒ String
Returns The URLs of related resources.
284 285 286 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 284 def links @properties['links'] end |
#pricing_type ⇒ String
Returns How customers are charged for using this Add-on.
266 267 268 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 266 def pricing_type @properties['pricing_type'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
248 249 250 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 248 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
304 305 306 307 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 304 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Marketplace.AvailableAddOnInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the resource.
278 279 280 |
# File 'lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb', line 278 def url @properties['url'] end |