3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addAddress' => CustomerAddAddressActionModel::class,
35 'addBillingAddressId' => CustomerAddBillingAddressIdActionModel::class,
36 'addShippingAddressId' => CustomerAddShippingAddressIdActionModel::class,
37 'addStore' => CustomerAddStoreActionModel::class,
38 'changeAddress' => CustomerChangeAddressActionModel::class,
39 'changeEmail' => CustomerChangeEmailActionModel::class,
40 'removeAddress' => CustomerRemoveAddressActionModel::class,
41 'removeBillingAddressId' => CustomerRemoveBillingAddressIdActionModel::class,
42 'removeShippingAddressId' => CustomerRemoveShippingAddressIdActionModel::class,
43 'removeStore' => CustomerRemoveStoreActionModel::class,
44 'setAddressCustomField' => CustomerSetAddressCustomFieldActionModel::class,
45 'setAddressCustomType' => CustomerSetAddressCustomTypeActionModel::class,
46 'setAuthenticationMode' => CustomerSetAuthenticationModeActionModel::class,
47 'setCompanyName' => CustomerSetCompanyNameActionModel::class,
48 'setCustomField' => CustomerSetCustomFieldActionModel::class,
49 'setCustomType' => CustomerSetCustomTypeActionModel::class,
50 'setCustomerGroup' => CustomerSetCustomerGroupActionModel::class,
51 'setCustomerNumber' => CustomerSetCustomerNumberActionModel::class,
52 'setDateOfBirth' => CustomerSetDateOfBirthActionModel::class,
53 'setDefaultBillingAddress' => CustomerSetDefaultBillingAddressActionModel::class,
54 'setDefaultShippingAddress' => CustomerSetDefaultShippingAddressActionModel::class,
55 'setExternalId' => CustomerSetExternalIdActionModel::class,
56 'setFirstName' => CustomerSetFirstNameActionModel::class,
57 'setKey' => CustomerSetKeyActionModel::class,
58 'setLastName' => CustomerSetLastNameActionModel::class,
59 'setLocale' => CustomerSetLocaleActionModel::class,
60 'setMiddleName' => CustomerSetMiddleNameActionModel::class,
61 'setSalutation' => CustomerSetSalutationActionModel::class,
62 'setStores' => CustomerSetStoresActionModel::class,
63 'setTitle' => CustomerSetTitleActionModel::class,
64 'setVatId' => CustomerSetVatIdActionModel::class,
82 if (is_null($this->action)) {
84 $data = $this->
raw(self::FIELD_ACTION);
88 $this->action = (string) $data;
105 if (is_object($value) && isset($value->$fieldName)) {
107 $discriminatorValue = $value->$fieldName;
108 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
109 return self::$discriminatorClasses[$discriminatorValue];
112 if (is_array($value) && isset($value[$fieldName])) {
114 $discriminatorValue = $value[$fieldName];
115 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
116 return self::$discriminatorClasses[$discriminatorValue];
121 $type = CustomerUpdateActionModel::class;