Skip to content

Commit 80fc5ba

Browse files
refactor(proto): deprecate billing_id in transaction and invoice RPCs (#437)
Deprecate billing_id parameter in 4 RPCs: - ListBillingTransactionsRequest - TotalDebitedTransactionsRequest (BREAKING: changed from required to optional) - ListInvoicesRequest - GetUpcomingInvoiceRequest Backend will infer billing_id from org_id since each organization has only one active billing account.
1 parent d7ccfee commit 80fc5ba

File tree

1 file changed

+32
-19
lines changed

1 file changed

+32
-19
lines changed

raystack/frontier/v1beta1/frontier.proto

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2048,11 +2048,14 @@ message CreateBillingUsageResponse {}
20482048

20492049
message ListBillingTransactionsRequest {
20502050
string org_id = 1 [(validate.rules).string.min_len = 3];
2051-
// ID of the billing account to update the subscription for
2052-
string billing_id = 2 [(validate.rules).string = {
2053-
ignore_empty: true,
2054-
uuid: true
2055-
}];
2051+
// DEPRECATED: billing_id will be inferred from org_id
2052+
string billing_id = 2 [
2053+
deprecated = true,
2054+
(validate.rules).string = {
2055+
ignore_empty: true,
2056+
uuid: true
2057+
}
2058+
];
20562059

20572060
google.protobuf.Timestamp since = 3 [deprecated=true];
20582061
google.protobuf.Timestamp start_range = 4;
@@ -2068,10 +2071,14 @@ message ListBillingTransactionsResponse {
20682071

20692072
message TotalDebitedTransactionsRequest {
20702073
string org_id = 1 [(validate.rules).string.min_len = 3];
2071-
// ID of the billing account
2072-
string billing_id = 2 [(validate.rules).string = {
2073-
uuid: true
2074-
}];
2074+
// DEPRECATED: billing_id will be inferred from org_id
2075+
string billing_id = 2 [
2076+
deprecated = true,
2077+
(validate.rules).string = {
2078+
ignore_empty: true,
2079+
uuid: true
2080+
}
2081+
];
20752082
}
20762083

20772084
message TotalDebitedTransactionsResponse {
@@ -2510,11 +2517,14 @@ message UpdatePlanResponse {
25102517

25112518
message ListInvoicesRequest {
25122519
string org_id = 1 [(validate.rules).string.min_len = 3];
2513-
// ID of the billing account to list invoices for
2514-
string billing_id = 2 [(validate.rules).string = {
2515-
ignore_empty: true,
2516-
uuid: true
2517-
}];
2520+
// DEPRECATED: billing_id will be inferred from org_id
2521+
string billing_id = 2 [
2522+
deprecated = true,
2523+
(validate.rules).string = {
2524+
ignore_empty: true,
2525+
uuid: true
2526+
}
2527+
];
25182528

25192529
bool nonzero_amount_only = 3;
25202530

@@ -2528,11 +2538,14 @@ message ListInvoicesResponse {
25282538

25292539
message GetUpcomingInvoiceRequest {
25302540
string org_id = 1 [(validate.rules).string.min_len = 3];
2531-
// ID of the billing account to get the upcoming invoice for
2532-
string billing_id = 2 [(validate.rules).string = {
2533-
ignore_empty: true,
2534-
uuid: true
2535-
}];
2541+
// DEPRECATED: billing_id will be inferred from org_id
2542+
string billing_id = 2 [
2543+
deprecated = true,
2544+
(validate.rules).string = {
2545+
ignore_empty: true,
2546+
uuid: true
2547+
}
2548+
];
25362549
}
25372550

25382551
message GetUpcomingInvoiceResponse {

0 commit comments

Comments
 (0)