3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addTransaction' => MyPaymentAddTransactionActionModel::class,
35 'changeAmountPlanned' => MyPaymentChangeAmountPlannedActionModel::class,
36 'setCustomField' => MyPaymentSetCustomFieldActionModel::class,
37 'setMethodInfoInterface' => MyPaymentSetMethodInfoInterfaceActionModel::class,
38 'setMethodInfoMethod' => MyPaymentSetMethodInfoMethodActionModel::class,
39 'setMethodInfoName' => MyPaymentSetMethodInfoNameActionModel::class,
40 'setTransactionCustomField' => MyPaymentSetTransactionCustomFieldActionModel::class,
58 if (is_null($this->action)) {
60 $data = $this->
raw(self::FIELD_ACTION);
64 $this->action = (string) $data;
81 if (is_object($value) && isset($value->$fieldName)) {
83 $discriminatorValue = $value->$fieldName;
84 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
85 return self::$discriminatorClasses[$discriminatorValue];
88 if (is_array($value) && isset($value[$fieldName])) {
90 $discriminatorValue = $value[$fieldName];
91 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
92 return self::$discriminatorClasses[$discriminatorValue];
97 $type = MyPaymentUpdateActionModel::class;