lib/helio/api_resource.rb in helio-ruby-0.1.0 vs lib/helio/api_resource.rb in helio-ruby-0.2.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Helio class APIResource < HelioObject include Helio::APIOperations::Request # A flag that can be set a behavior that will cause this resource to be @@ -47,10 +49,10 @@ def resource_url unless (id = self["id"]) raise InvalidRequestError.new("Could not determine which URL to request: #{self.class} instance has invalid ID: #{id.inspect}", "id") end - "#{self.class.resource_url}/#{CGI.escape(id)}" + "#{self.class.resource_url}/#{CGI.escape(id.to_s)}" end def refresh resp, opts = request(:get, resource_url, @retrieve_params) initialize_from(resp.data, opts)