diff --git a/src/PrintOne.ts b/src/PrintOne.ts index f928c54..ea78677 100644 --- a/src/PrintOne.ts +++ b/src/PrintOne.ts @@ -436,7 +436,7 @@ export class PrintOne { templates?: InFilter; format?: InFilter; status?: InFilter; - isBillable?: InFilter; + isBillable?: boolean; }; } = {}, ): Promise> { diff --git a/test/PrintOne.spec.ts b/test/PrintOne.spec.ts index a631fd1..385d370 100644 --- a/test/PrintOne.spec.ts +++ b/test/PrintOne.spec.ts @@ -1562,6 +1562,28 @@ describe("getBatches", function () { expect(batch.billingId).toEqual("test"); }); + it("should apply the isBillable filter", async function () { + // arrange + + // act + const batches = await client.getBatches({ + limit: 1, + filter: { + isBillable: true, + }, + }); + const batch = batches.data[0]; + + if (batch === undefined) { + console.warn("No orders found, skipping test"); + return; + } + + // assert + expect(batch).toBeDefined(); + expect(batch.isBillable).toEqual(true); + }); + it("should apply the name filter", async function () { // arrange const batchName = (await client.getBatches()).data[1]?.name ?? "test";