feat(order): Claim and Exchange entities (#7681)

This commit is contained in:
Carlos R. L. Rodrigues
2024-06-12 14:49:15 -03:00
committed by GitHub
parent 85d487d90b
commit 75811cd4b3
18 changed files with 877 additions and 56 deletions
@@ -30,6 +30,7 @@ export async function createReturn(
order_id: data.order_id,
order_version: order.version,
status: ReturnStatus.REQUESTED,
// TODO: add refund amount / calculate?
// refund_amount: data.refund_amount ?? null,
},
],
@@ -1,5 +1,6 @@
import { Context, OrderTypes } from "@medusajs/types"
import { MathBN, ReturnStatus } from "@medusajs/utils"
import { OrderChangeType } from "@types"
import { ChangeActionType } from "../../utils"
export async function receiveReturn(
@@ -35,6 +36,7 @@ export async function receiveReturn(
order_id: returnEntry.order_id,
reference: "return",
reference_id: returnEntry.id,
change_type: OrderChangeType.RETURN,
description: data.description,
internal_note: data.internal_note,
created_by: data.created_by,