docs: update order module's conceptual guides (#7893)
* fixes + add return document * update order conceptual guides * resolve todo * re-generate files map
This commit is contained in:
@@ -18,7 +18,13 @@ The [LineItemAdjustment data model](/references/order/models/LineItemAdjustment)
|
||||
|
||||

|
||||
|
||||
The `amount` property of the adjustment line indicates the amount to be discounted from the original amount. Also, the ID of the applied promotion can be stored in the `promotion_id` property of the adjustment line.
|
||||
The `amount` property of the adjustment line indicates the amount to be discounted from the original amount.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
The ID of the applied promotion is stored in the `promotion_id` property of the adjustment line.
|
||||
|
||||
</Note>
|
||||
|
||||
---
|
||||
|
||||
@@ -55,7 +61,7 @@ import {
|
||||
const order = await orderModuleService.retrieveOrder("ord_123", {
|
||||
relations: [
|
||||
"items.item.adjustments",
|
||||
"shipping_methods.adjustments",
|
||||
"shipping_methods.shipping_method.adjustments",
|
||||
],
|
||||
})
|
||||
// retrieve the line item adjustments
|
||||
@@ -95,6 +101,8 @@ const actions = await promotionModuleService.computeActions(
|
||||
{
|
||||
items: lineItemAdjustments,
|
||||
shipping_methods: shippingMethodAdjustments,
|
||||
// TODO infer from cart or region
|
||||
currency_code: "usd"
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user