@Path(value="shops/{shopId}/carts/{cartId}/line-items/")
public final class CartLineItemResource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private GUID |
cartId |
private CartService |
cartService |
private java.lang.String |
cartToken |
private java.lang.String |
shopId |
private ShopRequestContextService |
shopReqCtxService |
Constructor and Description |
---|
CartLineItemResource(ShopRequestContextService shopReqCtxService,
CartService cartService) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
createLineItem(LineItemInput item) |
javax.ws.rs.core.Response |
deleteLineItem(java.lang.String shopId,
GUID cartId,
GUID lineItemId) |
javax.ws.rs.core.Response |
updateLineItem(GUID lineItemId,
LineItemInput item) |
@PathParam(value="shopId") private java.lang.String shopId
@PathParam(value="cartId") private GUID cartId
@HeaderParam(value="X-ePages-Cart-Token") private java.lang.String cartToken
private final ShopRequestContextService shopReqCtxService
private final CartService cartService
@Inject public CartLineItemResource(ShopRequestContextService shopReqCtxService, CartService cartService)
@POST @Produces(value="application/vnd.epages.v1+json, application/json") @Consumes(value="application/json") @RolesAllowed(value={"sf","products_read"}) public javax.ws.rs.core.Response createLineItem(LineItemInput item)
@PUT @Path(value="{lineItemId}") @Consumes(value="application/json") @Produces(value="application/vnd.epages.v1+json, application/json") @RolesAllowed(value={"sf","products_read"}) public javax.ws.rs.core.Response updateLineItem(@PathParam(value="lineItemId") GUID lineItemId, LineItemInput item)
@DELETE @Path(value="{lineItemId}") @Produces(value="application/vnd.epages.v1+json, application/json") @RolesAllowed(value={"sf","products_read"}) public javax.ws.rs.core.Response deleteLineItem(@PathParam(value="shopId") java.lang.String shopId, @PathParam(value="cartId") GUID cartId, @PathParam(value="lineItemId") GUID lineItemId)