src/Core/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 => Money::class], |
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 CartChangeCustomLineItemMoneyAction |
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/Core/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/Core/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/Core/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 => ExternalTaxRateDraft::class], |
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/Core/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/Core/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 => ExternalTaxRateDraft::class], |
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/Core/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 => LocalizedString::class], |
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/Core/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/Core/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 => LocalizedString::class], |
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/Core/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/Core/Request/Customers/Command/CustomerChangeAddressAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method string getAction() |
20 |
|
* @method CustomerChangeAddressAction setAction(string $action = null) |
21 |
|
*/ |
22 |
|
class CustomerChangeAddressAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'addressId' => [static::TYPE => 'string'], |
29 |
|
'address' => [static::TYPE => Address::class], |
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('changeAddress'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $addressId |
45 |
|
* @param Address $address |
46 |
|
* @param Context|callable $context |
47 |
|
* @return CustomerChangeAddressAction |
48 |
|
*/ |
49 |
|
public static function ofAddressIdAndAddress($addressId, Address $address, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setAddressId($addressId)->setAddress($address); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Core/Request/Orders/Command/OrderImportCustomLineItemStateAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method ItemStateCollection getState() |
20 |
|
* @method OrderImportCustomLineItemStateAction setState(ItemStateCollection $state = null) |
21 |
|
*/ |
22 |
|
class OrderImportCustomLineItemStateAction extends AbstractAction |
23 |
|
{ |
24 |
|
/** |
25 |
|
* @param array $data |
26 |
|
* @param Context|callable $context |
27 |
|
*/ |
28 |
|
public function __construct(array $data = [], $context = null) |
29 |
|
{ |
30 |
|
parent::__construct($data, $context); |
31 |
|
$this->setAction('importCustomLineItemState'); |
32 |
|
} |
33 |
|
|
34 |
|
public function fieldDefinitions() |
35 |
|
{ |
36 |
|
return [ |
37 |
|
'action' => [static::TYPE => 'string'], |
38 |
|
'customLineItemId' => [static::TYPE => 'string'], |
39 |
|
'state' => [static::TYPE => ItemStateCollection::class] |
40 |
|
]; |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $customLineItemId |
45 |
|
* @param ItemStateCollection $state |
46 |
|
* @param Context|callable $context |
47 |
|
* @return OrderImportCustomLineItemStateAction |
48 |
|
*/ |
49 |
|
public static function ofCustomLineItemIdAndState($customLineItemId, ItemStateCollection $state, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setCustomLineItemId($customLineItemId)->setState($state); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Core/Request/Orders/Command/OrderImportLineItemStateAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method ItemStateCollection getState() |
20 |
|
* @method OrderImportLineItemStateAction setState(ItemStateCollection $state = null) |
21 |
|
*/ |
22 |
|
class OrderImportLineItemStateAction extends AbstractAction |
23 |
|
{ |
24 |
|
/** |
25 |
|
* @param array $data |
26 |
|
* @param Context|callable $context |
27 |
|
*/ |
28 |
|
public function __construct(array $data = [], $context = null) |
29 |
|
{ |
30 |
|
parent::__construct($data, $context); |
31 |
|
$this->setAction('importLineItemState'); |
32 |
|
} |
33 |
|
|
34 |
|
public function fieldDefinitions() |
35 |
|
{ |
36 |
|
return [ |
37 |
|
'action' => [static::TYPE => 'string'], |
38 |
|
'lineItemId' => [static::TYPE => 'string'], |
39 |
|
'state' => [static::TYPE => ItemStateCollection::class] |
40 |
|
]; |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $lineItemId |
45 |
|
* @param ItemStateCollection $state |
46 |
|
* @param Context|callable $context |
47 |
|
* @return OrderImportLineItemStateAction |
48 |
|
*/ |
49 |
|
public static function ofLineItemIdAndState($lineItemId, ItemStateCollection $state, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setLineItemId($lineItemId)->setState($state); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Core/Request/Products/Command/ProductAddToCategoryAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method bool getStaged() |
20 |
|
* @method ProductAddToCategoryAction setStaged(bool $staged = null) |
21 |
|
*/ |
22 |
|
class ProductAddToCategoryAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'category' => [static::TYPE => CategoryReference::class], |
29 |
|
'staged' => [static::TYPE => 'bool'] |
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('addToCategory'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param CategoryReference $categoryReference |
45 |
|
* @param Context|callable $context |
46 |
|
* @return ProductAddToCategoryAction |
47 |
|
*/ |
48 |
|
public static function ofCategory(CategoryReference $categoryReference, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setCategory($categoryReference); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Core/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/Core/Request/Products/Command/ProductChangeNameAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method bool getStaged() |
20 |
|
* @method ProductChangeNameAction setStaged(bool $staged = null) |
21 |
|
*/ |
22 |
|
class ProductChangeNameAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'name' => [static::TYPE => LocalizedString::class], |
29 |
|
'staged' => [static::TYPE => 'bool'], |
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('changeName'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param LocalizedString $name |
45 |
|
* @param Context|callable $context |
46 |
|
* @return ProductChangeNameAction |
47 |
|
*/ |
48 |
|
public static function ofName(LocalizedString $name, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setName($name); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Core/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 => PriceDraft::class], |
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/Core/Request/Products/Command/ProductChangeSlugAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method bool getStaged() |
20 |
|
* @method ProductChangeSlugAction setStaged(bool $staged = null) |
21 |
|
*/ |
22 |
|
class ProductChangeSlugAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'slug' => [static::TYPE => LocalizedString::class], |
29 |
|
'staged' => [static::TYPE => 'bool'], |
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('changeSlug'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param LocalizedString $slug |
45 |
|
* @param Context|callable $context |
46 |
|
* @return ProductChangeSlugAction |
47 |
|
*/ |
48 |
|
public static function ofSlug(LocalizedString $slug, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setSlug($slug); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Core/Request/Products/Command/ProductRemoveFromCategoryAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method bool getStaged() |
20 |
|
* @method ProductRemoveFromCategoryAction setStaged(bool $staged = null) |
21 |
|
*/ |
22 |
|
class ProductRemoveFromCategoryAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'category' => [static::TYPE => CategoryReference::class], |
29 |
|
'staged' => [static::TYPE => 'bool'] |
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('removeFromCategory'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param CategoryReference $categoryReference |
45 |
|
* @param Context|callable $context |
46 |
|
* @return ProductRemoveFromCategoryAction |
47 |
|
*/ |
48 |
|
public static function ofCategory(CategoryReference $categoryReference, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setCategory($categoryReference); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Core/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 ProductRemoveVariantAction |
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 ProductRemoveVariantAction |
59 |
|
*/ |
60 |
|
public static function ofSku($sku, $context = null) |
61 |
|
{ |
62 |
|
return static::of($context)->setSku($sku); |
63 |
|
} |
64 |
|
} |
65 |
|
|
src/Core/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/Core/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/Core/Request/Products/Command/ProductSetDescriptionAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method bool getStaged() |
20 |
|
* @method ProductSetDescriptionAction setStaged(bool $staged = null) |
21 |
|
*/ |
22 |
|
class ProductSetDescriptionAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'description' => [static::TYPE => LocalizedString::class], |
29 |
|
'staged' => [static::TYPE => 'bool'], |
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('setDescription'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param LocalizedString $description |
45 |
|
* @param Context|callable $context |
46 |
|
* @return ProductSetDescriptionAction |
47 |
|
*/ |
48 |
|
public static function ofDescription(LocalizedString $description, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setDescription($description); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Core/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 => DiscountedPrice::class], |
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/Core/Request/Products/Command/ProductSetSearchKeywordsAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method bool getStaged() |
20 |
|
* @method ProductSetSearchKeywordsAction setStaged(bool $staged = null) |
21 |
|
*/ |
22 |
|
class ProductSetSearchKeywordsAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'searchKeywords' => [static::TYPE => LocalizedSearchKeywords::class], |
29 |
|
'staged' => [static::TYPE => 'bool'], |
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('setSearchKeywords'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param LocalizedSearchKeywords $keywords |
45 |
|
* @param Context|callable $context |
46 |
|
* @return ProductSetSearchKeywordsAction |
47 |
|
*/ |
48 |
|
public static function ofKeywords(LocalizedSearchKeywords $keywords, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setSearchKeywords($keywords); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Core/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/Core/Request/ProductTypes/Command/ProductTypeAddLocalizedEnumValueAction.php 1 location
|
@@ 24-55 (lines=32) @@
|
21 |
|
* @method LocalizedEnum getValue() |
22 |
|
* @method ProductTypeAddLocalizedEnumValueAction setValue(LocalizedEnum $value = null) |
23 |
|
*/ |
24 |
|
class ProductTypeAddLocalizedEnumValueAction extends AbstractAction |
25 |
|
{ |
26 |
|
public function fieldDefinitions() |
27 |
|
{ |
28 |
|
return [ |
29 |
|
'action' => [static::TYPE => 'string'], |
30 |
|
'attributeName' => [static::TYPE => 'string'], |
31 |
|
'value' => [static::TYPE => LocalizedEnum::class] |
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('addLocalizedEnumValue'); |
43 |
|
} |
44 |
|
|
45 |
|
/** |
46 |
|
* @param string $attributeName |
47 |
|
* @param LocalizedEnum $value |
48 |
|
* @param Context|callable $context |
49 |
|
* @return ProductTypeAddLocalizedEnumValueAction |
50 |
|
*/ |
51 |
|
public static function ofAttributeNameAndValue($attributeName, LocalizedEnum $value, $context = null) |
52 |
|
{ |
53 |
|
return static::of($context)->setAttributeName($attributeName)->setValue($value); |
54 |
|
} |
55 |
|
} |
56 |
|
|
src/Core/Request/ProductTypes/Command/ProductTypeAddPlainEnumValueAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method Enum getValue() |
20 |
|
* @method ProductTypeAddPlainEnumValueAction setValue(Enum $value = null) |
21 |
|
*/ |
22 |
|
class ProductTypeAddPlainEnumValueAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'attributeName' => [static::TYPE => 'string'], |
29 |
|
'value' => [static::TYPE => Enum::class] |
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('addPlainEnumValue'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $attributeName |
45 |
|
* @param Enum $value |
46 |
|
* @param Context|callable $context |
47 |
|
* @return ProductTypeAddPlainEnumValueAction |
48 |
|
*/ |
49 |
|
public static function ofAttributeNameAndValue($attributeName, Enum $value, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setAttributeName($attributeName)->setValue($value); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Core/Request/ProductTypes/Command/ProductTypeChangeIsSearchableAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method bool getIsSearchable() |
20 |
|
* @method ProductTypeChangeIsSearchableAction setIsSearchable(bool $isSearchable = null) |
21 |
|
*/ |
22 |
|
class ProductTypeChangeIsSearchableAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'attributeName' => [static::TYPE => 'string'], |
29 |
|
'isSearchable' => [static::TYPE => 'bool'] |
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('changeIsSearchable'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $attributeName |
45 |
|
* @param bool $isSearchable |
46 |
|
* @param Context|callable $context |
47 |
|
* @return ProductTypeChangeIsSearchableAction |
48 |
|
*/ |
49 |
|
public static function ofAttributeNameAndIsSearchable($attributeName, $isSearchable, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setAttributeName($attributeName)->setIsSearchable($isSearchable); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Core/Request/ProductTypes/Command/ProductTypeChangeLabelAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method LocalizedString getLabel() |
20 |
|
* @method ProductTypeChangeLabelAction setLabel(LocalizedString $label = null) |
21 |
|
*/ |
22 |
|
class ProductTypeChangeLabelAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'attributeName' => [static::TYPE => 'string'], |
29 |
|
'label' => [static::TYPE => LocalizedString::class] |
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('changeLabel'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $attributeName |
45 |
|
* @param LocalizedString $label |
46 |
|
* @param Context|callable $context |
47 |
|
* @return ProductTypeChangeLabelAction |
48 |
|
*/ |
49 |
|
public static function ofAttributeNameAndLabel($attributeName, LocalizedString $label, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setAttributeName($attributeName)->setLabel($label); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Core/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 => LocalizedEnum::class] |
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 ProductTypeChangeLocalizedEnumLabelAction |
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/Core/Request/ProductTypes/Command/ProductTypeChangeLocalizedEnumValueOrderAction.php 1 location
|
@@ 24-55 (lines=32) @@
|
21 |
|
* @method LocalizedEnumCollection getValues() |
22 |
|
* @method ProductTypeChangeLocalizedEnumValueOrderAction setValues(LocalizedEnumCollection $values = null) |
23 |
|
*/ |
24 |
|
class ProductTypeChangeLocalizedEnumValueOrderAction extends AbstractAction |
25 |
|
{ |
26 |
|
public function fieldDefinitions() |
27 |
|
{ |
28 |
|
return [ |
29 |
|
'action' => [static::TYPE => 'string'], |
30 |
|
'attributeName' => [static::TYPE => 'string'], |
31 |
|
'values' => [static::TYPE => LocalizedEnumCollection::class] |
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('changeLocalizedEnumValueOrder'); |
43 |
|
} |
44 |
|
|
45 |
|
/** |
46 |
|
* @param string $attributeName |
47 |
|
* @param LocalizedEnumCollection $values |
48 |
|
* @param Context|callable $context |
49 |
|
* @return ProductTypeChangeLocalizedEnumValueOrderAction |
50 |
|
*/ |
51 |
|
public static function ofAttributeNameAndValues($attributeName, LocalizedEnumCollection $values, $context = null) |
52 |
|
{ |
53 |
|
return static::of($context)->setAttributeName($attributeName)->setValues($values); |
54 |
|
} |
55 |
|
} |
56 |
|
|
src/Core/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 => Enum::class] |
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 ProductTypeChangePlainEnumLabelAction |
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/Core/Request/ProductTypes/Command/ProductTypeChangePlainEnumValueOrderAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method EnumCollection getValues() |
20 |
|
* @method ProductTypeChangePlainEnumValueOrderAction setValues(EnumCollection $values = null) |
21 |
|
*/ |
22 |
|
class ProductTypeChangePlainEnumValueOrderAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'attributeName' => [static::TYPE => 'string'], |
29 |
|
'values' => [static::TYPE => EnumCollection::class] |
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('changePlainEnumValueOrder'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $attributeName |
45 |
|
* @param EnumCollection $values |
46 |
|
* @param Context|callable $context |
47 |
|
* @return ProductTypeChangePlainEnumValueOrderAction |
48 |
|
*/ |
49 |
|
public static function ofAttributeNameAndValues($attributeName, EnumCollection $values, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setAttributeName($attributeName)->setValues($values); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Core/Request/ProductTypes/Command/ProductTypeSetInputTipAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method LocalizedString getInputTip() |
20 |
|
* @method ProductTypeSetInputTipAction setInputTip(LocalizedString $inputTip = null) |
21 |
|
*/ |
22 |
|
class ProductTypeSetInputTipAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'attributeName' => [static::TYPE => 'string'], |
29 |
|
'inputTip' => [static::TYPE => LocalizedString::class] |
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('setInputTip'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $attributeName |
45 |
|
* @param Context|callable $context |
46 |
|
* @return static |
47 |
|
*/ |
48 |
|
public static function ofAttributeName($attributeName, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setAttributeName($attributeName); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Core/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/Core/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 => LocalizedString::class], |
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/Core/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/Core/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/Core/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/Core/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/Core/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/Core/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 => LocalizedString::class], |
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 |
|
|
src/Core/Request/Types/Command/TypeChangeEnumValueOrderAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method array getKeys() |
20 |
|
* @method TypeChangeEnumValueOrderAction setKeys(array $keys = null) |
21 |
|
*/ |
22 |
|
class TypeChangeEnumValueOrderAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'fieldName' => [static::TYPE => 'string'], |
29 |
|
'keys' => [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('changeEnumValueOrder'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $fieldName |
45 |
|
* @param array $keys |
46 |
|
* @param Context|callable $context |
47 |
|
* @return TypeChangeEnumValueOrderAction |
48 |
|
*/ |
49 |
|
public static function ofNameAndEnums($fieldName, array $keys, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setFieldName($fieldName)->setKeys($keys); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Core/Request/Types/Command/TypeChangeLocalizedEnumValueOrderAction.php 1 location
|
@@ 23-54 (lines=32) @@
|
20 |
|
* @method array getKeys() |
21 |
|
* @method TypeChangeLocalizedEnumValueOrderAction setKeys(array $keys = null) |
22 |
|
*/ |
23 |
|
class TypeChangeLocalizedEnumValueOrderAction extends AbstractAction |
24 |
|
{ |
25 |
|
public function fieldDefinitions() |
26 |
|
{ |
27 |
|
return [ |
28 |
|
'action' => [static::TYPE => 'string'], |
29 |
|
'fieldName' => [static::TYPE => 'string'], |
30 |
|
'keys' => [static::TYPE => 'array'] |
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('changeLocalizedEnumValueOrder'); |
42 |
|
} |
43 |
|
|
44 |
|
/** |
45 |
|
* @param string $fieldName |
46 |
|
* @param array $keys |
47 |
|
* @param Context|callable $context |
48 |
|
* @return TypeChangeLocalizedEnumValueOrderAction |
49 |
|
*/ |
50 |
|
public static function ofNameAndEnums($fieldName, array $keys, $context = null) |
51 |
|
{ |
52 |
|
return static::of($context)->setFieldName($fieldName)->setKeys($keys); |
53 |
|
} |
54 |
|
} |
55 |
|
|
src/Core/Request/ProductTypes/Command/ProductTypeChangeInputHintAction.php 1 location
|
@@ 22-53 (lines=32) @@
|
19 |
|
* @method string getNewValue() |
20 |
|
* @method ProductTypeChangeInputHintAction setNewValue(string $newValue = null) |
21 |
|
*/ |
22 |
|
class ProductTypeChangeInputHintAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'attributeName' => [static::TYPE => 'string'], |
29 |
|
'newValue' => [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('changeInputHint'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $attributeName |
45 |
|
* @param string $inputHint |
46 |
|
* @param Context|callable $context |
47 |
|
* @return ProductTypeChangeInputHintAction |
48 |
|
*/ |
49 |
|
public static function ofAttributeNameAndInputHint($attributeName, $inputHint, $context = null) |
50 |
|
{ |
51 |
|
return static::of($context)->setAttributeName($attributeName)->setNewValue($inputHint); |
52 |
|
} |
53 |
|
} |
54 |
|
|
src/Core/Request/Carts/Command/CartSetLineItemPriceAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method Money getExternalPrice() |
20 |
|
* @method CartSetLineItemPriceAction setExternalPrice(Money $externalPrice = null) |
21 |
|
*/ |
22 |
|
class CartSetLineItemPriceAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'lineItemId' => [static::TYPE => 'string'], |
29 |
|
'externalPrice' => [static::TYPE => Money::class], |
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('setLineItemPrice'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param $lineItemId |
45 |
|
* @param Context|callable $context |
46 |
|
* @return CartSetLineItemPriceAction |
47 |
|
*/ |
48 |
|
public static function ofLineItemId($lineItemId, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setLineItemId($lineItemId); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Core/Request/Carts/Command/CartSetLineItemTotalPriceAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method string getLineItemId() |
20 |
|
* @method CartSetLineItemTotalPriceAction setLineItemId(string $lineItemId = null) |
21 |
|
*/ |
22 |
|
class CartSetLineItemTotalPriceAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'lineItemId' => [static::TYPE => 'string'], |
29 |
|
'externalTotalPrice' => [static::TYPE => ExternalLineItemTotalPrice::class], |
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('setLineItemTotalPrice'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param $lineItemId |
45 |
|
* @param Context|callable $context |
46 |
|
* @return CartSetLineItemTotalPriceAction |
47 |
|
*/ |
48 |
|
public static function ofLineItemId($lineItemId, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setLineItemId($lineItemId); |
51 |
|
} |
52 |
|
} |
53 |
|
|
src/Core/Request/Categories/Command/CategorySetAssetSourcesAction.php 1 location
|
@@ 22-52 (lines=31) @@
|
19 |
|
* @method AssetSourceCollection getSources() |
20 |
|
* @method CategorySetAssetSourcesAction setSources(AssetSourceCollection $sources = null) |
21 |
|
*/ |
22 |
|
class CategorySetAssetSourcesAction extends AbstractAction |
23 |
|
{ |
24 |
|
public function fieldDefinitions() |
25 |
|
{ |
26 |
|
return [ |
27 |
|
'action' => [static::TYPE => 'string'], |
28 |
|
'assetId' => [static::TYPE => 'string'], |
29 |
|
'sources' => [static::TYPE => AssetSourceCollection::class], |
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('setAssetSources'); |
41 |
|
} |
42 |
|
|
43 |
|
/** |
44 |
|
* @param string $assetId |
45 |
|
* @param Context|callable $context |
46 |
|
* @return CategorySetAssetSourcesAction |
47 |
|
*/ |
48 |
|
public static function ofAssetId($assetId, $context = null) |
49 |
|
{ |
50 |
|
return static::of($context)->setAssetId($assetId); |
51 |
|
} |
52 |
|
} |
53 |
|
|