105 Commits

Author SHA1 Message Date
Sven Efftinge
2fd43d6307 [usage] update stripe usage on finalization
update stripe with current usage immediately, so that
invoices created between now and the next reconcile
are correct.
2023-02-10 14:33:15 +01:00
Milan Pavlik
41dabf9619 [usage] Reduce log level for Fetching usage data log 2023-02-08 14:55:46 +01:00
Sven Efftinge
03a5fb6ac7 [billing] provide human readable price info 2023-01-23 11:55:30 +01:00
Sven Efftinge
6868ce095c [dashboard] access invoices after cancellation 2023-01-06 08:27:45 +01:00
Sven Efftinge
aaa0653d54 [ubp] reset usage on chargebee cancellation 2022-12-15 12:32:25 -03:00
Christian Weichel
478a75e744 Switch license to AGPL 2022-12-08 13:05:19 -03:00
Sven Efftinge
aa4a5cafb6 [usage] make increment billing cycle more robust 2022-12-07 05:54:17 -03:00
Sven Efftinge
fcc42fe1a4 [usage] handle no stopping but stopped time 2022-12-06 12:38:17 -03:00
Sven Efftinge
57593bfedd [usage] increment cycle on finalize invoice 2022-12-06 05:24:16 -03:00
Sven Efftinge
797c1b7421 [usage] support multiple entries on invoices 2022-12-05 08:44:15 -03:00
Sven Efftinge
a5d67448b2 Revert "[usage] handle reset usage for chargebee" 2022-12-02 11:47:01 -03:00
Sven Efftinge
6c41fa5e17 [usage] remove dependency on workspace class name 2022-12-02 05:59:01 -03:00
Sven Efftinge
2eead4a625 [usage] handle reset usage for chargebee
chargebee subscriptions that are cancelled get a dedicatd cost center
2022-11-30 09:08:00 -03:00
Sven Efftinge
7252b10b78 [usage] reduce possibility for races in ResetUsage 2022-11-28 11:02:57 -03:00
Sven Efftinge
e044c1d49f [admin] allow usage adjustments 2022-11-22 06:31:51 -03:00
Laurie T. Malau
ee08e7863c [db] Move db models to gitpod-db/go module 2022-11-21 08:37:50 -03:00
Alex Tugarev
35599d8bbd [stripe] store currency for a stripe customer 2022-11-21 06:56:50 -03:00
Alex Tugarev
3de193e3fb [stripe] guard resubscribing with another currency
because it currently not supported.
2022-11-21 06:56:50 -03:00
Sven Efftinge
89d0b7df3f [admin] add admin endpoints for usage 2022-11-18 12:57:47 +02:00
Jan Keromnes
e97e8e91b4 [usage] Address nits from https://github.com/gitpod-io/gitpod/pull/14485 2022-11-16 13:29:45 +02:00
Milan Pavlik
e4daab98a4 [common-go] Move base database connection & types to common-go 2022-11-16 10:59:45 +02:00
Jan Keromnes
77bb23fc5e [usage] Don't pass '0001-01-01T00:15:00Z' timestamps through the CostCenter API when it should be undefined 🙃 2022-11-11 13:32:41 +02:00
Jan Keromnes
56a4fe2895 [usage] Introduce an explicit CostCenter.BillingCycleStart time 2022-11-11 13:32:41 +02:00
Milan Pavlik
3c553500f0 [usage]Actually reset usage during ResetUsage RPC 2022-11-02 09:16:07 +01:00
Laurie T. Malau
ee8354aa79 [usage] Implement CreateStripeSubscription 2022-11-01 16:15:06 +01:00
Milan Pavlik
2ec4546105 [usage] List cost centers with expired billing time 2022-10-27 16:56:42 +02:00
Milan Pavlik
8735238f00 [stripe] Populate Stripe Customers from searches, use as lookup 2022-10-20 13:50:35 +02:00
Milan Pavlik
0d566be29a [stripe] Store Stripe Customer in the db on creation 2022-10-20 09:37:35 +02:00
Milan Pavlik
224c961883 [billing] Implement CreateStripeCustomer 2022-10-19 10:38:34 +02:00
Milan Pavlik
f626371eaf [usage] Validate spending limits in UpdateCostCenter 2022-10-13 14:00:29 +02:00
Milan Pavlik
849170fedd [usage] Return CostCenter from SetCostCenter udpates - implementation 2022-10-12 11:41:27 +02:00
Milan Pavlik
c428154475 [stripe] Implement BillingService.GetStripeCustomer 2022-10-07 16:55:23 +02:00
Milan Pavlik
93fa97a5be [stripe] Add test for filtering out balances for Stripe Cost Centers 2022-10-05 17:59:21 +02:00
Milan Pavlik
ec9523701d [stripe] Fix inverted comparison 2022-10-05 13:13:20 +02:00
Milan Pavlik
865cc2c5a7 [usage] Simplify UpdateInvoices handling 2022-09-29 15:11:29 +02:00
Sven Efftinge
5670a5500e [usage] show sum of usage not balance
fixes #13067
2022-09-23 10:03:24 +02:00
Sven Efftinge
1b995ef47f [usage] introduce getBalance API 2022-09-23 07:34:23 +02:00
Milan Pavlik
c7efb44985 [usage] Use credit cents when computing listed usage balance 2022-09-21 14:57:22 +02:00
Sven Efftinge
4d35f4db8f [usage] remove unused GetUpcomingInvoice 2022-09-19 11:22:20 +02:00
Sven Efftinge
65812bf67f [usage] implement CancelSubscription 2022-09-16 16:24:17 +02:00
Milan Pavlik
686963ba63 [usage] Fix stripe invoice finalization 2022-09-16 14:37:17 +02:00
Milan Pavlik
d9f460b6ee [billing] Remove implementation of SetBilledSession RPC 2022-09-16 13:16:18 +02:00
Sven Efftinge
2701ec7bdc [usage] added costcenter nextBillingTime 2022-09-15 19:18:16 +02:00
Milan Pavlik
c3673e3fdc [usage] Rename ReconcileUsageWithLedger to ReconcileUsage 2022-09-13 15:55:14 +02:00
Sven Efftinge
343c462098 [usage] added a test for ListUsage 2022-09-09 12:26:24 +02:00
Sven Efftinge
74bc751ec7 [cost center] Add save API 2022-09-09 11:25:24 +02:00
Milan Pavlik
51245afbd4 [usage] Include drafts when listing usage summary 2022-09-09 11:03:24 +02:00
Milan Pavlik
43e526b1d6 [stripe] Finalized invoce debits, do not set credits to negative when updating 2022-09-09 09:27:24 +02:00
Milan Pavlik
066b577b6d [usage] Remove unused RPCs from proto 2022-09-09 07:19:23 +02:00
Milan Pavlik
9329939388 [stripe] Use attributionId in stripe queries 2022-09-09 07:18:23 +02:00