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, \Pager|null $pager = null, array $sorters = array()) : \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.

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

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(\Pager|null $pager = null, array $sorters = array()) : \OrderListItemCollection

Returns an OrderListItemCollection depending on the provided arguments.

Arguments

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

\OrderListItemCollection

Order list item collection.

Returns an OrderListItemCollection depending on the provided customer ID.

getOrderListByCustomerId(\IdType $customerId, \Pager|null $pager = null, array $sorters = array()) : \OrderListItemCollection

Arguments

$customerId

\IdType

Customer ID

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

\OrderListItemCollection

Order list item collection.

Filter the order list by a string keyword.

getOrderListByKeyword(\StringType $keyword, \Pager|null $pager = null, array $sorters = array()) : \OrderListItemCollection

Arguments

$keyword

\StringType

Keyword to be used for searching the order list items.

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

\OrderListItemCollection

Order list item collection.

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

Returns an OrderListItemCollection depending on the provided order status ID.

getOrderListByOrderStatusId(\IntType $orderStatusId, \Pager|null $pager = null, array $sorters = array()) : \OrderListItemCollection

Arguments

$orderStatusId

\IntType

Order status ID

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

\OrderListItemCollection

Order list item collection.

Get the total count of all orders

getOrderListCount() : integer

Response

integer

searchOrders

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

Arguments

$searchCondition

\OrderSearchCondition

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

mixed

Properties

orderRepository

orderRepository : \OrderRepositoryInterface

orderItemRepository

orderItemRepository : \OrderItemRepositoryInterface

orderListGenerator

orderListGenerator : \OrderListGenerator
var

Type(s)

\OrderListGenerator