Adjusted Per seat billing and added example to the sample schema

This commit is contained in:
giancarlo
2024-04-22 22:48:02 +08:00
parent b96d4cf855
commit 70da6ef1fa
19 changed files with 2190 additions and 2066 deletions

View File

@@ -242,7 +242,11 @@ export class TeamBillingService {
}> = [];
for (const lineItem of lineItems) {
if (lineItem.type === 'per-seat') {
// check if the line item is a per seat type
const isPerSeat = lineItem.type === 'per_seat';
if (isPerSeat) {
// get the current number of members in the account
const quantity = await this.getCurrentMembersCount(accountId);
const item = {
@@ -254,6 +258,7 @@ export class TeamBillingService {
}
}
// set initial quantity for the line items
return variantQuantities;
}