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
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 243 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.
282 283 284 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 282 def account_sid @properties['account_sid'] end |
#configuration ⇒ Hash
312 313 314 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 312 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
267 268 269 270 271 272 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 267 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
320 321 322 323 324 325 326 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 320 def create(voice_v2_configuration_request: :unset ) context.create( voice_v2_configuration_request: voice_v2_configuration_request, ) end |
#date_created ⇒ Time
300 301 302 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 300 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
306 307 308 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 306 def date_updated @properties['date_updated'] end |
#default ⇒ default
Access the default
331 332 333 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 331 def default context.default end |
#description ⇒ String
Returns The description.
294 295 296 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 294 def description @properties['description'] end |
#id ⇒ String
Returns Configuration Identifier.
276 277 278 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 276 def id @properties['id'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
344 345 346 347 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 344 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V2.ConfigurationInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
337 338 339 340 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 337 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V2.ConfigurationInstance #{values}>" end |
#unique_name ⇒ String
Returns The unique name.
288 289 290 |
# File 'lib/twilio-ruby/rest/voice/v2/configuration.rb', line 288 def unique_name @properties['unique_name'] end |