mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-09-22 00:00:31 -04:00
#save doesn't need an api_key, it's on the object already
This commit is contained in:
parent
88b4afbac0
commit
5331e81f54
@ -1,8 +1,7 @@
|
||||
module Stripe
|
||||
module APIOperations
|
||||
module Update
|
||||
def save(opts={}, api_key=nil)
|
||||
api_key ||= @api_key
|
||||
def save(opts={})
|
||||
values = serialize_params(self).merge(opts)
|
||||
|
||||
if @values[:metadata]
|
||||
@ -12,8 +11,8 @@ module Stripe
|
||||
if values.length > 0
|
||||
values.delete(:id)
|
||||
|
||||
response, key = Stripe.request(:post, url, api_key, values)
|
||||
refresh_from(response, key)
|
||||
response, api_key = Stripe.request(:post, url, @api_key, values)
|
||||
refresh_from(response, api_key)
|
||||
end
|
||||
self
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user