#mtanzi - delete coupon

1 messages · Page 1 of 1 (latest)

ivory nexus
#

Are you getting some kind of error when you try to delete them?

stoic lance
#

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>'
ivory nexus
#

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

stoic lance
#

I see... The "problem" is that since I have removed coupons, now I have a lot of orphaned PromotionCode

#

I will run a script to deactivate them

#

thanks