class Twilio::REST::Voice::V1::DialingPermissionsList::CountryContext
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 help@twilio.com.
Public Class Methods
new(version, iso_code)
click to toggle source
Initialize the CountryContext
@param [Version] version Version
that contains the resource @param [String] iso_code The {ISO country
code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] of the DialingPermissions Country resource to fetch
@return [CountryContext] CountryContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb 228 def initialize(version, iso_code) 229 super(version) 230 231 # Path Solution 232 @solution = {iso_code: iso_code, } 233 @uri = "/DialingPermissions/Countries/#{@solution[:iso_code]}" 234 235 # Dependents 236 @highrisk_special_prefixes = nil 237 end
Public Instance Methods
fetch()
click to toggle source
Fetch the CountryInstance
@return [CountryInstance] Fetched CountryInstance
# File lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb 242 def fetch 243 payload = @version.fetch('GET', @uri) 244 245 CountryInstance.new(@version, payload, iso_code: @solution[:iso_code], ) 246 end
highrisk_special_prefixes()
click to toggle source
Access the highrisk_special_prefixes
@return [HighriskSpecialPrefixList] @return [HighriskSpecialPrefixContext]
# File lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb 252 def highrisk_special_prefixes 253 unless @highrisk_special_prefixes 254 @highrisk_special_prefixes = HighriskSpecialPrefixList.new(@version, iso_code: @solution[:iso_code], ) 255 end 256 257 @highrisk_special_prefixes 258 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb 269 def inspect 270 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 271 "#<Twilio.Voice.V1.CountryContext #{context}>" 272 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb 262 def to_s 263 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 264 "#<Twilio.Voice.V1.CountryContext #{context}>" 265 end