@FrameworkRestController @FrameworkMapping(value="/checkout") public class CheckoutCartEndpoint extends Object
Constructor and Description |
---|
CheckoutCartEndpoint(CartResolverService cartResolverService,
CartOperationService cartOperationService,
CartVersionValidationService cartVersionValidationService,
GuestCartProtectionService guestCartProtectionService,
GuestCartTokenValidator guestCartTokenValidator,
CartValidationProperties cartValidationProperties,
CheckoutService checkoutService,
FulfillmentPricingService fulfillmentPricingService) |
Modifier and Type | Method and Description |
---|---|
com.broadleafcommerce.cart.client.domain.Cart |
addPaymentToCart(String cartId,
AddPaymentRequest addPaymentRequest,
boolean price,
Integer cartVersion,
String guestToken,
com.broadleafcommerce.cart.client.domain.CustomerRef customer,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) |
protected String |
cartNotFoundMessage(String cartId) |
GuestTokenResponse |
generateGuestTokenForCart(String cartId,
Integer cartVersion,
com.broadleafcommerce.cart.client.domain.CustomerRef customer,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) |
protected CartOperationService |
getCartOperationService() |
protected CartResolverService |
getCartResolverService() |
protected CartValidationProperties |
getCartValidationProperties() |
protected CartVersionValidationService |
getCartVersionValidationService() |
protected CheckoutService |
getCheckoutService() |
List<com.broadleafcommerce.shipping.domain.FulfillmentOptionPricedResponse> |
getFulfillmentOptionsForCart(String cartId,
String referenceNumber,
Integer cartVersion,
com.broadleafcommerce.cart.client.domain.CustomerRef customer,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) |
protected FulfillmentPricingService |
getFulfillmentPricingService() |
protected GuestCartProtectionService |
getGuestCartProtectionService() |
protected GuestCartTokenValidator |
getGuestCartTokenValidator() |
org.springframework.http.ResponseEntity<CheckoutResponse> |
processCheckout(String cartId,
CheckoutProcessRequest checkoutProcessRequest,
Integer cartVersion,
String guestToken,
com.broadleafcommerce.cart.client.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.cart.client.domain.CustomerRef customer,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) |
com.broadleafcommerce.cart.client.domain.Cart |
removePaymentFromCart(String cartId,
String paymentId,
boolean price,
Integer cartVersion,
String guestToken,
com.broadleafcommerce.cart.client.domain.CustomerRef customer,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) |
protected com.broadleafcommerce.cart.client.domain.Cart |
resolveCart(String cartId,
com.broadleafcommerce.cart.client.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.cart.client.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.cart.client.domain.CustomerRef customer,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) |
com.broadleafcommerce.cart.client.domain.Cart |
updateContactInfoInCart(String cartId,
ContactInfoRequest contactInfoRequest,
boolean price,
Integer cartVersion,
String guestToken,
com.broadleafcommerce.cart.client.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.cart.client.domain.CustomerRef customer,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) |
com.broadleafcommerce.cart.client.domain.Cart |
updatePaymentInCart(String cartId,
String paymentId,
UpdatePaymentRequest updatePaymentRequest,
boolean price,
Integer cartVersion,
String guestToken,
com.broadleafcommerce.cart.client.domain.CustomerRef customer,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) |
GuestTokenValidationResponse |
validateGuestTokenForCart(String cartId,
Integer cartVersion,
String guestTokenString,
com.broadleafcommerce.cart.client.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) |
public static final String BASE_URI
public CheckoutCartEndpoint(CartResolverService cartResolverService, CartOperationService cartOperationService, CartVersionValidationService cartVersionValidationService, GuestCartProtectionService guestCartProtectionService, GuestCartTokenValidator guestCartTokenValidator, CartValidationProperties cartValidationProperties, CheckoutService checkoutService, FulfillmentPricingService fulfillmentPricingService)
@FrameworkPostMapping(value="/{cartId}/guest-token") public GuestTokenResponse generateGuestTokenForCart(@PathVariable String cartId, Integer cartVersion, com.broadleafcommerce.cart.client.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
@FrameworkPostMapping(value="/{cartId}/guest-token/validate") public GuestTokenValidationResponse validateGuestTokenForCart(@PathVariable String cartId, Integer cartVersion, @RequestBody String guestTokenString, com.broadleafcommerce.cart.client.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
@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.cart.client.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
@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.cart.client.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
@FrameworkGetMapping(value="/{cartId}/fulfillment-options/{referenceNumber}") public List<com.broadleafcommerce.shipping.domain.FulfillmentOptionPricedResponse> getFulfillmentOptionsForCart(@PathVariable String cartId, @PathVariable String referenceNumber, Integer cartVersion, com.broadleafcommerce.cart.client.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
@FrameworkPostMapping(value="/{cartId}/payments", consumes="application/json") public com.broadleafcommerce.cart.client.domain.Cart addPaymentToCart(@PathVariable String cartId, @RequestBody AddPaymentRequest addPaymentRequest, @RequestParam(defaultValue="true") boolean price, Integer cartVersion, String guestToken, com.broadleafcommerce.cart.client.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
@FrameworkPatchMapping(value="/{cartId}/payments/{paymentId}", consumes="application/json") public com.broadleafcommerce.cart.client.domain.Cart updatePaymentInCart(@PathVariable String cartId, @PathVariable String paymentId, @RequestBody UpdatePaymentRequest updatePaymentRequest, @RequestParam(defaultValue="true") boolean price, Integer cartVersion, String guestToken, com.broadleafcommerce.cart.client.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
@FrameworkDeleteMapping(value="/{cartId}/payments/{paymentId}") public com.broadleafcommerce.cart.client.domain.Cart removePaymentFromCart(@PathVariable String cartId, @PathVariable String paymentId, @RequestParam(defaultValue="true") boolean price, Integer cartVersion, String guestToken, com.broadleafcommerce.cart.client.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
@FrameworkPostMapping(value="/{cartId}/recalculate-tax", consumes="application/json") 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.cart.client.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
@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.cart.client.domain.CustomerRef customer, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
@NonNull protected com.broadleafcommerce.cart.client.domain.Cart resolveCartForRead(@NonNull String cartId, @Nullable Integer cartVersion, @Nullable com.broadleafcommerce.cart.client.domain.CustomerRef customer, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
@NonNull protected com.broadleafcommerce.cart.client.domain.Cart resolveCartForUpdate(@NonNull String cartId, @Nullable Integer cartVersion, @Nullable com.broadleafcommerce.cart.client.domain.CustomerRef customer, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
@NonNull protected com.broadleafcommerce.cart.client.domain.Cart resolveCart(@NonNull String cartId, @Nullable com.broadleafcommerce.cart.client.domain.CustomerRef customer, @Nullable 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)
protected CartResolverService getCartResolverService()
protected CartOperationService getCartOperationService()
protected CartVersionValidationService getCartVersionValidationService()
protected GuestCartProtectionService getGuestCartProtectionService()
protected GuestCartTokenValidator getGuestCartTokenValidator()
protected CartValidationProperties getCartValidationProperties()
protected CheckoutService getCheckoutService()
protected FulfillmentPricingService getFulfillmentPricingService()
Copyright © 2021. All rights reserved.