From 7bf02e458c833554fc3e661497a7233f7a9be0ea Mon Sep 17 00:00:00 2001 From: Paul Rill Date: Wed, 7 Aug 2024 11:35:54 +0200 Subject: [PATCH] fix: :rotating_light: fix linting issues --- docs/Coupon.md | 30 ++++++++++++++---------------- docs/CouponCode.md | 17 +++++++++-------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/docs/Coupon.md b/docs/Coupon.md index 313efba..f04a397 100644 --- a/docs/Coupon.md +++ b/docs/Coupon.md @@ -2,12 +2,12 @@ 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' | +| 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 @@ -28,7 +28,7 @@ await coupon.refresh(); ## `Coupon.getCodes()` -Get all coupon codes within the coupon. | +Get all coupon codes within the coupon. | **Returns: [`Promise>`](./CouponCode)** @@ -42,7 +42,7 @@ const couponCodes = await coupon.getCodes(); ## `Coupon.getCode(id)` -Get all coupon codes by its ID. +Get all coupon codes by its ID. **Parameters** @@ -55,7 +55,7 @@ Get all coupon codes by its ID. **Example** ```js -const couponCode = await coupon.getCode('example-coupon-code-id'); +const couponCode = await coupon.getCode("example-coupon-code-id"); ``` --- @@ -66,11 +66,11 @@ Add coupon codes to the coupon by uploading a CSV. **Parameters** -| Name | Type | Description | -| ---------- | ------------- | --------------------------------- | -| `csv` | `ArrayBuffer` | The file to upload. Must be a CSV | +| Name | Type | Description | +| ----- | ------------- | --------------------------------- | +| `csv` | `ArrayBuffer` | The file to upload. Must be a CSV | -**Returns: `Promise` +\*\*Returns: `Promise` **Example** @@ -79,18 +79,16 @@ const data = fs.readFileSync("example.csv").buffer; const file = await coupon.addCodes(data); ``` - --- ## `Coupon.delete()` Delete the coupon. -**Returns: `Promise` +\*\*Returns: `Promise` **Example** ```js await coupon.delete(); ``` - diff --git a/docs/CouponCode.md b/docs/CouponCode.md index 96af0ed..8bf6e58 100644 --- a/docs/CouponCode.md +++ b/docs/CouponCode.md @@ -2,16 +2,17 @@ Contains all information about a given CsvOrder # Fields -| Name | Type | Description | -| ---------------------- | ------------------------------------ | --------------------------------------------------------------------------------- | -| `id` | `string` | The ID of the coupon code. | -| `couponId` | `string` | The ID of the parent coupon. | -| `code` | `string` | The actual code saved for the coupon code`. | -| `used` | `boolean` | Whether the coupon code has been used. | -| `usedAt` | `Date` or `null` | The date at which the coupon code was used or `null` if not used yet. | -| `orderId` | `string` or `null` | The order ID by which the coupon code was used or `null` if not used yet. | +| Name | Type | Description | +| ---------- | ------------------ | ------------------------------------------------------------------------- | +| `id` | `string` | The ID of the coupon code. | +| `couponId` | `string` | The ID of the parent coupon. | +| `code` | `string` | The actual code saved for the coupon code`. | +| `used` | `boolean` | Whether the coupon code has been used. | +| `usedAt` | `Date` or `null` | The date at which the coupon code was used or `null` if not used yet. | +| `orderId` | `string` or `null` | The order ID by which the coupon code was used or `null` if not used yet. | # Methods + --- ## `.refresh()`