Skip to content

Commit 7b0eb54

Browse files
committed
feat: add client orders errors
1 parent fd66d84 commit 7b0eb54

File tree

1 file changed

+28
-0
lines changed
  • client-orders/src/main/scala/dev/atedeg/mdm/clientorders

1 file changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package dev.atedeg.mdm.clientorders
2+
3+
import dev.atedeg.mdm.products.Product
4+
5+
/**
6+
* An error that may be produced by the [[palletizeProductForOrder palletization action]].
7+
*/
8+
enum PalletizationError:
9+
/**
10+
* Raised when trying to palletize a [[Product product]] for an [[Order.InProgressOrder order]] that does not require
11+
* it.
12+
*/
13+
case ProductNotInOrder()
14+
15+
/**
16+
* Raised when trying to palletize more of a [[Product product]] than required.
17+
*/
18+
case PalletizedMoreThanRequired(requiredQuantity: Quantity)
19+
20+
/**
21+
* An error that may be produced by the [[completeOrder() order completion action]].
22+
*/
23+
enum OrderCompletionError:
24+
/**
25+
* Raised when trying to mark an [[Order.InProgressOrder order]] as [[Order.CompletedOrder completed]] when any of its
26+
* [[Order.InProgressOrderLine lines]] are not completed.
27+
*/
28+
case OrderNotComplete()

0 commit comments

Comments
 (0)