#mtanzi - delete coupon
1 messages · Page 1 of 1 (latest)
I looked int the API and I couldn't find the delete - https://stripe.com/docs/api/promotion_codes/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
if I try from console (ruby)
> Stripe::PromotionCode.delete('promo_1KUtClJfYi7qv89iFkdHbMHk')
NoMethodError: undefined method `delete' for Stripe::PromotionCode:Class
Did you mean? delegate
from (pry):43:in `<main>'
Gotcha. I was not aware of that. It looks like the recommended way to get rid of a code is by deactivating the code by setting active to false
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.