VariantListingConfigField example

static::assertSame(DataAbstractionLayerException::INVALID_FIELD_SERIALIZER_CODE, $e->getErrorCode());
        }
    }

    /** * @throws \JsonException */
    public function testDecode(): void
    {
        $json = '{"displayParent": true, "mainVariantId": "123", "configuratorGroupConfig": null}';

        $field = new VariantListingConfigField('test', 'test');

        $decoded = $this->serializer->decode($field$json);

        static::assertInstanceOf(VariantListingConfig::class$decoded);
        static::assertTrue($decoded->getDisplayParent());
        static::assertSame('123', $decoded->getMainVariantId());
        static::assertNull($decoded->getConfiguratorGroupConfig());
    }

    /** * @throws \JsonException */
new PriceField('price', 'price'))->addFlags(new Inherited()new Required()new ApiCriteriaAware()),
            (new NumberRangeField('product_number', 'productNumber'))->addFlags(new ApiAware()new SearchRanking(SearchRanking::HIGH_SEARCH_RANKING, false)new Required()),
            (new IntField('restock_time', 'restockTime'))->addFlags(new ApiAware()new Inherited()),
            new AutoIncrementField(),
            (new BoolField('active', 'active'))->addFlags(new ApiAware()new Inherited()),
            (new BoolField('available', 'available'))->addFlags(new ApiAware()new WriteProtected()),
            (new BoolField('is_closeout', 'isCloseout'))->addFlags(new ApiAware()new Inherited()),

            (new ListField('variation', 'variation', StringField::class))->addFlags(new Runtime(['options.name', 'options.group.name'])),
            (new StringField('display_group', 'displayGroup'))->addFlags(new ApiAware()new WriteProtected()),
            (new VariantListingConfigField('variant_listing_config', 'variantListingConfig'))->addFlags(new Inherited()),
            new JsonField('variant_restrictions', 'variantRestrictions'),
            (new StringField('manufacturer_number', 'manufacturerNumber'))->addFlags(new ApiAware()new Inherited()new SearchRanking(SearchRanking::MIDDLE_SEARCH_RANKING, false)),
            (new StringField('ean', 'ean'))->addFlags(new ApiAware()new Inherited()new SearchRanking(SearchRanking::MIDDLE_SEARCH_RANKING, false)),
            (new IntField('purchase_steps', 'purchaseSteps', 1))->addFlags(new ApiAware()new Inherited()),
            (new IntField('max_purchase', 'maxPurchase'))->addFlags(new ApiAware()new Inherited()),
            (new IntField('min_purchase', 'minPurchase', 1))->addFlags(new ApiAware()new Inherited()),
            (new FloatField('purchase_unit', 'purchaseUnit'))->addFlags(new ApiAware()new Inherited()),
            (new FloatField('reference_unit', 'referenceUnit'))->addFlags(new ApiAware()new Inherited()),
            (new BoolField('shipping_free', 'shippingFree'))->addFlags(new ApiAware()new Inherited()),
            (new PriceField('purchase_prices', 'purchasePrices'))->addFlags(new Inherited()),
            (new BoolField('mark_as_topseller', 'markAsTopseller'))->addFlags(new ApiAware()new Inherited()),
            (
Home | Imprint | This part of the site doesn't use cookies.