OrderReadService

Implements \OrderReadServiceInterface

Class OrderReadService

category

System

package

Order

Methods

OrderReadService Constructor

__construct(\OrderRepositoryInterface $orderRepository, \OrderItemRepositoryInterface $orderItemRepository, \OrderListGeneratorInterface $orderListGenerator) 

Arguments

$orderRepository

\OrderRepositoryInterface

$orderItemRepository

\OrderItemRepositoryInterface

$orderListGenerator

\OrderListGeneratorInterface

Filter the order records with specific conditions.

filterOrderList(array $filterParameters, \IntType $startIndex = null, \IntType $maxCount = null, \StringType $orderBy = null) : \OrderListItemCollection

Provide the filtering values in the conditions array in order to fetch a filtered result set.

Arguments

$filterParameters

array

Contains an array of the GET parameters to be used for filtering the order records.

$startIndex

\IntType

Start index of order list item collections which should be returned.

$maxCount

\IntType

Maximum amount of collections.

$orderBy

\StringType

Argument to specify the order.

Response

\OrderListItemCollection

Get the filtered orders count.

filterOrderListCount(array $filterParameters) : integer
Throws
\BadMethodCallException

Arguments

$filterParameters

array

Response

integer

Get Order by ID

getOrderById(\IdType $orderId) : \OrderInterface

Returns an order, depending on the provided order ID.

Arguments

$orderId

\IdType

Order ID of the wanted order

Response

\OrderInterface

Get a stored order item by ID.

getOrderItemById(\IdType $orderItemId) : \StoredOrderItemInterface

Returns a stored order item, depending on the provided order item ID.

Arguments

$orderItemId

\IdType

Order item ID.

Response

\StoredOrderItemInterface

Get Order List

getOrderList(\IntType $startIndex = null, \IntType $maxCount = null, \StringType $orderBy = null) : \OrderListItemCollection

Returns an OrderListItemCollection depending on the provided arguments.

Arguments

$startIndex

\IntType

Start index of order list item collections which should be returned.

$maxCount

\IntType

Maximum amount of collections.

$orderBy

\StringType

Argument to specify the order.

Response

\OrderListItemCollection

Get Order List by Customer ID

getOrderListByCustomerId(\IdType $customerId, \IntType $startIndex = null, \IntType $maxCount = null, \StringType $orderBy = null) : \OrderListItemCollection

Returns an OrderListItemCollection depending on the provided customer ID.

Arguments

$customerId

\IdType

Customer ID

$startIndex

\IntType

Start index of order list item collections which should be returned.

$maxCount

\IntType

Maximum amount of collections.

$orderBy

\StringType

Argument to specify the order.

Response

\OrderListItemCollection

Filter the order list by a string keyword.

getOrderListByKeyword(\StringType $keyword, \IntType $startIndex = null, \IntType $maxCount = null, \StringType $orderBy = null) : \OrderListItemCollection

Arguments

$keyword

\StringType

Keyword to be used for searching the order list items.

$startIndex

\IntType

Start index of order list item collections which should be returned.

$maxCount

\IntType

Maximum amount of collections.

$orderBy

\StringType

Argument to specify the order.

Response

\OrderListItemCollection

Get Count of orders filtered by keyword

getOrderListByKeywordCount(\StringType $keyword) : integer

Arguments

$keyword

\StringType

Keyword to be used for searching in orders list items.

Response

integer

Get Order List by Order Status ID

getOrderListByOrderStatusId(\IntType $orderStatusId, \IntType $startIndex = null, \IntType $maxCount = null, \StringType $orderBy = null) : \OrderListItemCollection

Returns an OrderListItemCollection depending on the provided order status ID.

Arguments

$orderStatusId

\IntType

Order status ID

$startIndex

\IntType

Start index of order list item collections which should be returned.

$maxCount

\IntType

Maximum amount of collections.

$orderBy

\StringType

Argument to specify the order.

Response

\OrderListItemCollection

Get the total count of all orders

getOrderListCount() : integer

Response

integer

searchOrders

searchOrders(\OrderSearchCondition $searchCondition, \Pager|null $pager) : mixed

Arguments

$searchCondition

\OrderSearchCondition

$pager

\Pager|null

Response

mixed

Properties

orderRepository

orderRepository : \OrderRepositoryInterface

orderItemRepository

orderItemRepository : \OrderItemRepositoryInterface

orderListGenerator

orderListGenerator : \OrderListGenerator
var

Type(s)

\OrderListGenerator