lib/stripe/util.rb in stripe-8.6.0.pre.beta.6 vs lib/stripe/util.rb in stripe-8.6.0
- old
+ new
@@ -5,11 +5,10 @@
module Stripe
module Util
# Options that a user is allowed to specify.
OPTS_USER_SPECIFIED = Set[
:api_key,
- :authenticator,
:idempotency_key,
:stripe_account,
:stripe_version
].freeze
@@ -280,16 +279,10 @@
def self.normalize_opts(opts)
case opts
when String
{ api_key: opts }
when Hash
- # If the user is using request signing for authentication,
- # no need to check the api_key per request.
- if !(opts.key?(:client) &&
- opts.fetch(:client).config.authenticator) &&
- opts.key?(:api_key)
- check_api_key!(opts.fetch(:api_key))
- end
+ check_api_key!(opts.fetch(:api_key)) if opts.key?(:api_key)
# Explicitly use dup here instead of clone to avoid preserving freeze
# state on input params.
opts.dup
else
raise TypeError, "normalize_opts expects a string or a hash"