lib/stripe/resources/account.rb in stripe-5.30.0 vs lib/stripe/resources/account.rb in stripe-5.31.0
- old
+ new
@@ -43,16 +43,12 @@
"/v1/account"
end
end
# @override To make id optional
- def self.retrieve(id = ARGUMENT_NOT_PROVIDED, opts = {})
- id = if id.equal?(ARGUMENT_NOT_PROVIDED)
- nil
- else
- Util.check_string_argument!(id)
- end
+ def self.retrieve(id = nil, opts = {})
+ Util.check_string_argument!(id) if id
# Account used to be a singleton, where this method's signature was
# `(opts={})`. For the sake of not breaking folks who pass in an OAuth
# key in opts, let's lurkily string match for it.
if opts == {} && id.is_a?(String) && id.start_with?("sk_")
@@ -134,13 +130,12 @@
def deauthorize(client_id = nil, opts = {})
params = {
client_id: client_id,
stripe_user_id: id,
}
+ opts = @opts.merge(Util.normalize_opts(opts))
OAuth.deauthorize(params, opts)
end
-
- ARGUMENT_NOT_PROVIDED = Object.new
private def serialize_additional_owners(legal_entity, additional_owners)
original_value =
legal_entity
.instance_variable_get(:@original_values)[:additional_owners]