From 040cda03b4d7c85e895232a3b7cd366eb5f7bdea Mon Sep 17 00:00:00 2001 From: Kush Sharma Date: Thu, 19 Sep 2024 21:37:53 +0530 Subject: [PATCH] feat(frontier): billing account credit min limit Negative number works as overdraft Signed-off-by: Kush Sharma --- raystack/frontier/v1beta1/admin.proto | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/raystack/frontier/v1beta1/admin.proto b/raystack/frontier/v1beta1/admin.proto index d5f2e6a2..3bbbc99e 100644 --- a/raystack/frontier/v1beta1/admin.proto +++ b/raystack/frontier/v1beta1/admin.proto @@ -412,6 +412,19 @@ service AdminService { description: "List all webhooks."; }; } + + // Billing Account + rpc UpdateBillingAccountLimits(UpdateBillingAccountLimitsRequest) returns (UpdateBillingAccountLimitsResponse) { + option (google.api.http) = { + put: "/v1beta1/admin/billing/accounts/{id}/limits", + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "Billing"; + summary: "Update billing account limits"; + description: "Update billing account limits."; + }; + } } message ListAllUsersRequest { @@ -771,3 +784,14 @@ message ListWebhooksRequest {} message ListWebhooksResponse { repeated Webhook webhooks = 1; } + +message UpdateBillingAccountLimitsRequest { + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // credit_min is the minimum credit limit for the billing account + // default is 0, negative numbers work as overdraft, positive + // numbers work as minimum purchase limit + int64 credit_min = 2; +} + +message UpdateBillingAccountLimitsResponse {} \ No newline at end of file