ProductPriceMapper
in package
implements
ProductPriceMapperInterface
Class ProductPriceMapper
Interfaces, Classes and Traits
- ProductPriceMapperInterface
- Interface ProductPriceMapperInterface
Table of Contents
- $reader : ProductPriceReaderInterface
- $writer : ProductPriceWriterInterface
- __construct() : mixed
- ProductPriceMapper constructor.
- delete() : void
- Deletes the product price from the storage.uanti
- findById() : ProductPriceInterface|null
- Returns the product price by given product id.
- findByQuantity() : GraduatedPriceInterface|null
- Returns the product prices that matches the given search condition.
- save() : ProductPriceInterface
- Saves or updates the given product price in the storage.
Properties
$reader
protected
ProductPriceReaderInterface
$reader
$writer
protected
ProductPriceWriterInterface
$writer
Methods
__construct()
ProductPriceMapper constructor.
public
__construct(ProductPriceAdapterInterface $dataAdapter) : mixed
Parameters
- $dataAdapter : ProductPriceAdapterInterface
Return values
mixed —delete()
Deletes the product price from the storage.uanti
public
delete(ProductPriceInterface $productPrice) : void
Parameters
- $productPrice : ProductPriceInterface
-
Product price to be removed.
Return values
void —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 prices that matches the given search condition.
public
findByQuantity(IdType $productId, IdType $customerGroupId, DecimalType $quantity) : GraduatedPriceInterface|null
Parameters
- $productId : IdType
-
Product id.
- $customerGroupId : IdType
-
Customer group id.
- $quantity : DecimalType
-
Quantity.
Return values
GraduatedPriceInterface|null —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.