lib/stripe/api_operations/delete.rb in stripe-6.3.0 vs lib/stripe/api_operations/delete.rb in stripe-6.4.0

- old
+ new

@@ -16,20 +16,25 @@ # object values) to be added to the request. E.g. to allow for an # idempotency_key to be passed in the request headers, or for the # api_key to be overwritten. See # {APIOperations::Request.execute_resource_request}. def delete(id, params = {}, opts = {}) - resp, opts = execute_resource_request(:delete, - "#{resource_url}/#{id}", - params, opts) - Util.convert_to_stripe_object(resp.data, opts) + request_stripe_object( + method: :delete, + path: "#{resource_url}/#{id}", + params: params, + opts: opts + ) end end def delete(params = {}, opts = {}) - resp, opts = execute_resource_request(:delete, resource_url, - params, opts) - initialize_from(resp.data, opts) + request_stripe_object( + method: :delete, + path: resource_url, + params: params, + opts: opts + ) end def self.included(base) base.extend(ClassMethods) end