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 unique ID of the Account that owns this Trunk.
-
#auth_type ⇒ String
The types of authentication you have mapped to your domain.
-
#auth_type_set ⇒ String
The auth_type_set.
-
#cnam_lookup_enabled ⇒ Boolean
The Caller ID Name (CNAM) lookup setting for this trunk.
-
#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 this Activity was created.
-
#date_updated ⇒ Time
The date this Activity was updated.
-
#delete ⇒ Boolean
Deletes the TrunkInstance.
-
#disaster_recovery_method ⇒ String
The HTTP method Twilio will use when requesting the DisasterRecoveryUrl.
-
#disaster_recovery_url ⇒ String
The HTTP URL that Twilio will request if an error occurs while sending SIP traffic towards your configured Origination URL.
-
#domain_name ⇒ String
The unique address you reserve on Twilio to which you route your SIP traffic.
-
#fetch ⇒ TrunkInstance
Fetch a TrunkInstance.
-
#friendly_name ⇒ String
A human-readable name for the Trunk.
-
#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 settings for this trunk.
-
#secure ⇒ Boolean
The Secure Trunking settings for this trunk.
-
#sid ⇒ String
A 34 character string that uniquely identifies the SIP Trunk in Twilio.
-
#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, cnam_lookup_enabled: :unset) ⇒ TrunkInstance
Update the TrunkInstance.
-
#url ⇒ String
The URL for this resource, relative to trunking.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ TrunkInstance
Initialize the TrunkInstance
378 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 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 378 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'], 'cnam_lookup_enabled' => payload['cnam_lookup_enabled'], '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 unique ID of the Account that owns this Trunk.
418 419 420 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 418 def account_sid @properties['account_sid'] end |
#auth_type ⇒ String
Returns The types of authentication you have mapped to your domain.
466 467 468 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 466 def auth_type @properties['auth_type'] end |
#auth_type_set ⇒ String
Returns The auth_type_set.
472 473 474 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 472 def auth_type_set @properties['auth_type_set'] end |
#cnam_lookup_enabled ⇒ Boolean
Returns The Caller ID Name (CNAM) lookup setting for this trunk.
460 461 462 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 460 def cnam_lookup_enabled @properties['cnam_lookup_enabled'] 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
409 410 411 412 413 414 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 409 def context unless @instance_context @instance_context = TrunkContext.new(@version, @params['sid'], ) end @instance_context end |
#credentials_lists ⇒ credentials_lists
Access the credentials_lists
574 575 576 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 574 def credentials_lists context.credentials_lists end |
#date_created ⇒ Time
Returns The date this Activity was created.
478 479 480 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 478 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date this Activity was updated.
484 485 486 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 484 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the TrunkInstance
516 517 518 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 516 def delete context.delete end |
#disaster_recovery_method ⇒ String
Returns The HTTP method Twilio will use when requesting the DisasterRecoveryUrl.
430 431 432 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 430 def disaster_recovery_method @properties['disaster_recovery_method'] end |
#disaster_recovery_url ⇒ String
Returns The HTTP URL that Twilio will request if an error occurs while sending SIP traffic towards your configured Origination URL.
436 437 438 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 436 def disaster_recovery_url @properties['disaster_recovery_url'] end |
#domain_name ⇒ String
Returns The unique address you reserve on Twilio to which you route your SIP traffic.
424 425 426 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 424 def domain_name @properties['domain_name'] end |
#fetch ⇒ TrunkInstance
Fetch a TrunkInstance
509 510 511 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 509 def fetch context.fetch end |
#friendly_name ⇒ String
Returns A human-readable name for the Trunk.
442 443 444 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 442 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
601 602 603 604 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 601 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
581 582 583 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 581 def ip_access_control_lists context.ip_access_control_lists end |
#links ⇒ String
Returns The links.
502 503 504 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 502 def links @properties['links'] end |
#origination_urls ⇒ origination_urls
Access the origination_urls
567 568 569 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 567 def origination_urls context.origination_urls end |
#phone_numbers ⇒ phone_numbers
Access the phone_numbers
588 589 590 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 588 def phone_numbers context.phone_numbers end |
#recording ⇒ Hash
Returns The recording settings for this trunk.
454 455 456 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 454 def recording @properties['recording'] end |
#secure ⇒ Boolean
Returns The Secure Trunking settings for this trunk.
448 449 450 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 448 def secure @properties['secure'] end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies the SIP Trunk in Twilio.
490 491 492 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 490 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
594 595 596 597 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 594 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, cnam_lookup_enabled: :unset) ⇒ TrunkInstance
Update the TrunkInstance
552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 552 def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, secure: :unset, cnam_lookup_enabled: :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, cnam_lookup_enabled: cnam_lookup_enabled, ) end |
#url ⇒ String
Returns The URL for this resource, relative to trunking.
496 497 498 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk.rb', line 496 def url @properties['url'] end |