Interface FulfillmentGroupService

All Known Implementing Classes:
FulfillmentGroupServiceImpl

public interface FulfillmentGroupService
  • Method Details

    • save

      FulfillmentGroup save(FulfillmentGroup fulfillmentGroup)
    • createEmptyFulfillmentGroup

      FulfillmentGroup createEmptyFulfillmentGroup()
    • findFulfillmentGroupById

      FulfillmentGroup findFulfillmentGroupById(Long fulfillmentGroupId)
    • delete

      void delete(FulfillmentGroup fulfillmentGroup)
    • 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

      Order removeAllFulfillmentGroupsFromOrder(Order order, boolean priceOrder) throws PricingException
      Throws:
      PricingException
    • removeOrderItemFromFullfillmentGroups

      void removeOrderItemFromFullfillmentGroups(Order order, OrderItem orderItem)
      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

      List<FulfillmentGroup> findUnfulfilledFulfillmentGroups(int start, int maxResults)
      Reads FulfillmentGroups whose status is not FULFILLED or DELIVERED.
      Parameters:
      start -
      maxResults -
      Returns:
    • findPartiallyFulfilledFulfillmentGroups

      List<FulfillmentGroup> findPartiallyFulfilledFulfillmentGroups(int start, int maxResults)
      Reads FulfillmentGroups whose status is PARTIALLY_FULFILLED or PARTIALLY_DELIVERED.
      Parameters:
      start -
      maxResults -
      Returns:
    • findUnprocessedFulfillmentGroups

      List<FulfillmentGroup> findUnprocessedFulfillmentGroups(int start, int maxResults)
      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

      boolean isShippable(FulfillmentType fulfillmentType)
      Determines if a fulfillment group is shippable based on its fulfillment type.
      Parameters:
      fulfillmentType -
      Returns:
    • getFirstShippableFulfillmentGroup

      FulfillmentGroup getFirstShippableFulfillmentGroup(Order order)
      Returns the first shippable fulfillment group from an order.
      Parameters:
      order -
      See Also:
    • getAllShippableFulfillmentGroups

      List<FulfillmentGroup> getAllShippableFulfillmentGroups(Order order)
      Returns all of the shippable fulfillment groups for an order
      See Also:
    • getFulfillmentGroupItemsForOrderItem

      List<FulfillmentGroupItem> getFulfillmentGroupItemsForOrderItem(Order order, OrderItem orderItem)
      Finds all FulfillmentGroupItems in the given Order that reference the given OrderItem.
      Parameters:
      order -
      orderItem -
      Returns:
      the list of related FulfillmentGroupItems
    • calculateNumShippableFulfillmentGroups

      Integer calculateNumShippableFulfillmentGroups(Order order)
      Parameters:
      order -
      Returns: