Class B2BCartsController
java.lang.Object
de.hybris.platform.b2bocc.v2.controllers.BaseController
de.hybris.platform.b2bocc.v2.controllers.B2BCartsController
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected DataMapperprotected UserFacadeFields inherited from class de.hybris.platform.b2bocc.v2.controllers.BaseController
BASIC_FIELD_SET, DEFAULT_CURRENT_PAGE, DEFAULT_FIELD_SET, DEFAULT_PAGE_SIZE, HEADER_TOTAL_COUNT, INVALID_REQUEST_BODY_ERROR_MESSAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCartEntries(String baseSiteId, String fields, OrderEntryListWsDTO entries) addCartEntry(String baseSiteId, String code, long quantity, String fields) protected List<OrderEntryData>convertToData(OrderEntryListWsDTO entriesWS) protected CartModificationDataListgetCurrentCart(String fields) protected OrderEntryDatagetOrderEntryData(long quantity, String productCode, Integer entryNumber) setCartCostCenter(String costCenterId, String fields) setCartDeliveryAddress(String addressId, String fields) setPaymentType(String paymentType, String purchaseOrderNumber, String fields) updateCartEntries(String baseSiteId, String fields, OrderEntryListWsDTO entries) updateCartEntry(String baseSiteId, int entryNumber, Long quantity, String fields) updateCartEntry(String baseSiteId, String product, Integer entryNumber, Long quantity, String fields) protected voidvalidateCartAddress(String addressId) Methods inherited from class de.hybris.platform.b2bocc.v2.controllers.BaseController
addPaginationField, getDataMapper, handleDuplicateUidException, handleErrorInternal, handleHttpMessageNotReadableException, handleModelNotFoundException, logParam, logParam, logParam, logValue, sanitize, setDataMapper, setTotalCountHeader, setTotalCountHeader, validate
-
Field Details
-
API_COMPATIBILITY_B2B_CHANNELS
- See Also:
-
userFacade
-
dataMapper
-
-
Constructor Details
-
B2BCartsController
public B2BCartsController()
-
-
Method Details
-
addCartEntry
@SiteChannelRestriction(allowedSiteChannelsProperty="api.compatibility.b2b.channels") @PostMapping("#{ ${occ.rewrite.overlapping.paths.enabled:false} ? \'/{baseSiteId}/orgUsers/{userId}\' : \'/{baseSiteId}/users/{userId}\'}/carts/{cartId}/entries") @ResponseBody public CartModificationWsDTO addCartEntry(@PathVariable String baseSiteId, @RequestParam(required=true) String code, @RequestParam(required=false,defaultValue="1") long quantity, @RequestParam(required=false,defaultValue="DEFAULT") String fields) -
updateCartEntry
@SiteChannelRestriction(allowedSiteChannelsProperty="api.compatibility.b2b.channels") @PutMapping("#{ ${occ.rewrite.overlapping.paths.enabled:false} ? \'/{baseSiteId}/orgUsers/{userId}\' : \'/{baseSiteId}/users/{userId}\'}/carts/{cartId}/entries/{entryNumber}") @ResponseBody public CartModificationWsDTO updateCartEntry(@PathVariable String baseSiteId, @PathVariable int entryNumber, @RequestParam(required=true) Long quantity, @RequestParam(required=false,defaultValue="DEFAULT") String fields) -
updateCartEntry
@SiteChannelRestriction(allowedSiteChannelsProperty="api.compatibility.b2b.channels") @PutMapping("#{ ${occ.rewrite.overlapping.paths.enabled:false} ? \'/{baseSiteId}/orgUsers/{userId}\' : \'/{baseSiteId}/users/{userId}\'}/carts/{cartId}/entries/") @ResponseBody public CartModificationWsDTO updateCartEntry(@PathVariable String baseSiteId, @RequestParam(required=false) String product, @RequestParam(required=false) Integer entryNumber, @RequestParam(required=true) Long quantity, @RequestParam(required=false,defaultValue="DEFAULT") String fields) -
addCartEntries
@SiteChannelRestriction(allowedSiteChannelsProperty="api.compatibility.b2b.channels") @PostMapping(value="#{ ${occ.rewrite.overlapping.paths.enabled:false} ? \'/{baseSiteId}/orgUsers/{userId}\' : \'/{baseSiteId}/users/{userId}\'}/carts/{cartId}/entries/", consumes="application/json") @ResponseBody public CartModificationListWsDTO addCartEntries(@PathVariable String baseSiteId, @RequestParam(required=false,defaultValue="DEFAULT") String fields, @RequestBody(required=true) OrderEntryListWsDTO entries) -
updateCartEntries
@SiteChannelRestriction(allowedSiteChannelsProperty="api.compatibility.b2b.channels") @PutMapping(value="#{ ${occ.rewrite.overlapping.paths.enabled:false} ? \'/{baseSiteId}/orgUsers/{userId}\' : \'/{baseSiteId}/users/{userId}\'}/carts/{cartId}/entries/", consumes="application/json") @ResponseBody public CartModificationListWsDTO updateCartEntries(@PathVariable String baseSiteId, @RequestParam(required=false,defaultValue="DEFAULT") String fields, @RequestBody(required=true) OrderEntryListWsDTO entries) -
setCartCostCenter
@Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @PutMapping("/{baseSiteId}/users/{userId}/carts/{cartId}/costcenter") @ResponseStatus(OK) @ResponseBody public CartWsDTO setCartCostCenter(@RequestParam(required=true) String costCenterId, @RequestParam(required=false,defaultValue="DEFAULT") String fields) -
setPaymentType
@Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @PutMapping("/{baseSiteId}/users/{userId}/carts/{cartId}/paymenttype") @ResponseStatus(OK) @ResponseBody public CartWsDTO setPaymentType(@RequestParam(required=true) String paymentType, @RequestParam(required=false) String purchaseOrderNumber, @RequestParam(required=false,defaultValue="DEFAULT") String fields) -
setCartDeliveryAddress
@Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @PutMapping("#{ ${occ.rewrite.overlapping.paths.enabled:false} ? \'/{baseSiteId}/orgUsers/{userId}\' : \'/{baseSiteId}/users/{userId}\'}/carts/{cartId}/addresses/delivery") @SiteChannelRestriction(allowedSiteChannelsProperty="api.compatibility.b2b.channels") @ResponseStatus(OK) @ResponseBody public CartWsDTO setCartDeliveryAddress(@RequestParam(required=true) String addressId, @RequestParam(required=false,defaultValue="DEFAULT") String fields) -
getCurrentCart
-
getCartModificationDataList
-
convertToData
-
getOrderEntryData
-
validateCartAddress
-