34 private static $discriminatorClasses = [
35 'customLineItems' => ChangeTargetCustomLineItemsChangeValueModel::class,
36 'lineItems' => ChangeTargetLineItemsChangeValueModel::class,
37 'multiBuyCustomLineItems' => ChangeTargetMultiBuyCustomLineItemsChangeValueModel::class,
38 'multiBuyLineItems' => ChangeTargetMultiBuyLineItemsChangeValueModel::class,
39 'pattern' => ChangeTargetPatternChangeValueModel::class,
40 'shipping' => ChangeTargetShippingChangeValueModel::class,
59 if (is_null($this->type)) {
61 $data = $this->
raw(self::FIELD_TYPE);
65 $this->type = (string) $data;
82 if (is_object($value) && isset($value->$fieldName)) {
84 $discriminatorValue = $value->$fieldName;
85 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
86 return self::$discriminatorClasses[$discriminatorValue];
89 if (is_array($value) && isset($value[$fieldName])) {
91 $discriminatorValue = $value[$fieldName];
92 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
93 return self::$discriminatorClasses[$discriminatorValue];
98 $type = ChangeTargetChangeValueModel::class;