lib/twilio-ruby/rest/pricing/v2/voice/country.rb in twilio-ruby-5.38.0 vs lib/twilio-ruby/rest/pricing/v2/voice/country.rb in twilio-ruby-5.39.0
- old
+ new
@@ -83,15 +83,13 @@
params = Twilio::Values.of({
'PageToken' => page_token,
'Page' => page_number,
'PageSize' => page_size,
})
- response = @version.page(
- 'GET',
- @uri,
- params
- )
+
+ response = @version.page('GET', @uri, params)
+
CountryPage.new(@version, response, @solution)
end
##
# Retrieve a single page of CountryInstance records from the API.
@@ -157,21 +155,15 @@
@solution = {iso_country: iso_country, }
@uri = "/Voice/Countries/#{@solution[:iso_country]}"
end
##
- # Fetch a CountryInstance
+ # Fetch the CountryInstance
# @return [CountryInstance] Fetched CountryInstance
def fetch
- params = Twilio::Values.of({})
+ payload = @version.fetch('GET', @uri)
- payload = @version.fetch(
- 'GET',
- @uri,
- params,
- )
-
CountryInstance.new(@version, payload, iso_country: @solution[:iso_country], )
end
##
# Provide a user friendly representation
@@ -261,10 +253,10 @@
def url
@properties['url']
end
##
- # Fetch a CountryInstance
+ # Fetch the CountryInstance
# @return [CountryInstance] Fetched CountryInstance
def fetch
context.fetch
end
\ No newline at end of file