From 21ea965b6ef1c35d3c6ce60689737a81c7915887 Mon Sep 17 00:00:00 2001 From: Jonathan Smith Date: Mon, 21 Oct 2024 16:38:57 -0400 Subject: [PATCH] Always return the result of .refresh in .retrieve With the refactor of v13, there are now cases where `self` is not mutated in the call to refresh and instead a new object is returned. This change ensures that the new object is always returned by returning the result of refresh instead. --- lib/stripe/api_resource.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/stripe/api_resource.rb b/lib/stripe/api_resource.rb index 7ac3f3cc..4a4c9ef9 100644 --- a/lib/stripe/api_resource.rb +++ b/lib/stripe/api_resource.rb @@ -110,7 +110,6 @@ def self.retrieve(id, opts = {}) opts = Util.normalize_opts(opts) instance = new(id, opts) instance.refresh - instance end def request_stripe_object(method:, path:, params:, base_address: :api, opts: {})