$products =
$this->repository->
search($criteria,
$context);
static::
assertTrue($products->
has($id));
/** @var ProductEntity $product */
$product =
$products->
get($id);
static::
assertCount(1,
$product->
getPrices());
/** @var ProductPriceEntity $price */
$price =
$product->
getPrices()->
first();
static::
assertEquals($ruleA,
$price->
getRuleId());
$data =
[ 'id' =>
$id,
'prices' =>
[ // update existing rule with new price and quantity end to add another graduation
[ 'id' =>
$id,
'quantityEnd' => 20,
'price' =>
[['currencyId' => Defaults::CURRENCY, 'gross' => 5000, 'net' => 4000, 'linked' => false
]],
],