ProductPriceRepository

Implements \ProductPriceRepositoryInterface

Class ProductPriceRepository

category

System

package

ProductPrice

subpackage

Repositories

Methods

ProductPriceRepository constructor.

__construct(\ProductPriceMapperInterface $mapper) 

Arguments

Deletes the given product price from the storage.

delete(\ProductPriceInterface $productPrice) : \ProductPriceInterface

Arguments

$productPrice

\ProductPriceInterface

Product price to be deleted.

Response

\ProductPriceInterface

Returns the product price by given product id.

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

Arguments

$productId

\IdType

Product id.

Response

\ProductPriceInterface|null

Returns the product price that matches the given search condition.

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

Arguments

$productId

\IdType

Product id.

$customerGroupId

\IdType

Customer group id.

$quantity

\DecimalType

Quantity.

Response

\GraduatedPriceInterface

Saves or updates the given product price in the storage.

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

Arguments

$productPrice

\ProductPriceInterface

Product price to be saved or updated.

$productId

\IdType

Id of product to be updated.

Response

\ProductPriceInterface

Properties

mapper

mapper : \ProductPriceMapperInterface