Method: Stripe::CouponService#delete
- Defined in:
- lib/stripe/services/coupon_service.rb
#delete(coupon, params = {}, opts = {}) ⇒ Object
You can delete coupons via the [coupon management](dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.
14 15 16 17 18 19 20 21 22 |
# File 'lib/stripe/services/coupon_service.rb', line 14 def delete(coupon, params = {}, opts = {}) request( method: :delete, path: format("/v1/coupons/%<coupon>s", { coupon: CGI.escape(coupon) }), params: params, opts: opts, base_address: :api ) end |