@Path(value="shops/{shopId}/carts/{cartId}/shipping-address")
@RolesAllowed(value={"sf","admin"})
public class CartShippingAddressResource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private CartAddressService |
addressService |
Constructor and Description |
---|
CartShippingAddressResource(CartAddressService addressService) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
deleteShippingAddress(java.lang.String shopId,
GUID cartId)
Deletes a shipping address for a specified cart
|
javax.ws.rs.core.Response |
updateShippingAddress(java.lang.String shopId,
GUID cartId,
ShippingAddress address)
Updates a shipping address for a specified cart
|
private final CartAddressService addressService
@Inject public CartShippingAddressResource(@Named(value="shipping") CartAddressService addressService)
@DELETE @Produces(value="application/vnd.epages.v1+json") public javax.ws.rs.core.Response deleteShippingAddress(@PathParam(value="shopId") java.lang.String shopId, @PathParam(value="cartId") GUID cartId)
shopId
- Unique identifier of the shopcartId
- Unique identifier of the cart@PUT @Produces(value="application/vnd.epages.v1+json") @Consumes(value="application/json") public javax.ws.rs.core.Response updateShippingAddress(@PathParam(value="shopId") java.lang.String shopId, @PathParam(value="cartId") GUID cartId, ShippingAddress address)
shopId
- Unique identifier of the shopcartId
- Unique identifier of the cartaddress
- address creation input. The required fields and their
validation depend on the shop registration set.