lib/stripe/api_operations/update.rb in stripe-1.29.1 vs lib/stripe/api_operations/update.rb in stripe-1.30.0

- old
+ new

@@ -18,11 +18,11 @@ req_url = params.delete(:req_url) || save_url # We started unintentionally (sort of) allowing attributes send to # +save+ to override values used during the update. So as not to break # the API, this makes that official here. - update_attributes_with_options(params, :raise_error => false) + update_attributes(params) # Now remove any parameters that look like object attributes. params = params.reject { |k, _| respond_to?(k) } values = self.class.serialize_params(self).merge(params) @@ -31,10 +31,10 @@ # note that id gets removed here our call to #url above has already # generated a uri for this object with an identifier baked in values.delete(:id) response, opts = request(:post, req_url, values) - refresh_from(response, opts) + initialize_from(response, opts) end self end private