Skip to content

Commit c0cefcd

Browse files
refactor(frontier): deprecate redundant request parameters from subscription RPC (#435)
* deprecate billing id from request payload for subscription * remove org id as not needed
1 parent dcceed8 commit c0cefcd

File tree

1 file changed

+72
-24
lines changed

1 file changed

+72
-24
lines changed

raystack/frontier/v1beta1/frontier.proto

Lines changed: 72 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,12 +2080,23 @@ message TotalDebitedTransactionsResponse {
20802080
}
20812081

20822082
message GetSubscriptionRequest {
2083-
string org_id = 1 [(validate.rules).string.min_len = 3];
2083+
// DEPRECATED: org_id will be inferred from subscription id
2084+
string org_id = 1 [
2085+
deprecated = true,
2086+
(validate.rules).string = {
2087+
ignore_empty: true,
2088+
min_len: 3
2089+
}
2090+
];
2091+
// DEPRECATED: billing_id will be inferred from subscription id
20842092
// ID of the billing account to get the subscription for
2085-
string billing_id = 2 [(validate.rules).string = {
2086-
ignore_empty: true,
2087-
uuid: true
2088-
}];
2093+
string billing_id = 2 [
2094+
deprecated = true,
2095+
(validate.rules).string = {
2096+
ignore_empty: true,
2097+
uuid: true
2098+
}
2099+
];
20892100
// ID of the subscription to get
20902101
string id = 3 [(validate.rules).string.min_len = 1];
20912102

@@ -2098,11 +2109,15 @@ message GetSubscriptionResponse {
20982109

20992110
message ListSubscriptionsRequest {
21002111
string org_id = 1 [(validate.rules).string.min_len = 3];
2112+
// DEPRECATED: billing_id will be inferred from org_id
21012113
// ID of the billing account to list subscriptions for
2102-
string billing_id = 2 [(validate.rules).string = {
2103-
ignore_empty: true,
2104-
uuid: true
2105-
}];
2114+
string billing_id = 2 [
2115+
deprecated = true,
2116+
(validate.rules).string = {
2117+
ignore_empty: true,
2118+
uuid: true
2119+
}
2120+
];
21062121

21072122
// Filter subscriptions by state
21082123
string state = 3;
@@ -2117,12 +2132,23 @@ message ListSubscriptionsResponse {
21172132
}
21182133

21192134
message UpdateSubscriptionRequest {
2120-
string org_id = 1 [(validate.rules).string.min_len = 3];
2135+
// DEPRECATED: org_id will be inferred from subscription id
2136+
string org_id = 1 [
2137+
deprecated = true,
2138+
(validate.rules).string = {
2139+
ignore_empty: true,
2140+
min_len: 3
2141+
}
2142+
];
2143+
// DEPRECATED: billing_id will be inferred from subscription id
21212144
// ID of the billing account to update the subscription for
2122-
string billing_id = 2 [(validate.rules).string = {
2123-
ignore_empty: true,
2124-
uuid: true
2125-
}];
2145+
string billing_id = 2 [
2146+
deprecated = true,
2147+
(validate.rules).string = {
2148+
ignore_empty: true,
2149+
uuid: true
2150+
}
2151+
];
21262152
// ID of the subscription to update
21272153
string id = 3 [(validate.rules).string.min_len = 1];
21282154

@@ -2135,12 +2161,23 @@ message UpdateSubscriptionResponse {
21352161
}
21362162

21372163
message ChangeSubscriptionRequest {
2138-
string org_id = 1 [(validate.rules).string.min_len = 3];
2164+
// DEPRECATED: org_id will be inferred from subscription id
2165+
string org_id = 1 [
2166+
deprecated = true,
2167+
(validate.rules).string = {
2168+
ignore_empty: true,
2169+
min_len: 3
2170+
}
2171+
];
2172+
// DEPRECATED: billing_id will be inferred from subscription id
21392173
// ID of the billing account to update the subscription for
2140-
string billing_id = 2 [(validate.rules).string = {
2141-
ignore_empty: true,
2142-
uuid: true
2143-
}];
2174+
string billing_id = 2 [
2175+
deprecated = true,
2176+
(validate.rules).string = {
2177+
ignore_empty: true,
2178+
uuid: true
2179+
}
2180+
];
21442181
// ID of the subscription to update
21452182
string id = 3 [(validate.rules).string.min_len = 1];
21462183

@@ -2175,12 +2212,23 @@ message ChangeSubscriptionResponse {
21752212
}
21762213

21772214
message CancelSubscriptionRequest {
2178-
string org_id = 1 [(validate.rules).string.min_len = 3];
2215+
// DEPRECATED: org_id will be inferred from subscription id
2216+
string org_id = 1 [
2217+
deprecated = true,
2218+
(validate.rules).string = {
2219+
ignore_empty: true,
2220+
min_len: 3
2221+
}
2222+
];
2223+
// DEPRECATED: billing_id will be inferred from subscription id
21792224
// ID of the billing account to update the subscription for
2180-
string billing_id = 2 [(validate.rules).string = {
2181-
ignore_empty: true,
2182-
uuid: true
2183-
}];
2225+
string billing_id = 2 [
2226+
deprecated = true,
2227+
(validate.rules).string = {
2228+
ignore_empty: true,
2229+
uuid: true
2230+
}
2231+
];
21842232
// ID of the subscription to cancel
21852233
string id = 3 [(validate.rules).string.min_len = 1];
21862234

0 commit comments

Comments
 (0)