3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'addDiscountCode' => MyCartAddDiscountCodeActionModel::class,
35 'addItemShippingAddress' => MyCartAddItemShippingAddressActionModel::class,
36 'addLineItem' => MyCartAddLineItemActionModel::class,
37 'addPayment' => MyCartAddPaymentActionModel::class,
38 'applyDeltaToLineItemShippingDetailsTargets' => MyCartApplyDeltaToLineItemShippingDetailsTargetsActionModel::class,
39 'changeLineItemQuantity' => MyCartChangeLineItemQuantityActionModel::class,
40 'changeLineItemsOrder' => MyCartChangeLineItemsOrderActionModel::class,
41 'changeTaxMode' => MyCartChangeTaxModeActionModel::class,
42 'recalculate' => MyCartRecalculateActionModel::class,
43 'removeDiscountCode' => MyCartRemoveDiscountCodeActionModel::class,
44 'removeItemShippingAddress' => MyCartRemoveItemShippingAddressActionModel::class,
45 'removeLineItem' => MyCartRemoveLineItemActionModel::class,
46 'removePayment' => MyCartRemovePaymentActionModel::class,
47 'setBillingAddress' => MyCartSetBillingAddressActionModel::class,
48 'setBusinessUnit' => MyCartSetBusinessUnitActionModel::class,
49 'setCountry' => MyCartSetCountryActionModel::class,
50 'setCustomField' => MyCartSetCustomFieldActionModel::class,
51 'setCustomType' => MyCartSetCustomTypeActionModel::class,
52 'setCustomerEmail' => MyCartSetCustomerEmailActionModel::class,
53 'setDeleteDaysAfterLastModification' => MyCartSetDeleteDaysAfterLastModificationActionModel::class,
54 'setLineItemCustomField' => MyCartSetLineItemCustomFieldActionModel::class,
55 'setLineItemCustomType' => MyCartSetLineItemCustomTypeActionModel::class,
56 'setLineItemDistributionChannel' => MyCartSetLineItemDistributionChannelActionModel::class,
57 'setLineItemShippingDetails' => MyCartSetLineItemShippingDetailsActionModel::class,
58 'setLineItemSupplyChannel' => MyCartSetLineItemSupplyChannelActionModel::class,
59 'setLocale' => MyCartSetLocaleActionModel::class,
60 'setShippingAddress' => MyCartSetShippingAddressActionModel::class,
61 'setShippingMethod' => MyCartSetShippingMethodActionModel::class,
62 'updateItemShippingAddress' => MyCartUpdateItemShippingAddressActionModel::class,
80 if (is_null($this->action)) {
82 $data = $this->
raw(self::FIELD_ACTION);
86 $this->action = (string) $data;
103 if (is_object($value) && isset($value->$fieldName)) {
105 $discriminatorValue = $value->$fieldName;
106 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
107 return self::$discriminatorClasses[$discriminatorValue];
110 if (is_array($value) && isset($value[$fieldName])) {
112 $discriminatorValue = $value[$fieldName];
113 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
114 return self::$discriminatorClasses[$discriminatorValue];
119 $type = MyCartUpdateActionModel::class;