Class: Twilio::REST::Voice::V1::DialingPermissionsList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb,
lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb,
lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb,
lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb,
lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb

Overview

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected]

Defined Under Namespace

Classes: BulkCountryUpdateInstance, BulkCountryUpdateList, BulkCountryUpdatePage, CountryContext, CountryInstance, CountryList, CountryPage, SettingsContext, SettingsInstance, SettingsList, SettingsPage

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ DialingPermissionsList

Initialize the DialingPermissionsList

Parameters:

  • version (Version)

    Version that contains the resource


20
21
22
23
24
25
26
27
28
29
30
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb', line 20

def initialize(version)
  super(version)

  # Path Solution
  @solution = {}

  # Components
  @countries = nil
  @settings = nil
  @bulk_country_updates = nil
end

Instance Method Details

#bulk_country_updatesBulkCountryUpdateList, BulkCountryUpdateContext

Access the bulk_country_updates

Returns:


60
61
62
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb', line 60

def bulk_country_updates
  @bulk_country_updates ||= BulkCountryUpdateList.new(@version, )
end

#countries(iso_code = :unset) ⇒ CountryList, CountryContext

Access the countries

Parameters:

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

    The ISO country code of the DialingPermissions Country resource to fetch

Returns:

Raises:

  • (ArgumentError)

39
40
41
42
43
44
45
46
47
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb', line 39

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

  if iso_code != :unset
    return CountryContext.new(@version, iso_code, )
  end

    @countries ||= CountryList.new(@version, )
end

#settingsSettingsContext

Access the settings

Returns:


52
53
54
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb', line 52

def settings
  return SettingsContext.new(@version, )
end

#to_sObject

Provide a user friendly representation


66
67
68
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb', line 66

def to_s
  '#<Twilio.Voice.V1.DialingPermissionsList>'
end