From 885836ea601bfc285d636e03d84d59fba05d8706 Mon Sep 17 00:00:00 2001 From: Paul Rill Date: Thu, 25 Jul 2024 11:39:37 +0200 Subject: [PATCH] docs: :memo: added docs for coupons --- docs/Coupon.md | 111 +++++++++++++++++++++++++++++++++++++++++++++ docs/CouponCode.md | 43 ++++++++++++++++++ docs/PrintOne.md | 74 ++++++++++++++++++++++++++++++ 3 files changed, 228 insertions(+) create mode 100644 docs/Coupon.md create mode 100644 docs/CouponCode.md diff --git a/docs/Coupon.md b/docs/Coupon.md new file mode 100644 index 0000000..0e543cc --- /dev/null +++ b/docs/Coupon.md @@ -0,0 +1,111 @@ +Contains all information about a given CsvOrder + +# Fields + +| Name | Type | Description | +| ---------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------- | +| `id` | `string` | The ID of the coupon. | +| `name` | `string` | The name of the coupon. | +| `companyId` | `string` | The ID of the company the coupon belongs to. | +| `stats` | `object` | An object containing the stats of the coupon. With keys 'total', 'used' and 'remaining' | + +# Methods + +## `.getTemplate()` + +Get the template the order is based on. Uses [`PrintOne.getTemplate()`](./PrintOne#gettemplateid). + +**Returns: [`Promise