Class: Twilio::REST::Marketplace::V1::AvailableAddOnContext::AvailableAddOnExtensionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Marketplace::V1::AvailableAddOnContext::AvailableAddOnExtensionInstance
- Defined in:
- lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb
Instance Method Summary collapse
-
#available_add_on_sid ⇒ String
The SID of the AvailableAddOn resource to which this extension applies.
-
#context ⇒ AvailableAddOnExtensionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ AvailableAddOnExtensionInstance
Fetch the AvailableAddOnExtensionInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, available_add_on_sid: nil, sid: nil) ⇒ AvailableAddOnExtensionInstance
constructor
Initialize the AvailableAddOnExtensionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#product_name ⇒ String
The name of the Product this Extension is used within.
-
#sid ⇒ String
The unique string that we created to identify the AvailableAddOnExtension resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
An application-defined string that uniquely identifies the resource.
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, available_add_on_sid: nil, sid: nil) ⇒ AvailableAddOnExtensionInstance
Initialize the AvailableAddOnExtensionInstance
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb', line 222 def initialize(version, payload , available_add_on_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'available_add_on_sid' => payload['available_add_on_sid'], 'friendly_name' => payload['friendly_name'], 'product_name' => payload['product_name'], 'unique_name' => payload['unique_name'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'available_add_on_sid' => available_add_on_sid || @properties['available_add_on_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#available_add_on_sid ⇒ String
Returns The SID of the AvailableAddOn resource to which this extension applies.
259 260 261 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb', line 259 def available_add_on_sid @properties['available_add_on_sid'] end |
#context ⇒ AvailableAddOnExtensionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
244 245 246 247 248 249 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb', line 244 def context unless @instance_context @instance_context = AvailableAddOnExtensionContext.new(@version , @params['available_add_on_sid'], @params['sid']) end @instance_context end |
#fetch ⇒ AvailableAddOnExtensionInstance
Fetch the AvailableAddOnExtensionInstance
290 291 292 293 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb', line 290 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
265 266 267 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb', line 265 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
304 305 306 307 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb', line 304 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Marketplace.V1.AvailableAddOnExtensionInstance #{values}>" end |
#product_name ⇒ String
Returns The name of the Product this Extension is used within.
271 272 273 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb', line 271 def product_name @properties['product_name'] end |
#sid ⇒ String
Returns The unique string that we created to identify the AvailableAddOnExtension resource.
253 254 255 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb', line 253 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
297 298 299 300 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb', line 297 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Marketplace.V1.AvailableAddOnExtensionInstance #{values}>" end |
#unique_name ⇒ String
Returns An application-defined string that uniquely identifies the resource.
277 278 279 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb', line 277 def unique_name @properties['unique_name'] end |
#url ⇒ String
Returns The absolute URL of the resource.
283 284 285 |
# File 'lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb', line 283 def url @properties['url'] end |