@Path(value="shops/{shopId}/shipping-methods")
@RolesAllowed(value={"sf","products_read"})
public final class ShippingMethodsResource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private ShippingMethodService |
methodService |
private ShopRequestContextService |
shopService |
Constructor and Description |
---|
ShippingMethodsResource(ShippingMethodService methodService,
ShopRequestContextService shopService) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
deleteMethod(java.lang.String shopId,
java.lang.String shippingMethodId) |
javax.ws.rs.core.Response |
getAllMethods(java.lang.String shopId,
java.util.Locale locale)
Returns all shipping-methods of a shop.
|
javax.ws.rs.core.Response |
getMethod(java.lang.String shopId,
java.lang.String shippingMethodId,
java.util.Locale locale)
Returns a shipping-method of a shop.
|
private final ShippingMethodService methodService
private final ShopRequestContextService shopService
@Inject public ShippingMethodsResource(ShippingMethodService methodService, ShopRequestContextService shopService)
@GET @Produces(value="application/vnd.epages.v1+json, application/json") public javax.ws.rs.core.Response getAllMethods(@PathParam(value="shopId") java.lang.String shopId, @QueryParam(value="locale") java.util.Locale locale)
shopId
- The id of the shop.locale
- The ISO 639-1 for language code and ISO 3166-1 for country code. (Example: de_DE).@GET @Path(value="{shippingMethodId}") @Produces(value="application/vnd.epages.v1+json, application/json") public javax.ws.rs.core.Response getMethod(@PathParam(value="shopId") java.lang.String shopId, @PathParam(value="shippingMethodId") java.lang.String shippingMethodId, @QueryParam(value="locale") java.util.Locale locale)
shopId
- The id of the shop.shippingMethodId
- The id of the shipping-method.locale
- The ISO 639-1 for language code and ISO 3166-1 for country code. (Example: de_DE).@DELETE @Path(value="{shippingMethodId}") @Produces(value="application/vnd.epages.v1+json, application/json") @RolesAllowed(value="development") public javax.ws.rs.core.Response deleteMethod(@PathParam(value="shopId") java.lang.String shopId, @PathParam(value="shippingMethodId") java.lang.String shippingMethodId)