Class: Twilio::REST::Voice::V1::DialingPermissionsList::CountryContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Voice::V1::DialingPermissionsList::CountryContext
- Defined in:
- lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.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: HighriskSpecialPrefixInstance, HighriskSpecialPrefixList, HighriskSpecialPrefixPage
Instance Method Summary collapse
-
#fetch ⇒ CountryInstance
Fetch the CountryInstance.
-
#highrisk_special_prefixes ⇒ HighriskSpecialPrefixList, HighriskSpecialPrefixContext
Access the highrisk_special_prefixes.
-
#initialize(version, iso_code) ⇒ CountryContext
constructor
Initialize the CountryContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, iso_code) ⇒ CountryContext
Initialize the CountryContext
173 174 175 176 177 178 179 180 181 182 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb', line 173 def initialize(version, iso_code) super(version) # Path Solution @solution = { iso_code: iso_code, } @uri = "/DialingPermissions/Countries/#{@solution[:iso_code]}" # Dependents @highrisk_special_prefixes = nil end |
Instance Method Details
#fetch ⇒ CountryInstance
Fetch the CountryInstance
186 187 188 189 190 191 192 193 194 195 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb', line 186 def fetch payload = @version.fetch('GET', @uri) CountryInstance.new( @version, payload, iso_code: @solution[:iso_code], ) end |
#highrisk_special_prefixes ⇒ HighriskSpecialPrefixList, HighriskSpecialPrefixContext
Access the highrisk_special_prefixes
201 202 203 204 205 206 207 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb', line 201 def highrisk_special_prefixes unless @highrisk_special_prefixes @highrisk_special_prefixes = HighriskSpecialPrefixList.new( @version, iso_code: @solution[:iso_code], ) end @highrisk_special_prefixes end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
218 219 220 221 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb', line 218 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Voice.V1.CountryContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
211 212 213 214 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb', line 211 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Voice.V1.CountryContext #{context}>" end |