Compare commits

..

No commits in common. "990792f9c16472e97aa6b9c6e3993e59a01cbd3a" and "339d36b0a2a9ff0d28ce2b24ef18e610e072b9c3" have entirely different histories.

View File

@ -429,13 +429,13 @@ module Stripe
# * +:opts:+ Options for StripeObject like an API key.
# * +:partial:+ Indicates that the re-initialization should not attempt to
# remove accessors.
protected def initialize_from(values, opts)
protected def initialize_from(values, opts, partial = false)
@opts = Util.normalize_opts(opts)
# the `#send` is here so that we can keep this method private
@original_values = self.class.send(:deep_copy, values)
removed = Set.new(@values.keys - values.keys)
removed = partial ? Set.new : Set.new(@values.keys - values.keys)
added = Set.new(values.keys - @values.keys)
# Wipe old state before setting new. This is useful for e.g. updating a