Skip to content

Commit

Permalink
feat(frontier): allow cancel of upcoming subscription change
Browse files Browse the repository at this point in the history
Signed-off-by: Kush Sharma <[email protected]>
  • Loading branch information
kushsharma committed Feb 20, 2024
1 parent 2320f67 commit c540cf8
Showing 1 changed file with 36 additions and 15 deletions.
51 changes: 36 additions & 15 deletions raystack/frontier/v1beta1/frontier.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1673,7 +1673,7 @@ message CreateBillingAccountRequest {
// ID of the organization to create the billing account for
string org_id = 1 [(validate.rules).string.min_len = 1];
// Billing account to create.
BillingAccountRequestBody body = 2;
BillingAccountRequestBody body = 2 [(validate.rules).message.required = true];
}

message CreateBillingAccountResponse {
Expand Down Expand Up @@ -1818,8 +1818,29 @@ message ChangeSubscriptionRequest {
string id = 3 [(validate.rules).string.min_len = 1];

// plan to change to
string plan = 4;
bool immediate = 5;
// deprecated in favor of plan_change
string plan = 4 [deprecated = true];

// should the change be immediate or at the end of the current billing period
// deprecated in favor of plan_change
bool immediate = 5 [deprecated = true];

message PlanChange {
// plan to change to
string plan = 1;

// should the change be immediate or at the end of the current billing period
bool immediate = 2;
}
message PhaseChange {
// should the upcoming changes be cancelled
bool cancel_upcoming_changes = 1;
}

oneof change {
PlanChange plan_change = 6;
PhaseChange phase_change = 7;
}
}

message ChangeSubscriptionResponse {
Expand Down Expand Up @@ -1893,7 +1914,7 @@ message ListCheckoutsResponse {
message ProductRequestBody {
reserved 7;

string name = 1;
string name = 1 [(validate.rules).string.min_len = 3];
string title = 2;
string description = 3;
string plan_id = 4;
Expand All @@ -1907,7 +1928,7 @@ message ProductRequestBody {

message CreateProductRequest {
// Product to create
ProductRequestBody body = 1;
ProductRequestBody body = 1 [(validate.rules).message.required = true];
}

message CreateProductResponse {
Expand Down Expand Up @@ -1967,7 +1988,7 @@ message PlanRequestBody {

message CreatePlanRequest {
// Plan to create
PlanRequestBody body = 1;
PlanRequestBody body = 1 [(validate.rules).message.required = true];
}

message CreatePlanResponse {
Expand Down Expand Up @@ -2347,7 +2368,7 @@ message ServiceUserRequestBody {
}

message CreateServiceUserRequest {
ServiceUserRequestBody body = 1;
ServiceUserRequestBody body = 1 [(validate.rules).message.required = true];
string org_id = 2 [
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The organization ID to which the service user belongs to."}
Expand Down Expand Up @@ -2460,7 +2481,7 @@ message ListOrganizationGroupsResponse {
}

message CreateOrganizationRoleRequest {
RoleRequestBody body = 1;
RoleRequestBody body = 1 [(validate.rules).message.required = true];
string org_id = 2 [
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The organization ID to which the role belongs to."}
Expand Down Expand Up @@ -2546,7 +2567,7 @@ message ListOrganizationsResponse {
}

message CreateOrganizationRequest {
OrganizationRequestBody body = 1;
OrganizationRequestBody body = 1 [(validate.rules).message.required = true];
}

message CreateOrganizationResponse {
Expand Down Expand Up @@ -2805,7 +2826,7 @@ message ProjectRequestBody {
}

message CreateProjectRequest {
ProjectRequestBody body = 1;
ProjectRequestBody body = 1 [(validate.rules).message.required = true];
}

message CreateProjectResponse {
Expand Down Expand Up @@ -2961,7 +2982,7 @@ message GetNamespaceResponse {
}

message CreatePolicyRequest {
PolicyRequestBody body = 1;
PolicyRequestBody body = 1 [(validate.rules).message.required = true];
}

message CreatePolicyResponse {
Expand Down Expand Up @@ -3016,7 +3037,7 @@ message RelationRequestBody {
}

message CreateRelationRequest {
RelationRequestBody body = 1;
RelationRequestBody body = 1 [(validate.rules).message.required = true];
}

message CreateRelationResponse {
Expand Down Expand Up @@ -3054,7 +3075,7 @@ message GroupRequestBody {
}

message CreateGroupRequest {
GroupRequestBody body = 1;
GroupRequestBody body = 1 [(validate.rules).message.required = true];
string org_id = 2 [
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The organization ID to which the group belongs to."}
Expand Down Expand Up @@ -3183,7 +3204,7 @@ message ResourceRequestBody {
}

message CreateProjectResourceRequest {
ResourceRequestBody body = 1;
ResourceRequestBody body = 1 [(validate.rules).message.required = true];
// project uuid or name
string project_id = 2;
string id = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Autogenerated if skipped."}];
Expand Down Expand Up @@ -3281,7 +3302,7 @@ message MetaSchemaRequestBody {
}

message CreateMetaSchemaRequest {
MetaSchemaRequestBody body = 1;
MetaSchemaRequestBody body = 1 [(validate.rules).message.required = true];
}

message CreateMetaSchemaResponse {
Expand Down

0 comments on commit c540cf8

Please sign in to comment.