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

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



26
27
28
29
30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb', line 26

def initialize(version)
    super(version)
    # Path Solution
    @solution = {  }
    @uri = "/DialingPermissions"
    # Components
    @bulk_country_updates = nil
    @countries = nil
    @settings = nil
end

Instance Method Details

#bulk_country_updatesBulkCountryUpdateList, BulkCountryUpdateContext

Access the bulk_country_updates

Returns:



42
43
44
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb', line 42

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

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

Access the countries

Returns:

Raises:

  • (ArgumentError)


49
50
51
52
53
54
55
56
57
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb', line 49

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:



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

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