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.
-
#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
Deletes the DomainInstance.
-
#domain_name ⇒ String
The unique address on Twilio to route SIP traffic.
-
#fetch ⇒ DomainInstance
Fetch a 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.
-
#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) ⇒ 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
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 370 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'], } # 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.
412 413 414 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 412 def account_sid @properties['account_sid'] end |
#api_version ⇒ String
Returns The API version used to process the call.
418 419 420 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 418 def api_version @properties['api_version'] end |
#auth ⇒ auth
Access the auth
578 579 580 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 578 def auth context.auth end |
#auth_type ⇒ String
Returns The types of authentication mapped to the domain.
424 425 426 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 424 def auth_type @properties['auth_type'] 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
403 404 405 406 407 408 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 403 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
571 572 573 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 571 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.
430 431 432 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 430 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.
436 437 438 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 436 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the DomainInstance
557 558 559 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 557 def delete context.delete end |
#domain_name ⇒ String
Returns The unique address on Twilio to route SIP traffic.
442 443 444 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 442 def domain_name @properties['domain_name'] end |
#fetch ⇒ DomainInstance
Fetch a DomainInstance
515 516 517 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 515 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
448 449 450 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 448 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
591 592 593 594 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 591 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
564 565 566 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 564 def ip_access_control_list_mappings context.ip_access_control_list_mappings end |
#sid ⇒ String
Returns The unique string that identifies the resource.
454 455 456 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 454 def sid @properties['sid'] end |
#sip_registration ⇒ Boolean
Returns Whether SIP registration is allowed.
508 509 510 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 508 def sip_registration @properties['sip_registration'] end |
#subresource_uris ⇒ String
Returns A list mapping resources associated with the SIP Domain resource.
502 503 504 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 502 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
584 585 586 587 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 584 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) ⇒ DomainInstance
Update the DomainInstance
540 541 542 543 544 545 546 547 548 549 550 551 552 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 540 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) 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, ) end |
#uri ⇒ String
Returns The URI of the resource, relative to ‘api.twilio.com`.
460 461 462 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 460 def uri @properties['uri'] end |
#voice_fallback_method ⇒ String
Returns The HTTP method used with voice_fallback_url.
466 467 468 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 466 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.
472 473 474 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 472 def voice_fallback_url @properties['voice_fallback_url'] end |
#voice_method ⇒ String
Returns The HTTP method to use with voice_url.
478 479 480 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 478 def voice_method @properties['voice_method'] end |
#voice_status_callback_method ⇒ String
Returns The HTTP method we use to call voice_status_callback_url.
484 485 486 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 484 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.
490 491 492 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 490 def voice_status_callback_url @properties['voice_status_callback_url'] end |
#voice_url ⇒ String
Returns The URL we call when receiving a call.
496 497 498 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 496 def voice_url @properties['voice_url'] end |