ProductPriceRepository
in package
implements
ProductPriceRepositoryInterface
Class ProductPriceRepository
Tags
Interfaces, Classes and Traits
- ProductPriceRepositoryInterface
- Interface ProductPriceRepositoryInterface
Table of Contents
- $mapper : ProductPriceMapperInterface
- __construct() : mixed
- ProductPriceRepository constructor.
- delete() : ProductPriceInterface
- Deletes the given product price from the storage.
- findById() : ProductPriceInterface|null
- Returns the product price by given product id.
- findByQuantity() : GraduatedPriceInterface
- Returns the product price that matches the given search condition.
- save() : ProductPriceInterface
- Saves or updates the given product price in the storage.
Properties
$mapper
protected
ProductPriceMapperInterface
$mapper
Methods
__construct()
ProductPriceRepository constructor.
public
__construct(ProductPriceMapperInterface $mapper) : mixed
Parameters
- $mapper : ProductPriceMapperInterface
Return values
mixed —delete()
Deletes the given product price from the storage.
public
delete(ProductPriceInterface $productPrice) : ProductPriceInterface
Parameters
- $productPrice : ProductPriceInterface
-
Product price to be deleted.
Return values
ProductPriceInterface —findById()
Returns the product price by given product id.
public
findById(IdType $productId) : ProductPriceInterface|null
Parameters
- $productId : IdType
Return values
ProductPriceInterface|null —findByQuantity()
Returns the product price that matches the given search condition.
public
findByQuantity(IdType $productId, IdType $customerGroupId, DecimalType $quantity) : GraduatedPriceInterface
Parameters
- $productId : IdType
- $customerGroupId : IdType
- $quantity : DecimalType
Return values
GraduatedPriceInterface —save()
Saves or updates the given product price in the storage.
public
save(ProductPriceInterface $productPrice, IdType $productId) : ProductPriceInterface
Parameters
- $productPrice : ProductPriceInterface
-
Product price to be saved or updated.
- $productId : IdType
-
Id of product to be updated.