Class: Twilio::REST::Voice::V2::ConfigurationInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Voice::V2::ConfigurationInstance
- Defined in:
- lib/twilio-ruby/rest/voice/v2/configuration.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
Account sid.
- #configuration ⇒ Hash
-
#context ⇒ ConfigurationContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#create(voice_v2_configuration_request: :unset) ⇒ ConfigurationInstance
Create the ConfigurationInstance.
- #date_created ⇒ Time
- #date_updated ⇒ Time
-
#default ⇒ default
Access the default.
-
#description ⇒ String
The description.
-
#id ⇒ String
Configuration Identifier.
-
#initialize(version, payload, type: nil) ⇒ ConfigurationInstance
constructor
Initialize the ConfigurationInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
The unique name.
Constructor Details
#initialize(version, payload, type: nil) ⇒ ConfigurationInstance
Initialize the ConfigurationInstance
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 302 def initialize(version, payload , type: nil) super(version) # Marshaled Properties @properties = { 'id' => payload['id'], 'account_sid' => payload['account_sid'], 'unique_name' => payload['unique_name'], 'description' => payload['description'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'configuration' => payload['configuration'], } # Context @instance_context = nil @params = { 'type' => type || @properties['type'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns Account sid.
341 342 343 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 341 def account_sid @properties['account_sid'] end |
#configuration ⇒ Hash
371 372 373 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 371 def configuration @properties['configuration'] end |
#context ⇒ ConfigurationContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
326 327 328 329 330 331 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 326 def context unless @instance_context @instance_context = ConfigurationContext.new(@version , @params['type']) end @instance_context end |
#create(voice_v2_configuration_request: :unset) ⇒ ConfigurationInstance
Create the ConfigurationInstance
379 380 381 382 383 384 385 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 379 def create(voice_v2_configuration_request: :unset ) context.create( voice_v2_configuration_request: voice_v2_configuration_request, ) end |
#date_created ⇒ Time
359 360 361 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 359 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
365 366 367 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 365 def date_updated @properties['date_updated'] end |
#default ⇒ default
Access the default
390 391 392 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 390 def default context.default end |
#description ⇒ String
Returns The description.
353 354 355 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 353 def description @properties['description'] end |
#id ⇒ String
Returns Configuration Identifier.
335 336 337 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 335 def id @properties['id'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
403 404 405 406 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 403 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V2.ConfigurationInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
396 397 398 399 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 396 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V2.ConfigurationInstance #{values}>" end |
#unique_name ⇒ String
Returns The unique name.
347 348 349 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 347 def unique_name @properties['unique_name'] end |