|
6 | 6 | use Commercetools\Core\Request\AbstractAction; |
7 | 7 | use Commercetools\Core\Request\Carts\Command\CartAddCustomLineItemAction; |
8 | 8 | use Commercetools\Core\Request\Carts\Command\CartAddDiscountCodeAction; |
| 9 | +use Commercetools\Core\Request\Carts\Command\CartAddItemShippingAddressAction; |
9 | 10 | use Commercetools\Core\Request\Carts\Command\CartAddLineItemAction; |
10 | 11 | use Commercetools\Core\Request\Carts\Command\CartAddPaymentAction; |
11 | 12 | use Commercetools\Core\Request\Carts\Command\CartAddShoppingListAction; |
| 13 | +use Commercetools\Core\Request\Carts\Command\CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction; |
| 14 | +use Commercetools\Core\Request\Carts\Command\CartApplyDeltaToLineItemShippingDetailsTargetsAction; |
12 | 15 | use Commercetools\Core\Request\Carts\Command\CartChangeCustomLineItemMoneyAction; |
13 | 16 | use Commercetools\Core\Request\Carts\Command\CartChangeCustomLineItemQuantityAction; |
14 | 17 | use Commercetools\Core\Request\Carts\Command\CartChangeLineItemQuantityAction; |
|
18 | 21 | use Commercetools\Core\Request\Carts\Command\CartRecalculateAction; |
19 | 22 | use Commercetools\Core\Request\Carts\Command\CartRemoveCustomLineItemAction; |
20 | 23 | use Commercetools\Core\Request\Carts\Command\CartRemoveDiscountCodeAction; |
| 24 | +use Commercetools\Core\Request\Carts\Command\CartRemoveItemShippingAddressAction; |
21 | 25 | use Commercetools\Core\Request\Carts\Command\CartRemoveLineItemAction; |
22 | 26 | use Commercetools\Core\Request\Carts\Command\CartRemovePaymentAction; |
23 | 27 | use Commercetools\Core\Request\Carts\Command\CartSetAnonymousIdAction; |
|
27 | 31 | use Commercetools\Core\Request\Carts\Command\CartSetCustomFieldAction; |
28 | 32 | use Commercetools\Core\Request\Carts\Command\CartSetCustomLineItemCustomFieldAction; |
29 | 33 | use Commercetools\Core\Request\Carts\Command\CartSetCustomLineItemCustomTypeAction; |
| 34 | +use Commercetools\Core\Request\Carts\Command\CartSetCustomLineItemShippingDetailsAction; |
30 | 35 | use Commercetools\Core\Request\Carts\Command\CartSetCustomLineItemTaxAmountAction; |
31 | 36 | use Commercetools\Core\Request\Carts\Command\CartSetCustomLineItemTaxRateAction; |
32 | 37 | use Commercetools\Core\Request\Carts\Command\CartSetCustomShippingMethodAction; |
|
38 | 43 | use Commercetools\Core\Request\Carts\Command\CartSetLineItemCustomFieldAction; |
39 | 44 | use Commercetools\Core\Request\Carts\Command\CartSetLineItemCustomTypeAction; |
40 | 45 | use Commercetools\Core\Request\Carts\Command\CartSetLineItemPriceAction; |
| 46 | +use Commercetools\Core\Request\Carts\Command\CartSetLineItemShippingDetailsAction; |
41 | 47 | use Commercetools\Core\Request\Carts\Command\CartSetLineItemTaxAmountAction; |
42 | 48 | use Commercetools\Core\Request\Carts\Command\CartSetLineItemTaxRateAction; |
43 | 49 | use Commercetools\Core\Request\Carts\Command\CartSetLineItemTotalPriceAction; |
|
47 | 53 | use Commercetools\Core\Request\Carts\Command\CartSetShippingMethodTaxAmountAction; |
48 | 54 | use Commercetools\Core\Request\Carts\Command\CartSetShippingMethodTaxRateAction; |
49 | 55 | use Commercetools\Core\Request\Carts\Command\CartSetShippingRateInputAction; |
| 56 | +use Commercetools\Core\Request\Carts\Command\CartUpdateItemShippingAddressAction; |
50 | 57 |
|
51 | 58 | class CartsActionBuilder |
52 | 59 | { |
@@ -74,6 +81,17 @@ public function addDiscountCode($action = null) |
74 | 81 | return $this; |
75 | 82 | } |
76 | 83 |
|
| 84 | + /** |
| 85 | + * |
| 86 | + * @param CartAddItemShippingAddressAction|callable $action |
| 87 | + * @return $this |
| 88 | + */ |
| 89 | + public function addItemShippingAddress($action = null) |
| 90 | + { |
| 91 | + $this->addAction($this->resolveAction(CartAddItemShippingAddressAction::class, $action)); |
| 92 | + return $this; |
| 93 | + } |
| 94 | + |
77 | 95 | /** |
78 | 96 | * @link https://docs.commercetools.com/http-api-projects-carts.html#add-lineitem |
79 | 97 | * @param CartAddLineItemAction|callable $action |
@@ -107,6 +125,29 @@ public function addShoppingList($action = null) |
107 | 125 | return $this; |
108 | 126 | } |
109 | 127 |
|
| 128 | + /** |
| 129 | + * @link https://docs.commercetools.com/http-api-projects-carts.html#apply-deltatocustomlineitemshippingdetailstargets |
| 130 | + * @param CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction|callable $action |
| 131 | + * @return $this |
| 132 | + */ |
| 133 | + public function applyDeltaToCustomLineItemShippingDetailsTargets($action = null) |
| 134 | + { |
| 135 | + // @codingStandardsIgnoreLine |
| 136 | + $this->addAction($this->resolveAction(CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction::class, $action)); |
| 137 | + return $this; |
| 138 | + } |
| 139 | + |
| 140 | + /** |
| 141 | + * @link https://docs.commercetools.com/http-api-projects-carts.html#apply-deltatolineitemshippingdetailstargets |
| 142 | + * @param CartApplyDeltaToLineItemShippingDetailsTargetsAction|callable $action |
| 143 | + * @return $this |
| 144 | + */ |
| 145 | + public function applyDeltaToLineItemShippingDetailsTargets($action = null) |
| 146 | + { |
| 147 | + $this->addAction($this->resolveAction(CartApplyDeltaToLineItemShippingDetailsTargetsAction::class, $action)); |
| 148 | + return $this; |
| 149 | + } |
| 150 | + |
110 | 151 | /** |
111 | 152 | * @link https://docs.commercetools.com/http-api-projects-carts.html#change-customlineitem-money |
112 | 153 | * @param CartChangeCustomLineItemMoneyAction|callable $action |
@@ -206,6 +247,17 @@ public function removeDiscountCode($action = null) |
206 | 247 | return $this; |
207 | 248 | } |
208 | 249 |
|
| 250 | + /** |
| 251 | + * |
| 252 | + * @param CartRemoveItemShippingAddressAction|callable $action |
| 253 | + * @return $this |
| 254 | + */ |
| 255 | + public function removeItemShippingAddress($action = null) |
| 256 | + { |
| 257 | + $this->addAction($this->resolveAction(CartRemoveItemShippingAddressAction::class, $action)); |
| 258 | + return $this; |
| 259 | + } |
| 260 | + |
209 | 261 | /** |
210 | 262 | * @link https://docs.commercetools.com/http-api-projects-carts.html#remove-lineitem |
211 | 263 | * @param CartRemoveLineItemAction|callable $action |
@@ -305,6 +357,17 @@ public function setCustomLineItemCustomType($action = null) |
305 | 357 | return $this; |
306 | 358 | } |
307 | 359 |
|
| 360 | + /** |
| 361 | + * |
| 362 | + * @param CartSetCustomLineItemShippingDetailsAction|callable $action |
| 363 | + * @return $this |
| 364 | + */ |
| 365 | + public function setCustomLineItemShippingDetails($action = null) |
| 366 | + { |
| 367 | + $this->addAction($this->resolveAction(CartSetCustomLineItemShippingDetailsAction::class, $action)); |
| 368 | + return $this; |
| 369 | + } |
| 370 | + |
308 | 371 | /** |
309 | 372 | * @link https://docs.commercetools.com/http-api-projects-carts.html#set-customlineitem-taxamount |
310 | 373 | * @param CartSetCustomLineItemTaxAmountAction|callable $action |
@@ -426,6 +489,17 @@ public function setLineItemPrice($action = null) |
426 | 489 | return $this; |
427 | 490 | } |
428 | 491 |
|
| 492 | + /** |
| 493 | + * @link https://docs.commercetools.com/http-api-projects-carts.html#set-lineitem-totalprice |
| 494 | + * @param CartSetLineItemShippingDetailsAction|callable $action |
| 495 | + * @return $this |
| 496 | + */ |
| 497 | + public function setLineItemShippingDetails($action = null) |
| 498 | + { |
| 499 | + $this->addAction($this->resolveAction(CartSetLineItemShippingDetailsAction::class, $action)); |
| 500 | + return $this; |
| 501 | + } |
| 502 | + |
429 | 503 | /** |
430 | 504 | * @link https://docs.commercetools.com/http-api-projects-carts.html#set-lineitem-taxamount |
431 | 505 | * @param CartSetLineItemTaxAmountAction|callable $action |
@@ -526,6 +600,17 @@ public function setShippingRateInput($action = null) |
526 | 600 | return $this; |
527 | 601 | } |
528 | 602 |
|
| 603 | + /** |
| 604 | + * |
| 605 | + * @param CartUpdateItemShippingAddressAction|callable $action |
| 606 | + * @return $this |
| 607 | + */ |
| 608 | + public function updateItemShippingAddress($action = null) |
| 609 | + { |
| 610 | + $this->addAction($this->resolveAction(CartUpdateItemShippingAddressAction::class, $action)); |
| 611 | + return $this; |
| 612 | + } |
| 613 | + |
529 | 614 | /** |
530 | 615 | * @return CartsActionBuilder |
531 | 616 | */ |
|
0 commit comments