docs: added order claim documentation (#2805)
This commit is contained in:
@@ -54,7 +54,20 @@ constructor({ productService, eventBusService }) {
|
||||
}
|
||||
```
|
||||
|
||||
You can then use `this.productService` anywhere in your subscriber’s methods.
|
||||
You can then use `this.productService` anywhere in your subscriber’s methods. For example:
|
||||
|
||||
```ts
|
||||
handleOrder = async (data) => {
|
||||
//...
|
||||
const product = this.productService.list()
|
||||
}
|
||||
```
|
||||
|
||||
:::note
|
||||
|
||||
When using attributes defined in the subscriber, such as the `productService` in the example above, you must use an arrow function to declare the method. Otherwise, the attribute will be undefined when used.
|
||||
|
||||
:::
|
||||
|
||||
## What’s Next
|
||||
|
||||
|
||||
@@ -2681,6 +2681,55 @@ Object of the following format:
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Token Events
|
||||
|
||||
This section holds all events related to tokens.
|
||||
|
||||
<table class="reference-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Event Name
|
||||
</th>
|
||||
<th>
|
||||
Description
|
||||
</th>
|
||||
<th>
|
||||
Event Data Payload
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`order-update-token.created`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Triggered when a customer requests to claim an order and a token is created.
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Object of the following format:
|
||||
|
||||
```js noReport noCopy
|
||||
{
|
||||
old_email, //string email of order
|
||||
new_customer_id, //string ID of customer
|
||||
orders, //array of string IDs of orders
|
||||
token, //string token used for verification
|
||||
}
|
||||
```
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## User Events
|
||||
|
||||
This section holds all events related to users.
|
||||
|
||||
Reference in New Issue
Block a user