feat(core-flows,types): Refunds can only be performed when order is imbalanced (#8944)

* feat(core-flows,types): Refunds can only be performed when order is imbalanced

* Apply suggestions from code review

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>

* chore: fix tests

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Riqwan Thamir
2024-09-03 13:53:20 +02:00
committed by GitHub
co-authored by Oli Juhl
parent 9a34e03ae1
commit 230acb700b
8 changed files with 382 additions and 581 deletions
@@ -1,13 +1,13 @@
import {
ICartModuleService,
IFulfillmentModuleService,
IInventoryServiceNext,
IInventoryService,
IOrderModuleService,
IPaymentModuleService,
IPricingModuleService,
IProductModuleService,
IRegionModuleService,
IStockLocationServiceNext,
IStockLocationService,
} from "@medusajs/types"
import {
ContainerRegistrationKeys,
@@ -32,8 +32,8 @@ medusaIntegrationTestRunner({
let productModule: IProductModuleService
let paymentModule: IPaymentModuleService
let pricingModule: IPricingModuleService
let inventoryModule: IInventoryServiceNext
let stockLocationModule: IStockLocationServiceNext
let inventoryModule: IInventoryService
let stockLocationModule: IStockLocationService
let fulfillmentModule: IFulfillmentModuleService
let orderModule: IOrderModuleService
let remoteLink, remoteQuery
@@ -138,6 +138,7 @@ medusaIntegrationTestRunner({
display_id: 1,
payment_collections: [],
payment_status: "not_paid",
region_id: "test_region_id",
fulfillments: [],
fulfillment_status: "not_fulfilled",
summary: expect.objectContaining({