Interface CartApprovalService

All Known Implementing Classes:
DefaultCartApprovalService

public interface CartApprovalService
Defines a service that handles cart approval operations performed on a Cart.
  • Method Summary

    Modifier and Type
    Method
    Description
    rejectCart(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.order.common.domain.CustomerRef customer, CartApprovalProcessRequest cartApprovalProcessRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Action performed by an account approver to reject a Cart.
    org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCartsRequiringApproval(String requestedAccountId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve a page of Carts that require approval in the current authenticated user's account context and requested account id if applicable.
    submitForApproval(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.order.common.domain.CustomerRef customer, CartApprovalProcessRequest cartApprovalProcessRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Action performed by an account member to submit for approval of a Cart.
  • Method Details

    • retrieveCartsRequiringApproval

      org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart> retrieveCartsRequiringApproval(@Nullable String requestedAccountId, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve a page of Carts that require approval in the current authenticated user's account context and requested account id if applicable.
      Parameters:
      requestedAccountId - optional parameter to retrieve carts from a specific account, if not specified, carts in the current account and its sub-accounts context will be retrieved
      customerRef - the currently authenticated CustomerRef containing user's account details
      filters - exising filters to build on top of
      pageable - the requested page of results
      contextInfo - context information related to multitenancy
      Returns:
      a page of Carts that require approval in the current authenticated user's account context and requested account id if applicable.
    • submitForApproval

      CartApprovalProcessResponse submitForApproval(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.order.common.domain.CustomerRef customer, CartApprovalProcessRequest cartApprovalProcessRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Action performed by an account member to submit for approval of a Cart. Produces a CartActionAudit.
      Parameters:
      cart - The cart that was submitted for approval
      customer - The customer who submitted the cart for approval
      cartApprovalProcessRequest - the request with which CartApprovalEndpoint is hit
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      a CartApprovalProcessResponse that contains the updated cart, any validation errors encountered, status of the request, and additionalAttributes
      Throws:
      CartApprovalValidationException - when the validation fails for the request
    • rejectCart

      CartApprovalProcessResponse rejectCart(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.order.common.domain.CustomerRef customer, CartApprovalProcessRequest cartApprovalProcessRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Action performed by an account approver to reject a Cart. Produces a CartActionAudit . Produces a CartRejectionEvent
      Parameters:
      cart - The cart that was rejected
      customer - The customer who rejected the cart
      cartApprovalProcessRequest - the request with which CartApprovalEndpoint is hit
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The rejected cart
      Throws:
      CartApprovalValidationException - if an error is encountered during rejection