1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* |
4
|
|
|
*/ |
5
|
|
|
|
6
|
|
|
namespace Commercetools\Core\Request\Carts\Command; |
7
|
|
|
|
8
|
|
|
use Commercetools\Core\Model\Cart\ItemShippingTargetCollection; |
9
|
|
|
use Commercetools\Core\Model\Common\Context; |
10
|
|
|
use Commercetools\Core\Request\AbstractAction; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* @package Commercetools\Core\Request\Carts\Command |
14
|
|
|
* @link https://docs.commercetools.com/http-api-projects-carts.html#apply-deltatocustomlineitemshippingdetailstargets |
15
|
|
|
* @method string getAction() |
16
|
|
|
* @method CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction setAction(string $action = null) |
17
|
|
|
* @method string getLineItemId() |
18
|
|
|
* @method CartApplyDeltaToLineItemShippingDetailsTargetsAction setLineItemId(string $lineItemId = null) |
19
|
|
|
* @method ItemShippingTargetCollection getTargetsDelta() |
20
|
|
|
* @codingStandardsIgnoreStart |
21
|
|
|
* @method CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction setTargetsDelta(ItemShippingTargetCollection $targetsDelta = null) |
22
|
|
|
* @codingStandardsIgnoreEnd |
23
|
|
|
* @method string getCustomLineItemId() |
24
|
|
|
* @codingStandardsIgnoreStart |
25
|
|
|
* @method CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction setCustomLineItemId(string $customLineItemId = null) |
26
|
|
|
* @codingStandardsIgnoreEnd |
27
|
|
|
*/ |
28
|
|
|
class CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction extends AbstractAction |
29
|
|
|
{ |
30
|
3 |
|
public function fieldDefinitions() |
31
|
|
|
{ |
32
|
|
|
return [ |
33
|
3 |
|
'action' => [static::TYPE => 'string'], |
34
|
3 |
|
'customLineItemId' => [static::TYPE => 'string'], |
35
|
3 |
|
'targetsDelta' => [static::TYPE => ItemShippingTargetCollection::class] |
36
|
|
|
]; |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @param array $data |
41
|
|
|
* @param Context|callable $context |
42
|
|
|
*/ |
43
|
3 |
|
public function __construct(array $data = [], Context $context = null) |
44
|
|
|
{ |
45
|
3 |
|
parent::__construct($data, $context); |
46
|
3 |
|
$this->setAction('applyDeltaToCustomLineItemShippingDetailsTargets'); |
47
|
3 |
|
} |
48
|
|
|
} |
49
|
|
|
|