40 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
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
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
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
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
Milan Pavlik
e4daab98a4 [common-go] Move base database connection & types to common-go 2022-11-16 10:59:45 +02:00
Laurie T. Malau
ee8354aa79 [usage] Implement CreateStripeSubscription 2022-11-01 16:15:06 +01: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
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
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
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
9329939388 [stripe] Use attributionId in stripe queries 2022-09-09 07:18:23 +02:00
Milan Pavlik
9cab00ae89 [biling] Remove UpdateInvoices - old reconciler 2022-09-08 16:38:23 +02:00
Milan Pavlik
52279b12ab [billing] Implement ReconcileInvoices 2022-09-07 14:34:22 +02:00
Milan Pavlik
9cd730ebdb [billing] Implement FinalizeInvoice with usage ledger 2022-09-07 12:46:22 +02:00
Milan Pavlik
28f6980a26 [stripe] Handle invoice finalization 2022-08-31 16:06:16 +02:00
Milan Pavlik
8b11db368b [usage] Fix content service nil pointer 2022-08-30 14:56:14 +02:00
Milan Pavlik
dba77a55e6 [usage] Upload report with more details 2022-08-30 14:52:15 +02:00
Milan Pavlik
33c613c5da [stripe] Set reportId on invoices after updating credits 2022-08-30 11:36:15 +02:00
Milan Pavlik
9df045e11c [usage] Fetch sessions from usage report instead of from RPC arguments 2022-08-30 11:00:14 +02:00
Milan Pavlik
8d009263e1 [billing] Set report ID on Invoices when updating usage credits 2022-08-26 13:40:11 +02:00
Alex Tugarev
030c183993 Use upcoming invoice 2022-08-25 16:07:10 +02:00
Laurie T. Malau
87fbe606ea Fix return 2022-08-12 13:08:29 +02:00
Laurie T. Malau
0e3702e073 Implement setBilledSession 2022-08-11 09:15:55 +02:00
Andrew Farries
8a8d2eab6d Add placeholder implementation of FinalizeInvoice 2022-08-10 14:48:54 +02:00
Andrew Farries
9d72fb5df9 [usage] Add billInstancesAfter config setting
Add a new config setting to the usage component.

`billInstancesAfter` sets the date after which instances should be
considered for billing - instances started before `billInstancesAfter`
will not be considered by the billing controller.
2022-08-05 09:47:49 -03:00
Milan Pavlik
c4708b3048 [usage] Implement BillingService 2022-07-27 04:48:22 -03:00