OrderStatusService

Implements \OrderStatusServiceInterface

Class OrderStatusService

category

System

package

OrderStatus

Methods

Class Constructor

__construct(\OrderStatusRepositoryInterface $repository) 

Arguments

Creates a new order status.

create(\OrderStatus $orderStatus) : integer

Arguments

$orderStatus

\OrderStatus

Order status entity with new data.

Response

integer

Id of new order status entity.

Returns an order status entity by the given order status id. If no data was found, null is returned.

find(\IntType $orderStatusId) : \OrderStatus|null

Arguments

$orderStatusId

\IntType

Id of expected OrderStatus entity.

Response

\OrderStatus|null

Whether the found order status entity or null.

Returns a collection with all order status.

findAll() : \OrderStatusCollection

Response

\OrderStatusCollection

Collection of all order status resources.

Returns an order status entity by the given order status id. If no data was found, an exception is thrown.

get(\IntType $orderStatusId) : \OrderStatus
Throws
\OrderStatusNotFoundException

If expected order status entity was not found by the given id.

Arguments

$orderStatusId

\IntType

Id of expected OrderStatus entity.

Response

\OrderStatus

Expected order status entity.

Removes an order status.

remove(\IntType $orderStatusId) : $this|\OrderStatusServiceInterface

Arguments

$orderStatusId

\IntType

Id of order status entity to be removed.

Response

$this|\OrderStatusServiceInterface

Same instance for chained method calls.

Updates an order status.

update(\OrderStatus $orderStatus) : $this|\OrderStatusServiceInterface

Arguments

$orderStatus

\OrderStatus

Order status entity with updated data.

Response

$this|\OrderStatusServiceInterface

Same instance for chained method calls.

Properties

repository

repository : \OrderStatusRepositoryInterface