Class: Twilio::REST::Pricing::V1::PhoneNumberList::CountryContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Pricing::V1::PhoneNumberList::CountryContext
- Defined in:
- lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb
Instance Method Summary collapse
-
#fetch ⇒ CountryInstance
Fetch the CountryInstance.
-
#initialize(version, iso_country) ⇒ 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_country) ⇒ CountryContext
Initialize the CountryContext
151 152 153 154 155 156 157 |
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb', line 151 def initialize(version, iso_country) super(version) # Path Solution @solution = {iso_country: iso_country, } @uri = "/PhoneNumbers/Countries/#{@solution[:iso_country]}" end |
Instance Method Details
#fetch ⇒ CountryInstance
Fetch the CountryInstance
162 163 164 165 166 |
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb', line 162 def fetch payload = @version.fetch('GET', @uri) CountryInstance.new(@version, payload, iso_country: @solution[:iso_country], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
177 178 179 180 |
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb', line 177 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Pricing.V1.CountryContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
170 171 172 173 |
# File 'lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb', line 170 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Pricing.V1.CountryContext #{context}>" end |