• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-ruby / #5867

18 Apr 2024 09:24PM UTC coverage: 92.724% (-4.8%) from 97.485%
#5867

push

github

ramya-stripe
Bump version to 11.2.0

10067 of 10857 relevant lines covered (92.72%)

258.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.73
/lib/stripe/api_operations/delete.rb
1
# frozen_string_literal: true
2

3
module Stripe
1✔
4
  module APIOperations
1✔
5
    module Delete
1✔
6
      module ClassMethods
1✔
7
        # Deletes an API resource
8
        #
9
        # Deletes the identified resource with the passed in parameters.
10
        #
11
        # ==== Attributes
12
        #
13
        # * +id+ - ID of the resource to delete.
14
        # * +params+ - A hash of parameters to pass to the API
15
        # * +opts+ - A Hash of additional options (separate from the params /
16
        #   object values) to be added to the request. E.g. to allow for an
17
        #   idempotency_key to be passed in the request headers, or for the
18
        #   api_key to be overwritten. See
19
        #   {APIOperations::Request.execute_resource_request}.
20
        def delete(id, params = {}, opts = {})
1✔
21
          request_stripe_object(
×
22
            method: :delete,
23
            path: "#{resource_url}/#{id}",
×
24
            params: params,
25
            opts: opts
26
          )
27
        end
28
      end
29

30
      def delete(params = {}, opts = {})
1✔
31
        request_stripe_object(
×
32
          method: :delete,
33
          path: resource_url,
34
          params: params,
35
          opts: opts
36
        )
37
      end
38

39
      def self.included(base)
1✔
40
        base.extend(ClassMethods)
20✔
41
      end
42
    end
43
  end
44
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc