#ironbeard-promotioncode-expiration
1 messages · Page 1 of 1 (latest)
Hm, so to create a promotioncode that expires tomorrow and then wait? or?
expires_at is a timestamp, so you can set it 100 seconds in the future and wait a bit yes
ah gotcha cool cool. Thanks 🙂
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
No worries! Also, PromotionCodes can't be deleted right? They just turn to active=False?
okay looks like we don't send an event
I haven't gotten a webook for this yet
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.
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.)
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.
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
Yeah, I think I'll do that. Thanks for everything, have a great day!