Skip to content

Commit d7ccfee

Browse files
refactor: deprecate billing_id in checkout RPCs (#436)
Co-authored-by: Claude <[email protected]>
1 parent c0cefcd commit d7ccfee

File tree

2 files changed

+40
-18
lines changed

2 files changed

+40
-18
lines changed

raystack/frontier/v1beta1/admin.proto

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,11 +1033,15 @@ message RemovePlatformUserResponse {}
10331033

10341034
message DelegatedCheckoutRequest {
10351035
string org_id = 1 [(validate.rules).string.min_len = 3];
1036+
// DEPRECATED: billing_id will be inferred from org_id
10361037
// ID of the billing account to update the subscription for
1037-
string billing_id = 2 [(validate.rules).string = {
1038-
ignore_empty: true,
1039-
uuid: true
1040-
}];
1038+
string billing_id = 2 [
1039+
deprecated = true,
1040+
(validate.rules).string = {
1041+
ignore_empty: true,
1042+
uuid: true
1043+
}
1044+
];
10411045

10421046
// Subscription to create
10431047
CheckoutSubscriptionBody subscription_body = 10;

raystack/frontier/v1beta1/frontier.proto

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,11 +2275,15 @@ message CheckCreditEntitlementResponse {
22752275

22762276
message CreateCheckoutRequest {
22772277
string org_id = 1 [(validate.rules).string.min_len = 3];
2278+
// DEPRECATED: billing_id will be inferred from org_id
22782279
// ID of the billing account to update the subscription for
2279-
string billing_id = 2 [(validate.rules).string = {
2280-
ignore_empty: true,
2281-
uuid: true
2282-
}];
2280+
string billing_id = 2 [
2281+
deprecated = true,
2282+
(validate.rules).string = {
2283+
ignore_empty: true,
2284+
uuid: true
2285+
}
2286+
];
22832287

22842288
string success_url = 3;
22852289
string cancel_url = 4;
@@ -2299,11 +2303,15 @@ message CreateCheckoutResponse {
22992303

23002304
message ListCheckoutsRequest {
23012305
string org_id = 1 [(validate.rules).string.min_len = 3];
2306+
// DEPRECATED: billing_id will be inferred from org_id
23022307
// ID of the billing account to get the subscriptions for
2303-
string billing_id = 2 [(validate.rules).string = {
2304-
ignore_empty: true,
2305-
uuid: true
2306-
}];
2308+
string billing_id = 2 [
2309+
deprecated = true,
2310+
(validate.rules).string = {
2311+
ignore_empty: true,
2312+
uuid: true
2313+
}
2314+
];
23072315
}
23082316

23092317
message ListCheckoutsResponse {
@@ -2312,12 +2320,22 @@ message ListCheckoutsResponse {
23122320
}
23132321

23142322
message GetCheckoutRequest {
2315-
string org_id = 1 [(validate.rules).string.min_len = 3];
2316-
// ID of the billing account to get the subscriptions for
2317-
string billing_id = 2 [(validate.rules).string = {
2318-
ignore_empty: true,
2319-
uuid: true
2320-
}];
2323+
// DEPRECATED: org_id is not needed, checkout can be fetched by id alone
2324+
string org_id = 1 [
2325+
deprecated = true,
2326+
(validate.rules).string = {
2327+
ignore_empty: true,
2328+
min_len: 3
2329+
}
2330+
];
2331+
// DEPRECATED: billing_id is not needed, checkout can be fetched by id alone
2332+
string billing_id = 2 [
2333+
deprecated = true,
2334+
(validate.rules).string = {
2335+
ignore_empty: true,
2336+
uuid: true
2337+
}
2338+
];
23212339
// ID of the checkout to get
23222340
string id = 3 [(validate.rules).string.min_len = 1];
23232341
}

0 commit comments

Comments
 (0)