diff --git a/docs/Batch.md b/docs/Batch.md new file mode 100644 index 0000000..d5a8c06 --- /dev/null +++ b/docs/Batch.md @@ -0,0 +1,164 @@ +Contains all information about a given Batch + +# Fields + +| Name | Type | Description | +| ---------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | `string` | The ID of the batch. | +| `companyId` | `string` | The ID of the company the batch belongs to. | +| `Name` | `string` | The name of the batch. | +| `billingId` | `string` \| `undefined` | The ID assigned to the batch by the customer. | +| `finish` | `string` | The finish of the batch. Can be `GLOSSY` or `MATT`. | +| `isBillable` | `boolean` | Whether the batch is billable. True when an live API key is used, false when a test API key is used. | +| `templateId` | `string` | The ID of the template the batch is based on. | +| `estimatedPrice` | `number` | The estimated price of the batch. | +| `status` | `string` | The status of the batch. Can be `batch_created`, `batch_needs_approval`, `batch_user_ready`, `batch_ready_to_schedule`, `batch_scheduling`, `batch_scheduled` or `batch_sent` | +| `orders` | `object` | An object containing the orders of the batch. With keys 'processing', 'success', 'failed' and 'cancelled' | +| `createdAt` | `string` | The date the batch was created. | +| `updatedAt` | `string` | The date the batch was last updated. | + +# Methods + +## `.getTemplate()` + +Get the template the batch is based on. Uses [`PrintOne.getTemplate()`](./PrintOne#gettemplateid). + +**Returns: [`Promise