Skip to content

Commit

Permalink
feat(frontier): billing account credit min limit
Browse files Browse the repository at this point in the history
Negative number works as overdraft

Signed-off-by: Kush Sharma <[email protected]>
  • Loading branch information
kushsharma committed Sep 19, 2024
1 parent 7f50778 commit 262f5e9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions raystack/frontier/v1beta1/admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,19 @@ service AdminService {
description: "List all webhooks.";
};
}

// Billing Account
rpc UpdateBillingAccountLimits(UpdateBillingAccountLimitsRequest) returns (UpdateBillingAccountLimitsResponse) {
option (google.api.http) = {
put: "/v1beta1/admin/organizations/{org_id}/billing/{billing_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 {
Expand Down Expand Up @@ -771,3 +784,18 @@ message ListWebhooksRequest {}
message ListWebhooksResponse {
repeated Webhook webhooks = 1;
}

message UpdateBillingAccountLimitsRequest {
string org_id = 1 [(validate.rules).string = {min_len: 3}];
string billing_id = 2 [(validate.rules).string = {
ignore_empty: true,
uuid: true
}];

// 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 = 3;
}

message UpdateBillingAccountLimitsResponse {}

0 comments on commit 262f5e9

Please sign in to comment.