Skip to content

Commit

Permalink
Always return the result of .refresh in .retrieve
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AnotherJoSmith committed Oct 21, 2024
1 parent a2e2881 commit 21ea965
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/stripe/api_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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: {})
Expand Down

0 comments on commit 21ea965

Please sign in to comment.