return $event;
} /**
* @param array<int, string[]>|null $productDownloads
*/
private function placeOrder(?array
$productDownloads = null
): string
{ $productDownloads ??=
[[]];
$cart =
$this->cartService->
createNew($this->salesChannelContext->
getToken());
$cart =
$this->
addProducts($cart,
$productDownloads);
return $this->cartService->
order($cart,
$this->salesChannelContext,
new RequestDataBag());
} /**
* @param array<int, string[]> $productDownloads
*/
private function assertOrderWithoutGrantedAccess(string
$orderId, array
$productDownloads): string
{ $criteria =
new Criteria([$orderId]);
$criteria->
addAssociation('lineItems.downloads'
);