ZIm/crates/collab/src/db/queries
Marshall Bowers a4dd92fe06
collab: Prevent users from creating a new subscription when they have overdue subscriptions (#22870)
This PR adjusts the create billing subscription endpoint to prevent
initiating a checkout flow when a user has existing subscriptions that
are overdue.

A subscription is considered "overdue" when either:

- The status is `past_due`
- The status is `canceled` and the cancellation reason is
`payment_failed`

In Stripe, when a subscription has failed payment a certain number of
times, it is canceled with a reason of `payment_failed`. However, today
there is nothing stopping someone from simply creating a new
subscription without paying the outstanding invoices. With this change a
user will need to reconcile their outstanding invoices before they can
sign up for a new subscription.

Release Notes:

- N/A
2025-01-08 22:50:48 +00:00
..
access_tokens.rs Migrate from scrypt to sha256. (#8969) 2024-03-06 20:51:43 -07:00
billing_customers.rs collab: Rework Stripe event processing (#15510) 2024-07-30 16:35:11 -04:00
billing_preferences.rs collab: Add billing preferences for maximum LLM monthly spend (#18948) 2024-10-09 16:29:07 -04:00
billing_subscriptions.rs collab: Prevent users from creating a new subscription when they have overdue subscriptions (#22870) 2025-01-08 22:50:48 +00:00
buffers.rs ssh remoting: Show the host's GitHub name in the titlebar when sharing an SSH project (#19844) 2024-10-29 09:52:54 +01:00
channels.rs Use LiveKit's Rust SDK on Linux while continue using Swift SDK on Mac (#21550) 2024-12-05 15:06:17 -08:00
contacts.rs Enable clippy::explicit_auto_deref (#8753) 2024-03-02 22:30:18 -05:00
contributors.rs collab: Require github_user_created_at at ingress points (#17180) 2024-08-30 17:09:59 -04:00
dev_server_projects.rs Remove dev servers (#19638) 2024-10-24 12:14:03 -06:00
dev_servers.rs Remove dev servers (#19638) 2024-10-24 12:14:03 -06:00
embeddings.rs Semantic Index (#10329) 2024-04-12 11:40:59 -06:00
extensions.rs Bring Jupyter to Zed Editing (#12062) 2024-06-17 10:02:31 -07:00
messages.rs Support very large channel membership lists (#11939) 2024-05-16 20:02:25 -06:00
notifications.rs chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
processed_stripe_events.rs collab: Rework Stripe event processing (#15510) 2024-07-30 16:35:11 -04:00
projects.rs Move git status out of Entry (#22224) 2025-01-04 01:00:16 +00:00
rate_buckets.rs Allow AI interactions to be proxied through Zed's server so you don't need an API key (#7367) 2024-03-19 19:22:26 +01:00
rooms.rs Move git status out of Entry (#22224) 2025-01-04 01:00:16 +00:00
servers.rs Enable clippy::borrow_deref_ref (#8894) 2024-03-05 12:24:54 -05:00
users.rs collab: Fix GitHub user retrieval in seed script (#18296) 2024-09-24 15:44:55 -04:00