PriceAssertion example

new PartialEntity())->assign(['taxId' => Uuid::randomHex()]),
            null,
        ];

        yield 'Price will be calculated' => [
            (new PartialEntity())->assign([
                'taxId' => Uuid::randomHex(),
                'price' => new PriceCollection([
                    new Price(Defaults::CURRENCY, 1, 1, false),
                ]),
            ]),
            new PriceAssertion(1.0, null, null),
        ];

        yield 'Reference price will be calculated' => [
            (new PartialEntity())->assign([
                'taxId' => Uuid::randomHex(),
                'price' => new PriceCollection([
                    new Price(Defaults::CURRENCY, 1, 1, false),
                ]),
                'purchaseUnit' => 0.5,
                'referenceUnit' => 1,
                'unitId' => Defaults::CURRENCY,
            ]),
Home | Imprint | This part of the site doesn't use cookies.