Class: Twilio::REST::Api::V2010::AccountContext::SipList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/sip.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_credential_list_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations/auth_registrations_credential_list_mapping.rb

Defined Under Namespace

Classes: CredentialListContext, CredentialListInstance, CredentialListList, CredentialListPage, DomainContext, DomainInstance, DomainList, DomainPage, IpAccessControlListContext, IpAccessControlListInstance, IpAccessControlListList, IpAccessControlListPage

Instance Method Summary collapse

Constructor Details

#initialize(version, account_sid: nil) ⇒ SipList

Initialize the SipList

Parameters:

  • version (Version)

    Version that contains the resource



27
28
29
30
31
32
33
34
35
36
# File 'lib/twilio-ruby/rest/api/v2010/account/sip.rb', line 27

def initialize(version, account_sid: nil)
    super(version)
    # Path Solution
    @solution = { account_sid:  }
    @uri = "/Accounts/#{@solution[:account_sid]}/SIP.json"
    # Components
    @domains = nil
    @credential_lists = nil
    @ip_access_control_lists = nil
end

Instance Method Details

#credential_lists(sid = :unset) ⇒ CredentialListList, CredentialListContext

Access the credential_lists

Returns:

Raises:

  • (ArgumentError)


56
57
58
59
60
61
62
63
64
# File 'lib/twilio-ruby/rest/api/v2010/account/sip.rb', line 56

def credential_lists(sid=:unset)
    raise ArgumentError, 'sid cannot be nil' if sid.nil?

    if sid != :unset
        return CredentialListContext.new(@version, @solution[:account_sid],sid )
    end

    @credential_lists ||= CredentialListList.new(@version, account_sid: @solution[:account_sid] )
end

#domains(sid = :unset) ⇒ DomainList, DomainContext

Access the domains

Returns:

Raises:

  • (ArgumentError)


43
44
45
46
47
48
49
50
51
# File 'lib/twilio-ruby/rest/api/v2010/account/sip.rb', line 43

def domains(sid=:unset)
    raise ArgumentError, 'sid cannot be nil' if sid.nil?

    if sid != :unset
        return DomainContext.new(@version, @solution[:account_sid],sid )
    end

    @domains ||= DomainList.new(@version, account_sid: @solution[:account_sid] )
end

#ip_access_control_lists(sid = :unset) ⇒ IpAccessControlListList, IpAccessControlListContext

Access the ip_access_control_lists

Returns:

Raises:

  • (ArgumentError)


69
70
71
72
73
74
75
76
77
# File 'lib/twilio-ruby/rest/api/v2010/account/sip.rb', line 69

def ip_access_control_lists(sid=:unset)
    raise ArgumentError, 'sid cannot be nil' if sid.nil?

    if sid != :unset
        return IpAccessControlListContext.new(@version, @solution[:account_sid],sid )
    end

    @ip_access_control_lists ||= IpAccessControlListList.new(@version, account_sid: @solution[:account_sid] )
end

#to_sObject

Provide a user friendly representation



80
81
82
# File 'lib/twilio-ruby/rest/api/v2010/account/sip.rb', line 80

def to_s
    '#<Twilio.Api.V2010.SipList>'
end