lib/recurly/resource.rb in recurly-2.4.10 vs lib/recurly/resource.rb in recurly-2.4.11

- old
+ new

@@ -594,12 +594,15 @@ def reload response = nil if response return if response.body.to_s.length.zero? fresh = self.class.from_response response else - fresh = self.class.find( - @href || to_param, :etag => (etag unless changed?) - ) + options = {:etag => (etag unless changed?)} + fresh = if @href + self.class.from_response API.get(@href, {}, options) + else + self.class.find(to_param, options) + end end fresh and copy_from fresh persist! true self rescue API::NotModified