3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addAddress' => MyBusinessUnitAddAddressActionModel::class,
35 'addBillingAddressId' => MyBusinessUnitAddBillingAddressIdActionModel::class,
36 'addShippingAddressId' => MyBusinessUnitAddShippingAddressIdActionModel::class,
37 'changeAddress' => MyBusinessUnitChangeAddressActionModel::class,
38 'changeAssociate' => MyBusinessUnitChangeAssociateActionModel::class,
39 'changeName' => MyBusinessUnitChangeNameActionModel::class,
40 'changeParentUnit' => MyBusinessUnitChangeParentUnitActionModel::class,
41 'removeAddress' => MyBusinessUnitRemoveAddressActionModel::class,
42 'removeAssociate' => MyBusinessUnitRemoveAssociateActionModel::class,
43 'removeBillingAddressId' => MyBusinessUnitRemoveBillingAddressIdActionModel::class,
44 'removeShippingAddressId' => MyBusinessUnitRemoveShippingAddressIdActionModel::class,
45 'setAddressCustomField' => MyBusinessUnitSetAddressCustomFieldActionModel::class,
46 'setAddressCustomType' => MyBusinessUnitSetAddressCustomTypeActionModel::class,
47 'setContactEmail' => MyBusinessUnitSetContactEmailActionModel::class,
48 'setCustomField' => MyBusinessUnitSetCustomFieldActionModel::class,
49 'setCustomType' => MyBusinessUnitSetCustomTypeActionModel::class,
50 'setDefaultBillingAddress' => MyBusinessUnitSetDefaultBillingAddressActionModel::class,
51 'setDefaultShippingAddress' => MyBusinessUnitSetDefaultShippingAddressActionModel::class,
69 if (is_null($this->action)) {
71 $data = $this->
raw(self::FIELD_ACTION);
75 $this->action = (string) $data;
92 if (is_object($value) && isset($value->$fieldName)) {
94 $discriminatorValue = $value->$fieldName;
95 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
96 return self::$discriminatorClasses[$discriminatorValue];
99 if (is_array($value) && isset($value[$fieldName])) {
101 $discriminatorValue = $value[$fieldName];
102 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
103 return self::$discriminatorClasses[$discriminatorValue];
108 $type = MyBusinessUnitUpdateActionModel::class;