Skip to content

Commit

Permalink
feat(frontier): change subscribed plan of a billing customer
Browse files Browse the repository at this point in the history
Signed-off-by: Kush Sharma <[email protected]>
  • Loading branch information
kushsharma committed Jan 21, 2024
1 parent 88e0eb6 commit 17cf4f5
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions raystack/frontier/v1beta1/frontier.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,18 @@ service FrontierService {
};
}

rpc ChangeSubscription(ChangeSubscriptionRequest) returns (ChangeSubscriptionResponse) {
option (google.api.http) = {
post: "/v1beta1/organizations/{org_id}/billing/{billing_id}/subscriptions/{id}/change",
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Subscription";
summary: "Change subscription plan";
description: "Change a subscription plan by ID.";
};
}

rpc UpdateSubscription(UpdateSubscriptionRequest) returns (UpdateSubscriptionResponse) {
option (google.api.http) = {
put: "/v1beta1/organizations/{org_id}/billing/{billing_id}/subscriptions/{id}",
Expand Down Expand Up @@ -1788,6 +1800,22 @@ message UpdateSubscriptionResponse {
Subscription subscription = 1;
}

message ChangeSubscriptionRequest {
string org_id = 1 [(validate.rules).string.min_len = 3];
// ID of the billing account to update the subscription for
string billing_id = 2 [(validate.rules).string.min_len = 1];
// ID of the subscription to update
string id = 3 [(validate.rules).string.min_len = 1];

// plan to change to
string plan = 4;
bool immediate = 5;
}

message ChangeSubscriptionResponse {

}

message CancelSubscriptionRequest {
string org_id = 1 [(validate.rules).string.min_len = 3];
// ID of the billing account to update the subscription for
Expand Down

0 comments on commit 17cf4f5

Please sign in to comment.