Skip to content

Commit

Permalink
feat(frontier): max limit of product seat in plan (#333)
Browse files Browse the repository at this point in the history
Signed-off-by: Kush Sharma <[email protected]>
  • Loading branch information
kushsharma authored Jan 19, 2024
1 parent 0e8def5 commit 88e0eb6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 7 additions & 1 deletion raystack/frontier/v1beta1/frontier.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,9 @@ message ListSubscriptionsRequest {
string org_id = 1 [(validate.rules).string.min_len = 3];
// ID of the billing account to list subscriptions for
string billing_id = 2 [(validate.rules).string.min_len = 1];

// Filter subscriptions by state
string state = 3;
}

message ListSubscriptionsResponse {
Expand Down Expand Up @@ -1848,14 +1851,16 @@ message ListCheckoutsResponse {
}

message ProductRequestBody {
reserved 7;

string name = 1;
string title = 2;
string description = 3;
string plan_id = 4;
repeated Price prices = 5;
int64 credit_amount = 7;
string behavior = 8;
repeated Feature features = 9;
Product.BehaviorConfig behavior_config = 10;

google.protobuf.Struct metadata = 20;
}
Expand Down Expand Up @@ -1906,6 +1911,7 @@ message PlanRequestBody {

repeated Product products = 4;
string interval = 5; // known intervals are "day", "week", "month", and "year"
int64 on_start_credits = 6;

google.protobuf.Struct metadata = 20;
}
Expand Down
9 changes: 8 additions & 1 deletion raystack/frontier/v1beta1/models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -621,13 +621,20 @@ message Plan {
string description = 4;
repeated Product products = 5;
string interval = 6; // known intervals are "day", "week", "month", and "year"
int64 on_start_credits = 7;

google.protobuf.Struct metadata = 20;
google.protobuf.Timestamp created_at = 21;
google.protobuf.Timestamp updated_at = 22;
}

message Product {
reserved 8;
message BehaviorConfig {
int64 credit_amount = 1;
int64 seat_limit = 2;
}

string id = 1;
string name = 2;
string title = 3;
Expand All @@ -636,9 +643,9 @@ message Product {
string state = 6;

repeated Price prices = 7;
int64 credit_amount = 8;
string behavior = 9;
repeated Feature features = 10;
BehaviorConfig behavior_config = 11;

google.protobuf.Struct metadata = 20;
google.protobuf.Timestamp created_at = 21;
Expand Down

0 comments on commit 88e0eb6

Please sign in to comment.