Change to hash parameter for now for 1.9 support

This commit is contained in:
Brandur 2017-01-13 14:46:46 -08:00
parent 1412479bf6
commit b5ad0e30d7

View File

@ -73,7 +73,7 @@ module Stripe
# on subsequent API calls.
# * +response+ - An object containing information about the API response
# 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
when Array
data.map { |i| convert_to_stripe_object(i, opts) }
@ -86,7 +86,8 @@ module Stripe
case obj
when APIResource, ListObject
obj.response = response
# Change this to an optional parameter when we drop 1.9 support.
obj.response = other_opts[:response]
end
obj