Class: Twilio::REST::Voice::V1::VoicePermissionList::CountryInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Voice::V1::VoicePermissionList::CountryInstance
- Defined in:
- lib/twilio-ruby/rest/voice/v1/voice_permission/country.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].
Instance Method Summary collapse
-
#context ⇒ CountryContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#continent ⇒ String
Name of the continent.
-
#country_codes ⇒ String
The E.164 assigned country codes(s).
-
#fetch ⇒ CountryInstance
Fetch a CountryInstance.
-
#high_risk_special_numbers_enabled ⇒ Boolean
True, if dialing to high-risk special services numbers is enabled, else false.
-
#high_risk_tollfraud_numbers_enabled ⇒ Boolean
True, if dialing to high-risk toll fraud numbers is enabled, else false.
-
#highrisk_special_prefixes ⇒ highrisk_special_prefixes
Access the highrisk_special_prefixes.
-
#initialize(version, payload, iso_code: nil) ⇒ CountryInstance
constructor
Initialize the CountryInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#iso_code ⇒ String
The ISO country code.
-
#links ⇒ String
The links.
-
#low_risk_numbers_enabled ⇒ Boolean
True, if dialing to low-risk numbers is enabled, else false.
-
#name ⇒ String
Name of the country.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL for this resource.
Constructor Details
#initialize(version, payload, iso_code: nil) ⇒ CountryInstance
Initialize the CountryInstance
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 285 def initialize(version, payload, iso_code: nil) super(version) # Marshaled Properties @properties = { 'iso_code' => payload['iso_code'], 'name' => payload['name'], 'continent' => payload['continent'], 'country_codes' => payload['country_codes'], 'low_risk_numbers_enabled' => payload['low_risk_numbers_enabled'], 'high_risk_special_numbers_enabled' => payload['high_risk_special_numbers_enabled'], 'high_risk_tollfraud_numbers_enabled' => payload['high_risk_tollfraud_numbers_enabled'], 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = {'iso_code' => iso_code || @properties['iso_code'], } end |
Instance Method Details
#context ⇒ CountryContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
310 311 312 313 314 315 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 310 def context unless @instance_context @instance_context = CountryContext.new(@version, @params['iso_code'], ) end @instance_context end |
#continent ⇒ String
Returns Name of the continent.
331 332 333 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 331 def continent @properties['continent'] end |
#country_codes ⇒ String
Returns The E.164 assigned country codes(s).
337 338 339 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 337 def country_codes @properties['country_codes'] end |
#fetch ⇒ CountryInstance
Fetch a CountryInstance
374 375 376 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 374 def fetch context.fetch end |
#high_risk_special_numbers_enabled ⇒ Boolean
Returns true, if dialing to high-risk special services numbers is enabled, else false. This group of prefixes, are number ranges allocated by the corresponding country. They consist of number types such as premium numbers, special services, shared cost and others.
349 350 351 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 349 def high_risk_special_numbers_enabled @properties['high_risk_special_numbers_enabled'] end |
#high_risk_tollfraud_numbers_enabled ⇒ Boolean
Returns true, if dialing to high-risk toll fraud numbers is enabled, else false. This group of prefixes are narrow number ranges that have a high-risk of international revenue sharing fraud (IRSF) attacks also called toll fraud. The group of prefixes is formed through integration with anti-fraud databases and verified by analyzing calls on the Twilio Super Network. This group of prefixes are not available for download and are updated frequently.
355 356 357 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 355 def high_risk_tollfraud_numbers_enabled @properties['high_risk_tollfraud_numbers_enabled'] end |
#highrisk_special_prefixes ⇒ highrisk_special_prefixes
Access the highrisk_special_prefixes
381 382 383 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 381 def highrisk_special_prefixes context.highrisk_special_prefixes end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
394 395 396 397 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 394 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V1.CountryInstance #{values}>" end |
#iso_code ⇒ String
Returns The ISO country code.
319 320 321 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 319 def iso_code @properties['iso_code'] end |
#links ⇒ String
Returns The links.
367 368 369 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 367 def links @properties['links'] end |
#low_risk_numbers_enabled ⇒ Boolean
Returns true, if dialing to low-risk numbers is enabled, else false.
343 344 345 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 343 def low_risk_numbers_enabled @properties['low_risk_numbers_enabled'] end |
#name ⇒ String
Returns Name of the country.
325 326 327 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 325 def name @properties['name'] end |
#to_s ⇒ Object
Provide a user friendly representation
387 388 389 390 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 387 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V1.CountryInstance #{values}>" end |
#url ⇒ String
Returns The URL for this resource.
361 362 363 |
# File 'lib/twilio-ruby/rest/voice/v1/voice_permission/country.rb', line 361 def url @properties['url'] end |