From f300f357ee45b1690a5e6a4981864137f2b30c56 Mon Sep 17 00:00:00 2001 From: Annie Li Date: Tue, 18 Oct 2022 15:19:43 -0700 Subject: [PATCH] Deprecate save method --- lib/stripe/api_operations/save.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/stripe/api_operations/save.rb b/lib/stripe/api_operations/save.rb index 8b08c88b..93987f9f 100644 --- a/lib/stripe/api_operations/save.rb +++ b/lib/stripe/api_operations/save.rb @@ -50,6 +50,9 @@ module Stripe # idempotency_key to be passed in the request headers, or for the # api_key to be overwritten. See # {APIOperations::Request.execute_resource_request}. + # + # This method is DEPRECATED and for backwards compatibility only. + # Use the update method with the resource ID instead. def save(params = {}, opts = {}) # We started unintentionally (sort of) allowing attributes sent to # +save+ to override values used during the update. So as not to break @@ -68,6 +71,8 @@ module Stripe resp, opts = execute_resource_request(:post, save_url, values, opts) initialize_from(resp.data, opts) end + extend Gem::Deprecate + deprecate :save, :none, 2022, 11 def self.included(base) # Set `metadata` as additive so that when it's set directly we remember