Interface FulfillmentGroupService
- All Known Implementing Classes:
FulfillmentGroupServiceImpl
public interface FulfillmentGroupService
-
Method Summary
Modifier and TypeMethodDescriptionaddFulfillmentGroupToOrder(FulfillmentGroupRequest fulfillmentGroupRequest, boolean priceOrder) addItemToFulfillmentGroup(FulfillmentGroupItemRequest fulfillmentGroupItemRequest, boolean priceOrder) addItemToFulfillmentGroup(FulfillmentGroupItemRequest fulfillmentGroupItemRequest, boolean priceOrder, boolean save) collapseToOneShippableFulfillmentGroup(Order order, boolean priceOrder) Collapses all of the shippable fulfillment groups in the given order to the first shippable fulfillment group in the order.voiddelete(FulfillmentGroup fulfillmentGroup) findFulfillmentGroupById(Long fulfillmentGroupId) findFulfillmentGroupsByStatus(FulfillmentGroupStatusType status, int start, int maxResults) Reads FulfillmentGroups by status, ascending according to the date that the order was created.findFulfillmentGroupsByStatus(FulfillmentGroupStatusType status, int start, int maxResults, boolean ascending) Reads FulfillmentGroups by status, either ascending or descending according to the date that the order was created.findPartiallyFulfilledFulfillmentGroups(int start, int maxResults) Reads FulfillmentGroups whose status is PARTIALLY_FULFILLED or PARTIALLY_DELIVERED.findUnfulfilledFulfillmentGroups(int start, int maxResults) Reads FulfillmentGroups whose status is not FULFILLED or DELIVERED.findUnprocessedFulfillmentGroups(int start, int maxResults) Returns FulfillmentGroups whose status is null, or where no processing has yet occured.Returns all of the shippable fulfillment groups for an orderReturns the first shippable fulfillment group from an order.getFulfillmentGroupItemsForOrderItem(Order order, OrderItem orderItem) Finds all FulfillmentGroupItems in the given Order that reference the given OrderItem.booleanisShippable(FulfillmentType fulfillmentType) Determines if a fulfillment group is shippable based on its fulfillment type.matchFulfillmentGroupsToMultishipOptions(Order order, boolean priceOrder) Associates shippable FulfillmentGroupItems in the given Order such that they match the structure of the OrderMultishipOptions associated with the given Order.removeAllFulfillmentGroupsFromOrder(Order order, boolean priceOrder) voidremoveOrderItemFromFullfillmentGroups(Order order, OrderItem orderItem) Removes every fulfillment group item in every fulfillment group in the order that is associated with the given orderItem.save(FulfillmentGroup fulfillmentGroup)
-
Method Details
-
save
-
createEmptyFulfillmentGroup
FulfillmentGroup createEmptyFulfillmentGroup() -
findFulfillmentGroupById
-
delete
-
addFulfillmentGroupToOrder
FulfillmentGroup addFulfillmentGroupToOrder(FulfillmentGroupRequest fulfillmentGroupRequest, boolean priceOrder) throws PricingException - Throws:
PricingException
-
addItemToFulfillmentGroup
FulfillmentGroup addItemToFulfillmentGroup(FulfillmentGroupItemRequest fulfillmentGroupItemRequest, boolean priceOrder) throws PricingException - Throws:
PricingException
-
addItemToFulfillmentGroup
FulfillmentGroup addItemToFulfillmentGroup(FulfillmentGroupItemRequest fulfillmentGroupItemRequest, boolean priceOrder, boolean save) throws PricingException - Throws:
PricingException
-
removeAllFulfillmentGroupsFromOrder
- Throws:
PricingException
-
removeOrderItemFromFullfillmentGroups
Removes every fulfillment group item in every fulfillment group in the order that is associated with the given orderItem. Note that it does not save the changes made - instead, the caller is responsible for saving the order further down.- Parameters:
order-orderItem-
-
createFulfillmentGroupFee
FulfillmentGroupFee createFulfillmentGroupFee() -
matchFulfillmentGroupsToMultishipOptions
Order matchFulfillmentGroupsToMultishipOptions(Order order, boolean priceOrder) throws PricingException Associates shippable FulfillmentGroupItems in the given Order such that they match the structure of the OrderMultishipOptions associated with the given Order.- Parameters:
order-- Returns:
- the saved order
- Throws:
PricingException- See Also:
-
collapseToOneShippableFulfillmentGroup
Order collapseToOneShippableFulfillmentGroup(Order order, boolean priceOrder) throws PricingException Collapses all of the shippable fulfillment groups in the given order to the first shippable fulfillment group in the order.- Parameters:
order-priceOrder-- Returns:
- the saved order
- Throws:
PricingException- See Also:
-
findUnfulfilledFulfillmentGroups
Reads FulfillmentGroups whose status is not FULFILLED or DELIVERED.- Parameters:
start-maxResults-- Returns:
-
findPartiallyFulfilledFulfillmentGroups
Reads FulfillmentGroups whose status is PARTIALLY_FULFILLED or PARTIALLY_DELIVERED.- Parameters:
start-maxResults-- Returns:
-
findUnprocessedFulfillmentGroups
Returns FulfillmentGroups whose status is null, or where no processing has yet occured. Default returns in ascending order according to date that the order was created.- Parameters:
start-maxResults-- Returns:
-
findFulfillmentGroupsByStatus
List<FulfillmentGroup> findFulfillmentGroupsByStatus(FulfillmentGroupStatusType status, int start, int maxResults, boolean ascending) Reads FulfillmentGroups by status, either ascending or descending according to the date that the order was created.- Parameters:
status-start-maxResults-ascending-- Returns:
-
findFulfillmentGroupsByStatus
List<FulfillmentGroup> findFulfillmentGroupsByStatus(FulfillmentGroupStatusType status, int start, int maxResults) Reads FulfillmentGroups by status, ascending according to the date that the order was created.- Parameters:
status-start-maxResults-- Returns:
-
isShippable
Determines if a fulfillment group is shippable based on its fulfillment type.- Parameters:
fulfillmentType-- Returns:
-
getFirstShippableFulfillmentGroup
Returns the first shippable fulfillment group from an order.- Parameters:
order-- See Also:
-
getAllShippableFulfillmentGroups
Returns all of the shippable fulfillment groups for an order- See Also:
-
getFulfillmentGroupItemsForOrderItem
Finds all FulfillmentGroupItems in the given Order that reference the given OrderItem.- Parameters:
order-orderItem-- Returns:
- the list of related FulfillmentGroupItems
-
calculateNumShippableFulfillmentGroups
- Parameters:
order-- Returns:
-