Feat(medusa): handle reservation quantity update for line items (#3484)
**What** - Raise exception if a reservation is updated or created to have larger quantity than is unfulfilled for a line-item Fixes CORE-1249
This commit is contained in:
@@ -152,6 +152,17 @@ export default class InventoryService
|
||||
return inventoryLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a reservation item
|
||||
* @param inventoryItemId - the id of the reservation item
|
||||
* @return the retrieved reservation level
|
||||
*/
|
||||
async retrieveReservationItem(reservationId: string): Promise<ReservationItemDTO> {
|
||||
return await this.reservationItemService_
|
||||
.withTransaction(this.activeManager_)
|
||||
.retrieve(reservationId)
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a reservation item
|
||||
* @param input - the input object
|
||||
|
||||
Reference in New Issue
Block a user