Files
twenty/packages/twenty-server/src/engine/core-modules
Ana Sofia Marin Alexandre f58f84114c update subscription interval and quantity for hybrid susbscription (#9822)
Solves https://github.com/twentyhq/private-issues/issues/253

**TLDR:**

Can update the billing subscription interval for a subscription with a
base product and metered product. It also updates correctly as the
quantity of base products depending on how many people are in the
workspace.

**In order to test:**

1. Have the environment variable IS_BILLING_ENABLED set to true and add
the other required environment variables for Billing to work
2. Do a database reset (to ensure that the new feature flag is properly
added and that the billing tables are created)
3. Run the command: npx nx run twenty-server:command
billing:sync-plans-data (if you don't do that the products and prices
will not be present in the database)
4. Run the server , the frontend, the worker, and the stripe listen
command (stripe listen --forward-to
http://localhost:3000/billing/webhooks)
5. Buy a subscription for the Acme workspace , change the interval in
the Billing Settings
6. Add another person to the workspace, you should see all the previous
changes reflected in the database

**Doing**
Moving the BillingSubscriptionsService.getUpdatedSubscriptionItems to an
util (for a less cluttered service)
2025-01-24 18:19:09 +01:00
..
2025-01-21 14:30:59 +01:00
2025-01-24 16:24:41 +01:00
2024-10-22 18:21:00 +02:00
2025-01-08 21:52:29 +01:00
2024-11-12 17:58:36 +01:00
2025-01-21 14:30:59 +01:00
2025-01-21 15:44:52 +01:00
2025-01-21 14:30:59 +01:00