Class: Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberContext::AssignedAddOnContext::AssignedAddOnExtensionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberContext::AssignedAddOnContext::AssignedAddOnExtensionInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the resource.
-
#assigned_add_on_sid ⇒ String
The SID that uniquely identifies the assigned Add-on installation.
-
#context ⇒ AssignedAddOnExtensionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#enabled ⇒ Boolean
Whether the Extension will be invoked.
-
#fetch ⇒ AssignedAddOnExtensionInstance
Fetch the AssignedAddOnExtensionInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, account_sid: nil, resource_sid: nil, assigned_add_on_sid: nil, sid: nil) ⇒ AssignedAddOnExtensionInstance
constructor
Initialize the AssignedAddOnExtensionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#product_name ⇒ String
A string that you assigned to describe the Product this Extension is used within.
-
#resource_sid ⇒ String
The SID of the Phone Number to which the Add-on is assigned.
-
#sid ⇒ String
The unique string that that we created to identify the resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
An application-defined string that uniquely identifies the resource.
-
#uri ⇒ String
The URI of the resource, relative to ‘api.twilio.com`.
Constructor Details
#initialize(version, payload, account_sid: nil, resource_sid: nil, assigned_add_on_sid: nil, sid: nil) ⇒ AssignedAddOnExtensionInstance
Initialize the AssignedAddOnExtensionInstance
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 228 def initialize(version, payload , account_sid: nil, resource_sid: nil, assigned_add_on_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'resource_sid' => payload['resource_sid'], 'assigned_add_on_sid' => payload['assigned_add_on_sid'], 'friendly_name' => payload['friendly_name'], 'product_name' => payload['product_name'], 'unique_name' => payload['unique_name'], 'uri' => payload['uri'], 'enabled' => payload['enabled'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid ,'resource_sid' => resource_sid || @properties['resource_sid'] ,'assigned_add_on_sid' => assigned_add_on_sid || @properties['assigned_add_on_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the resource.
268 269 270 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 268 def account_sid @properties['account_sid'] end |
#assigned_add_on_sid ⇒ String
Returns The SID that uniquely identifies the assigned Add-on installation.
280 281 282 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 280 def assigned_add_on_sid @properties['assigned_add_on_sid'] end |
#context ⇒ AssignedAddOnExtensionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
253 254 255 256 257 258 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 253 def context unless @instance_context @instance_context = AssignedAddOnExtensionContext.new(@version , @params['account_sid'], @params['resource_sid'], @params['assigned_add_on_sid'], @params['sid']) end @instance_context end |
#enabled ⇒ Boolean
Returns Whether the Extension will be invoked.
310 311 312 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 310 def enabled @properties['enabled'] end |
#fetch ⇒ AssignedAddOnExtensionInstance
Fetch the AssignedAddOnExtensionInstance
317 318 319 320 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 317 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
286 287 288 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 286 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
331 332 333 334 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 331 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.AssignedAddOnExtensionInstance #{values}>" end |
#product_name ⇒ String
Returns A string that you assigned to describe the Product this Extension is used within.
292 293 294 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 292 def product_name @properties['product_name'] end |
#resource_sid ⇒ String
Returns The SID of the Phone Number to which the Add-on is assigned.
274 275 276 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 274 def resource_sid @properties['resource_sid'] end |
#sid ⇒ String
Returns The unique string that that we created to identify the resource.
262 263 264 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 262 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
324 325 326 327 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 324 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.AssignedAddOnExtensionInstance #{values}>" end |
#unique_name ⇒ String
Returns An application-defined string that uniquely identifies the resource. It can be used in place of the resource’s ‘sid` in the URL to address the resource.
298 299 300 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 298 def unique_name @properties['unique_name'] end |
#uri ⇒ String
Returns The URI of the resource, relative to ‘api.twilio.com`.
304 305 306 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb', line 304 def uri @properties['uri'] end |