3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'changeCustomer' => QuoteRequestChangeCustomerActionModel::class,
35 'changeQuoteRequestState' => QuoteRequestChangeQuoteRequestStateActionModel::class,
36 'setCustomField' => QuoteRequestSetCustomFieldActionModel::class,
37 'setCustomType' => QuoteRequestSetCustomTypeActionModel::class,
38 'transitionState' => QuoteRequestTransitionStateActionModel::class,
56 if (is_null($this->action)) {
58 $data = $this->
raw(self::FIELD_ACTION);
62 $this->action = (string) $data;
79 if (is_object($value) && isset($value->$fieldName)) {
81 $discriminatorValue = $value->$fieldName;
82 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
83 return self::$discriminatorClasses[$discriminatorValue];
86 if (is_array($value) && isset($value[$fieldName])) {
88 $discriminatorValue = $value[$fieldName];
89 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
90 return self::$discriminatorClasses[$discriminatorValue];
95 $type = QuoteRequestUpdateActionModel::class;