Skip to content

Commit 13d0c09

Browse files
jankeromnesroboquat
authored andcommitted
[server] Add new individual Stripe Price IDs to Gitpod's configuration
1 parent 6c9f601 commit 13d0c09

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

.werft/jobs/build/payment/stripe-configmap.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,13 @@ data:
99
"usageProductPriceIds": {
1010
"EUR": "price_1LiId7GadRXm50o3OayAS2y4",
1111
"USD": "price_1LiIdbGadRXm50o3ylg5S44r"
12+
},
13+
"individualUsagePriceIds": {
14+
"EUR": "price_1LmFcFGadRXm50o3XUrEuajK",
15+
"USD": "price_1LmFclGadRXm50o3mWTkir9g"
16+
},
17+
"teamUsagePriceIds": {
18+
"EUR": "price_1LiId7GadRXm50o3OayAS2y4",
19+
"USD": "price_1LiIdbGadRXm50o3ylg5S44r"
1220
}
1321
}

components/gitpod-protocol/src/protocol.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,8 +817,8 @@ export interface RepositoryCloneInformation {
817817

818818
export interface CoreDumpConfig {
819819
enabled?: boolean;
820-
softLimit?: number;
821-
hardLimit?: number;
820+
softLimit?: number;
821+
hardLimit?: number;
822822
}
823823

824824
export interface WorkspaceConfig {
@@ -1522,6 +1522,12 @@ export interface Terms {
15221522
readonly formElements?: object;
15231523
}
15241524

1525+
export interface StripeConfig {
1526+
usageProductPriceIds: { [currency: string]: string };
1527+
individualUsagePriceIds?: { [currency: string]: string };
1528+
teamUsagePriceIds?: { [currency: string]: string };
1529+
}
1530+
15251531
export type BillingStrategy = "other" | "stripe";
15261532
export interface CostCenter {
15271533
readonly id: AttributionId;

components/server/src/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import { GitpodHostUrl } from "@gitpod/gitpod-protocol/lib/util/gitpod-host-url";
88
import { AuthProviderParams, normalizeAuthProviderParams } from "./auth/auth-provider";
99

10-
import { NamedWorkspaceFeatureFlag } from "@gitpod/gitpod-protocol";
10+
import { NamedWorkspaceFeatureFlag, StripeConfig } from "@gitpod/gitpod-protocol";
1111

1212
import { RateLimiterConfig } from "./auth/rate-limiter";
1313
import { CodeSyncConfig } from "./code-sync/code-sync-service";
@@ -27,7 +27,7 @@ export type Config = Omit<
2727
workspaceDefaults: WorkspaceDefaults;
2828
chargebeeProviderOptions?: ChargebeeProviderOptions;
2929
stripeSecrets?: { publishableKey: string; secretKey: string };
30-
stripeConfig?: { usageProductPriceIds: { [currency: string]: string } };
30+
stripeConfig?: StripeConfig;
3131
builtinAuthProvidersConfigured: boolean;
3232
inactivityPeriodForRepos?: number;
3333
};
@@ -266,7 +266,7 @@ export namespace ConfigFile {
266266
log.error("Could not load Stripe secrets", error);
267267
}
268268
}
269-
let stripeConfig: { usageProductPriceIds: { EUR: string; USD: string } } | undefined;
269+
let stripeConfig: StripeConfig | undefined;
270270
if (config.enablePayment && config.stripeConfigFile) {
271271
try {
272272
stripeConfig = JSON.parse(fs.readFileSync(filePathTelepresenceAware(config.stripeConfigFile), "utf-8"));

0 commit comments

Comments
 (0)