Skip to content

Commit 4144445

Browse files
refactor: deprecate billing_id and project_id in entitlement and usage RPCs
Mark billing_id and project_id fields as deprecated in the following RPCs: - CheckFeatureEntitlement - CreateBillingUsage - RevertBillingUsage The billing_id will now be automatically inferred from org_id on the backend. The project_id is also deprecated - use org_id directly instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 80fc5ba commit 4144445

File tree

2 files changed

+30
-24
lines changed

2 files changed

+30
-24
lines changed

raystack/frontier/v1beta1/admin.proto

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,16 +1094,18 @@ message ListAllBillingAccountsResponse {
10941094
}
10951095

10961096
message RevertBillingUsageRequest {
1097-
// either provide org_id or infer org from project_id
10981097
string org_id = 1;
1099-
string project_id = 2;
1098+
// DEPRECATED
1099+
string project_id = 2 [deprecated = true];
11001100

1101-
// either provide billing_id of the org or API can infer the default
1102-
// billing ID from either org_id or project_id, not both
1103-
string billing_id = 3 [(validate.rules).string = {
1104-
ignore_empty: true,
1105-
uuid: true
1106-
}];
1101+
// DEPRECATED: billing_id will be inferred from org_id
1102+
string billing_id = 3 [
1103+
deprecated = true,
1104+
(validate.rules).string = {
1105+
ignore_empty: true,
1106+
uuid: true
1107+
}
1108+
];
11071109

11081110
// usage id to revert, a usage can only be allowed to revert once
11091111
string usage_id = 4 [(validate.rules).string = {uuid: true}];

raystack/frontier/v1beta1/frontier.proto

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2030,15 +2030,17 @@ message HasTrialedResponse {
20302030

20312031
message CreateBillingUsageRequest {
20322032
string org_id = 1;
2033-
// ID of the billing account to update the subscription for
2034-
string billing_id = 2 [(validate.rules).string = {
2035-
ignore_empty: true,
2036-
uuid: true
2037-
}];
2033+
// DEPRECATED: billing_id will be inferred from org_id
2034+
string billing_id = 2 [
2035+
deprecated = true,
2036+
(validate.rules).string = {
2037+
ignore_empty: true,
2038+
uuid: true
2039+
}
2040+
];
20382041

2039-
// either provide billing_id of the org or API can infer the default
2040-
// billing ID from either org_id or project_id, not both
2041-
string project_id = 4;
2042+
// DEPRECATED
2043+
string project_id = 4 [deprecated = true];
20422044

20432045
// Usage to create
20442046
repeated Usage usages = 3;
@@ -2253,15 +2255,17 @@ message ListPlansResponse {
22532255

22542256
message CheckFeatureEntitlementRequest {
22552257
string org_id = 1;
2256-
// ID of the billing account to update the subscription for
2257-
string billing_id = 2 [(validate.rules).string = {
2258-
ignore_empty: true,
2259-
uuid: true
2260-
}];
2258+
// DEPRECATED: billing_id will be inferred from org_id
2259+
string billing_id = 2 [
2260+
deprecated = true,
2261+
(validate.rules).string = {
2262+
ignore_empty: true,
2263+
uuid: true
2264+
}
2265+
];
22612266

2262-
// either provide billing_id of the org or API can infer the default
2263-
// billing ID from either org_id or project_id, not both
2264-
string project_id = 4;
2267+
// DEPRECATED
2268+
string project_id = 4 [deprecated = true];
22652269

22662270
// feature or product name
22672271
string feature = 3 [(validate.rules).string.min_len = 1];

0 commit comments

Comments
 (0)