Interface B2BOrderService

All Superinterfaces:
AbstractOrderService<OrderModel,OrderEntryModel>, OrderService
All Known Implementing Classes:
DefaultB2BOrderService

public interface B2BOrderService extends OrderService
Service around OrderModel
Spring Bean ID:
b2bOrderService
  • Method Details

    • getRejectedOrders

      <T extends UserModel> List<OrderModel> getRejectedOrders(T user)
      Gets the orders with a status of OrderStatus.REJECTED for a user.
      Parameters:
      user - the user
      Returns:
      the rejected orders
    • getRejectedByMerchantOrders

      @Deprecated(since="4.4", forRemoval=true) <T extends UserModel> List<OrderModel> getRejectedByMerchantOrders(T user)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the orders with a status of OrderStatus.REJECTED_BY_MERCHANT for a user.
      Parameters:
      user - the user
      Returns:
      the merchant rejected orders
    • getRejectedForMerchantOrders

      <T extends UserModel> List<OrderModel> getRejectedForMerchantOrders(T user)
      Gets the orders with a status of OrderStatus.REJECTED_BY_MERCHANT for a user.
      Parameters:
      user - the user
      Returns:
      the merchant rejected orders
    • getRejectedQuoteOrders

      @Deprecated(since="6.3", forRemoval=true) <T extends UserModel> List<OrderModel> getRejectedQuoteOrders(T user)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 6.3. Please see quote functionality from commerce. Gets the orders with a status of OrderStatus.REJECTED_QUOTE for a user.
      Parameters:
      user - the user
      Returns:
      the rejected orders
    • getApprovedQuoteOrders

      @Deprecated(since="6.3", forRemoval=true) <T extends UserModel> List<OrderModel> getApprovedQuoteOrders(T user)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 6.3. Please see quote functionality from commerce. Gets the orders with a status of OrderStatus.APPROVED_QUOTE for a user.
      Parameters:
      user - the user
      Returns:
      the approved orders
    • getPendingQuoteOrders

      @Deprecated(since="6.3", forRemoval=true) <T extends UserModel> List<OrderModel> getPendingQuoteOrders(T user)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 6.3. Please see quote functionality from commerce. Gets the orders with a status of OrderStatus.PENDING_QUOTE for a user.
      Parameters:
      user - the user
      Returns:
      List of orders
    • getApprovedOrders

      <T extends UserModel> List<OrderModel> getApprovedOrders(T user)
      Gets the orders with a status of OrderStatus.APPROVED for a user.
      Parameters:
      user - the user
      Returns:
      the approved orders
    • getOrderByCode

      @Deprecated(since="4.4", forRemoval=true) OrderModel getOrderByCode(String code)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 4.4. Use getOrderForCode(String) instead
      Gets the order by code.
      Parameters:
      code - the code
      Returns:
      the order by code
    • getOrderForCode

      OrderModel getOrderForCode(String code)
      Gets the order based on it's AbstractOrderModel.CODE.
      Parameters:
      code - the code
      Returns:
      the order
    • getPendingApprovalOrders

      <T extends UserModel> List<OrderModel> getPendingApprovalOrders(T user)
      Gets the orders which are in OrderStatus.PENDING_APPROVAL
      Parameters:
      user - the user
      Returns:
      the pending approval orders
    • getPendingApprovalOrdersFromMerchant

      <T extends UserModel> List<OrderModel> getPendingApprovalOrdersFromMerchant(T user)
      Gets the orders which are in OrderStatus.PENDING_APPROVAL_FROM_MERCHANT
      Parameters:
      user - the user
      Returns:
      the pending approval orders by merchant
    • getScheduledOrders

      <T extends UserModel> List<CartToOrderCronJobModel> getScheduledOrders(T user)
      Finds scheduled CartToOrderCronJob's for a given user.
      Parameters:
      user - A user who had a cart scheduled for replenishment.
      Returns:
      A list of cronjobs responsible for replenishment of users cart.
    • findScheduledCartToOrderJob

      @Deprecated(since="4.4", forRemoval=true) CartToOrderCronJobModel findScheduledCartToOrderJob(String code)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Find scheduled cart to order job.
      Parameters:
      code - the code
      Returns:
      the cart to order cron job model
    • getScheduledCartToOrderJobForCode

      CartToOrderCronJobModel getScheduledCartToOrderJobForCode(String code)
      Get the CartToOrderCronJob with a particular CronJobModel.CODE.
      Parameters:
      code - the cron job's CronJobModel.CODE
      Returns:
      the cart to order cron job model
    • getErroredOrders

      <T extends UserModel> List<OrderModel> getErroredOrders(T user)
      Gets orders for a user with status OrderStatus.B2B_PROCESSING_ERROR
      Parameters:
      user - the user
      Returns:
      orders that filed to process for any reason
    • isQuoteAllowed

      @Deprecated(since="6.3", forRemoval=true) boolean isQuoteAllowed(AbstractOrderModel source)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 6.3. Gets quote allowed flag based on Order detail
      Parameters:
      source - the order
      Returns:
      true if quote is allowed
    • deleteOrder

      void deleteOrder(String code)
      Delete order - currently we only allow delete quote order
      Parameters:
      code - the order to delete
    • getOrderEntryDiscountAmount

      double getOrderEntryDiscountAmount(AbstractOrderEntryModel entry)
      Get the amount discounted from the original price. For example if the original price is 15 and the discount is 5 off this method will return 10.
      Parameters:
      entry - An AbstractOrderEntryModel
      Returns:
      The discounted amount of the original price.
    • hasItemDiscounts

      boolean hasItemDiscounts(AbstractOrderModel order)
      Checks for item discounts.
      Parameters:
      order - the order
      Returns:
      true, if successful
    • getTotalDiscount

      double getTotalDiscount(AbstractOrderEntryModel entry)
      Gets the total discount of a line item entry.
      Parameters:
      entry - the entry line item of an order
      Returns:
      the total discount
    • getAbstractOrderForCode

      AbstractOrderModel getAbstractOrderForCode(String code)
      Gets the order with a particular AbstractOrderModel.CODE.
      Parameters:
      code - the AbstractOrderModel.CODE of the order
      Returns:
      the order