Class FulfillmentOptionEndpoint
java.lang.Object
com.broadleafcommerce.cartoperation.web.endpoint.FulfillmentOptionEndpoint
@FrameworkRestController
@FrameworkMapping("/fulfillment-options")
@DataRouteByKey("cartoperation")
public class FulfillmentOptionEndpoint
extends Object
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFulfillmentOptionEndpoint
(CartResolverService cartResolverService, CartVersionValidationService cartVersionValidationService, FulfillmentOptionRequestService fulfillmentOptionRequestService, CartOperationService cartOperationService) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
cartNotFoundMessage
(String cartId) determineOptionsAndGroups
(com.broadleafcommerce.fulfillment.common.domain.Address address, String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Convenience endpoint to get the cart with all fulfillment options, and ensure that options for the default service level are selected all at once.protected CartOperationService
protected CartResolverService
protected CartVersionValidationService
protected FulfillmentOptionRequestService
com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponse
getOptions
(String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig
getPricingConfigForContext
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) getServiceLevelMap
(String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.broadleafcommerce.cart.client.domain.Cart
resolveCart
(String cartId, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.broadleafcommerce.cart.client.domain.Cart
resolveCartForRead
(String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.broadleafcommerce.cart.client.domain.Cart
resolveCartForUpdate
(String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) selectOption
(com.broadleafcommerce.order.common.domain.PricedFulfillmentOption pricedFulfillmentOption, String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) updateAddressOnGroup
(com.broadleafcommerce.fulfillment.common.domain.Address address, String cartId, String fulfillmentGroupReference, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
Field Details
-
FULFILLMENT_OPTION_URI
- See Also:
-
-
Constructor Details
-
FulfillmentOptionEndpoint
public FulfillmentOptionEndpoint(CartResolverService cartResolverService, CartVersionValidationService cartVersionValidationService, FulfillmentOptionRequestService fulfillmentOptionRequestService, CartOperationService cartOperationService)
-
-
Method Details
-
getOptions
@FrameworkGetMapping("/{cartId}") public com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponse getOptions(@PathVariable String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
determineOptionsAndGroups
@FrameworkPostMapping("/{cartId}") public CartFulfillmentResponse determineOptionsAndGroups(@RequestBody(required=false) com.broadleafcommerce.fulfillment.common.domain.Address address, @PathVariable String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Convenience endpoint to get the cart with all fulfillment options, and ensure that options for the default service level are selected all at once. -
selectOption
@FrameworkPostMapping("/{cartId}/select") public CartFulfillmentResponse selectOption(@RequestBody com.broadleafcommerce.order.common.domain.PricedFulfillmentOption pricedFulfillmentOption, @PathVariable String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getServiceLevelMap
@FrameworkGetMapping("/{cartId}/service-levels") public Map<String,javax.money.MonetaryAmount> getServiceLevelMap(@PathVariable String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getPricingConfigForContext
@FrameworkGetMapping("/pricing-config") public com.broadleafcommerce.fulfillment.common.domain.FulfillmentPricingConfig getPricingConfigForContext(@ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
updateAddressOnGroup
@FrameworkPostMapping("/{cartId}/address/{fulfillmentGroupReference}") public CartFulfillmentResponse updateAddressOnGroup(@RequestBody com.broadleafcommerce.fulfillment.common.domain.Address address, @PathVariable String cartId, @PathVariable String fulfillmentGroupReference, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
resolveCartForRead
-
resolveCartForUpdate
-
resolveCart
protected com.broadleafcommerce.cart.client.domain.Cart resolveCart(@NonNull String cartId, @Nullable com.broadleafcommerce.order.common.domain.CustomerRef customer, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
cartNotFoundMessage
-
getCartResolverService
-
getCartVersionValidationService
-
getFulfillmentOptionRequestService
-
getCartOperationService
-