mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-03 00:01:21 -04:00
Deprecate save method
This commit is contained in:
parent
bb48bff819
commit
f300f357ee
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user