ProductPriceMapper

Implements \ProductPriceMapperInterface

Class ProductPriceMapper

package

Default

Methods

ProductPriceMapper constructor.

__construct(\ProductPriceAdapterInterface $dataAdapter) 

Arguments

Deletes the product price from the storage.uanti

delete(\ProductPriceInterface $productPrice) : void

Arguments

$productPrice

\ProductPriceInterface

Product price to be removed.

Returns the product price by given product id.

findById(\IdType $productId) : \ProductPriceInterface|null

Arguments

$productId

\IdType

Response

\ProductPriceInterface|null

Returns the product prices that matches the given search condition.

findByQuantity(\IdType $productId, \IdType $customerGroupId, \DecimalType $quantity) : \GraduatedPriceInterface|null

Arguments

$productId

\IdType

Product id.

$customerGroupId

\IdType

Customer group id.

$quantity

\DecimalType

Quantity.

Response

\GraduatedPriceInterface|null

Saves or updates the given product price in the storage.

save(\ProductPriceInterface $productPrice, \IdType $productId) : \ProductPriceInterface
Throws
\EntityNotFoundException

If product does not exist

Arguments

$productPrice

\ProductPriceInterface

Product price to be saved or updated.

$productId

\IdType

Id of product to be updated.

Response

\ProductPriceInterface

Properties

reader

reader : \ProductPriceReaderInterface

writer

writer : \ProductPriceWriterInterface