Module: Stripe::APIOperations::Delete::ClassMethods

Defined in:
lib/stripe/api_operations/delete.rb

Instance Method Summary collapse

Instance Method Details

#delete(id, params = {}, opts = {}) ⇒ Object

Deletes an API resource

Deletes the identified resource with the passed in parameters.

Attributes

  • id - ID of the resource to delete.

  • params - A hash of parameters to pass to the API

  • opts - A Hash of additional options (separate from the params / 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.request.



19
20
21
22
# File 'lib/stripe/api_operations/delete.rb', line 19

def delete(id, params = {}, opts = {})
  resp, opts = request(:delete, "#{resource_url}/#{id}", params, opts)
  Util.convert_to_stripe_object(resp.data, opts)
end