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](www.twilio.com/docs/iam/api/account) that created the SipDomain resource.
-
#api_version ⇒ String
The API version used to process the call.
-
#auth ⇒ auth
Access the auth.
-
#auth_type ⇒ String
The types of authentication you have mapped to your domain.
-
#byoc_trunk_sid ⇒ String
The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with.
-
#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 date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_updated ⇒ Time
The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#delete ⇒ Boolean
Delete the DomainInstance.
-
#domain_name ⇒ String
The unique address you reserve on Twilio to which you route your 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 that we created to identify the SipDomain resource.
-
#sip_registration ⇒ Boolean
Whether to allow SIP Endpoints to register with the domain to receive calls.
-
#subresource_uris ⇒ Hash
A list of mapping resources associated with the SIP Domain resource identified by their relative URIs.
-
#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 we use to call ‘voice_fallback_url`.
-
#voice_fallback_url ⇒ String
The URL that we call when an error occurs while retrieving or executing the TwiML requested from ‘voice_url`.
-
#voice_method ⇒ String
The HTTP method we use to call ‘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 to pass status parameters (such as call ended) to your application.
-
#voice_url ⇒ String
The URL we call using the ‘voice_method` when the domain receives a call.
Constructor Details
#initialize(version, payload, account_sid: nil, sid: nil) ⇒ DomainInstance
Initialize the DomainInstance
735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 735 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](www.twilio.com/docs/iam/api/account) that created the SipDomain resource.
782 783 784 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 782 def account_sid @properties['account_sid'] end |
#api_version ⇒ String
Returns The API version used to process the call.
788 789 790 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 788 def api_version @properties['api_version'] end |
#auth ⇒ auth
Access the auth
974 975 976 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 974 def auth context.auth end |
#auth_type ⇒ String
Returns The types of authentication you have mapped to your domain. Can be: ‘IP_ACL` and `CREDENTIAL_LIST`. If you have both defined for your domain, both will be returned in a comma delimited string. If `auth_type` is not defined, the domain will not be able to receive any traffic.
794 795 796 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 794 def auth_type @properties['auth_type'] end |
#byoc_trunk_sid ⇒ String
Returns The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with.
896 897 898 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 896 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
773 774 775 776 777 778 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 773 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
988 989 990 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 988 def credential_list_mappings context.credential_list_mappings end |
#date_created ⇒ Time
Returns The date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
800 801 802 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 800 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
806 807 808 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 806 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the DomainInstance
909 910 911 912 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 909 def delete context.delete end |
#domain_name ⇒ String
Returns The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-" and must end with ‘sip.twilio.com`.
812 813 814 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 812 def domain_name @properties['domain_name'] end |
#emergency_caller_sid ⇒ String
Returns Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call.
902 903 904 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 902 def emergency_caller_sid @properties['emergency_caller_sid'] end |
#emergency_calling_enabled ⇒ Boolean
Returns Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses.
884 885 886 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 884 def emergency_calling_enabled @properties['emergency_calling_enabled'] end |
#fetch ⇒ DomainInstance
Fetch the DomainInstance
917 918 919 920 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 917 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
818 819 820 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 818 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
1001 1002 1003 1004 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 1001 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
981 982 983 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 981 def ip_access_control_list_mappings context.ip_access_control_list_mappings end |
#secure ⇒ Boolean
Returns Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain.
890 891 892 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 890 def secure @properties['secure'] end |
#sid ⇒ String
Returns The unique string that that we created to identify the SipDomain resource.
824 825 826 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 824 def sid @properties['sid'] end |
#sip_registration ⇒ Boolean
Returns Whether to allow SIP Endpoints to register with the domain to receive calls.
878 879 880 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 878 def sip_registration @properties['sip_registration'] end |
#subresource_uris ⇒ Hash
Returns A list of mapping resources associated with the SIP Domain resource identified by their relative URIs.
872 873 874 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 872 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
994 995 996 997 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 994 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
938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 938 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`.
830 831 832 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 830 def uri @properties['uri'] end |
#voice_fallback_method ⇒ String
Returns The HTTP method we use to call ‘voice_fallback_url`. Can be: `GET` or `POST`.
836 837 838 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 836 def voice_fallback_method @properties['voice_fallback_method'] end |
#voice_fallback_url ⇒ String
Returns The URL that we call when an error occurs while retrieving or executing the TwiML requested from ‘voice_url`.
842 843 844 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 842 def voice_fallback_url @properties['voice_fallback_url'] end |
#voice_method ⇒ String
Returns The HTTP method we use to call ‘voice_url`. Can be: `GET` or `POST`.
848 849 850 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 848 def voice_method @properties['voice_method'] end |
#voice_status_callback_method ⇒ String
Returns The HTTP method we use to call ‘voice_status_callback_url`. Either `GET` or `POST`.
854 855 856 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 854 def voice_status_callback_method @properties['voice_status_callback_method'] end |
#voice_status_callback_url ⇒ String
Returns The URL that we call to pass status parameters (such as call ended) to your application.
860 861 862 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 860 def voice_status_callback_url @properties['voice_status_callback_url'] end |
#voice_url ⇒ String
Returns The URL we call using the ‘voice_method` when the domain receives a call.
866 867 868 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb', line 866 def voice_url @properties['voice_url'] end |