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/ip_access_control_list/ip_address.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.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_registrations_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb,
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/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

  • account_sid (String) (defaults to: nil)

    A 34 character string that uniquely identifies this resource.


21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/twilio-ruby/rest/api/v2010/account/sip.rb', line 21

def initialize(version, account_sid: nil)
  super(version)

  # Path Solution
  @solution = {account_sid: }

  # Components
  @domains = nil
  @regions = nil
  @ip_access_control_lists = nil
  @credential_lists = nil
end

Instance Method Details

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

Access the credential_lists

Parameters:

  • sid (String) (defaults to: :unset)

    The credential list Sid that uniquely identifies this resource

Returns:

Raises:

  • (ArgumentError)

83
84
85
86
87
88
89
90
91
# File 'lib/twilio-ruby/rest/api/v2010/account/sip.rb', line 83

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

Parameters:

  • sid (String) (defaults to: :unset)

    The Twilio-provided string that uniquely identifies the SipDomain resource to fetch.

Returns:

Raises:

  • (ArgumentError)

40
41
42
43
44
45
46
47
48
# File 'lib/twilio-ruby/rest/api/v2010/account/sip.rb', line 40

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

Parameters:

  • sid (String) (defaults to: :unset)

    A 34 character string that uniquely identifies the resource to fetch.

Returns:

Raises:

  • (ArgumentError)

64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/twilio-ruby/rest/api/v2010/account/sip.rb', line 64

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

#regionsRegionList, RegionContext

Access the regions

Returns:

  • (RegionList)
  • (RegionContext)

54
55
56
# File 'lib/twilio-ruby/rest/api/v2010/account/sip.rb', line 54

def regions
  @regions ||= RegionList.new(@version, account_sid: @solution[:account_sid], )
end

#to_sObject

Provide a user friendly representation


95
96
97
# File 'lib/twilio-ruby/rest/api/v2010/account/sip.rb', line 95

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