diff --git a/src/PrintOne.ts b/src/PrintOne.ts index 3547350..78b8e6e 100644 --- a/src/PrintOne.ts +++ b/src/PrintOne.ts @@ -411,6 +411,7 @@ export class PrintOne { templateId: templateId, finish: data.finish, ready: ready ? ready : null, + sender: data.sender, }); return new Batch(this.protected, response); diff --git a/src/models/Batch.ts b/src/models/Batch.ts index bb1434d..18ea920 100644 --- a/src/models/Batch.ts +++ b/src/models/Batch.ts @@ -17,6 +17,7 @@ export type CreateBatch = { template: string | Template; finish: Finish; ready?: Date | boolean; + sender: Address; }; export type CreateBatchOrder = { diff --git a/test/Batch.spec.ts b/test/Batch.spec.ts index d67823d..fd1dca5 100644 --- a/test/Batch.spec.ts +++ b/test/Batch.spec.ts @@ -1,4 +1,5 @@ import { + Address, Batch, CreateBatchCsvOrder, CsvOrder, @@ -17,6 +18,14 @@ import { sleep } from "../src/utils"; let batch: Batch = null as unknown as Batch; let template: Template = null as unknown as Template; +const address: Address = { + name: "Jane Doe", + address: "123 Main Street", + postalCode: "1234 AB", + city: "Somecity", + country: "NL", +}; + beforeAll(async function () { template = await client.createTemplate({ name: `Test Order ${new Date().toISOString().replaceAll(":", "-")}`, @@ -31,6 +40,7 @@ beforeEach(async function () { template: template, name: `Test Batch ${new Date().toISOString().replaceAll(":", "-")}`, finish: Finish.GLOSSY, + sender: address, }); }); @@ -347,6 +357,7 @@ describe("getOrder", function () { template: template, name: `Test Batch ${new Date().toISOString().replaceAll(":", "-")}`, finish: Finish.GLOSSY, + sender: address, }); const order = await batch2.createOrder({ recipient: {