/** @var ProductEntity $product */
$product =
$products->
get($id);
static::
assertCount(2,
$product->
getPrices());
/** @var ProductPriceEntity $price */
$price =
$product->
getPrices()->
get($id);
static::
assertEquals($ruleA,
$price->
getRuleId());
static::
assertEquals(new Price(Defaults::CURRENCY, 4000, 5000, false
),
$price->
getPrice()->
get(Defaults::CURRENCY
));
static::
assertEquals(1,
$price->
getQuantityStart());
static::
assertEquals(20,
$price->
getQuantityEnd());
$id3 = Uuid::
randomHex();
$data =
[ 'id' =>
$id,
'prices' =>
[ [ 'id' =>
$id3,
'quantityStart' => 1,
'ruleId' =>
$ruleB,
'price' =>
[['currencyId' => Defaults::CURRENCY, 'gross' => 50, 'net' => 50, 'linked' => false
]],
],