src/Request/Orders/Command/OrderAddParcelToDeliveryAction.php 1 location
|
@@ 25-56 (lines=32) @@
|
22 |
|
* @method TrackingData getTrackingData() |
23 |
|
* @method OrderAddParcelToDeliveryAction setTrackingData(TrackingData $trackingData = null) |
24 |
|
*/ |
25 |
|
class OrderAddParcelToDeliveryAction extends AbstractAction |
26 |
|
{ |
27 |
|
public function fieldDefinitions() |
28 |
|
{ |
29 |
|
return [ |
30 |
|
'action' => [static::TYPE => 'string'], |
31 |
|
'deliveryId' => [static::TYPE => 'string'], |
32 |
|
'measurements' => [static::TYPE => '\Commercetools\Core\Model\Order\ParcelMeasurements'], |
33 |
|
'trackingData' => [static::TYPE => '\Commercetools\Core\Model\Order\TrackingData'] |
34 |
|
]; |
35 |
|
} |
36 |
|
|
37 |
|
/** |
38 |
|
* @param array $data |
39 |
|
* @param Context|callable $context |
40 |
|
*/ |
41 |
|
public function __construct(array $data = [], $context = null) |
42 |
|
{ |
43 |
|
parent::__construct($data, $context); |
44 |
|
$this->setAction('addParcelToDelivery'); |
45 |
|
} |
46 |
|
|
47 |
|
/** |
48 |
|
* @param string $deliveryId |
49 |
|
* @param Context|callable $context |
50 |
|
* @return OrderAddParcelToDeliveryAction |
51 |
|
*/ |
52 |
|
public static function ofDeliveryId($deliveryId, $context = null) |
53 |
|
{ |
54 |
|
return static::of($context)->setDeliveryId($deliveryId); |
55 |
|
} |
56 |
|
} |
57 |
|
|
src/Request/Orders/Command/OrderUpdateSyncInfoAction.php 1 location
|
@@ 25-59 (lines=35) @@
|
22 |
|
* @method DateTimeDecorator getSyncedAt() |
23 |
|
* @method OrderUpdateSyncInfoAction setSyncedAt(\DateTime $syncedAt = null) |
24 |
|
*/ |
25 |
|
class OrderUpdateSyncInfoAction extends AbstractAction |
26 |
|
{ |
27 |
|
/** |
28 |
|
* @param array $data |
29 |
|
* @param Context|callable $context |
30 |
|
*/ |
31 |
|
public function __construct(array $data = [], $context = null) |
32 |
|
{ |
33 |
|
parent::__construct($data, $context); |
34 |
|
$this->setAction('updateSyncInfo'); |
35 |
|
} |
36 |
|
|
37 |
|
public function fieldDefinitions() |
38 |
|
{ |
39 |
|
return [ |
40 |
|
'action' => [static::TYPE => 'string'], |
41 |
|
'channel' => [static::TYPE => '\Commercetools\Core\Model\Channel\ChannelReference'], |
42 |
|
'externalId' => [static::TYPE => 'string'], |
43 |
|
'syncedAt' => [ |
44 |
|
static::TYPE => '\DateTime', |
45 |
|
static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
46 |
|
] |
47 |
|
]; |
48 |
|
} |
49 |
|
|
50 |
|
/** |
51 |
|
* @param ChannelReference $channel |
52 |
|
* @param Context|callable $context |
53 |
|
* @return OrderUpdateSyncInfoAction |
54 |
|
*/ |
55 |
|
public static function ofChannel(ChannelReference $channel, $context = null) |
56 |
|
{ |
57 |
|
return static::of($context)->setChannel($channel); |
58 |
|
} |
59 |
|
} |
60 |
|
|
src/Request/Payments/Command/PaymentChangeTransactionTimestampAction.php 1 location
|
@@ 23-57 (lines=35) @@
|
20 |
|
* @method DateTimeDecorator getTimestamp() |
21 |
|
* @method PaymentChangeTransactionTimestampAction setTimestamp(\DateTime $timestamp = null) |
22 |
|
*/ |
23 |
|
class PaymentChangeTransactionTimestampAction extends AbstractAction |
24 |
|
{ |
25 |
|
public function fieldDefinitions() |
26 |
|
{ |
27 |
|
return [ |
28 |
|
'action' => [static::TYPE => 'string'], |
29 |
|
'transactionId' => [static::TYPE => 'string'], |
30 |
|
'timestamp' => [ |
31 |
|
static::TYPE => '\DateTime', |
32 |
|
static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator' |
33 |
|
], |
34 |
|
]; |
35 |
|
} |
36 |
|
|
37 |
|
/** |
38 |
|
* @param array $data |
39 |
|
* @param Context|callable $context |
40 |
|
*/ |
41 |
|
public function __construct(array $data = [], $context = null) |
42 |
|
{ |
43 |
|
parent::__construct($data, $context); |
44 |
|
$this->setAction('changeTransactionTimestamp'); |
45 |
|
} |
46 |
|
|
47 |
|
/** |
48 |
|
* @param string $transactionId |
49 |
|
* @param \DateTime $timestamp |
50 |
|
* @param Context|callable $context |
51 |
|
* @return PaymentAddTransactionAction |
52 |
|
*/ |
53 |
|
public static function ofTransactionIdAndTimestamp($transactionId, \DateTime $timestamp, $context = null) |
54 |
|
{ |
55 |
|
return static::of($context)->setTransactionId($transactionId)->setTimestamp($timestamp); |
56 |
|
} |
57 |
|
} |
58 |
|
|
src/Request/Products/Command/ProductChangePriceAction.php 1 location
|
@@ 24-56 (lines=33) @@
|
21 |
|
* @method string getPriceId() |
22 |
|
* @method ProductChangePriceAction setPriceId(string $priceId = null) |
23 |
|
*/ |
24 |
|
class ProductChangePriceAction extends AbstractAction |
25 |
|
{ |
26 |
|
public function fieldDefinitions() |
27 |
|
{ |
28 |
|
return [ |
29 |
|
'action' => [static::TYPE => 'string'], |
30 |
|
'priceId' => [static::TYPE => 'string'], |
31 |
|
'price' => [static::TYPE => '\Commercetools\Core\Model\Common\PriceDraft'], |
32 |
|
'staged' => [static::TYPE => 'bool'], |
33 |
|
]; |
34 |
|
} |
35 |
|
|
36 |
|
/** |
37 |
|
* @param array $data |
38 |
|
* @param Context|callable $context |
39 |
|
*/ |
40 |
|
public function __construct(array $data = [], $context = null) |
41 |
|
{ |
42 |
|
parent::__construct($data, $context); |
43 |
|
$this->setAction('changePrice'); |
44 |
|
} |
45 |
|
|
46 |
|
/** |
47 |
|
* @param string $priceId |
48 |
|
* @param PriceDraft $price |
49 |
|
* @param Context|callable $context |
50 |
|
* @return ProductChangePriceAction |
51 |
|
*/ |
52 |
|
public static function ofPriceIdAndPrice($priceId, PriceDraft $price, $context = null) |
53 |
|
{ |
54 |
|
return static::of($context)->setPriceId($priceId)->setPrice($price); |
55 |
|
} |
56 |
|
} |
57 |
|
|
src/Request/Products/Command/ProductSetAttributeInAllVariantsAction.php 1 location
|
@@ 23-54 (lines=32) @@
|
20 |
|
* @method bool getStaged() |
21 |
|
* @method ProductSetAttributeInAllVariantsAction setStaged(bool $staged = null) |
22 |
|
*/ |
23 |
|
class ProductSetAttributeInAllVariantsAction extends AbstractAction |
24 |
|
{ |
25 |
|
public function fieldDefinitions() |
26 |
|
{ |
27 |
|
return [ |
28 |
|
'action' => [static::TYPE => 'string'], |
29 |
|
'name' => [static::TYPE => 'string'], |
30 |
|
'value' => [static::TYPE => null], |
31 |
|
'staged' => [static::TYPE => 'bool'], |
32 |
|
]; |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param array $data |
37 |
|
* @param Context|callable $context |
38 |
|
*/ |
39 |
|
public function __construct(array $data = [], $context = null) |
40 |
|
{ |
41 |
|
parent::__construct($data, $context); |
42 |
|
$this->setAction('setAttributeInAllVariants'); |
43 |
|
} |
44 |
|
|
45 |
|
/** |
46 |
|
* @param string $name |
47 |
|
* @param Context|callable $context |
48 |
|
* @return ProductSetAttributeInAllVariantsAction |
49 |
|
*/ |
50 |
|
public static function ofName($name, $context = null) |
51 |
|
{ |
52 |
|
return static::of($context)->setName($name); |
53 |
|
} |
54 |
|
} |
55 |
|
|
src/Request/Products/Command/ProductSetCategoryOrderHintAction.php 1 location
|
@@ 24-55 (lines=32) @@
|
21 |
|
* @method bool getStaged() |
22 |
|
* @method ProductSetCategoryOrderHintAction setStaged(bool $staged = null) |
23 |
|
*/ |
24 |
|
class ProductSetCategoryOrderHintAction extends AbstractAction |
25 |
|
{ |
26 |
|
public function fieldDefinitions() |
27 |
|
{ |
28 |
|
return [ |
29 |
|
'action' => [static::TYPE => 'string'], |
30 |
|
'categoryId' => [static::TYPE => 'string'], |
31 |
|
'orderHint' => [static::TYPE => 'string'], |
32 |
|
'staged' => [static::TYPE => 'bool'], |
33 |
|
]; |
34 |
|
} |
35 |
|
|
36 |
|
/** |
37 |
|
* @param array $data |
38 |
|
* @param Context|callable $context |
39 |
|
*/ |
40 |
|
public function __construct(array $data = [], $context = null) |
41 |
|
{ |
42 |
|
parent::__construct($data, $context); |
43 |
|
$this->setAction('setCategoryOrderHint'); |
44 |
|
} |
45 |
|
|
46 |
|
/** |
47 |
|
* @param string $categoryId |
48 |
|
* @param Context|callable $context |
49 |
|
* @return ProductSetCategoryOrderHintAction |
50 |
|
*/ |
51 |
|
public static function ofCategoryId($categoryId, $context = null) |
52 |
|
{ |
53 |
|
return static::of($context)->setCategoryId($categoryId); |
54 |
|
} |
55 |
|
} |
56 |
|
|
src/Request/Products/Command/ProductSetSkuAction.php 1 location
|
@@ 23-54 (lines=32) @@
|
20 |
|
* @method bool getStaged() |
21 |
|
* @method ProductSetSkuAction setStaged(bool $staged = null) |
22 |
|
*/ |
23 |
|
class ProductSetSkuAction extends AbstractAction |
24 |
|
{ |
25 |
|
public function fieldDefinitions() |
26 |
|
{ |
27 |
|
return [ |
28 |
|
'action' => [static::TYPE => 'string'], |
29 |
|
'variantId' => [static::TYPE => 'int'], |
30 |
|
'sku' => [static::TYPE => 'string'], |
31 |
|
'staged' => [static::TYPE => 'bool'] |
32 |
|
]; |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param array $data |
37 |
|
* @param Context|callable $context |
38 |
|
*/ |
39 |
|
public function __construct(array $data = [], $context = null) |
40 |
|
{ |
41 |
|
parent::__construct($data, $context); |
42 |
|
$this->setAction('setSku'); |
43 |
|
} |
44 |
|
|
45 |
|
/** |
46 |
|
* @param int $variantId |
47 |
|
* @param Context|callable $context |
48 |
|
* @return ProductSetSkuAction |
49 |
|
*/ |
50 |
|
public static function ofVariantId($variantId, $context = null) |
51 |
|
{ |
52 |
|
return static::of($context)->setVariantId($variantId); |
53 |
|
} |
54 |
|
} |
55 |
|
|
src/Request/Products/Command/ProductSetSkuNotStageableAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method string getSku() |
20 |
|
* @method ProductSetSkuNotStageableAction setSku(string $sku = null) |
21 |
|
*/ |
22 |
|
class ProductSetSkuNotStageableAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'variantId' => [static::TYPE => 'int'], |
29 |
|
'sku' => [static::TYPE => 'string'], |
30 |
|
]; |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param array $data |
35 |
|
* @param Context|callable $context |
36 |
|
*/ |
37 |
|
public function __construct(array $data = [], $context = null) |
38 |
|
{ |
39 |
|
parent::__construct($data, $context); |
40 |
|
$this->setAction('setSKU'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param int $variantId |
45 |
|
* @param Context|callable $context |
46 |
|
* @return ProductSetSkuNotStageableAction |
47 |
|
*/ |
48 |
|
public static function ofVariantId($variantId, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setVariantId($variantId); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Request/Products/Command/ProductRemoveVariantAction.php 1 location
|
@@ 23-64 (lines=42) @@
|
20 |
|
* @method bool getStaged() |
21 |
|
* @method ProductRemoveVariantAction setStaged(bool $staged = null) |
22 |
|
*/ |
23 |
|
class ProductRemoveVariantAction extends AbstractAction |
24 |
|
{ |
25 |
|
public function fieldDefinitions() |
26 |
|
{ |
27 |
|
return [ |
28 |
|
'action' => [static::TYPE => 'string'], |
29 |
|
'id' => [static::TYPE => 'int'], |
30 |
|
'sku' => [static::TYPE => 'string'], |
31 |
|
'staged' => [static::TYPE => 'bool'], |
32 |
|
]; |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param array $data |
37 |
|
* @param Context|callable $context |
38 |
|
*/ |
39 |
|
public function __construct(array $data = [], $context = null) |
40 |
|
{ |
41 |
|
parent::__construct($data, $context); |
42 |
|
$this->setAction('removeVariant'); |
43 |
|
} |
44 |
|
|
45 |
|
/** |
46 |
|
* @param int $variantId |
47 |
|
* @param Context|callable $context |
48 |
|
* @return ProductRemovePriceAction |
49 |
|
*/ |
50 |
|
public static function ofVariantId($variantId, $context = null) |
51 |
|
{ |
52 |
|
return static::of($context)->setId($variantId); |
53 |
|
} |
54 |
|
|
55 |
|
/** |
56 |
|
* @param string $sku |
57 |
|
* @param Context|callable $context |
58 |
|
* @return ProductRemovePriceAction |
59 |
|
*/ |
60 |
|
public static function ofSku($sku, $context = null) |
61 |
|
{ |
62 |
|
return static::of($context)->setSku($sku); |
63 |
|
} |
64 |
|
} |
65 |
|
|
src/Request/Carts/Command/CartSetCustomLineItemTaxRateAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method ExternalTaxRateDraft getExternalTaxRate() |
20 |
|
* @method CartSetCustomLineItemTaxRateAction setExternalTaxRate(ExternalTaxRateDraft $externalTaxRate = null) |
21 |
|
*/ |
22 |
|
class CartSetCustomLineItemTaxRateAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'customLineItemId' => [static::TYPE => 'string'], |
29 |
|
'externalTaxRate' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft'], |
30 |
|
]; |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param array $data |
35 |
|
* @param Context|callable $context |
36 |
|
*/ |
37 |
|
public function __construct(array $data = [], $context = null) |
38 |
|
{ |
39 |
|
parent::__construct($data, $context); |
40 |
|
$this->setAction('setCustomLineItemTaxRate'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param $lineItemId |
45 |
|
* @param Context|callable $context |
46 |
|
* @return CartSetCustomLineItemTaxRateAction |
47 |
|
*/ |
48 |
|
public static function ofCustomLineItemId($lineItemId, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setCustomLineItemId($lineItemId); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Request/Carts/Command/CartSetLineItemTaxRateAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method ExternalTaxRateDraft getExternalTaxRate() |
20 |
|
* @method CartSetLineItemTaxRateAction setExternalTaxRate(ExternalTaxRateDraft $externalTaxRate = null) |
21 |
|
*/ |
22 |
|
class CartSetLineItemTaxRateAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'lineItemId' => [static::TYPE => 'string'], |
29 |
|
'externalTaxRate' => [static::TYPE => '\Commercetools\Core\Model\TaxCategory\ExternalTaxRateDraft'], |
30 |
|
]; |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param array $data |
35 |
|
* @param Context|callable $context |
36 |
|
*/ |
37 |
|
public function __construct(array $data = [], $context = null) |
38 |
|
{ |
39 |
|
parent::__construct($data, $context); |
40 |
|
$this->setAction('setLineItemTaxRate'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param $lineItemId |
45 |
|
* @param Context|callable $context |
46 |
|
* @return CartSetLineItemTaxRateAction |
47 |
|
*/ |
48 |
|
public static function ofLineItemId($lineItemId, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setLineItemId($lineItemId); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Request/Products/Command/ProductChangeMasterVariantAction.php 1 location
|
@@ 23-62 (lines=40) @@
|
20 |
|
* @method bool getStaged() |
21 |
|
* @method ProductChangeMasterVariantAction setStaged(bool $staged = null) |
22 |
|
*/ |
23 |
|
class ProductChangeMasterVariantAction extends AbstractAction |
24 |
|
{ |
25 |
|
public function fieldDefinitions() |
26 |
|
{ |
27 |
|
return [ |
28 |
|
'action' => [static::TYPE => 'string'], |
29 |
|
'variantId' => [static::TYPE => 'int'], |
30 |
|
'sku' => [static::TYPE => 'string'], |
31 |
|
'staged' => [static::TYPE => 'bool'], |
32 |
|
]; |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param array $data |
37 |
|
* @param Context|callable $context |
38 |
|
*/ |
39 |
|
public function __construct(array $data = [], $context = null) |
40 |
|
{ |
41 |
|
parent::__construct($data, $context); |
42 |
|
$this->setAction('changeMasterVariant'); |
43 |
|
} |
44 |
|
|
45 |
|
/** |
46 |
|
* @param $variantId |
47 |
|
* @return ProductChangeMasterVariantAction |
48 |
|
*/ |
49 |
|
public static function ofVariantId($variantId) |
50 |
|
{ |
51 |
|
return static::of()->setVariantId($variantId); |
52 |
|
} |
53 |
|
|
54 |
|
/** |
55 |
|
* @param $sku |
56 |
|
* @return ProductChangeMasterVariantAction |
57 |
|
*/ |
58 |
|
public static function ofSku($sku) |
59 |
|
{ |
60 |
|
return static::of()->setSku($sku); |
61 |
|
} |
62 |
|
} |
63 |
|
|
src/Request/Carts/Command/CartChangeCustomLineItemMoneyAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method Money getMoney() |
20 |
|
* @method CartChangeCustomLineItemMoneyAction setMoney(Money $money = null) |
21 |
|
*/ |
22 |
|
class CartChangeCustomLineItemMoneyAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'customLineItemId' => [static::TYPE => 'string'], |
29 |
|
'money' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'], |
30 |
|
]; |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param array $data |
35 |
|
* @param Context|callable $context |
36 |
|
*/ |
37 |
|
public function __construct(array $data = [], $context = null) |
38 |
|
{ |
39 |
|
parent::__construct($data, $context); |
40 |
|
$this->setAction('changeCustomLineItemMoney'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $customLineItemId |
45 |
|
* @param Money $money |
46 |
|
* @param Context|callable $context |
47 |
|
* @return CartSetLineItemTotalPriceAction |
48 |
|
*/ |
49 |
|
public static function ofCustomLineItemIdAndMoney($customLineItemId, Money $money, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setCustomLineItemId($customLineItemId)->setMoney($money); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Request/Carts/Command/CartChangeCustomLineItemQuantityAction.php 1 location
|
@@ 21-52 (lines=32) @@
|
18 |
|
* @method string getCustomLineItemId() |
19 |
|
* @method CartChangeCustomLineItemQuantityAction setCustomLineItemId(string $customLineItemId = null) |
20 |
|
*/ |
21 |
|
class CartChangeCustomLineItemQuantityAction extends AbstractAction |
22 |
|
{ |
23 |
|
public function fieldDefinitions() |
24 |
|
{ |
25 |
|
return [ |
26 |
|
'action' => [static::TYPE => 'string'], |
27 |
|
'customLineItemId' => [static::TYPE => 'string'], |
28 |
|
'quantity' => [static::TYPE => 'int'], |
29 |
|
]; |
30 |
|
} |
31 |
|
|
32 |
|
/** |
33 |
|
* @param array $data |
34 |
|
* @param Context|callable $context |
35 |
|
*/ |
36 |
|
public function __construct(array $data = [], $context = null) |
37 |
|
{ |
38 |
|
parent::__construct($data, $context); |
39 |
|
$this->setAction('changeCustomLineItemQuantity'); |
40 |
|
} |
41 |
|
|
42 |
|
/** |
43 |
|
* @param string $customLineItemId |
44 |
|
* @param int $quantity |
45 |
|
* @param Context|callable $context |
46 |
|
* @return CartChangeCustomLineItemQuantityAction |
47 |
|
*/ |
48 |
|
public static function ofCustomLineItemIdAndQuantity($customLineItemId, $quantity, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setCustomLineItemId($customLineItemId)->setQuantity($quantity); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Request/Carts/Command/CartSetLineItemTotalPriceAction.php 1 location
|
@@ 23-53 (lines=31) @@
|
20 |
|
* @method string getLineItemId() |
21 |
|
* @method CartSetLineItemTotalPriceAction setLineItemId(string $lineItemId = null) |
22 |
|
*/ |
23 |
|
class CartSetLineItemTotalPriceAction extends AbstractAction |
24 |
|
{ |
25 |
|
public function fieldDefinitions() |
26 |
|
{ |
27 |
|
return [ |
28 |
|
'action' => [static::TYPE => 'string'], |
29 |
|
'lineItemId' => [static::TYPE => 'string'], |
30 |
|
'externalTotalPrice' => [static::TYPE => '\Commercetools\Core\Model\Cart\ExternalLineItemTotalPrice'], |
31 |
|
]; |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
|
* @param array $data |
36 |
|
* @param Context|callable $context |
37 |
|
*/ |
38 |
|
public function __construct(array $data = [], $context = null) |
39 |
|
{ |
40 |
|
parent::__construct($data, $context); |
41 |
|
$this->setAction('setLineItemTotalPrice'); |
42 |
|
} |
43 |
|
|
44 |
|
/** |
45 |
|
* @param $lineItemId |
46 |
|
* @param Context|callable $context |
47 |
|
* @return CartSetLineItemTotalPriceAction |
48 |
|
*/ |
49 |
|
public static function ofLineItemId($lineItemId, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setLineItemId($lineItemId); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Request/Products/Command/ProductSetDiscountedPriceAction.php 1 location
|
@@ 24-55 (lines=32) @@
|
21 |
|
* @method DiscountedPrice getDiscounted() |
22 |
|
* @method ProductSetDiscountedPriceAction setDiscounted(DiscountedPrice $discounted = null) |
23 |
|
*/ |
24 |
|
class ProductSetDiscountedPriceAction extends AbstractAction |
25 |
|
{ |
26 |
|
public function fieldDefinitions() |
27 |
|
{ |
28 |
|
return [ |
29 |
|
'action' => [static::TYPE => 'string'], |
30 |
|
'priceId' => [static::TYPE => 'string'], |
31 |
|
'staged' => [static::TYPE => 'bool'], |
32 |
|
'discounted' => [static::TYPE => '\Commercetools\Core\Model\Common\DiscountedPrice'], |
33 |
|
]; |
34 |
|
} |
35 |
|
|
36 |
|
/** |
37 |
|
* @param array $data |
38 |
|
* @param Context|callable $context |
39 |
|
*/ |
40 |
|
public function __construct(array $data = [], $context = null) |
41 |
|
{ |
42 |
|
parent::__construct($data, $context); |
43 |
|
$this->setAction('setDiscountedPrice'); |
44 |
|
} |
45 |
|
|
46 |
|
/** |
47 |
|
* @param string $priceId |
48 |
|
* @param Context|callable $context |
49 |
|
* @return ProductSetDiscountedPriceAction |
50 |
|
*/ |
51 |
|
public static function ofPriceId($priceId, $context = null) |
52 |
|
{ |
53 |
|
return static::of($context)->setPriceId($priceId); |
54 |
|
} |
55 |
|
} |
56 |
|
|
src/Request/ProductTypes/Command/ProductTypeChangeLocalizedEnumLabelAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method LocalizedEnum getNewValue() |
20 |
|
* @method ProductTypeChangeLocalizedEnumLabelAction setNewValue(LocalizedEnum $newValue = null) |
21 |
|
*/ |
22 |
|
class ProductTypeChangeLocalizedEnumLabelAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'attributeName' => [static::TYPE => 'string'], |
29 |
|
'newValue' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedEnum'] |
30 |
|
]; |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param array $data |
35 |
|
* @param Context|callable $context |
36 |
|
*/ |
37 |
|
public function __construct(array $data = [], $context = null) |
38 |
|
{ |
39 |
|
parent::__construct($data, $context); |
40 |
|
$this->setAction('changeLocalizedEnumValueLabel'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $attributeName |
45 |
|
* @param LocalizedEnum $enum |
46 |
|
* @param Context|callable $context |
47 |
|
* @return ProductTypeChangeLabelAction |
48 |
|
*/ |
49 |
|
public static function ofAttributeNameAndEnumValue($attributeName, LocalizedEnum $enum, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setAttributeName($attributeName)->setNewValue($enum); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Request/ProductTypes/Command/ProductTypeChangePlainEnumLabelAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method Enum getNewValue() |
20 |
|
* @method ProductTypeChangePlainEnumLabelAction setNewValue(Enum $newValue = null) |
21 |
|
*/ |
22 |
|
class ProductTypeChangePlainEnumLabelAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'attributeName' => [static::TYPE => 'string'], |
29 |
|
'newValue' => [static::TYPE => '\Commercetools\Core\Model\Common\Enum'] |
30 |
|
]; |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param array $data |
35 |
|
* @param Context|callable $context |
36 |
|
*/ |
37 |
|
public function __construct(array $data = [], $context = null) |
38 |
|
{ |
39 |
|
parent::__construct($data, $context); |
40 |
|
$this->setAction('changePlainEnumValueLabel'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $attributeName |
45 |
|
* @param Enum $enum |
46 |
|
* @param Context|callable $context |
47 |
|
* @return ProductTypeChangeLabelAction |
48 |
|
*/ |
49 |
|
public static function ofAttributeNameAndEnumValue($attributeName, Enum $enum, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setAttributeName($attributeName)->setNewValue($enum); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Request/Carts/Command/CartAddShoppingListAction.php 1 location
|
@@ 25-54 (lines=30) @@
|
22 |
|
* @method ChannelReference getDistributionChannel() |
23 |
|
* @method CartAddShoppingListAction setDistributionChannel(ChannelReference $distributionChannel = null) |
24 |
|
*/ |
25 |
|
class CartAddShoppingListAction extends AbstractAction |
26 |
|
{ |
27 |
|
public function fieldDefinitions() |
28 |
|
{ |
29 |
|
return [ |
30 |
|
'action' => [static::TYPE => 'string'], |
31 |
|
'shoppingList' => [static::TYPE => '\Commercetools\Core\Model\ShoppingList\ShoppingListReference'], |
32 |
|
'supplyChannel' => [static::TYPE => '\Commercetools\Core\Model\Channel\ChannelReference'], |
33 |
|
'distributionChannel' => [static::TYPE => '\Commercetools\Core\Model\Channel\ChannelReference'], |
34 |
|
]; |
35 |
|
} |
36 |
|
|
37 |
|
/** |
38 |
|
* @param array $data |
39 |
|
* @param Context|callable $context |
40 |
|
*/ |
41 |
|
public function __construct(array $data = [], $context = null) |
42 |
|
{ |
43 |
|
parent::__construct($data, $context); |
44 |
|
$this->setAction('addShoppingList'); |
45 |
|
} |
46 |
|
|
47 |
|
public static function ofShoppingList( |
48 |
|
ShoppingListReference $shoppingList, |
49 |
|
$context = null |
50 |
|
) { |
51 |
|
return static::of($context) |
52 |
|
->setShoppingList($shoppingList); |
53 |
|
} |
54 |
|
} |
55 |
|
|
src/Request/Carts/Command/CartSetCustomLineItemCustomFieldAction.php 1 location
|
@@ 23-55 (lines=33) @@
|
20 |
|
* @method mixed getValue() |
21 |
|
* @method CartSetCustomLineItemCustomFieldAction setValue($value = null) |
22 |
|
*/ |
23 |
|
class CartSetCustomLineItemCustomFieldAction extends SetCustomFieldAction |
24 |
|
{ |
25 |
|
public function fieldDefinitions() |
26 |
|
{ |
27 |
|
return [ |
28 |
|
'action' => [static::TYPE => 'string'], |
29 |
|
'name' => [static::TYPE => 'string'], |
30 |
|
'customLineItemId' => [static::TYPE => 'string'], |
31 |
|
'value' => [static::TYPE => null], |
32 |
|
]; |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param array $data |
37 |
|
* @param Context|callable $context |
38 |
|
*/ |
39 |
|
public function __construct(array $data = [], $context = null) |
40 |
|
{ |
41 |
|
parent::__construct($data, $context); |
42 |
|
$this->setAction('setCustomLineItemCustomField'); |
43 |
|
} |
44 |
|
|
45 |
|
/** |
46 |
|
* @param string $customLineItemId |
47 |
|
* @param string $name |
48 |
|
* @param Context|callable $context |
49 |
|
* @return static |
50 |
|
*/ |
51 |
|
public static function ofCustomLineItemIdAndName($customLineItemId, $name, $context = null) |
52 |
|
{ |
53 |
|
return static::of($context)->setCustomLineItemId($customLineItemId)->setName($name); |
54 |
|
} |
55 |
|
} |
56 |
|
|
src/Request/Carts/Command/CartSetLineItemCustomFieldAction.php 1 location
|
@@ 23-55 (lines=33) @@
|
20 |
|
* @method mixed getValue() |
21 |
|
* @method CartSetLineItemCustomFieldAction setValue($value = null) |
22 |
|
*/ |
23 |
|
class CartSetLineItemCustomFieldAction extends SetCustomFieldAction |
24 |
|
{ |
25 |
|
public function fieldDefinitions() |
26 |
|
{ |
27 |
|
return [ |
28 |
|
'action' => [static::TYPE => 'string'], |
29 |
|
'name' => [static::TYPE => 'string'], |
30 |
|
'lineItemId' => [static::TYPE => 'string'], |
31 |
|
'value' => [static::TYPE => null], |
32 |
|
]; |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param array $data |
37 |
|
* @param Context|callable $context |
38 |
|
*/ |
39 |
|
public function __construct(array $data = [], $context = null) |
40 |
|
{ |
41 |
|
parent::__construct($data, $context); |
42 |
|
$this->setAction('setLineItemCustomField'); |
43 |
|
} |
44 |
|
|
45 |
|
/** |
46 |
|
* @param string $lineItemId |
47 |
|
* @param string $name |
48 |
|
* @param Context|callable $context |
49 |
|
* @return static |
50 |
|
*/ |
51 |
|
public static function ofLineItemIdAndName($lineItemId, $name, $context = null) |
52 |
|
{ |
53 |
|
return static::of($context)->setLineItemId($lineItemId)->setName($name); |
54 |
|
} |
55 |
|
} |
56 |
|
|
src/Request/Categories/Command/CategoryChangeAssetNameAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method string getAssetId() |
20 |
|
* @method CategoryChangeAssetNameAction setAssetId(string $assetId = null) |
21 |
|
*/ |
22 |
|
class CategoryChangeAssetNameAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'assetId' => [static::TYPE => 'string'], |
29 |
|
'name' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'], |
30 |
|
]; |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param array $data |
35 |
|
* @param Context|callable $context |
36 |
|
*/ |
37 |
|
public function __construct(array $data = [], $context = null) |
38 |
|
{ |
39 |
|
parent::__construct($data, $context); |
40 |
|
$this->setAction('changeAssetName'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $assetId |
45 |
|
* @param LocalizedString $name |
46 |
|
* @param Context|callable $context |
47 |
|
* @return CategoryChangeAssetNameAction |
48 |
|
*/ |
49 |
|
public static function ofAssetIdAndName($assetId, LocalizedString $name, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setAssetId($assetId)->setName($name); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Request/Categories/Command/CategorySetAssetCustomFieldAction.php 1 location
|
@@ 24-56 (lines=33) @@
|
21 |
|
* @method mixed getValue() |
22 |
|
* @method CategorySetAssetCustomFieldAction setValue($value = null) |
23 |
|
*/ |
24 |
|
class CategorySetAssetCustomFieldAction extends SetCustomFieldAction |
25 |
|
{ |
26 |
|
public function fieldDefinitions() |
27 |
|
{ |
28 |
|
return [ |
29 |
|
'action' => [static::TYPE => 'string'], |
30 |
|
'assetId' => [static::TYPE => 'string'], |
31 |
|
'name' => [static::TYPE => 'string'], |
32 |
|
'value' => [static::TYPE => null], |
33 |
|
]; |
34 |
|
} |
35 |
|
|
36 |
|
/** |
37 |
|
* @param array $data |
38 |
|
* @param Context|callable $context |
39 |
|
*/ |
40 |
|
public function __construct(array $data = [], $context = null) |
41 |
|
{ |
42 |
|
parent::__construct($data, $context); |
43 |
|
$this->setAction('setAssetCustomField'); |
44 |
|
} |
45 |
|
|
46 |
|
/** |
47 |
|
* @param string $assetId |
48 |
|
* @param string $name |
49 |
|
* @param Context|callable $context |
50 |
|
* @return CategorySetAssetCustomFieldAction |
51 |
|
*/ |
52 |
|
public static function ofAssetIdAndName($assetId, $name, $context = null) |
53 |
|
{ |
54 |
|
return static::of($context)->setAssetId($assetId)->setName($name); |
55 |
|
} |
56 |
|
} |
57 |
|
|
src/Request/Categories/Command/CategorySetAssetCustomTypeAction.php 1 location
|
@@ 25-57 (lines=33) @@
|
22 |
|
* @method FieldContainer getFields() |
23 |
|
* @method CategorySetAssetCustomTypeAction setFields(FieldContainer $fields = null) |
24 |
|
*/ |
25 |
|
class CategorySetAssetCustomTypeAction extends SetCustomTypeAction |
26 |
|
{ |
27 |
|
public function fieldDefinitions() |
28 |
|
{ |
29 |
|
return [ |
30 |
|
'action' => [static::TYPE => 'string'], |
31 |
|
'assetId' => [static::TYPE => 'string'], |
32 |
|
'type' => [static::TYPE => '\Commercetools\Core\Model\Type\TypeReference'], |
33 |
|
'fields' => [static::TYPE => '\Commercetools\Core\Model\CustomField\FieldContainer'], |
34 |
|
]; |
35 |
|
} |
36 |
|
|
37 |
|
/** |
38 |
|
* @param array $data |
39 |
|
* @param Context|callable $context |
40 |
|
*/ |
41 |
|
public function __construct(array $data = [], $context = null) |
42 |
|
{ |
43 |
|
parent::__construct($data, $context); |
44 |
|
$this->setAction('setAssetCustomType'); |
45 |
|
} |
46 |
|
|
47 |
|
/** |
48 |
|
* @param TypeReference $type |
49 |
|
* @param string $assetId |
50 |
|
* @param Context|callable $context |
51 |
|
* @return CategorySetAssetCustomTypeAction |
52 |
|
*/ |
53 |
|
public static function ofTypeAssetIdAndName(TypeReference $type, $assetId, $context = null) |
54 |
|
{ |
55 |
|
return static::of($context)->setType($type)->setAssetId($assetId); |
56 |
|
} |
57 |
|
} |
58 |
|
|
src/Request/Categories/Command/CategorySetAssetDescriptionAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method LocalizedString getDescription() |
20 |
|
* @method CategorySetAssetDescriptionAction setDescription(LocalizedString $description = null) |
21 |
|
*/ |
22 |
|
class CategorySetAssetDescriptionAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'assetId' => [static::TYPE => 'string'], |
29 |
|
'description' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'], |
30 |
|
]; |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param array $data |
35 |
|
* @param Context|callable $context |
36 |
|
*/ |
37 |
|
public function __construct(array $data = [], $context = null) |
38 |
|
{ |
39 |
|
parent::__construct($data, $context); |
40 |
|
$this->setAction('setAssetDescription'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $assetId |
45 |
|
* @param Context|callable $context |
46 |
|
* @return CategorySetAssetDescriptionAction |
47 |
|
*/ |
48 |
|
public static function ofAssetId($assetId, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setAssetId($assetId); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Request/Categories/Command/CategorySetAssetSourcesAction.php 1 location
|
@@ 23-53 (lines=31) @@
|
20 |
|
* @method AssetSourceCollection getSources() |
21 |
|
* @method CategorySetAssetSourcesAction setSources(AssetSourceCollection $sources = null) |
22 |
|
*/ |
23 |
|
class CategorySetAssetSourcesAction extends AbstractAction |
24 |
|
{ |
25 |
|
public function fieldDefinitions() |
26 |
|
{ |
27 |
|
return [ |
28 |
|
'action' => [static::TYPE => 'string'], |
29 |
|
'assetId' => [static::TYPE => 'string'], |
30 |
|
'sources' => [static::TYPE => '\Commercetools\Core\Model\Common\AssetSourceCollection'], |
31 |
|
]; |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
|
* @param array $data |
36 |
|
* @param Context|callable $context |
37 |
|
*/ |
38 |
|
public function __construct(array $data = [], $context = null) |
39 |
|
{ |
40 |
|
parent::__construct($data, $context); |
41 |
|
$this->setAction('setAssetSources'); |
42 |
|
} |
43 |
|
|
44 |
|
/** |
45 |
|
* @param string $assetId |
46 |
|
* @param Context|callable $context |
47 |
|
* @return CategorySetAssetSourcesAction |
48 |
|
*/ |
49 |
|
public static function ofAssetId($assetId, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setAssetId($assetId); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Request/Categories/Command/CategorySetAssetTagsAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method array getTags() |
20 |
|
* @method CategorySetAssetTagsAction setTags(array $tags = null) |
21 |
|
*/ |
22 |
|
class CategorySetAssetTagsAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'assetId' => [static::TYPE => 'string'], |
29 |
|
'tags' => [static::TYPE => 'array'], |
30 |
|
]; |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param array $data |
35 |
|
* @param Context|callable $context |
36 |
|
*/ |
37 |
|
public function __construct(array $data = [], $context = null) |
38 |
|
{ |
39 |
|
parent::__construct($data, $context); |
40 |
|
$this->setAction('setAssetTags'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $assetId |
45 |
|
* @param Context|callable $context |
46 |
|
* @return CategorySetAssetTagsAction |
47 |
|
*/ |
48 |
|
public static function ofAssetId($assetId, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setAssetId($assetId); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Request/ShoppingLists/Command/ShoppingListChangeLineItemQuantityAction.php 1 location
|
@@ 21-52 (lines=32) @@
|
18 |
|
* @method int getQuantity() |
19 |
|
* @method ShoppingListChangeLineItemQuantityAction setQuantity(int $quantity = null) |
20 |
|
*/ |
21 |
|
class ShoppingListChangeLineItemQuantityAction extends AbstractAction |
22 |
|
{ |
23 |
|
public function fieldDefinitions() |
24 |
|
{ |
25 |
|
return [ |
26 |
|
'action' => [static::TYPE => 'string'], |
27 |
|
'lineItemId' => [static::TYPE => 'string'], |
28 |
|
'quantity' => [static::TYPE => 'int'], |
29 |
|
]; |
30 |
|
} |
31 |
|
|
32 |
|
/** |
33 |
|
* @param array $data |
34 |
|
* @param Context|callable $context |
35 |
|
*/ |
36 |
|
public function __construct(array $data = [], $context = null) |
37 |
|
{ |
38 |
|
parent::__construct($data, $context); |
39 |
|
$this->setAction('changeLineItemQuantity'); |
40 |
|
} |
41 |
|
|
42 |
|
/** |
43 |
|
* @param string $lineItemId |
44 |
|
* @param int $quantity |
45 |
|
* @param Context|callable $context |
46 |
|
* @return ShoppingListChangeLineItemQuantityAction |
47 |
|
*/ |
48 |
|
public static function ofLineItemIdAndQuantity($lineItemId, $quantity, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setLineItemId($lineItemId)->setQuantity($quantity); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Request/ShoppingLists/Command/ShoppingListChangeTextLineItemNameAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method LocalizedString getName() |
20 |
|
* @method ShoppingListChangeTextLineItemNameAction setName(LocalizedString $name = null) |
21 |
|
*/ |
22 |
|
class ShoppingListChangeTextLineItemNameAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'textLineItemId' => [static::TYPE => 'string'], |
29 |
|
'name' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'], |
30 |
|
]; |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param array $data |
35 |
|
* @param Context|callable $context |
36 |
|
*/ |
37 |
|
public function __construct(array $data = [], $context = null) |
38 |
|
{ |
39 |
|
parent::__construct($data, $context); |
40 |
|
$this->setAction('changeTextLineItemName'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $textLineItemId |
45 |
|
* @param LocalizedString $name |
46 |
|
* @param Context|callable $context |
47 |
|
* @return ShoppingListChangeTextLineItemNameAction |
48 |
|
*/ |
49 |
|
public static function ofTextLineItemIdAndName($textLineItemId, $name, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setTextLineItemId($textLineItemId)->setName($name); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Request/ShoppingLists/Command/ShoppingListChangeTextLineItemQuantityAction.php 1 location
|
@@ 21-52 (lines=32) @@
|
18 |
|
* @method int getQuantity() |
19 |
|
* @method ShoppingListChangeTextLineItemQuantityAction setQuantity(int $quantity = null) |
20 |
|
*/ |
21 |
|
class ShoppingListChangeTextLineItemQuantityAction extends AbstractAction |
22 |
|
{ |
23 |
|
public function fieldDefinitions() |
24 |
|
{ |
25 |
|
return [ |
26 |
|
'action' => [static::TYPE => 'string'], |
27 |
|
'textLineItemId' => [static::TYPE => 'string'], |
28 |
|
'quantity' => [static::TYPE => 'int'], |
29 |
|
]; |
30 |
|
} |
31 |
|
|
32 |
|
/** |
33 |
|
* @param array $data |
34 |
|
* @param Context|callable $context |
35 |
|
*/ |
36 |
|
public function __construct(array $data = [], $context = null) |
37 |
|
{ |
38 |
|
parent::__construct($data, $context); |
39 |
|
$this->setAction('changeTextLineItemQuantity'); |
40 |
|
} |
41 |
|
|
42 |
|
/** |
43 |
|
* @param string $textLineItemId |
44 |
|
* @param int $quantity |
45 |
|
* @param Context|callable $context |
46 |
|
* @return ShoppingListChangeTextLineItemQuantityAction |
47 |
|
*/ |
48 |
|
public static function ofTextLineItemIdAndQuantity($textLineItemId, $quantity, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setTextLineItemId($textLineItemId)->setQuantity($quantity); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Request/ShoppingLists/Command/ShoppingListRemoveLineItemAction.php 1 location
|
@@ 21-51 (lines=31) @@
|
18 |
|
* @method int getQuantity() |
19 |
|
* @method ShoppingListRemoveLineItemAction setQuantity(int $quantity = null) |
20 |
|
*/ |
21 |
|
class ShoppingListRemoveLineItemAction extends AbstractAction |
22 |
|
{ |
23 |
|
public function fieldDefinitions() |
24 |
|
{ |
25 |
|
return [ |
26 |
|
'action' => [static::TYPE => 'string'], |
27 |
|
'lineItemId' => [static::TYPE => 'string'], |
28 |
|
'quantity' => [static::TYPE => 'int'], |
29 |
|
]; |
30 |
|
} |
31 |
|
|
32 |
|
/** |
33 |
|
* @param array $data |
34 |
|
* @param Context|callable $context |
35 |
|
*/ |
36 |
|
public function __construct(array $data = [], $context = null) |
37 |
|
{ |
38 |
|
parent::__construct($data, $context); |
39 |
|
$this->setAction('removeLineItem'); |
40 |
|
} |
41 |
|
|
42 |
|
/** |
43 |
|
* @param $lineItemId |
44 |
|
* @param Context|callable $context |
45 |
|
* @return ShoppingListRemoveLineItemAction |
46 |
|
*/ |
47 |
|
public static function ofLineItemId($lineItemId, $context = null) |
48 |
|
{ |
49 |
|
return static::of($context)->setLineItemId($lineItemId); |
50 |
|
} |
51 |
|
} |
52 |
|
|
src/Request/ShoppingLists/Command/ShoppingListRemoveTextLineItemAction.php 1 location
|
@@ 21-51 (lines=31) @@
|
18 |
|
* @method int getQuantity() |
19 |
|
* @method ShoppingListRemoveTextLineItemAction setQuantity(int $quantity = null) |
20 |
|
*/ |
21 |
|
class ShoppingListRemoveTextLineItemAction extends AbstractAction |
22 |
|
{ |
23 |
|
public function fieldDefinitions() |
24 |
|
{ |
25 |
|
return [ |
26 |
|
'action' => [static::TYPE => 'string'], |
27 |
|
'textLineItemId' => [static::TYPE => 'string'], |
28 |
|
'quantity' => [static::TYPE => 'int'], |
29 |
|
]; |
30 |
|
} |
31 |
|
|
32 |
|
/** |
33 |
|
* @param array $data |
34 |
|
* @param Context|callable $context |
35 |
|
*/ |
36 |
|
public function __construct(array $data = [], $context = null) |
37 |
|
{ |
38 |
|
parent::__construct($data, $context); |
39 |
|
$this->setAction('removeTextLineItem'); |
40 |
|
} |
41 |
|
|
42 |
|
/** |
43 |
|
* @param string $textLineItemId |
44 |
|
* @param Context|callable $context |
45 |
|
* @return ShoppingListRemoveTextLineItemAction |
46 |
|
*/ |
47 |
|
public static function ofTextLineItemId($textLineItemId, $context = null) |
48 |
|
{ |
49 |
|
return static::of($context)->setTextLineItemId($textLineItemId); |
50 |
|
} |
51 |
|
} |
52 |
|
|
src/Request/ShoppingLists/Command/ShoppingListSetLineItemCustomFieldAction.php 1 location
|
@@ 23-55 (lines=33) @@
|
20 |
|
* @method mixed getValue() |
21 |
|
* @method ShoppingListSetLineItemCustomFieldAction setValue($value = null) |
22 |
|
*/ |
23 |
|
class ShoppingListSetLineItemCustomFieldAction extends SetCustomFieldAction |
24 |
|
{ |
25 |
|
public function fieldDefinitions() |
26 |
|
{ |
27 |
|
return [ |
28 |
|
'action' => [static::TYPE => 'string'], |
29 |
|
'name' => [static::TYPE => 'string'], |
30 |
|
'lineItemId' => [static::TYPE => 'string'], |
31 |
|
'value' => [static::TYPE => null], |
32 |
|
]; |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param array $data |
37 |
|
* @param Context|callable $context |
38 |
|
*/ |
39 |
|
public function __construct(array $data = [], $context = null) |
40 |
|
{ |
41 |
|
parent::__construct($data, $context); |
42 |
|
$this->setAction('setLineItemCustomField'); |
43 |
|
} |
44 |
|
|
45 |
|
/** |
46 |
|
* @param string $lineItemId |
47 |
|
* @param string $name |
48 |
|
* @param Context|callable $context |
49 |
|
* @return static |
50 |
|
*/ |
51 |
|
public static function ofLineItemIdAndName($lineItemId, $name, $context = null) |
52 |
|
{ |
53 |
|
return static::of($context)->setLineItemId($lineItemId)->setName($name); |
54 |
|
} |
55 |
|
} |
56 |
|
|
src/Request/ShoppingLists/Command/ShoppingListSetTextLineItemCustomFieldAction.php 1 location
|
@@ 23-55 (lines=33) @@
|
20 |
|
* @method mixed getValue() |
21 |
|
* @method ShoppingListSetTextLineItemCustomFieldAction setValue($value = null) |
22 |
|
*/ |
23 |
|
class ShoppingListSetTextLineItemCustomFieldAction extends SetCustomFieldAction |
24 |
|
{ |
25 |
|
public function fieldDefinitions() |
26 |
|
{ |
27 |
|
return [ |
28 |
|
'action' => [static::TYPE => 'string'], |
29 |
|
'name' => [static::TYPE => 'string'], |
30 |
|
'textLineItemId' => [static::TYPE => 'string'], |
31 |
|
'value' => [static::TYPE => null], |
32 |
|
]; |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @param array $data |
37 |
|
* @param Context|callable $context |
38 |
|
*/ |
39 |
|
public function __construct(array $data = [], $context = null) |
40 |
|
{ |
41 |
|
parent::__construct($data, $context); |
42 |
|
$this->setAction('setTextLineItemCustomField'); |
43 |
|
} |
44 |
|
|
45 |
|
/** |
46 |
|
* @param string $textLineItemId |
47 |
|
* @param string $name |
48 |
|
* @param Context|callable $context |
49 |
|
* @return static |
50 |
|
*/ |
51 |
|
public static function ofTextLineItemIdAndName($textLineItemId, $name, $context = null) |
52 |
|
{ |
53 |
|
return static::of($context)->setTextLineItemId($textLineItemId)->setName($name); |
54 |
|
} |
55 |
|
} |
56 |
|
|
src/Request/ShoppingLists/Command/ShoppingListSetTextLineItemDescriptionAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method LocalizedString getDescription() |
20 |
|
* @method ShoppingListSetTextLineItemDescriptionAction setDescription(LocalizedString $description = null) |
21 |
|
*/ |
22 |
|
class ShoppingListSetTextLineItemDescriptionAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'textLineItemId' => [static::TYPE => 'string'], |
29 |
|
'description' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'], |
30 |
|
]; |
31 |
|
} |
32 |
|
|
33 |
|
/** |
34 |
|
* @param array $data |
35 |
|
* @param Context|callable $context |
36 |
|
*/ |
37 |
|
public function __construct(array $data = [], $context = null) |
38 |
|
{ |
39 |
|
parent::__construct($data, $context); |
40 |
|
$this->setAction('setTextLineItemDescription'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $textLineItemId |
45 |
|
* @param Context|callable $context |
46 |
|
* @return ShoppingListSetTextLineItemDescriptionAction |
47 |
|
*/ |
48 |
|
public static function ofTextLineItemId($textLineItemId, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setTextLineItemId($textLineItemId); |
51 |
|
} |
52 |
|
} |
53 |
|
|