From 31ca597fbdcdc9d038d775bceec6f1f12fc68481 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Mon, 29 Apr 2024 14:58:21 +0530 Subject: [PATCH 1/3] feat(frontier): add rpc to get billing account portal url --- raystack/frontier/v1beta1/frontier.proto | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/raystack/frontier/v1beta1/frontier.proto b/raystack/frontier/v1beta1/frontier.proto index 3b550f6e..b765be47 100644 --- a/raystack/frontier/v1beta1/frontier.proto +++ b/raystack/frontier/v1beta1/frontier.proto @@ -1460,6 +1460,15 @@ service FrontierService { }; } + rpc GetBillingAccountPortalURL(GetBillingAccountPortalURLRequest) returns (GetBillingAccountPortalURLResponse) { + option (google.api.http) = {get: "/v1beta1/organizations/{org_id}/billing/{id}/portal"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "Billing"; + summary: "Get billing account portal URL"; + description: "Get a billing account portal url by ID."; + }; + } + rpc GetBillingBalance(GetBillingBalanceRequest) returns (GetBillingBalanceResponse) { option (google.api.http) = {get: "/v1beta1/organizations/{org_id}/billing/{id}/balance"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -1832,6 +1841,19 @@ message DeleteBillingAccountRequest { message DeleteBillingAccountResponse {} +message GetBillingAccountPortalURLRequest { + // ID of the billing account to get + string id = 1 [(validate.rules).string.min_len = 1]; + + string org_id = 2 [(validate.rules).string.min_len = 1]; + + string return_url = 3; +} + +message GetBillingAccountPortalURLResponse { + string url = 1; +} + message GetBillingBalanceRequest { // ID of the billing account to get the balance for string id = 1 [(validate.rules).string.uuid = true]; From 0f75c731995c223aabc133b54329f14c2a4f4823 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Tue, 30 Apr 2024 11:10:29 +0530 Subject: [PATCH 2/3] Revert "feat(frontier): add rpc to get billing account portal url" This reverts commit 31ca597fbdcdc9d038d775bceec6f1f12fc68481. --- raystack/frontier/v1beta1/frontier.proto | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/raystack/frontier/v1beta1/frontier.proto b/raystack/frontier/v1beta1/frontier.proto index b765be47..3b550f6e 100644 --- a/raystack/frontier/v1beta1/frontier.proto +++ b/raystack/frontier/v1beta1/frontier.proto @@ -1460,15 +1460,6 @@ service FrontierService { }; } - rpc GetBillingAccountPortalURL(GetBillingAccountPortalURLRequest) returns (GetBillingAccountPortalURLResponse) { - option (google.api.http) = {get: "/v1beta1/organizations/{org_id}/billing/{id}/portal"}; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - tags: "Billing"; - summary: "Get billing account portal URL"; - description: "Get a billing account portal url by ID."; - }; - } - rpc GetBillingBalance(GetBillingBalanceRequest) returns (GetBillingBalanceResponse) { option (google.api.http) = {get: "/v1beta1/organizations/{org_id}/billing/{id}/balance"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -1841,19 +1832,6 @@ message DeleteBillingAccountRequest { message DeleteBillingAccountResponse {} -message GetBillingAccountPortalURLRequest { - // ID of the billing account to get - string id = 1 [(validate.rules).string.min_len = 1]; - - string org_id = 2 [(validate.rules).string.min_len = 1]; - - string return_url = 3; -} - -message GetBillingAccountPortalURLResponse { - string url = 1; -} - message GetBillingBalanceRequest { // ID of the billing account to get the balance for string id = 1 [(validate.rules).string.uuid = true]; From acaad106cbc6ee1517eab2eecf8337b5c2d690ec Mon Sep 17 00:00:00 2001 From: Rishabh Date: Tue, 30 Apr 2024 11:13:43 +0530 Subject: [PATCH 3/3] feat: add customer_portal field to CheckoutSetupBody --- raystack/frontier/v1beta1/models.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/raystack/frontier/v1beta1/models.proto b/raystack/frontier/v1beta1/models.proto index 5533be6f..8a96bc3d 100644 --- a/raystack/frontier/v1beta1/models.proto +++ b/raystack/frontier/v1beta1/models.proto @@ -899,4 +899,5 @@ message CheckoutProductBody { message CheckoutSetupBody { bool payment_method = 1; + bool customer_portal = 2; }