Skip to content
Merged
Show file tree
Hide file tree
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
72 changes: 67 additions & 5 deletions gc/v1/gc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,10 @@ service GuaranteedCommitments {
};
}

// WORK-IN-PROGRESS: Retrieves the latest onboarding status for an MSP or a company under an MSP.
// Retrieves the latest onboarding status for an MSP or a company under an MSP.
// WORK-IN-PROGRESS: Retrieves the latest onboarding status for:
// - an MSP
// - a company under an MSP
// - a payer account under an MSP
rpc GetOnboardingStatus(GetOnboardingStatusRequest) returns (GetOnboardingStatusResponse) {
option (google.api.http) = {
post: "/v1/onboarding/status:read"
Expand Down Expand Up @@ -223,6 +225,25 @@ service GuaranteedCommitments {
};
}

rpc ListBillingGroups(ListBillingGroupsRequest) returns (ListBillingGroupsResponse) {
option (google.api.http) = {
get: "/v1/managements/billinggroups"
};
}

rpc SetBillingGroupStatus(SetBillingGroupStatusRequest) returns (SetBillingGroupStatusResponse) {
option (google.api.http) = {
post: "/v1/managements/billinggroups/{companyId}"
body: "*"
};
}

rpc GetBillingGroupStatus(GetBillingGroupStatusRequest) returns (GetBillingGroupStatusResponse) {
option (google.api.http) = {
get: "/v1/managements/billinggroups/status"
};
}

rpc ValidateBillingGroup(ValidateBillingGroupRequest) returns (ValidateBillingGroupResponse) {
option (google.api.http) = {
post: "/v1/onboarding/billinggroup:validate"
Expand Down Expand Up @@ -453,12 +474,14 @@ message VerifyAwsOnboardingRequest {
}

message GetOnboardingStatusRequest {

// Optional:
// - empty => MSP-level onboarding row (isMsp = true)
// - non-empty => company under MSP (isMsp = false)
// - all empty => MSP-level onboarding row
// - companyId set => company flow
// - payerAccountId set => payer-account flow
// billingGroupId may accompany company flow
string billingGroupId = 1;
string companyId = 2;
string payerAccountId = 3;
}

message ListPayerAccountsRequest {}
Expand All @@ -470,6 +493,15 @@ message SetPayerAccountEnabledRequest {

message GetPayerAccountStatusRequest {}

message ListBillingGroupsRequest {}

message SetBillingGroupStatusRequest {
string companyId = 1;
bool enabled = 2;
}

message GetBillingGroupStatusRequest {}

message ValidateBillingGroupRequest {
// Required. Company identifier.
string companyId = 1;
Expand Down Expand Up @@ -1168,6 +1200,36 @@ message GetPayerAccountStatusResponse {
ListPayerAccountsResponse.PayerAccount payerAccount = 1;
}

message ListBillingGroupsResponse {
enum BillingGroupStatus {
BILLING_GROUP_STATUS_UNSPECIFIED = 0;
BILLING_GROUP_STATUS_ENABLED = 1;
BILLING_GROUP_STATUS_DISABLED = 2;
}

message BillingGroup {
string companyId = 1;
string billingGroupId = 2;
string billingGroupName = 3;
string payerAccountId = 4;
string payerAccountName = 5;
string segmentId = 6;
BillingGroupStatus status = 7;
GetOnboardingStatusResponse.OnboardingStatus onboardingStatus = 8;
repeated VerifyAwsOnboardingResponse.AwsOnboardingFeatureCheck verificationChecks = 9;
}

repeated BillingGroup billingGroups = 1;
}

message SetBillingGroupStatusResponse {
ListBillingGroupsResponse.BillingGroup billingGroup = 1;
}

message GetBillingGroupStatusResponse {
ListBillingGroupsResponse.BillingGroup billingGroup = 1;
}

message ValidateBillingGroupResponse {
// True if the company is allowed to proceed with onboarding; false otherwise.
bool ok = 1;
Expand Down
Loading
Loading