Class: Twilio::REST::Api::V2010::AccountContext::SipList::DomainInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::SipList::DomainInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#api_version ⇒ String
The API version used to process the call.
-
#auth ⇒ auth
Access the auth.
-
#auth_type ⇒ String
The types of authentication mapped to the domain.
-
#byoc_trunk_sid ⇒ String
The SID of the BYOC Trunk resource.
-
#context ⇒ DomainContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#credential_list_mappings ⇒ credential_list_mappings
Access the credential_list_mappings.
-
#date_created ⇒ Time
The RFC 2822 date and time in GMT that the resource was created.
-
#date_updated ⇒ Time
The RFC 2822 date and time in GMT that the resource was last updated.
-
#delete ⇒ Boolean
Delete the DomainInstance.
-
#domain_name ⇒ String
The unique address on Twilio to route SIP traffic.
-
#emergency_caller_sid ⇒ String
Whether an emergency caller sid is configured for the domain.
-
#emergency_calling_enabled ⇒ Boolean
Whether emergency calling is enabled for the domain.
-
#fetch ⇒ DomainInstance
Fetch the DomainInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, account_sid: nil, sid: nil) ⇒ DomainInstance
constructor
Initialize the DomainInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#ip_access_control_list_mappings ⇒ ip_access_control_list_mappings
Access the ip_access_control_list_mappings.
-
#secure ⇒ Boolean
Whether secure SIP is enabled for the domain.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#sip_registration ⇒ Boolean
Whether SIP registration is allowed.
-
#subresource_uris ⇒ String
A list mapping resources associated with the SIP Domain resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset, byoc_trunk_sid: :unset, emergency_caller_sid: :unset) ⇒ DomainInstance
Update the DomainInstance.
-
#uri ⇒ String
The URI of the resource, relative to `api.twilio.com`.
-
#voice_fallback_method ⇒ String
The HTTP method used with voice_fallback_url.
-
#voice_fallback_url ⇒ String
The URL we call when an error occurs while executing TwiML.
-
#voice_method ⇒ String
The HTTP method to use with voice_url.
-
#voice_status_callback_method ⇒ String
The HTTP method we use to call voice_status_callback_url.
-
#voice_status_callback_url ⇒ String
The URL that we call with status updates.
-
#voice_url ⇒ String
The URL we call when receiving a call.
Constructor Details
#initialize(version, payload, account_sid: nil, sid: nil) ⇒ DomainInstance
Initialize the DomainInstance
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 385 def initialize(version, payload, account_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'api_version' => payload['api_version'], 'auth_type' => payload['auth_type'], 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'domain_name' => payload['domain_name'], 'friendly_name' => payload['friendly_name'], 'sid' => payload['sid'], 'uri' => payload['uri'], 'voice_fallback_method' => payload['voice_fallback_method'], 'voice_fallback_url' => payload['voice_fallback_url'], 'voice_method' => payload['voice_method'], 'voice_status_callback_method' => payload['voice_status_callback_method'], 'voice_status_callback_url' => payload['voice_status_callback_url'], 'voice_url' => payload['voice_url'], 'subresource_uris' => payload['subresource_uris'], 'sip_registration' => payload['sip_registration'], 'emergency_calling_enabled' => payload['emergency_calling_enabled'], 'secure' => payload['secure'], 'byoc_trunk_sid' => payload['byoc_trunk_sid'], 'emergency_caller_sid' => payload['emergency_caller_sid'], } # Context @instance_context = nil @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
431 432 433 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 431 def account_sid @properties['account_sid'] end |
#api_version ⇒ String
Returns The API version used to process the call.
437 438 439 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 437 def api_version @properties['api_version'] end |
#auth ⇒ auth
Access the auth
637 638 639 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 637 def auth context.auth end |
#auth_type ⇒ String
Returns The types of authentication mapped to the domain.
443 444 445 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 443 def auth_type @properties['auth_type'] end |
#byoc_trunk_sid ⇒ String
Returns The SID of the BYOC Trunk resource.
545 546 547 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 545 def byoc_trunk_sid @properties['byoc_trunk_sid'] end |
#context ⇒ DomainContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
422 423 424 425 426 427 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 422 def context unless @instance_context @instance_context = DomainContext.new(@version, @params['account_sid'], @params['sid'], ) end @instance_context end |
#credential_list_mappings ⇒ credential_list_mappings
Access the credential_list_mappings
630 631 632 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 630 def credential_list_mappings context.credential_list_mappings end |
#date_created ⇒ Time
Returns The RFC 2822 date and time in GMT that the resource was created.
449 450 451 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 449 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The RFC 2822 date and time in GMT that the resource was last updated.
455 456 457 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 455 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the DomainInstance
616 617 618 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 616 def delete context.delete end |
#domain_name ⇒ String
Returns The unique address on Twilio to route SIP traffic.
461 462 463 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 461 def domain_name @properties['domain_name'] end |
#emergency_caller_sid ⇒ String
Returns Whether an emergency caller sid is configured for the domain.
551 552 553 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 551 def emergency_caller_sid @properties['emergency_caller_sid'] end |
#emergency_calling_enabled ⇒ Boolean
Returns Whether emergency calling is enabled for the domain.
533 534 535 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 533 def emergency_calling_enabled @properties['emergency_calling_enabled'] end |
#fetch ⇒ DomainInstance
Fetch the DomainInstance
558 559 560 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 558 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
467 468 469 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 467 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
650 651 652 653 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 650 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.DomainInstance #{values}>" end |
#ip_access_control_list_mappings ⇒ ip_access_control_list_mappings
Access the ip_access_control_list_mappings
623 624 625 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 623 def ip_access_control_list_mappings context.ip_access_control_list_mappings end |
#secure ⇒ Boolean
Returns Whether secure SIP is enabled for the domain.
539 540 541 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 539 def secure @properties['secure'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
473 474 475 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 473 def sid @properties['sid'] end |
#sip_registration ⇒ Boolean
Returns Whether SIP registration is allowed.
527 528 529 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 527 def sip_registration @properties['sip_registration'] end |
#subresource_uris ⇒ String
Returns A list mapping resources associated with the SIP Domain resource.
521 522 523 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 521 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
643 644 645 646 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 643 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.DomainInstance #{values}>" end |
#update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset, byoc_trunk_sid: :unset, emergency_caller_sid: :unset) ⇒ DomainInstance
Update the DomainInstance
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 595 def update(friendly_name: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_status_callback_method: :unset, voice_status_callback_url: :unset, voice_url: :unset, sip_registration: :unset, domain_name: :unset, emergency_calling_enabled: :unset, secure: :unset, byoc_trunk_sid: :unset, emergency_caller_sid: :unset) context.update( friendly_name: friendly_name, voice_fallback_method: voice_fallback_method, voice_fallback_url: voice_fallback_url, voice_method: voice_method, voice_status_callback_method: voice_status_callback_method, voice_status_callback_url: voice_status_callback_url, voice_url: voice_url, sip_registration: sip_registration, domain_name: domain_name, emergency_calling_enabled: emergency_calling_enabled, secure: secure, byoc_trunk_sid: byoc_trunk_sid, emergency_caller_sid: emergency_caller_sid, ) end |
#uri ⇒ String
Returns The URI of the resource, relative to `api.twilio.com`.
479 480 481 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 479 def uri @properties['uri'] end |
#voice_fallback_method ⇒ String
Returns The HTTP method used with voice_fallback_url.
485 486 487 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 485 def voice_fallback_method @properties['voice_fallback_method'] end |
#voice_fallback_url ⇒ String
Returns The URL we call when an error occurs while executing TwiML.
491 492 493 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 491 def voice_fallback_url @properties['voice_fallback_url'] end |
#voice_method ⇒ String
Returns The HTTP method to use with voice_url.
497 498 499 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 497 def voice_method @properties['voice_method'] end |
#voice_status_callback_method ⇒ String
Returns The HTTP method we use to call voice_status_callback_url.
503 504 505 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 503 def voice_status_callback_method @properties['voice_status_callback_method'] end |
#voice_status_callback_url ⇒ String
Returns The URL that we call with status updates.
509 510 511 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 509 def voice_status_callback_url @properties['voice_status_callback_url'] end |
#voice_url ⇒ String
Returns The URL we call when receiving a call.
515 516 517 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 515 def voice_url @properties['voice_url'] end |