Skip to content

Commit

Permalink
fix: 🚨 fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulRill00 committed Aug 7, 2024
1 parent df4874b commit 7bf02e4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
30 changes: 14 additions & 16 deletions docs/Coupon.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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<PaginatedResponse<CouponCode>>`](./CouponCode)**

Expand All @@ -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**

Expand All @@ -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");
```

---
Expand All @@ -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<void>`
\*\*Returns: `Promise<void>`

**Example**

Expand All @@ -79,18 +79,16 @@ const data = fs.readFileSync("example.csv").buffer;
const file = await coupon.addCodes(data);
```


---

## `Coupon.delete()`

Delete the coupon.

**Returns: `Promise<void>`
\*\*Returns: `Promise<void>`

**Example**

```js
await coupon.delete();
```

17 changes: 9 additions & 8 deletions docs/CouponCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`
Expand Down

0 comments on commit 7bf02e4

Please sign in to comment.