splitFulfillment
List<F> splitFulfillment(F fulfillment,
List<Map<String,Integer>> itemQuantities)
Splits the given fulfillment into multiple. The first split fulfillment will contain the
remainder of the original fulfillment, while the rest will contain the portions requested by
itemQuantities
.
- Parameters:
fulfillment
- the original fulfillment to split
itemQuantities
- the quantities of each item to put into each fulfillment, with each map
having the fulfillment item ID as the key, and the quantity to include in that
fulfillment as the value
- Returns:
- a list containing the original fulfillment now containing the remainder of the
original fulfillment, and all of the new fulfillments each containing the items
requested