3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addPriceTier' => StandalonePriceAddPriceTierActionModel::class,
35 'applyStagedChanges' => StandalonePriceApplyStagedChangesActionModel::class,
36 'changeActive' => StandalonePriceChangeActiveActionModel::class,
37 'changeValue' => StandalonePriceChangeValueActionModel::class,
38 'removePriceTier' => StandalonePriceRemovePriceTierActionModel::class,
39 'removeStagedChanges' => StandalonePriceRemoveStagedChangesActionModel::class,
40 'setCustomField' => StandalonePriceSetCustomFieldActionModel::class,
41 'setCustomType' => StandalonePriceSetCustomTypeActionModel::class,
42 'setDiscountedPrice' => StandalonePriceSetDiscountedPriceActionModel::class,
43 'setKey' => StandalonePriceSetKeyActionModel::class,
44 'setPriceTiers' => StandalonePriceSetPriceTiersActionModel::class,
45 'setValidFrom' => StandalonePriceSetValidFromActionModel::class,
46 'setValidFromAndUntil' => StandalonePriceSetValidFromAndUntilActionModel::class,
47 'setValidUntil' => StandalonePriceSetValidUntilActionModel::class,
65 if (is_null($this->action)) {
67 $data = $this->
raw(self::FIELD_ACTION);
71 $this->action = (string) $data;
88 if (is_object($value) && isset($value->$fieldName)) {
90 $discriminatorValue = $value->$fieldName;
91 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
92 return self::$discriminatorClasses[$discriminatorValue];
95 if (is_array($value) && isset($value[$fieldName])) {
97 $discriminatorValue = $value[$fieldName];
98 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
99 return self::$discriminatorClasses[$discriminatorValue];
104 $type = StandalonePriceUpdateActionModel::class;