Class: Twilio::REST::Trunking::V1::TrunkInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Trunking::V1::TrunkInstance
- Defined in:
- lib/twilio-ruby/rest/trunking/v1/trunk.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The account_sid.
-
#auth_type ⇒ String
The auth_type.
-
#auth_type_set ⇒ String
The auth_type_set.
-
#context ⇒ TrunkContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#credentials_lists ⇒ credentials_lists
Access the credentials_lists.
-
#date_created ⇒ Time
The date_created.
-
#date_updated ⇒ Time
The date_updated.
-
#delete ⇒ Boolean
Deletes the TrunkInstance.
-
#disaster_recovery_method ⇒ String
The disaster_recovery_method.
-
#disaster_recovery_url ⇒ String
The disaster_recovery_url.
-
#domain_name ⇒ String
The domain_name.
-
#fetch ⇒ TrunkInstance
Fetch a TrunkInstance.
-
#friendly_name ⇒ String
The friendly_name.
-
#initialize(version, payload, sid: nil) ⇒ TrunkInstance
constructor
Initialize the TrunkInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#ip_access_control_lists ⇒ ip_access_control_lists
Access the ip_access_control_lists.
-
#links ⇒ String
The links.
-
#origination_urls ⇒ origination_urls
Access the origination_urls.
-
#phone_numbers ⇒ phone_numbers
Access the phone_numbers.
-
#recording ⇒ Hash
The recording.
-
#secure ⇒ Boolean
The secure.
-
#sid ⇒ String
The sid.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, secure: :unset) ⇒ TrunkInstance
Update the TrunkInstance.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ TrunkInstance
Initialize the TrunkInstance
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 379 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'domain_name' => payload['domain_name'], 'disaster_recovery_method' => payload['disaster_recovery_method'], 'disaster_recovery_url' => payload['disaster_recovery_url'], 'friendly_name' => payload['friendly_name'], 'secure' => payload['secure'], 'recording' => payload['recording'], 'auth_type' => payload['auth_type'], 'auth_type_set' => payload['auth_type_set'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'sid' => payload['sid'], 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The account_sid.
423 424 425 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 423 def account_sid @properties['account_sid'] end |
#auth_type ⇒ String
Returns The auth_type.
465 466 467 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 465 def auth_type @properties['auth_type'] end |
#auth_type_set ⇒ String
Returns The auth_type_set.
471 472 473 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 471 def auth_type_set @properties['auth_type_set'] end |
#context ⇒ TrunkContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
411 412 413 414 415 416 417 418 419 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 411 def context unless @instance_context @instance_context = TrunkContext.new( @version, @params['sid'], ) end @instance_context end |
#credentials_lists ⇒ credentials_lists
Access the credentials_lists
549 550 551 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 549 def credentials_lists context.credentials_lists end |
#date_created ⇒ Time
Returns The date_created.
477 478 479 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 477 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date_updated.
483 484 485 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 483 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the TrunkInstance
515 516 517 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 515 def delete context.delete end |
#disaster_recovery_method ⇒ String
Returns The disaster_recovery_method.
435 436 437 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 435 def disaster_recovery_method @properties['disaster_recovery_method'] end |
#disaster_recovery_url ⇒ String
Returns The disaster_recovery_url.
441 442 443 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 441 def disaster_recovery_url @properties['disaster_recovery_url'] end |
#domain_name ⇒ String
Returns The domain_name.
429 430 431 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 429 def domain_name @properties['domain_name'] end |
#fetch ⇒ TrunkInstance
Fetch a TrunkInstance
508 509 510 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 508 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The friendly_name.
447 448 449 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 447 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
576 577 578 579 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 576 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trunking.V1.TrunkInstance #{values}>" end |
#ip_access_control_lists ⇒ ip_access_control_lists
Access the ip_access_control_lists
556 557 558 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 556 def ip_access_control_lists context.ip_access_control_lists end |
#links ⇒ String
Returns The links.
501 502 503 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 501 def links @properties['links'] end |
#origination_urls ⇒ origination_urls
Access the origination_urls
542 543 544 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 542 def origination_urls context.origination_urls end |
#phone_numbers ⇒ phone_numbers
Access the phone_numbers
563 564 565 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 563 def phone_numbers context.phone_numbers end |
#recording ⇒ Hash
Returns The recording.
459 460 461 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 459 def recording @properties['recording'] end |
#secure ⇒ Boolean
Returns The secure.
453 454 455 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 453 def secure @properties['secure'] end |
#sid ⇒ String
Returns The sid.
489 490 491 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 489 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
569 570 571 572 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 569 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trunking.V1.TrunkInstance #{values}>" end |
#update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, secure: :unset) ⇒ TrunkInstance
Update the TrunkInstance
528 529 530 531 532 533 534 535 536 537 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 528 def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, secure: :unset) context.update( friendly_name: friendly_name, domain_name: domain_name, disaster_recovery_url: disaster_recovery_url, disaster_recovery_method: disaster_recovery_method, recording: recording, secure: secure, ) end |
#url ⇒ String
Returns The url.
495 496 497 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 495 def url @properties['url'] end |