Class CheckoutCartEndpoint
java.lang.Object
com.broadleafcommerce.cartoperation.web.endpoint.CheckoutCartEndpoint
@FrameworkRestController
@FrameworkMapping("/checkout")
public class CheckoutCartEndpoint
extends Object
- Author:
- Nick Crum (ncrum)
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCheckoutCartEndpoint
(CartResolverService cartResolverService, CartOperationService cartOperationService, CartVersionValidationService cartVersionValidationService, GuestCartProtectionService guestCartProtectionService, GuestCartTokenValidator guestCartTokenValidator, CartValidationProperties cartValidationProperties, CheckoutService checkoutService, FulfillmentPricingService fulfillmentPricingService) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
cartNotFoundMessage
(String cartId) generateGuestTokenForCart
(String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected CartOperationService
protected CartResolverService
protected CartValidationProperties
protected CartVersionValidationService
getCheckoutPaymentMethodOptions
(String cartId, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected CheckoutPaymentMethodService
protected CheckoutService
List<com.broadleafcommerce.shipping.domain.FulfillmentOptionPricedResponse>
getFulfillmentOptionsForCart
(String cartId, String referenceNumber, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected FulfillmentPricingService
protected GuestCartProtectionService
protected GuestCartTokenValidator
protected com.broadleafcommerce.common.extension.TypeFactory
org.springframework.http.ResponseEntity<CheckoutResponse>
processCheckout
(String cartId, CheckoutProcessRequest checkoutProcessRequest, Integer cartVersion, String guestToken, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) com.broadleafcommerce.cart.client.domain.Cart
recalculateTaxesForCart
(String cartId, boolean estimated, boolean actual, Integer cartVersion, String guestToken, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.com.broadleafcommerce.cart.client.domain.Cart
recalculateTaxesForCart
(String cartId, boolean estimated, Integer cartVersion, String guestToken, 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) void
setCheckoutPaymentMethodService
(CheckoutPaymentMethodService checkoutPaymentMethodService) void
setTypeFactory
(com.broadleafcommerce.common.extension.TypeFactory typeFactory) com.broadleafcommerce.cart.client.domain.Cart
updateContactInfoInCart
(String cartId, ContactInfoRequest contactInfoRequest, boolean price, Integer cartVersion, String guestToken, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) com.broadleafcommerce.cart.client.domain.Cart
updateFulfillmentGroupInCart
(String cartId, String referenceNumber, UpdateFulfillmentGroupRequest fulfillmentGroupRequest, boolean price, Integer cartVersion, String guestToken, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) validateGuestTokenForCart
(String cartId, Integer cartVersion, String guestTokenString, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected void
validateGuestTokenIfNecessary
(com.broadleafcommerce.cart.client.domain.Cart cart, String guestToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
Field Details
-
BASE_URI
- See Also:
-
-
Constructor Details
-
CheckoutCartEndpoint
public CheckoutCartEndpoint(CartResolverService cartResolverService, CartOperationService cartOperationService, CartVersionValidationService cartVersionValidationService, GuestCartProtectionService guestCartProtectionService, GuestCartTokenValidator guestCartTokenValidator, CartValidationProperties cartValidationProperties, CheckoutService checkoutService, FulfillmentPricingService fulfillmentPricingService)
-
-
Method Details
-
generateGuestTokenForCart
@FrameworkPostMapping("/{cartId}/guest-token") public GuestTokenResponse generateGuestTokenForCart(@PathVariable String cartId, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
validateGuestTokenForCart
@FrameworkPostMapping("/{cartId}/guest-token/validate") public GuestTokenValidationResponse validateGuestTokenForCart(@PathVariable String cartId, Integer cartVersion, @RequestBody String guestTokenString, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
updateContactInfoInCart
@FrameworkPostMapping(value="/{cartId}/contact-info", consumes="application/json") public com.broadleafcommerce.cart.client.domain.Cart updateContactInfoInCart(@PathVariable String cartId, @RequestBody ContactInfoRequest contactInfoRequest, @RequestParam(defaultValue="true") boolean price, Integer cartVersion, String guestToken, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
updateFulfillmentGroupInCart
@FrameworkPatchMapping(value="/{cartId}/fulfillment-groups/{referenceNumber}", consumes="application/json") public com.broadleafcommerce.cart.client.domain.Cart updateFulfillmentGroupInCart(@PathVariable String cartId, @PathVariable String referenceNumber, @RequestBody UpdateFulfillmentGroupRequest fulfillmentGroupRequest, @RequestParam(defaultValue="true") boolean price, Integer cartVersion, String guestToken, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getFulfillmentOptionsForCart
@FrameworkGetMapping("/{cartId}/fulfillment-options/{referenceNumber}") public List<com.broadleafcommerce.shipping.domain.FulfillmentOptionPricedResponse> getFulfillmentOptionsForCart(@PathVariable String cartId, @PathVariable String referenceNumber, Integer cartVersion, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
recalculateTaxesForCart
@FrameworkPostMapping("/{cartId}/recalculate-tax") public com.broadleafcommerce.cart.client.domain.Cart recalculateTaxesForCart(@PathVariable String cartId, @RequestParam(defaultValue="false") boolean estimated, Integer cartVersion, String guestToken, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
recalculateTaxesForCart
@Deprecated public com.broadleafcommerce.cart.client.domain.Cart recalculateTaxesForCart(@PathVariable String cartId, @RequestParam(defaultValue="true") boolean estimated, @RequestParam(defaultValue="true") boolean actual, Integer cartVersion, String guestToken, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getCheckoutPaymentMethodOptions
@FrameworkGetMapping(value="/{cartId}/payment-method-options", produces="application/json") public List<CheckoutPaymentMethodOption> getCheckoutPaymentMethodOptions(@PathVariable String cartId, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
processCheckout
@FrameworkPostMapping(value="/{cartId}/process", consumes="application/json") public org.springframework.http.ResponseEntity<CheckoutResponse> processCheckout(@PathVariable String cartId, @RequestBody CheckoutProcessRequest checkoutProcessRequest, Integer cartVersion, String guestToken, com.broadleafcommerce.order.common.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
resolveCartForRead
-
resolveCartForUpdate
-
resolveCart
@NonNull 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) -
validateGuestTokenIfNecessary
protected void validateGuestTokenIfNecessary(com.broadleafcommerce.cart.client.domain.Cart cart, String guestToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
cartNotFoundMessage
-
getCartResolverService
-
getCartOperationService
-
getCartVersionValidationService
-
getGuestCartProtectionService
-
getGuestCartTokenValidator
-
getCartValidationProperties
-
getCheckoutService
-
getFulfillmentPricingService
-
getCheckoutPaymentMethodService
-
setCheckoutPaymentMethodService
@Autowired public void setCheckoutPaymentMethodService(CheckoutPaymentMethodService checkoutPaymentMethodService) -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
setTypeFactory
@Autowired public void setTypeFactory(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
recalculateTaxesForCart(String, boolean, Integer, String, CustomerRef, ContextInfo)