feat(medusa): Configurable returnable_items on order decorate totals (#3276)

This commit is contained in:
Adrien de Peretti authored and GitHub committed 2023-02-21 14:48:49 +01:00
1 parent b393d74a10
commit d11ab924b8
36 files changed
+673 -307

No files matched your search

+7
View File
@@ -257,6 +257,8 @@ export class Order extends BaseEntity {
gift_card_total: number
gift_card_tax_total: number
returnable_items?: LineItem[]
@BeforeInsert()
private async beforeInsert(): Promise<void> {
this.id = generateEntityId(this.id, "order")
@@ -547,6 +549,11 @@ export class Order extends BaseEntity {
* description: The total of gift cards with taxes
* type: integer
* example: 0
* returnable_items:
* description: The items that are returnable as part of the order, order swaps or order claims
* type: array
* items:
* $ref: "#/components/schemas/LineItem"
* created_at:
* description: The date with timezone at which the resource was created.
* type: string