docs: Add discount created event (#5850)

* Emit event when discount code created.

* Documentation for discount.created event.

* add patch changeset

* Cleaner code, avoid array indexing.

* Revert "Documentation for discount.created event."

This reverts commit 9447f4a171dd55ac8a550beeb403cb7404a18df2.

* Docs for discount.created event.
This commit is contained in:
Zarar Siddiqi
2023-12-14 09:54:31 -05:00
committed by GitHub
parent ae53a66273
commit bbee9b4c53

View File

@@ -705,6 +705,53 @@ Object of the following format:
---
## Discount Events
This section holds all events related to discounts.
<table class="reference-table">
<thead>
<tr>
<th>
Event Name
</th>
<th>
Description
</th>
<th>
Event Data Payload
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
`discount.created`
</td>
<td>
Triggered when a discount is created.
</td>
<td>
Object of the following format:
```js noReport noCopy
{
id // string ID of discount
}
```
</td>
</tr>
</tbody>
</table>
---
## Draft Order Events
This section holds all events related to draft orders.