File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
components/usage/pkg/server
install/installer/pkg/components/usage Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,16 @@ import (
26
26
"gorm.io/gorm"
27
27
)
28
28
29
+ type PriceConfig struct {
30
+ EUR string `json:"eur"`
31
+ USD string `json:"usd"`
32
+ }
33
+
34
+ type StripePrices struct {
35
+ UsageProductPriceIDs PriceConfig `json:"usageProductPriceIds"`
36
+ IndividualUsagePriceIDs PriceConfig `json:"individualUsagePriceIds"`
37
+ TeamUsagePriceIDs PriceConfig `json:"teamUsagePriceIds"`
38
+ }
29
39
type Config struct {
30
40
// ControllerSchedule determines how frequently to run the Usage/Billing controller.
31
41
// When ControllerSchedule is empty, the background controller is disabled.
@@ -38,6 +48,8 @@ type Config struct {
38
48
Server * baseserver.Configuration `json:"server,omitempty"`
39
49
40
50
DefaultSpendingLimit db.DefaultSpendingLimit `json:"defaultSpendingLimit"`
51
+
52
+ StripePrices StripePrices `json:"stripePrices"`
41
53
}
42
54
43
55
func Start (cfg Config , version string ) error {
Original file line number Diff line number Diff line change @@ -33,6 +33,21 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
33
33
ForUsers : 1_000_000_000 ,
34
34
MinForUsersOnStripe : 0 ,
35
35
},
36
+ // TODO: Remove hardcoded IDs
37
+ StripePrices : server.StripePrices {
38
+ UsageProductPriceIDs : server.PriceConfig {
39
+ EUR : "price_1LmYVxGadRXm50o3AiLq0Qmo" ,
40
+ USD : "price_1LmYWRGadRXm50o3Ym8PLqnG" ,
41
+ },
42
+ IndividualUsagePriceIDs : server.PriceConfig {
43
+ EUR : "price_1LmY7GAyBDPbWrhaf8Lav5yd" ,
44
+ USD : "price_1LmY86AyBDPbWrhahYRNNSK1" ,
45
+ },
46
+ TeamUsagePriceIDs : server.PriceConfig {
47
+ EUR : "price_1LiJKtAyBDPbWrhaJ2rUVEBb" ,
48
+ USD : "price_1LiJLDAyBDPbWrhaOeWsP7Yr" ,
49
+ },
50
+ },
36
51
}
37
52
expConfig := getExperimentalConfig (ctx )
38
53
You can’t perform that action at this time.
0 commit comments