912 Commits

Author SHA1 Message Date
Andrew Farries
12bb47c380 Update getStripePortalUrlForTeam
Implement the method in terms of the more general `getStripePortalUrl`.
2022-09-12 16:59:13 +02:00
Andrew Farries
9be2634132 Add getStripePortalUrl method to server 2022-09-12 16:59:13 +02:00
Andrew Farries
015987aa42 Add findStripeSubscriptionId method to server
Add a general method for finding the stripe subscription id for a given
attribution id. Implement the existing `findStripeSubscriptionIdForTeam`
method in terms of the new method.
2022-09-12 14:30:14 +02:00
Sven Efftinge
74bc751ec7 [cost center] Add save API 2022-09-09 11:25:24 +02:00
Gero Posmyk-Leinemann
130b1d8946 [server] Implement adminGetBillingMode 2022-09-09 09:53:24 +02:00
Thomas Schubart
1b64527d76 [server] Ensure PVC workspace class does not change 2022-09-08 22:49:23 +02:00
Jean Pierre
eb9aaa995e Store editSessions 2022-09-08 18:47:23 +02:00
Milan Pavlik
b9a45c03d6 Revert "[stripe] Use AttributionID metadat when querying for customers"
This reverts commit 05141becb5f677263f8ad4553c88076f19db2a4c.
2022-09-08 12:14:23 +02:00
Milan Pavlik
05141becb5 [stripe] Use AttributionID metadat when querying for customers 2022-09-08 11:18:23 +02:00
Gero Posmyk-Leinemann
2814f385bc [server] Don't count "Professional Open Source" as personal subscription 2022-09-08 10:15:23 +02:00
Andrew Farries
7df06a862a Add createOrUpdateStripeCustomerForUser method
Directly analogous to createOrUpdateStripeCustomerForTeam, the only
difference is the metadata on the resulting Stripe customer.
2022-09-08 09:59:23 +02:00
Andrew Farries
81e189b19e Add findCustomerByQuery method
Implement `findCustomerByTeamId` and `findCustomerByUserId` in terms of
this more general method.
2022-09-08 09:59:23 +02:00
mustard
106e317c7a [server] add getTeams scope for supervisor 2022-09-08 09:45:23 +02:00
Milan Pavlik
fb2840a413 [stripe] Create customers with attributionId 2022-09-08 09:28:23 +02:00
Sven Efftinge
5e72785abc [usage] remove ListBilledUsage API 2022-09-08 08:54:23 +02:00
Sven Efftinge
249a563c48 [dashboard] Use new usage API for team-usage 2022-09-07 19:00:22 +02:00
Alex Tugarev
ca7602f0cb Reword "Spending Limit" to "Usage Limit" 2022-09-06 11:43:21 +02:00
Sven Efftinge
e01c880447 Added API call to fetch usage data 2022-09-06 09:58:21 +02:00
Gero Posmyk-Leinemann
8991e4a500 [server] Guard against bogus RPC method names 2022-09-06 08:58:21 +02:00
Sven Efftinge
51c0c6b849 [server] 'abort' prebuilds
use the new StopWorkspacePolicy introduced with #12284 to avoid
spending resources on backing up discarded prebuilds.
2022-09-06 07:41:21 +02:00
Jean Pierre
f693d41810 Add /oauth/inspect endpoint 2022-09-05 19:27:20 +02:00
Jan Keromnes
9726e86b26 [server] Poll Stripe after creating a new customer 2022-09-01 10:46:16 +02:00
Jan Keromnes
b94612d434 [server][dashboard] Allow new Stripe customers to select their preferred billing currency 2022-09-01 10:46:16 +02:00
Jan Keromnes
b48b8ffbe1 [server] Deprecate 'userGetsMoreResources' in usage-based billing 2022-09-01 10:44:16 +02:00
Jan Keromnes
5e5ed07fbb [server] Implement EntitlementServiceUBP.hasPaidSubscription 2022-09-01 10:44:16 +02:00
Gero Posmyk-Leinemann
7bc8bf954b [server] Don't raise alerts on unspecific errors 2022-09-01 08:28:16 +02:00
Sven Efftinge
9dfafc0966 [admin] Allow manual user verification
fixes #12540
2022-08-31 19:12:17 +02:00
Alex Tugarev
a8d0889405 Add pagination to list usage 2022-08-31 15:14:16 +02:00
Alex Tugarev
a2fa9dcfa3 Clean up webhook events
by running a periodic garbage collector. This is a pattern we use for other resources.

fixes #12430
2022-08-31 15:08:16 +02:00
Manuel Alejandro de Brito Fontes
f0199414da [server] Add name of blocked account when trying to run prebuilds 2022-08-31 09:19:15 +02:00
Gero Posmyk-Leinemann
14b38e581d [server] Improve logging/tracing on failed instance start 2022-08-30 12:32:14 +02:00
mustard
95fa4439e5 [gp-cli] provide workspace class info in top command 2022-08-30 10:25:14 +02:00
Anton Kosyakov
008ea3fadc [jb] prepare to split backend and plugin images 2022-08-30 09:36:14 +02:00
Gero Posmyk-Leinemann
fd7720d5ba [server] Only alert on explicit system failures 2022-08-29 21:17:14 +02:00
Thomas Schubart
8fa7544bba Ensure workspace class is selected if no user choice has been made 2022-08-29 11:41:13 +02:00
Gero Posmyk-Leinemann
a2b7412db4 [server] Fix usage of AccountStatementProvider by making it cache per userId 2022-08-29 11:00:14 +02:00
Gero Posmyk-Leinemann
7f537e2537 [server] Partial revert of b4a9939063fad70d25474e5a76f0b5923e27e43e 2022-08-29 11:00:14 +02:00
Sven Efftinge
79b75ab4d5 Add phone verification 2022-08-29 09:36:13 +02:00
Sven Efftinge
dda2ebd82d [server] track more startWorkspace failures
fixes #12332
2022-08-26 15:06:11 +02:00
Alex Tugarev
030c183993 Use upcoming invoice 2022-08-25 16:07:10 +02:00
Gero Posmyk-Leinemann
803b52a388 [server] Remove outdated feature flag deprecateOldImageLogsMechanism 2022-08-25 14:18:10 +02:00
mustard
cbe7c8c573 [gitpod-protocol] add missing method in golang 2022-08-25 12:36:41 +02:00
Alex Tugarev
d3147bcb55 regenerate usage-api 2022-08-23 12:08:39 +02:00
Gero Posmyk-Leinemann
18b1a50a07 [server, dashboard] Review comments
Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
2022-08-19 13:19:35 +02:00
Laurie T. Malau
502a9d59cf Show workspace and user details 2022-08-19 13:19:35 +02:00
Gero Posmyk-Leinemann
d8c91b9d9c [server] Never block getStripePublishableKey/getStripeSetupIntentClientSecret based on BillingMode 2022-08-18 09:48:34 +02:00
Pavel Tumik @ GitPod
74eb57b950 [server] fix workspace PVC always restored from prebuild even if backup already exists 2022-08-18 09:12:34 +02:00
Pavel Tumik @ GitPod
6687af602c [server] ensure that user that has PVC enabled will not force prebuilds to use them on projects that don't have PVC turned on 2022-08-17 20:02:34 +02:00
Alex Tugarev
5f131386b2 [server] trim rawEvents to avoid DB pollution
fixes #11578
2022-08-17 17:54:34 +02:00
Gero Posmyk-Leinemann
2d2c70f62c [server] BillingMode: Use findCustomerByTeamId 2022-08-17 14:56:34 +02:00