3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addQuantity' => InventoryEntryAddQuantityActionModel::class,
35 'changeQuantity' => InventoryEntryChangeQuantityActionModel::class,
36 'removeQuantity' => InventoryEntryRemoveQuantityActionModel::class,
37 'setCustomField' => InventoryEntrySetCustomFieldActionModel::class,
38 'setCustomType' => InventoryEntrySetCustomTypeActionModel::class,
39 'setExpectedDelivery' => InventoryEntrySetExpectedDeliveryActionModel::class,
40 'setKey' => InventoryEntrySetKeyActionModel::class,
41 'setRestockableInDays' => InventoryEntrySetRestockableInDaysActionModel::class,
42 'setSupplyChannel' => InventoryEntrySetSupplyChannelActionModel::class,
60 if (is_null($this->action)) {
62 $data = $this->
raw(self::FIELD_ACTION);
66 $this->action = (string) $data;
83 if (is_object($value) && isset($value->$fieldName)) {
85 $discriminatorValue = $value->$fieldName;
86 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
87 return self::$discriminatorClasses[$discriminatorValue];
90 if (is_array($value) && isset($value[$fieldName])) {
92 $discriminatorValue = $value[$fieldName];
93 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
94 return self::$discriminatorClasses[$discriminatorValue];
99 $type = InventoryEntryUpdateActionModel::class;
const DISCRIMINATOR_VALUE
__construct(?string $action=null)
static resolveDiscriminatorClass($value)
const DISCRIMINATOR_FIELD