Class OfferEngineEndpoint

java.lang.Object
com.broadleafcommerce.promotion.offer.web.endpoint.OfferEngineEndpoint

@FrameworkRestController @FrameworkMapping("/offer-engine") @DataRouteByExample(Offer.class) public class OfferEngineEndpoint extends Object
Author:
Chad Harchar (charchar)
  • Field Details

  • Constructor Details

  • Method Details

    • retrieveCodeUsability

      @FrameworkGetMapping("/code-use/{codes}") public Map<String,com.broadleafcommerce.promotion.offer.client.web.context.CodeUsabilityInfo> retrieveCodeUsability(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestHeader(value="X-Customer-Context",required=false) com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext, @PathVariable("codes") List<String> codes)
    • validateOfferUsage

      @FrameworkGetMapping("/validate-uses") public com.broadleafcommerce.promotion.offer.client.web.context.OfferAndOfferCodeUsageValidationResult validateOfferUsage(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestHeader(value="X-Customer-Context",required=false) com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext, @RequestParam List<String> offerCodes, @RequestParam List<String> offerIds)
    • applyOffers

      @FrameworkPostMapping("/apply") public com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse applyOffers(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody EnhancedOrder order)
    • evaluateOffers

      @FrameworkPostMapping("/evaluate-offers") public com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse evaluateOffers(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody EnhancedOrder order)
    • validateVouchers

      @FrameworkPostMapping("/validate-vouchers") public com.broadleafcommerce.promotion.offer.client.web.context.OfferAndOfferCodeUsageValidationResult validateVouchers(jakarta.servlet.http.HttpServletRequest request, @RequestBody EnhancedOrder order, @RequestParam(required=false,defaultValue="true") boolean postCheckout, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • handleBadOrderException

      @ExceptionHandler(BadOrderDataException.class) public org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError> handleBadOrderException(Exception ex, org.springframework.web.context.request.WebRequest request)
    • logDebug

      protected void logDebug(Exception ex, org.springframework.web.context.request.WebRequest request)
    • updateAuditVerificationProperties

      public void updateAuditVerificationProperties(String flow, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, boolean skipChecksByDefault)
    • getAuditVerificationProperties

      protected AuditVerficationProperties getAuditVerificationProperties()