Class OrderController
java.lang.Object
de.hybris.platform.ycommercewebservices.v1.controller.BaseController
de.hybris.platform.ycommercewebservices.v1.controller.OrderController
@Controller("orderControllerV1")
@RequestMapping("/{baseSiteId}/orders")
public class OrderController
extends BaseController
Web Service Controller for the ORDERS resource. All methods check orders of the current user. Methods require basic
authentication and are restricted to https channel.
-
Field Summary
Fields inherited from class de.hybris.platform.ycommercewebservices.v1.controller.BaseController
DEFAULT_CURRENT_PAGE, DEFAULT_PAGE_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected OrderHistoriesDataexpressUpdate(String timestamp, String baseSiteId) Web service handler for order status update feed.protected Set<OrderStatus>extractOrderStatuses(String statuses) protected voidfilterOrderStatusQueue(OrderStatusUpdateElementDataList orderStatusUpdateDataList, String baseSiteId) Web service for getting current user's order information by order code.
Sample call: https://localhost:9002/rest/v1/mysite/orders/1234
This method requires authentication.
Method type :GET.
Method is restricted forHTTPSchannel.getOrderByGuid(String guid) Web service for getting order information by order GUID.
Sample call: https://localhost:9002/rest/v1/mysite/orders/byGuid/ea134b389f3d04b4821f51aa55c79f0766974f5f
Method type :GET.
Method is restricted forHTTPSchannel.getPagedOrdersForStatuses(String statuses, int currentPage, int pageSize, String sort) Web service for getting current user's order history data.
Sample call: https://localhost:9002/rest/v1/mysite/orders?statuses=COMPLETED,CANCELLED&pageSize=5¤tPage=0
This method requires authentication.
Method type :GET.
Method is restricted forHTTPSchannel.Methods inherited from class de.hybris.platform.ycommercewebservices.v1.controller.BaseController
handleErrorInternal, handleModelNotFoundException, sanitize
-
Constructor Details
-
OrderController
public OrderController()
-
-
Method Details
-
getOrder
@Secured("ROLE_CUSTOMERGROUP") @RequestMapping(value="/{code}", method=GET) @ResponseBody public OrderData getOrder(@PathVariable String code) Web service for getting current user's order information by order code.
Sample call: https://localhost:9002/rest/v1/mysite/orders/1234
This method requires authentication.
Method type :GET.
Method is restricted forHTTPSchannel.- Parameters:
code- - order code - must be given as path variable.- Returns:
OrderDataas response body.
-
getOrderByGuid
@Secured("ROLE_CLIENT") @RequestMapping(value="/byGuid/{guid}", method=GET) @ResponseBody public OrderData getOrderByGuid(@PathVariable String guid) Web service for getting order information by order GUID.
Sample call: https://localhost:9002/rest/v1/mysite/orders/byGuid/ea134b389f3d04b4821f51aa55c79f0766974f5f
Method type :GET.
Method is restricted forHTTPSchannel.- Parameters:
guid- - order guid - must be given as path variable.- Returns:
OrderDataas response body.
-
getPagedOrdersForStatuses
@Secured("ROLE_CUSTOMERGROUP") @RequestMapping(method=GET) @ResponseBody public OrderHistoriesData getPagedOrdersForStatuses(@RequestParam(required=false) String statuses, @RequestParam(required=false,defaultValue="0") int currentPage, @RequestParam(required=false,defaultValue="20") int pageSize, @RequestParam(required=false) String sort) Web service for getting current user's order history data.
Sample call: https://localhost:9002/rest/v1/mysite/orders?statuses=COMPLETED,CANCELLED&pageSize=5¤tPage=0
This method requires authentication.
Method type :GET.
Method is restricted forHTTPSchannel.- Parameters:
statuses- - filter for order statuses- optionalcurrentPage- - pagination parameter- optionalpageSize- -PaginationDataparameter - optionalsort- - sort criterion- Returns:
OrderDataas response body.
-
expressUpdate
@Secured("ROLE_TRUSTED_CLIENT") @RequestMapping(value="/statusFeed", method=GET) @ResponseBody public OrderStatusUpdateElementDataList expressUpdate(@RequestParam String timestamp, @PathVariable String baseSiteId) Web service handler for order status update feed. Returns only elements from the current baseSite newer than specified timestamp. Sample Call: http://localhost:9001/rest/v1/{SITE}/orders/statusFeed
This method requires trusted client authentication.
Method type :GET.
Method is restricted forHTTPSchannel.- Parameters:
timestamp- - time in ISO-8601 format- Returns:
OrderStatusUpdateElementDataList
-
filterOrderStatusQueue
protected void filterOrderStatusQueue(OrderStatusUpdateElementDataList orderStatusUpdateDataList, String baseSiteId) -
extractOrderStatuses
-
createOrderHistoriesData
-