lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb in twilio-ruby-5.4.2 vs lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb in twilio-ruby-5.4.3

- old
+ new

@@ -32,14 +32,11 @@ # not set will use the default value of 50 records. If no page_size is defined # but a limit is defined, stream() will attempt to read the limit with the most # efficient page size, i.e. min(limit, 1000) # @return [Array] Array of up to limit results def list(limit: nil, page_size: nil) - self.stream( - limit: limit, - page_size: page_size - ).entries + self.stream(limit: limit, page_size: page_size).entries end ## # Streams CountryInstance records from the API as an Enumerable. # This operation lazily loads records as efficiently as possible until the limit @@ -52,13 +49,11 @@ # efficient page size, i.e. min(limit, 1000) # @return [Enumerable] Enumerable that will yield up to limit results def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page( - page_size: limits[:page_size], - ) + page = self.page(page_size: limits[:page_size],) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end ## @@ -66,13 +61,11 @@ # This operation lazily loads records as efficiently as possible until the limit # is reached. def each limits = @version.read_limits - page = self.page( - page_size: limits[:page_size], - ) + page = self.page(page_size: limits[:page_size],) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]).each {|x| yield x} end @@ -135,14 +128,11 @@ ## # Build an instance of CountryInstance # @param [Hash] payload Payload response from the API # @return [CountryInstance] CountryInstance def get_instance(payload) - CountryInstance.new( - @version, - payload, - ) + CountryInstance.new(@version, payload,) end ## # Provide a user friendly representation def to_s @@ -158,13 +148,11 @@ # @return [CountryContext] CountryContext def initialize(version, iso_country) super(version) # Path Solution - @solution = { - iso_country: iso_country, - } + @solution = {iso_country: iso_country,} @uri = "/PhoneNumbers/Countries/#{@solution[:iso_country]}" end ## # Fetch a CountryInstance @@ -176,15 +164,11 @@ 'GET', @uri, params, ) - CountryInstance.new( - @version, - payload, - iso_country: @solution[:iso_country], - ) + CountryInstance.new(@version, payload, iso_country: @solution[:iso_country],) end ## # Provide a user friendly representation def to_s @@ -212,24 +196,19 @@ 'price_unit' => payload['price_unit'], } # Context @instance_context = nil - @params = { - 'iso_country' => iso_country || @properties['iso_country'], - } + @params = {'iso_country' => iso_country || @properties['iso_country'],} end ## # Generate an instance context for the instance, the context is capable of # performing various actions. All instance actions are proxied to the context # @return [CountryContext] CountryContext for this CountryInstance def context unless @instance_context - @instance_context = CountryContext.new( - @version, - @params['iso_country'], - ) + @instance_context = CountryContext.new(@version, @params['iso_country'],) end @instance_context end ## \ No newline at end of file