mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-16 00:02:00 -04:00
Change to hash parameter for now for 1.9 support
This commit is contained in:
parent
1412479bf6
commit
b5ad0e30d7
@ -73,7 +73,7 @@ module Stripe
|
|||||||
# on subsequent API calls.
|
# on subsequent API calls.
|
||||||
# * +response+ - An object containing information about the API response
|
# * +response+ - An object containing information about the API response
|
||||||
# that produced the data which is hydrating the StripeObject.
|
# that produced the data which is hydrating the StripeObject.
|
||||||
def self.convert_to_stripe_object(data, opts, response: nil)
|
def self.convert_to_stripe_object(data, opts, other_opts = {})
|
||||||
obj = case data
|
obj = case data
|
||||||
when Array
|
when Array
|
||||||
data.map { |i| convert_to_stripe_object(i, opts) }
|
data.map { |i| convert_to_stripe_object(i, opts) }
|
||||||
@ -86,7 +86,8 @@ module Stripe
|
|||||||
|
|
||||||
case obj
|
case obj
|
||||||
when APIResource, ListObject
|
when APIResource, ListObject
|
||||||
obj.response = response
|
# Change this to an optional parameter when we drop 1.9 support.
|
||||||
|
obj.response = other_opts[:response]
|
||||||
end
|
end
|
||||||
|
|
||||||
obj
|
obj
|
||||||
|
Loading…
x
Reference in New Issue
Block a user