feat: invoice checkout mode

This commit is contained in:
John Yeo
2025-08-14 15:54:18 -07:00
parent 73349a32a5
commit f3ef6e1596
50 changed files with 1213 additions and 192 deletions

View File

@@ -45,7 +45,7 @@ const testCase = "addOn1";
describe(`${chalk.yellowBright(`${testCase}: Testing free add on, and updating free add on`)}`, () => {
let customerId = testCase;
let autumn: AutumnInt = new AutumnInt({ version: APIVersion.v1_4 });
let autumn: AutumnInt = new AutumnInt({ version: APIVersion.v1_2 });
let testClockId: string;
let db: DrizzleCli, org: Organization, env: AppEnv;
let stripeCli: Stripe;
@@ -112,7 +112,7 @@ describe(`${chalk.yellowBright(`${testCase}: Testing free add on, and updating f
const customer = await autumn.customers.get(customerId);
expect(customer.products.length).to.equal(2);
expect(customer.products.length).to.equal(3);
expectProductAttached({
customer,
product: addOn,
@@ -124,7 +124,7 @@ describe(`${chalk.yellowBright(`${testCase}: Testing free add on, and updating f
});
const customItems = replaceItems({
items: pro.items,
items: addOn.items,
featureId: TestFeature.Messages,
newItem: constructFeatureItem({
featureId: TestFeature.Messages,
@@ -149,7 +149,7 @@ describe(`${chalk.yellowBright(`${testCase}: Testing free add on, and updating f
const customer = await autumn.customers.get(customerId);
expect(customer.products.length).to.equal(2);
expect(customer.products.length).to.equal(3);
expectProductAttached({
customer,
product: addOn,