3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addAddress' => MyCustomerAddAddressActionModel::class,
35 'addBillingAddressId' => MyCustomerAddBillingAddressIdActionModel::class,
36 'addShippingAddressId' => MyCustomerAddShippingAddressIdActionModel::class,
37 'changeAddress' => MyCustomerChangeAddressActionModel::class,
38 'changeEmail' => MyCustomerChangeEmailActionModel::class,
39 'removeAddress' => MyCustomerRemoveAddressActionModel::class,
40 'removeBillingAddressId' => MyCustomerRemoveBillingAddressIdActionModel::class,
41 'removeShippingAddressId' => MyCustomerRemoveShippingAddressIdActionModel::class,
42 'setCompanyName' => MyCustomerSetCompanyNameActionModel::class,
43 'setCustomField' => MyCustomerSetCustomFieldActionModel::class,
44 'setCustomType' => MyCustomerSetCustomTypeActionModel::class,
45 'setDateOfBirth' => MyCustomerSetDateOfBirthActionModel::class,
46 'setDefaultBillingAddress' => MyCustomerSetDefaultBillingAddressActionModel::class,
47 'setDefaultShippingAddress' => MyCustomerSetDefaultShippingAddressActionModel::class,
48 'setFirstName' => MyCustomerSetFirstNameActionModel::class,
49 'setLastName' => MyCustomerSetLastNameActionModel::class,
50 'setLocale' => MyCustomerSetLocaleActionModel::class,
51 'setMiddleName' => MyCustomerSetMiddleNameActionModel::class,
52 'setSalutation' => MyCustomerSetSalutationActionModel::class,
53 'setTitle' => MyCustomerSetTitleActionModel::class,
54 'setVatId' => MyCustomerSetVatIdActionModel::class,
72 if (is_null($this->action)) {
74 $data = $this->
raw(self::FIELD_ACTION);
78 $this->action = (string) $data;
95 if (is_object($value) && isset($value->$fieldName)) {
97 $discriminatorValue = $value->$fieldName;
98 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
99 return self::$discriminatorClasses[$discriminatorValue];
102 if (is_array($value) && isset($value[$fieldName])) {
104 $discriminatorValue = $value[$fieldName];
105 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
106 return self::$discriminatorClasses[$discriminatorValue];
111 $type = MyCustomerUpdateActionModel::class;