#ironbeard-promotioncode-expiration

1 messages · Page 1 of 1 (latest)

grave surge
#

Hey @vocal perch

#

Easiest would be to try quickly in Test mode really

vocal perch
#

Hm, so to create a promotioncode that expires tomorrow and then wait? or?

grave surge
#

expires_at is a timestamp, so you can set it 100 seconds in the future and wait a bit yes

vocal perch
#

ah gotcha cool cool. Thanks 🙂

grave surge
#

I've done the same, so we'll see who gets an answer first

#

(sorry the server is a bit busy but I'm catching up)

#

I want to believe the PromotionCode becomes active: false and it triggers an Event at least

vocal perch
#

No worries! Also, PromotionCodes can't be deleted right? They just turn to active=False?

grave surge
#

okay looks like we don't send an event

vocal perch
#

I haven't gotten a webook for this yet

grave surge
#

Feels like a bug to me so I'll flag internally

#

clearly active is now false for me

vocal perch
#

Gotcha yeah

#

If a Stripe model doesn't have a delete method in the API, does it mean it's status is just tracked by an 'active' property? The ones I'm thinking of are Price, PromotionCode, PaymentIntent, BalanceTransaction, Charge, Refund, and SubscriptionSchedule.

I know PaymentMethod doesn't have a delete method, but that detaching it is basically the same thing.

grave surge
#

yeah I wouldn't say we have any guarantee of this in general. We have the active pattern, but we also have other patterns (like the detach, or the Subscription cancelation, etc.)

vocal perch
#

Gotcha. I'm just mirroring some of these models in my own database and trying to figure out if I should just not allow those objects to be deleted locally, do an active thing, or what.

grave surge
#

ah yeah that part is up to you. I think I wouldn't delete in my own database. I'd have a flag to treat them as inactive/deleted but I'd want to keep the data

vocal perch
#

Yeah, I think I'll do that. Thanks for everything, have a great day!