Skip to content

Commit 532a109

Browse files
authored
Merge pull request #844 from alphauslabs/archera-partner-channel-api
fix(archera/onboarding): add payer account status request + billing group management APIs
2 parents b5bd227 + f71bc37 commit 532a109

2 files changed

Lines changed: 388 additions & 79 deletions

File tree

gc/v1/gc.proto

Lines changed: 67 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,10 @@ service GuaranteedCommitments {
193193
};
194194
}
195195

196-
// WORK-IN-PROGRESS: Retrieves the latest onboarding status for an MSP or a company under an MSP.
197-
// Retrieves the latest onboarding status for an MSP or a company under an MSP.
196+
// WORK-IN-PROGRESS: Retrieves the latest onboarding status for:
197+
// - an MSP
198+
// - a company under an MSP
199+
// - a payer account under an MSP
198200
rpc GetOnboardingStatus(GetOnboardingStatusRequest) returns (GetOnboardingStatusResponse) {
199201
option (google.api.http) = {
200202
post: "/v1/onboarding/status:read"
@@ -223,6 +225,25 @@ service GuaranteedCommitments {
223225
};
224226
}
225227

228+
rpc ListBillingGroups(ListBillingGroupsRequest) returns (ListBillingGroupsResponse) {
229+
option (google.api.http) = {
230+
get: "/v1/managements/billinggroups"
231+
};
232+
}
233+
234+
rpc SetBillingGroupStatus(SetBillingGroupStatusRequest) returns (SetBillingGroupStatusResponse) {
235+
option (google.api.http) = {
236+
post: "/v1/managements/billinggroups/{companyId}"
237+
body: "*"
238+
};
239+
}
240+
241+
rpc GetBillingGroupStatus(GetBillingGroupStatusRequest) returns (GetBillingGroupStatusResponse) {
242+
option (google.api.http) = {
243+
get: "/v1/managements/billinggroups/status"
244+
};
245+
}
246+
226247
rpc ValidateBillingGroup(ValidateBillingGroupRequest) returns (ValidateBillingGroupResponse) {
227248
option (google.api.http) = {
228249
post: "/v1/onboarding/billinggroup:validate"
@@ -453,12 +474,14 @@ message VerifyAwsOnboardingRequest {
453474
}
454475

455476
message GetOnboardingStatusRequest {
456-
457477
// Optional:
458-
// - empty => MSP-level onboarding row (isMsp = true)
459-
// - non-empty => company under MSP (isMsp = false)
478+
// - all empty => MSP-level onboarding row
479+
// - companyId set => company flow
480+
// - payerAccountId set => payer-account flow
481+
// billingGroupId may accompany company flow
460482
string billingGroupId = 1;
461483
string companyId = 2;
484+
string payerAccountId = 3;
462485
}
463486

464487
message ListPayerAccountsRequest {}
@@ -470,6 +493,15 @@ message SetPayerAccountEnabledRequest {
470493

471494
message GetPayerAccountStatusRequest {}
472495

496+
message ListBillingGroupsRequest {}
497+
498+
message SetBillingGroupStatusRequest {
499+
string companyId = 1;
500+
bool enabled = 2;
501+
}
502+
503+
message GetBillingGroupStatusRequest {}
504+
473505
message ValidateBillingGroupRequest {
474506
// Required. Company identifier.
475507
string companyId = 1;
@@ -1168,6 +1200,36 @@ message GetPayerAccountStatusResponse {
11681200
ListPayerAccountsResponse.PayerAccount payerAccount = 1;
11691201
}
11701202

1203+
message ListBillingGroupsResponse {
1204+
enum BillingGroupStatus {
1205+
BILLING_GROUP_STATUS_UNSPECIFIED = 0;
1206+
BILLING_GROUP_STATUS_ENABLED = 1;
1207+
BILLING_GROUP_STATUS_DISABLED = 2;
1208+
}
1209+
1210+
message BillingGroup {
1211+
string companyId = 1;
1212+
string billingGroupId = 2;
1213+
string billingGroupName = 3;
1214+
string payerAccountId = 4;
1215+
string payerAccountName = 5;
1216+
string segmentId = 6;
1217+
BillingGroupStatus status = 7;
1218+
GetOnboardingStatusResponse.OnboardingStatus onboardingStatus = 8;
1219+
repeated VerifyAwsOnboardingResponse.AwsOnboardingFeatureCheck verificationChecks = 9;
1220+
}
1221+
1222+
repeated BillingGroup billingGroups = 1;
1223+
}
1224+
1225+
message SetBillingGroupStatusResponse {
1226+
ListBillingGroupsResponse.BillingGroup billingGroup = 1;
1227+
}
1228+
1229+
message GetBillingGroupStatusResponse {
1230+
ListBillingGroupsResponse.BillingGroup billingGroup = 1;
1231+
}
1232+
11711233
message ValidateBillingGroupResponse {
11721234
// True if the company is allowed to proceed with onboarding; false otherwise.
11731235
bool ok = 1;

0 commit comments

Comments
 (0)