Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
234 changes: 26 additions & 208 deletions raystack/frontier/v1beta1/frontier.proto
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,7 @@ message UpdateBillingAccountRequest {
// ID of the billing account to update
string id = 1 [(buf.validate.field).string.uuid = true];

string org_id = 2 [
deprecated = true,
(buf.validate.field).string.min_len = 1
]; // DEPRECATED: org_id will be inferred from billing account id
reserved 2;

// Billing account to update.
BillingAccountRequestBody body = 3;
Expand All @@ -467,10 +464,7 @@ message RegisterBillingAccountRequest {
// ID of the billing account to register
string id = 1 [(buf.validate.field).string.uuid = true];

string org_id = 2 [
deprecated = true,
(buf.validate.field).string.min_len = 1
]; // DEPRECATED: org_id will be inferred from billing account id
reserved 2;
}

message RegisterBillingAccountResponse {}
Expand All @@ -491,32 +485,23 @@ message DeleteBillingAccountRequest {
// ID of the billing account to delete
string id = 1 [(buf.validate.field).string.uuid = true];

string org_id = 2 [
deprecated = true,
(buf.validate.field).string.min_len = 1
]; // DEPRECATED: org_id will be inferred from billing account id
reserved 2;
}

message DeleteBillingAccountResponse {}

message EnableBillingAccountRequest {
// ID of the billing account to enable
string id = 1 [(buf.validate.field).string.uuid = true];
string org_id = 2 [
deprecated = true,
(buf.validate.field).string.min_len = 1
]; // DEPRECATED: org_id will be inferred from billing account id
reserved 2;
}

message EnableBillingAccountResponse {}

message DisableBillingAccountRequest {
// ID of the billing account to disable
string id = 1 [(buf.validate.field).string.uuid = true];
string org_id = 2 [
deprecated = true,
(buf.validate.field).string.min_len = 1
]; // DEPRECATED: org_id will be inferred from billing account id
reserved 2;
}

message DisableBillingAccountResponse {}
Expand All @@ -525,10 +510,7 @@ message GetBillingBalanceRequest {
// ID of the billing account to get the balance for
string id = 1 [(buf.validate.field).string.uuid = true];

string org_id = 2 [
deprecated = true,
(buf.validate.field).string.min_len = 1
]; // DEPRECATED: org_id will be inferred from billing account id
reserved 2;
}

message GetBillingBalanceResponse {
Expand All @@ -537,16 +519,7 @@ message GetBillingBalanceResponse {
}

message HasTrialedRequest {
// ID of the billing account to check
string id = 1 [
deprecated = true,
(buf.validate.field).string.uuid = true
]; // DEPRECATED: billing_id will be inferred from plan_id

string org_id = 2 [
deprecated = true,
(buf.validate.field).string.min_len = 1
]; // DEPRECATED: org_id will be inferred from plan_id
reserved 1, 2;

// ID of the plan to check
string plan_id = 3 [(buf.validate.field).string.min_len = 1];
Expand All @@ -559,17 +532,7 @@ message HasTrialedResponse {

message CreateBillingUsageRequest {
string org_id = 1;
// DEPRECATED: billing_id will be inferred from org_id
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];

// DEPRECATED
string project_id = 4 [deprecated = true];
reserved 2, 4;

// Usage to create
repeated Usage usages = 3;
Expand All @@ -579,16 +542,8 @@ message CreateBillingUsageResponse {}

message ListBillingTransactionsRequest {
string org_id = 1 [(buf.validate.field).string.min_len = 3];
// DEPRECATED: billing_id will be inferred from org_id
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];
reserved 2, 3;

google.protobuf.Timestamp since = 3 [deprecated = true];
google.protobuf.Timestamp start_range = 4;
google.protobuf.Timestamp end_range = 5;

Expand All @@ -602,14 +557,7 @@ message ListBillingTransactionsResponse {

message TotalDebitedTransactionsRequest {
string org_id = 1 [(buf.validate.field).string.min_len = 3];
// DEPRECATED: billing_id will be inferred from org_id
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];
reserved 2;
}

message TotalDebitedTransactionsResponse {
Expand All @@ -618,23 +566,8 @@ message TotalDebitedTransactionsResponse {
}

message GetSubscriptionRequest {
// DEPRECATED: org_id will be inferred from subscription id
string org_id = 1 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {min_len: 3}
}
];
// DEPRECATED: billing_id will be inferred from subscription id
// ID of the billing account to get the subscription for
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];
reserved 1, 2;

// ID of the subscription to get
string id = 3 [(buf.validate.field).string.min_len = 1];

Expand All @@ -647,15 +580,7 @@ message GetSubscriptionResponse {

message ListSubscriptionsRequest {
string org_id = 1 [(buf.validate.field).string.min_len = 3];
// DEPRECATED: billing_id will be inferred from org_id
// ID of the billing account to list subscriptions for
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];
reserved 2;

// Filter subscriptions by state
string state = 3;
Expand All @@ -670,23 +595,8 @@ message ListSubscriptionsResponse {
}

message UpdateSubscriptionRequest {
// DEPRECATED: org_id will be inferred from subscription id
string org_id = 1 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {min_len: 3}
}
];
// DEPRECATED: billing_id will be inferred from subscription id
// ID of the billing account to update the subscription for
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];
reserved 1, 2;

// ID of the subscription to update
string id = 3 [(buf.validate.field).string.min_len = 1];

Expand All @@ -699,34 +609,11 @@ message UpdateSubscriptionResponse {
}

message ChangeSubscriptionRequest {
// DEPRECATED: org_id will be inferred from subscription id
string org_id = 1 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {min_len: 3}
}
];
// DEPRECATED: billing_id will be inferred from subscription id
// ID of the billing account to update the subscription for
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];
reserved 1, 2, 4, 5;

// ID of the subscription to update
string id = 3 [(buf.validate.field).string.min_len = 1];

// plan to change to
// 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;
Expand All @@ -750,23 +637,8 @@ message ChangeSubscriptionResponse {
}

message CancelSubscriptionRequest {
// DEPRECATED: org_id will be inferred from subscription id
string org_id = 1 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {min_len: 3}
}
];
// DEPRECATED: billing_id will be inferred from subscription id
// ID of the billing account to update the subscription for
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];
reserved 1, 2;

// ID of the subscription to cancel
string id = 3 [(buf.validate.field).string.min_len = 1];

Expand All @@ -784,17 +656,7 @@ message ListPlansResponse {

message CheckFeatureEntitlementRequest {
string org_id = 1;
// DEPRECATED: billing_id will be inferred from org_id
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];

// DEPRECATED
string project_id = 4 [deprecated = true];
reserved 2, 4;

// feature or product name
string feature = 3 [(buf.validate.field).string.min_len = 1];
Expand All @@ -815,15 +677,7 @@ message CheckCreditEntitlementResponse {

message CreateCheckoutRequest {
string org_id = 1 [(buf.validate.field).string.min_len = 3];
// DEPRECATED: billing_id will be inferred from org_id
// ID of the billing account to update the subscription for
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];
reserved 2;

string success_url = 3;
string cancel_url = 4;
Expand All @@ -843,15 +697,7 @@ message CreateCheckoutResponse {

message ListCheckoutsRequest {
string org_id = 1 [(buf.validate.field).string.min_len = 3];
// DEPRECATED: billing_id will be inferred from org_id
// ID of the billing account to get the subscriptions for
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];
reserved 2;
}

message ListCheckoutsResponse {
Expand All @@ -860,22 +706,8 @@ message ListCheckoutsResponse {
}

message GetCheckoutRequest {
// DEPRECATED: org_id is not needed, checkout can be fetched by id alone
string org_id = 1 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {min_len: 3}
}
];
// DEPRECATED: billing_id is not needed, checkout can be fetched by id alone
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];
reserved 1, 2;

// ID of the checkout to get
string id = 3 [(buf.validate.field).string.min_len = 1];
}
Expand Down Expand Up @@ -1052,14 +884,7 @@ message UpdatePlanResponse {

message ListInvoicesRequest {
string org_id = 1 [(buf.validate.field).string.min_len = 3];
// DEPRECATED: billing_id will be inferred from org_id
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];
reserved 2;

bool nonzero_amount_only = 3;

Expand All @@ -1073,14 +898,7 @@ message ListInvoicesResponse {

message GetUpcomingInvoiceRequest {
string org_id = 1 [(buf.validate.field).string.min_len = 3];
// DEPRECATED: billing_id will be inferred from org_id
string billing_id = 2 [
deprecated = true,
(buf.validate.field) = {
ignore: IGNORE_IF_ZERO_VALUE
string: {uuid: true}
}
];
reserved 2;
}

message GetUpcomingInvoiceResponse {
Expand Down
Loading